Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


RE: [xsl] Error in XPath 2.0 expression Too many items

From: "Michael Kay" <mike@------------>
To:
Date: 1/3/2006 1:17:00 PM
> Just to speculate some more, I guess you have something like this:
> 
> <xsl:variable name="vCityStateZip">
>   <xsl:value-of select="city"/>
>   <xsl:value-of select="state"/>
>   <xsl:value-of select="zip"/>
> </xsl:variable>
> 
> and you really want:
> 
> <xsl:variable name="vCityStateZip" as="xs:string">
>   <xsl:value-of>
>     <xsl:value-of select="city"/>
>     <xsl:value-of select="state"/>
>     <xsl:value-of select="zip"/>
>   </xsl:value-of>
> </xsl:variable>
> 
> The former is sequence of several items, the latter is a 
> sequence of one item.

Actually, the former is a single item: a document node. An xsl:variable with
child instructions and no "as" attribute always produces a document node.

But IIRC there were reports that an early version of the Altova XSLT 2.0
processor got this wrong.

Michael Kay
http://www.saxonica.com/


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent