[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
Re: [xsl] passing a sequence as a parameter
Subject: Re: [xsl] passing a sequence as a parameter From: "Andrew Welch" <andrew.j.welch@xxxxxxxxx> Date: Tue, 26 Feb 2008 11:35:32 +0000 |
On 26/02/2008, Robert Walpole <robert.walpole@xxxxxxxxxxxx> wrote: > Hi, > > I am looking for a way of working with a sequence passed to a stylesheet > as a parameter. For example, I have an xml file as follows... > > <root> > <user> > <name>Robert</name> > <name>Adam</name> > <name>Graham</name> > </user> > </root> > > ...which I want to pass to my XSLT along with a parameter containing a > sequence of values, lets say ('true', 'false', 'true'). I then want to > iterate through the name elements, only outputing something when the > corresponding value in the sequence is 'true'. In this case I would want > to return > > <root> > <user> > <name>Robert</name> > <name>Graham</name> > </user> > </root> /root/user/name[position() = index-of(('true','false','true'), 'true')] cheers -- Andrew Welch http://andrewjwelch.com Kernow: http://kernowforsaxon.sf.net/
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] passing a sequence as a p, Geert Bormans | Thread | Re: [xsl] passing a sequence as a p, Colin Adams |
Re: [xsl] passing a sequence as a p, Geert Bormans | Date | Re: [xsl] passing a sequence as a p, Colin Adams |
Month |