Re: [xsl] PHP XSL adds Content-Type meta

Subject: Re: [xsl] PHP XSL adds Content-Type meta
From: Abel Braaksma <abel.online@xxxxxxxxx>
Date: Tue, 08 May 2007 11:08:01 +0200
Martynas Jusevicius wrote:

to the output. This is not needed, because the encoding is not known
at this point and negotiated later according to the HTTP headers.

This is (btw) an incorrect assumption: the encoding is very well known when you run XSLT. Both the input and the output encodings are vital parts of XSLT when running with a processor that is capable of serializing. Only when no serialization takes place, and the input is in-memory only, the encoding is not important (all there is is an input/output XML tree).


For
the same reason I cannot specify it directly in the <xsl:output>.

The 'meta' element has nothing to do with this (see prev message), but you must specify it (or, if you don't, it defaults to 'utf-8'). However, xsl:output is only used when you serialize the output.


Cheers,
-- Abel

Current Thread