[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Question about variable assignment based on run-ti

Subject: Re: Question about variable assignment based on run-time value
From: Bill French <french@xxxxxxxxxxxxx>
Date: Mon, 02 Nov 2009 12:10:46 -0800
Re:  Question about variable assignment based on run-ti
Apologies -- I should have specified that I'm using XSLT 2.0.

Bill French wrote:
Hi all,

I'm trying to capture a sequence of nodes in a variable. The catch is that the nodes I capture can vary based on the local-name() of the element matched by the template.

I've got:

<xsl:variable name="label-nodes">
<xsl:choose>
<xsl:when test="local-name() = 'shared'">
<xsl:value-of select="rm:label[$page-type = tokenize(@pages, '\s*,\s*')]"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="rm:label"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>


Instead, I want the sequence of rm:label elements selected by the XPath expression in the xsl:value-of instruction's select attribute. But how do I select a sequence?

Many thanks in advance,

--Bill

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.