xsl-list
[Top] [All Lists]

Re: [xsl] xsl:sequence

2006-08-08 06:30:20
On 8/8/06, David Carlisle <davidc(_at_)nag(_dot_)co(_dot_)uk> 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 " ").

--~------------------------------------------------------------------
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>
--~--

<Prev in Thread] Current Thread [Next in Thread>