[xsl] parameters to xsl file

Subject: [xsl] parameters to xsl file
From: "Laura Jenkins" <xsl_list@xxxxxxxxxxx>
Date: Mon, 18 Mar 2002 11:08:29 +0000

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



Current Thread