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

Re: list of Values

Subject: Re: list of Values
From: "Dimitre Novatchev" <dnovatchev@xxxxxxxxx>
Date: Thu, 27 Nov 2003 19:46:55 +0100
list of values
"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

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.