Subject: RE: text() vs xs:string serialization (was: Re: 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 |
|
mus47 - 12 Oct 2006 12:47:36 -0000
mus47 - 12 Oct 2006 12:53:42 -0000
mus47 - 12 Oct 2006 14:20:48 -0000
|
|