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

Compare the value and do something

Subject: Compare the value and do something
From: Cheun N Chong <cnc99r@xxxxxxxxxxxxxxx>
Date: Sat, 20 May 2000 11:57:42 +0100 (BST)
bestbefore
Hi,

	I am a newbie. I have several questios about XSLT. 
I have the following XML documents:
   <STUFF>
	<MILK>
		<BESTBEFORE>20 May 2000</BESTBEFORE>
		<CONDITION>still can drink</CONDITION>
	</MILK>

	<PORK>
		<BESTBEFORE>20 July 2000</BESTBEFORE>
		<CONDITION>freeze</CONDITION>
	</PORK>
   </STUFF>   

I am wondering whether XSLT can do the following (like normal
programming):


	1. Pass in a value to the XSL, eg. the current date.
	2. Compare the current date to the <BESTBEFORE> tag value.
	3. Change the <CONDITION> value if it is expired, if not preserve
	   the value. 

	Another question:

	Can XSL do "reading the value of <BESTBEFORE> set it to a
variable" (I have tried to use <xsl:param> and <xsl:variable>) and pass it
to another template, eg. pass the <BESTBEFORE> value of <MILK> to the
<BESTBEFORE> of <PORK>?


	I really need your expertise for this. Thousand thanks!


		

Best regards,
Cheun Ngen CHONG




 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.