Altova Mailing List Archives>Archive Index >xsl-list Archive Home >Recent entries >Thread Prev - [xsl] Question about variable assignment based on run-time value [Thread Next] Re: [xsl] Question about variable assignment based on run-time valueTo: "xsl-list@-----.------------.---" <--------@-----.------------.---> Date: 11/2/2009 8:11:00 PM 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 > > --~------------------------------------------------------------------ > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list > To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/ > or e-mail: <mailto:xsl-list-unsubscribe@l...> > --~-- > > --~------------------------------------------------------------------ XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/ or e-mail: <mailto:xsl-list-unsubscribe@l...> --~-- | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
