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

Re: passing a sequence as a parameter

Subject: Re: passing a sequence as a parameter
From: Geert Bormans <geert@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 26 Feb 2008 12:38:40 +0100
Re:  passing a sequence as a parameter
At 12:31 26/02/2008, you wrote:
why don't you pass a string instead of a sequence?
use tokenise() to make it a sequence in the XSLT
and index-of to help you with selecting the <name> you want to output

in code

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
<xsl:output indent="yes"></xsl:output>
<xsl:param name="my_params">true,false,true</xsl:param>
<xsl:param name="params_seq" select="tokenize($my_params, ',')"></xsl:param>
<xsl:template match="/root">
<xsl:template match="user">
<xsl:copy-of select="name[position() = index-of($params_seq, 'true')]"/>

Current Thread


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.
First Name
Last Name
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.