[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: Wed, 1 Jun 2005 13:34:42 +0100
RE:  A sequence of more than one item is not allowed as
> <xsl:template match="/">
>  <xsl:variable name="foo" as="item()*">
>    <xsl:text/>abc<xsl:sequence select="'def'"/>
>  </xsl:variable>
>
> By default spaces will be inserted when you value-of this but
> you can do
>
>  <xsl:value-of select="$foo" separator=""/>
>
> to get abcdef

Thanks for all the info, it certainly forces you to really understand
what's going on.

However, if I use item()+ instead of xs:string+:

<xsl:variable name="foo" as="item()+">
	<xsl:text/>abc<xsl:value-of select="'def'"/>
</xsl:variable>

<xsl:value-of select="$foo"/>

I get 'abcdef' - there's apparently no need for separator="" (it gets
ignored, as separator=" " also has no effect).

In fact, using text()+ or node()+ also ignore the separator attribute.

Is this the expected behaviour?

cheers
andrew

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.