xsl-list
[Top] [All Lists]

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

2006-10-12 09:01:33
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/


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--