[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

Subject: Re: A sequence of more than one item is not allowed as the value of item
From: David Carlisle <davidc@xxxxxxxxx>
Date: Thu, 2 Jun 2005 11:15:16 +0100
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

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
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)


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:

Current Thread


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.