Re: using dates-and-times
James Fuller <[email protected]>
| Newsgroups | gmane.text.xml.xslt.extensions |
|---|---|
| Organization | FlameDigital |
| Message-ID | <[email protected]> |
Hassan H. Hussain wrote: > Hi, > > I am new to this. I have a project left by our previous developer. The > xsl uses the dates-and-times function. I need to duplicate this > functionality for another page in another project.(on a different server) > > All I can see in the old project is that > > > <xsl:stylesheet version="1.0" > xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > xmlns:cscdates="http://exslt.org/dates-and-times" > exclude-result-prefixes="cscdates"> > > I put the same header in my xsl file and tried to call the function > > <td valign="top" ><xsl:value-of > select="cscdates:formatdate(string(@modified_date),'MMMM > yyyy')"></xsl:value-of> </td> > > However, I am getting error > > > /Cannot find the script or external object that implements prefix > 'cscdates'./ EXSLT works in 2 ways a) either there exists a script or pure XSLT version of the functionality...in this case one imports this (using xsl:include/xsl:import) and uses call-template to invoke. To find out if a function *has* a pure XSLT implementation just check the EXSLT page on the site and download. NOTE: just import the single function, note the module level includes, including entire modules do not work properly due to limitations outside of EXSLT. or b) the XSLT processor natively implements the functionality...in this case one just has to declare the namespace properly and use...I recc. looking at SAXON (www.saxonica.com) as an example gl, Jim Fuller