This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Pass variables from template to another template
- To: XSL-List at mulberrytech dot com
- Subject: Pass variables from template to another template
- From: Cheun N Chong <cnc99r at ecs dot soton dot ac dot uk>
- Date: Thu, 25 May 2000 12:16:36 +0100 (BST)
- Reply-To: xsl-list at mulberrytech dot com
Dear all,
I am wondering how to pass one variable from one template to
another template. I have the following XML codes:
<STUFF>
<TYPE>milk</TYPE>
<CONDITION>still can drink</CONDITION>
<FEATURES>
<EXPIREDATE>5 May 2000</EXPIREDATE>
<BRAND>ASDA</BRAND>
</FEATURES>
</STUFF>
Now I have an XSL codes to pass in the expire date (<xsl:param
name="expire" />) and read the values at the tag <EXPIREDATE>... Now I am
not sure how to compare two variables, and change the <CONDITION> value?
For example I pass in the "10 May 2000" and then compare it with
the "5 May 2000", and change the <CONDITION> to "expired". I am not sure
how to pass the two variables into the <CONDITION> template in XSL.
Please give me some hints for doing this. Thousand thanks.
Best regards,
Cheun Ngen CHONG
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list