[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: PHP XSL adds Content-Type meta

Subject: RE: PHP XSL adds Content-Type meta
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Tue, 8 May 2007 10:31:40 +0100
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

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.