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

Re: Passing arrays into XSL

Subject: Re: Passing arrays into XSL
From: Alex von Thorn <avt@xxxxxxxxxxxxxx>
Date: Wed, 01 Mar 2006 01:31:20 -0500
alex thorn
Date: Sat, 25 Feb 2006 16:53:13 -0800 (PST)
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
From: Deepak <deepak_vn@xxxxxxxxx>
Subject: Re:  Passing arrays into XSL
Message-ID: <20060226005313.24515.qmail@xxxxxxxxxxxxxxxxxxxxxxxxxxx>

Hi Jern,

Thanks for your help.

But my need is bit different, we have to match with
the strings from the variable or the parameter from a
servlet response.

  So i need to match those strings available in the
'param' with actual xml file. The xml file nodes may
be more than blue,red colors.  So the XSL display
should be depends on the values available in the
param. The parameter string may be with a delimiter
','(red, blue) or '' (red blue).

<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:param name="arrayString">
   blue,red
</xsl:param>


There are ways you can do this, you just need to think like XML. For example:

in the XML file


<colors> <color index="1">red</color> <color index="2">blue</color> <color index="3">green</color> ... </colors>


and then your XSL might look like


<xsl:param name="colorArray">
   <colorArray>
      <color>blue</color>
      <color>red</color>
   </colorArray>
</xsl:param>
<!-- code follows -->



Alex von Thorn
http://worldhouse.com/alex/

"They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -- Benjamin Franklin

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.