|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: A sequence of more than one item is not allowed as
This suggests that by specifying xs:string Saxon is jumping the gun and converting the text nodes (zero length text nodes as well - the leading comma) to strings before stage 2. the 6 stage process outlined was what xsl:value-of does given a sequence. When you put as="xs:string+" on the xsl:variable that forces a cast so that the sequence matches the specified type so that in this case $foo and $foo2 both contain the same sequence of three strings "" "abc" and "def" and then value-of does it's stuff and you get ",abc,def" for both of them. One thing that I hadn't noticed before this discussion is that the change to allow text nodes with zero length (but not to allow them as children of elements) (which happened in a recent draft) means that the common syntactic trick of writing <xsl:text/>abc<xsl:value-of ... rather than the more natural but more verbose <xsl:text>abc</xsl:text><xsl:value-of ... is no longer equivalent. The second form would have produced sequences of length 2 not sequences of length 3 in your examples (and no leading comma in your last result) David ________________________________________________________________________ This e-mail has been scanned for all viruses by Star. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk ________________________________________________________________________
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








