Re: [xslt] xhtml meta tag oddness



Hi Toby.

There is a discussion between Rob Richards and Daniel Veillard about this precise topic on the xml:gnome.org list yesterday and today.

Topic title : [xml] XHTML Doc serialization and meta element

The meta tag is being inserted by the serialisation process.
Descriptions of how, why and fixes for it are part of the discussion.


Mike


Toby White wrote:

The following stylesheet:

-----------------------------
<xsl:stylesheet version="1.0"
       xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
       xmlns="http://www.w3.org/1999/xhtml";
       >

 <xsl:output method="xml" version="1.0" encoding="UTF-8"
      omit-xml-declaration="no" standalone="yes"
      doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
      doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";
      indent="yes" media-type="application/xhtml+xml"/>

 <xsl:template match="/">
   <html>
     <head>
       <title>Web Page</title>
     </head>
   </html>
 </xsl:template>
</xsl:stylesheet>
------------------------------

produces this output:

------------------------------
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
<html xmlns="http://www.w3.org/1999/xhtml";>
 <head>
   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
   <title>Web Page</title>
 </head>
</html>
------------------------------

Note the <meta> tag that's been inserted - and note that it's advertising a content-type of "text/html" when I've specified
in the stylesheet that I want a media-type of "application/xhtml+xml".


Where is the meta tag coming from, and how do I fix it?

(This is with:
toby% xsltproc --version
Using libxml 20620, libxslt 10114 and libexslt 812
xsltproc was compiled against libxml 20616, libxslt 10112 and libexslt 810
libxslt 10114 was compiled against libxml 20619
libexslt 812 was compiled against libxml 20619
)
_______________________________________________
xslt mailing list, project page http://xmlsoft.org/XSLT/
xslt gnome org
http://mail.gnome.org/mailman/listinfo/xslt

Message Scanned by ClamAV on datalucid.com




-- Datalucid Limited


Message Scanned by ClamAV on datalucid.com



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]