xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cheun N Chong <cnc...@ecs.soton.ac.uk>
Subject Read ,Compare the value and do something
Date Mon, 22 May 2000 09:29:20 GMT

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






Mime
View raw message