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

RE: parameters to xsl file

Subject: RE: parameters to xsl file
From: Bagchi Ratul <bratul@xxxxxxxx>
Date: Tue, 19 Mar 2002 04:37:08 +0100
send parameters xsl file
You should use xsl:variable tag and set the value of id from some script and
u can put the select statement as
<xsl:for-each select = "/root/program/@id=$variable">
That will do it.
Best of luck.
-----Original Message-----
From: Laura Jenkins [mailto:xsl_list@xxxxxxxxxxx]
Sent: Monday, March 18, 2002 4:38 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject:  parameters to xsl file



hello

I have a doubt.
I have an xsl that has to run on a condition..
for example

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

<xsl:template match="/">

<xsl:for-each select = "/root/program/@id='VARYING_ID'">
.. DO SOME STUFF..
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
i have to run this xsl based on the id which could be varying..
and this id is not from xml file..
is there a way that i pass on this id as a parameter to xsl file(quite weird

??? ) like the command line argument??

or some way that xsl knows about this variable. i basically want the similar

behaviour of passing on a parameter to a batch file

i am thinking of a way that would be to give these varying ids( which are 
actuallyfixed in number ) in a property file kind of a file( which would be 
an xml file) and then make my xsl read this xml through import..

so if i have and xml file( the id defining xml file ) which looks like
<definingids>
<var id = 1>varid1</var>
<var id = 2>varid2</var>
<var id = 3>varid3</var>
</definingids>

and i run xsl for each definingids/var .. Is it a right approach or is there

any other way to do this?
laura

_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

 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.