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

Re: [xsl] Typing variables

Subject: Re: [xsl] Typing variables
From: Andrew Welch <andrew.j.welch@xxxxxxxxx>
Date: Tue, 18 Sep 2012 09:50:25 +0100

>        <xsl:variable name="val">"<xsl:sequence
> select="replace(.,',',
> If you type $val as xs:string+ you don't get the right result, if you
> type it as xs:string it doesn't type check.

Thats because you have a text node (the ") then the xsl:sequence... so
you will always get a sequence of more than 1 item.

If you want to use xs:string, you need to make sure the contents of
the variable is sequence of 1 item.

Andrew Welch

Current Thread