I'd like to increment the value of a date/time variable by a day in XSLT. I can create a new template and do it in the new template. I'm not sure if there are built-in extensions such as exslt or xalan that provide such a functionality.
Some basic questions in XSLT: 1 - What's the difference between a .xslt and a .xsl file? Identical? If they're identical, why use 2 names and not a single name?
2 - Technically, is a xslt or a xsl file runnable by itself without having an xml data file?
3 - When running a xslt or xsl file, how does the XSLT processor which xml file to map to this xslt file? Or vice versa, when an xml file does not directly refer to a xslt file as a style sheet, how does a processor know how to pick a xslt to display the xml data, and based on what criteria?
4 - I tried using date.zip from exslt.org web site but it seems that either their code is broken, or my xml editor (Altova's xmlpy) doesn't support it becuase I'm getting "Unexpected child" error when trying to include date.xsl from exslt.org. Any idea about that?
1. Extensions only mean something to the Windows operating system (and perhaps some others that I don't know anything about). You can name an XSLT file anything you like and software that processes it won't care about its extension. And why .xsl and .xslt? That dates back to when filenames could only be 8 characters and extensions only 3 characters.
2. It's possible to write an XSLT that doesn't require an input file, but uses the document() function to get all of its input.
3. How does an XSLT processor know where to find the XML to be transformed? You tell it where. Exactly how you tell it depends on the processor (read its documentation), and on whether you run it from the command line or from within a Java program or from some framework.
Hi Paul,just off the topic,are you the same guy on javasoft forum who posts by name DrClap?
Namma Suvarna Karnataka
Joined: Jan 15, 2004
1 - Where's document() getting its input info. from? 2 - Any idea where to get some reliable extensions for powerful date/time manipulation? Does xalan provide this? I tried exslt but it does not seem to be that reliable.