[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: PHP XSL adds Content-Type meta
XSLT 1.0 specifies that when you use the HTML output method, the serializer will add a <meta> element containing the media type and encoding. This normally causes no problems, because the encoding is known at this point (it's the responsibility of the serializer to get it right). XSLT 2.0 however does allow you to switch this behaviour off using <xsl:output include-content-type="no"> - this can be useful if you want to transcode the document after serialization and before HTTP delivery. Your snippet suggests you are using method="xml"; if that's the case then no <meta> element should be added. Michael Kay http://www.saxonica.com/ > -----Original Message----- > From: Martynas Jusevicius [mailto:martynas.jusevicius@xxxxxxxxx] > Sent: 08 May 2007 09:44 > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx > Subject: PHP XSL adds Content-Type meta > > Hi all, > > I'm using PHP's XSL extension (which uses libxsl, AFAIK). > When I specify > > <xsl:output method="xml" encoding="UTF-8" indent="yes" > doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" > doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"/> > > the processor adds > > <meta http-equiv="Content-Type" content="text/html; > charset=UTF-8" /> > > to the output. This is not needed, because the encoding is > not known at this point and negotiated later according to the > HTTP headers. For the same reason I cannot specify it > directly in the <xsl:output>. > Is it possible to turn this feature (bug?) off? > > Thanks, > > Martynas
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|