Subject: Re:Re: [xsl] Current date in a Xsl variable From: logchem.news@xxxxxxxxx Date: Wed, 10 Sep 2003 12:01:09 +0200 |
Hi M.David, When I use your code, I get the error: "Error in XPath expression, Function not in namespace" Do you know whats wrong? Thanks, Peter Xsl file: ______________________________________________________ <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:my="urn:my-scripts"> <xsl:output method="html"/> <xsl:template match="root"> <html><head> <script type="JavaScript" implements-prefix="my"><![CDATA[ function returnDate(){ var d, s; d = new Date(); s += (d.getMonth() + 1) + "/"; s += d.getDate() + "/"; s += d.getYear(); return(s); } ]]></script> </head><body> <xsl:variable name="date" select="my:returnDate()"/> <p>Today: <xsl:value-of select="$date"/></p> </body></html> </xsl:template> </xsl:stylesheet> _____________________________________________________ Xml file: _____________________________________________________ <?xml version="1.0" encoding="UTF-8"?> <root> <naam>Peter</naam> <datum>2000-08-28T15:39:49</datum> <dag>28</dag> <maand>3</maand> <jaar>2000</jaar> </root> ______________________________________________________ -- _____________________________________________________________________ Snel en voordelig ADSL nu voor iedereen bereikbaar. Zon Breedband Budget vanaf EUR 14,95 per maand. Nu tijdelijk geen aansluitkosten. Bestel snel op zonnet.nl/breedband XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Current date in a Xsl var, M. David Peterson | Thread | Re:Re: [xsl] Current date in a Xsl , Rajendra S Rawat |
Re: AW: [xsl] XPATH restricting pre, David Carlisle | Date | AW: [xsl] XPATH restricting precedi, Kloeck, Erwin |
Month |