[Mod_transform] meta tag created but not wanted, and not ended

Paul Querna chip at force-elite.com
Tue Dec 7 10:14:42 EST 2004


Stanislas Ormieres wrote:
> Hello, I am quite new to mod_transform, and I don't know why it creates
> a meta tag in the <head> (<meta http-equiv="Content-Type"
> content="text/html; charset=UTF-8">), especially a <meta> withtout /> at
> the end which make it impossible to parse with mozilla and firefox.
> 

It generates it without the trailing / because libxslt thinks it is in 
HTML mode.

[snip]
> movie.xsl :
> 
> <?xml version="1.0" ?>
> <xsl:stylesheet version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

Adding the following should 'fix' it:
   <xsl:output
         method="xml"
         version = "1.0"
         encoding="UTF-8"
         omit-xml-declaration="no"
         indent="yes"
         doctype-public="-//W3C//DTD XHTML 1.1//EN"
         doctype-system="http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"
          />
> <xsl:template match="/">
> <html>
>   <head>
>     <title>Movie Catalog Transformed</title>
>   </head>
>   <body>
>     <h1>My Movie Catalog</h1>
>     <hr/>
>     <xsl:for-each select="/MovieCatalog/movie">
>     <h2><xsl:value-of select="title" /></h2>
>     </xsl:for-each>
>   </body>
> </html>
> </xsl:template>
> </xsl:stylesheet>

Thanks for using mod_transform :)

-Paul


More information about the Mod_transform mailing list