rarararaha
Technical User
Hi,
I am very new to XML programming, so am looking for a quick fix. Basically, we have a ton of xml info submitted, and its handled by an xslt file. One of the fields has a product manufacture date in the form of 'YYYYMMDD' (which is then converted into 'YYYY-MM-DD' if that is relevent). What I really want to do though, is reject any submissions where the product age is greater than 5 years, with something like this as the error:
<Age_value broken-rule="Age_value element is more than 5 years old"/>
But what do I have as an 'if' statement?? I guess something that looks at <todays_date> and subtracts 5 years to see if it is more or less than the date submitted?
Any advice appreciated.
I am very new to XML programming, so am looking for a quick fix. Basically, we have a ton of xml info submitted, and its handled by an xslt file. One of the fields has a product manufacture date in the form of 'YYYYMMDD' (which is then converted into 'YYYY-MM-DD' if that is relevent). What I really want to do though, is reject any submissions where the product age is greater than 5 years, with something like this as the error:
<Age_value broken-rule="Age_value element is more than 5 years old"/>
But what do I have as an 'if' statement?? I guess something that looks at <todays_date> and subtracts 5 years to see if it is more or less than the date submitted?
Any advice appreciated.