Subject: [xsl] Re: list of Values From: "Dimitre Novatchev" <dnovatchev@xxxxxxxxx> Date: Thu, 27 Nov 2003 19:46:55 +0100 |
"Bruno LLopes" <brunollopes@xxxxxxx> wrote in message news:BAY3-DAV40id4PNJGol0003e5c7@xxxxxxxxxxxxxx > Hi, > How can I create a list of values? > > I want select n values from the xml file and put them in one list > to pass with-param to one template, something like this: > > <xsl:call-template name="tempName"> > <xsl:with-param name="$paramName" select="$listValues"/> > > </xsl:call-template> > > where listValue have for exemple the elements 'a' , 'b', 'c', 'd' In XSLT 2.0 the way to do this is using a sequence (created e.g. with xsl:sequence) with the obvious caveat that none of the values can be a sequence itself. In XSLT 1.0. such a list can be represented as a node-set, e.g. <list> <el>a</al> <el>b</al> <el>c</al> <el>d</al> </list> This representation is more general and does not have the problem of XSLT 2.0 sequences stated above. FXSL for XSLT 1.0 uses extensively the latter representation of lists. FXSL for XSLT 2.0 (the last yet unreleased version) uses a sequence to represent a list of atomic values. In the cases when an item of the sequence must represent a list itself, this list is represented by a node-set and the top-level node of this representation is a single item in the containing sequence. ===== Cheers, Dimitre Novatchev. http://fxsl.sourceforge.net/ -- the home of FXSL XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] list of Values, Bruno LLopes | Thread | Re: [xsl] list of Values, David Tolpin |
RE: [xsl] Search a string, Jarno . Elovirta | Date | [xsl] Re: how to optimize recursive, Dimitre Novatchev |
Month |