[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 10:04:09 +0100

> Yes but my original question was what was the type of
>
> <xsl:variable name="thing">"<xsl:value-of
> select="replace(.,',',concat($quot,',',$quot))"/>"</xsl:variable> and
> the value of the variable $quot is obvious.
>
> precisely because xs:string+ (although it types checks) wasn't giving
> the right result and omitting a type does.

Ahh - when you omit 'sequence type' (the as attribute) the contents of
the variable will be a document node with text node children, where
adjacent text nodes get merged.... leaving you with a document node
with a single text node child.



-- 
Andrew Welch
http://andrewjwelch.com


Current Thread