Subject: Re: [xsl] Typing variables From: Michael Kay <mike@xxxxxxxxxxxx> Date: Tue, 18 Sep 2012 10:09:37 +0100 |
Michael Kay Saxonica
On Tue, Sep 18, 2012 at 9:50 AM, Andrew Welch <andrew.j.welch@xxxxxxxxx> wrote:Yes but my original question was what was the type of...<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.
<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.
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Typing variables, David Carlisle | Thread | Re: [xsl] Typing variables, Ihe Onwuka |
Re: [xsl] Typing variables, Andrew Welch | Date | Re: [xsl] Typing variables, Ihe Onwuka |
Month |