[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: "Andrew Welch" <ajwelch@xxxxxxxxxxxxxxx>
Date: Thu, 2 Jun 2005 17:12:27 +0100
RE:  A sequence of more than one item is not allowed as
>    You can either do:
>   >
>   <xsl:variable name="foo" as="xs:string">
>    <xsl:value-of>
>     <xsl:text>abc</xsl:text><xsl:value-of select="'def'"/>
>    </xsl:value-of>
>    </xsl:variable>
>
> aha! that's what i suggested originally:-)

The problem with this is that it's a two pronged attack - you need both
the 'as' attribute and the xsl:value-of.  Couple that with a
xsl:value-of within a xsl:value-of and it's beginning to look like you
are making it up!

I think I'm just finding it difficult to grasp that adjacent text nodes
get merged, adjacent strings do not:

 <xsl:value-of separator=",">
   <xsl:value-of select="'abc'"/>
   <xsl:value-of select="'def'"/>
 </xsl:value-of>

Gives 'abcdef'

 <xsl:value-of separator=",">
   <xsl:sequence select="'abc'"/>
   <xsl:sequence select="'def'"/>
 </xsl:value-of>

Gives 'abc,def'

The statement 'value-of select returns a text node, sequence select
returns a string' helps here I think...

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

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.
Email
First Name
Last Name
Company
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.