RE: [xsl] text() vs xs:string serialization (was: Re: [xsl] text extraction)

Subject: RE: [xsl] text() vs xs:string serialization (was: Re: [xsl] text extraction)
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Thu, 12 Oct 2006 17:00:55 +0100
> Am I correct in my understanding that the reason the 
> stylesheet below works, separating each item from the 
> <xsl:sequence/> with a single whitespace character, is due to
> 
>  http://www.w3.org/TR/xslt-xquery-serialization/#serdm
> 
> where a sequence of strings will be padded, but a sequence of 
> text nodes will not be?  

Almost but not quite. That text describes what happens if you serialize a
sequence of nodes, which never happens in XSLT - in XSLT you always
serialize a single document node. But the serializer spec is mimicking the
XSLT specification for what happens when you form the content of a document
or text node, which is described in 

http://www.w3.org/TR/xslt20/#constructing-complex-content

The important difference is that the spaces are part of the result tree,
they are not simply added during serialization.

Michael Kay
http://www.saxonica.com/

Current Thread