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

Re: [xsl] Selecting from a sequence

Subject: Re: [xsl] Selecting from a sequence
From: "Michael Müller-Hillebrand mmh@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 5 Feb 2015 19:52:48 -0000

> <xsl:variable name="foo1"/>
>  <xsl:variable name="bar1" select= "'world'"/>
>  <xsl:value-of select="($foo,$bar)[1]"/> <!--first-->
>    <xsl:value-of select="(string($foo1),$bar1)[1]"/><!--Second-->
> First worked but second did not work
> I was expecting "World" to be output to the result ..

Oh no, string($foo1) gives you an empty string, which is a valid first member
of the sequence, so that is what you get.

- Michael

Current Thread