[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] xsl:sequence


Subject: Re: [xsl] xsl:sequence
From: "andrew welch" <andrew.j.welch@xxxxxxxxx>
Date: Tue, 8 Aug 2006 14:29:59 +0100

On 8/8/06, David Carlisle <davidc@xxxxxxxxx> wrote:

> right? Right. What did i say...I check sent mail.... ah so I got _both_ wrong. <xsl:value-of select="foo"/> generates a text node with value "one two" should, as you say, be "onetwo" (actually it was right when I wrote it, I changed the input example before sending:-) but then my description of the <xsl:value-of select="foo/text()"/> was also wrong, as described in another thread. I give up.

I think this is a good example:


<root>
 <foo>text</foo>
 <foo>text</foo>
</root>

<xsl:value-of select="/root"/>

produces "texttext" (with whitespace only nodes stripped)

This is because it's the string value of the <root> element - a
sequence of length one.

<xsl:value-of select="/root/foo"/>

produces "text text"

This is because it's the string value of each <foo> element - a
sequence of length two.

As there are two items in the sequence they are concatenated using the
optional separator (the default being " ").


Current Thread