Subject:Year Calculation Author:Miranda Newman Date:09 Feb 2007 11:03 AM
Hi everyone - I was hoping someone might know an answer to the problem I'm having. I'm a bit green at XSLT so I appreciate your patience. I have a form where the user enters a date into a date box. The output in the XML is MM/DD/YYYY. I want to take the year as a numeric amount and add 5 onto it so that the expiration year will print on the form five years from now. I could force users to enter the Month, day and year as separate fields and then add five onto the year entry, but I'd like to make it as easy for the users as possible. If anyone has any suggestions, I'd be very appreciative. Thanks in advance.
Subject:Year Calculation Author:Tony Lavinio Date:09 Feb 2007 11:25 AM
You didn't us much to go on.
1. Which version of Stylus Studio are you using?
2. Which XSLT processor? Can you do XSLT 2.0?
Assuming, since this is the Stylus Studio support forum, that you
have our product, and that you are using XSLT 1.0, attached is a
solution for you. If you're not using Stylus Studio, why not? :)