RE: [xsl] HTML Output & PI

Subject: RE: [xsl] HTML Output & PI
From: "Michael Kay" <michael.h.kay@xxxxxxxxxxxx>
Date: Wed, 30 Oct 2002 17:34:27 -0000
It's a good question. Saxon buffers the formatted comments and PIs until
it knows what the output method is. Technically I suppose it should
buffer the unformatted events and only format them when it knows the
output method.

I would love to file this under "not important enough to worry about"...

Not knowing the output method in advance is a pig: really, I would like
to know it statically, so that I can do the escaping of fixed text and
attribute values at compile time. But we have to live with the specs
that we're given...

Michael Kay
Software AG
home: Michael.H.Kay@xxxxxxxxxxxx
work: Michael.Kay@xxxxxxxxxxxxxx 

> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx 
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of 
> Kevin Jones
> Sent: 30 October 2002 13:59
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: [xsl] HTML Output & PI
> 
> 
> 
> I have a question on the output format for processing 
> instructions when no 
> output method is set. For HTML a XSLT processor is supposed to use 
> '>' rather than '?>' to terminate a processing instruction. 
> However if you 
> use,
> 
> <xsl:template match="/">
> 	<xsl:processing-instruction 
> name="a">b</xsl:processing-instruction>
> 	<html/>
> </xsl:template>
> 
> with Instant Saxon 6.5 the output is,
> 
> <?a b?><html/>
> 
> I am assuming that Saxon does not determine the output should 
> be HTML until 
> after the PI has been output. To handle this correctly would 
> clearly require 
> some form of output lookahead is used when formating output 
> which would be 
> nasty to implement. So,
> 
> 1. Is Saxon non-conformant here?
> 2. If it is are there likely to be any adverse effects? 
> Browser issues?
> 
> Thanks,
> Kev.
> 
> 
> 
> 
> 
> 
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> 
> 


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread