Re: EXSLT: Date/time
"Holmes, Charles V." <[email protected]> Thu, 2 Aug 2007 11:40:45 -0400
| Newsgroups | gmane.text.xml.xslt.extensions |
|---|---|
| Message-ID | <[email protected]> |
I'm relatively new to this too, but did you import your extension
module/function? It will require downloading the templates before
importing however. The following example is a stylesheet I've defined
that might be helpful.
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:math="http://exslt.org/math"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
extension-element-prefixes="math">
<xsl:import href="math.sin.xsl" />
<xsl:import href="math.cos.xsl" />
<xsl:output method="xml" />
<xsl:variable name="PI" select="math:constant('PI',10)"/>
--
Charles
________________________________
From: [email protected]
[mailto:[email protected]] On Behalf Of Attila
Sent: Thursday, August 02, 2007 11:26 AM
To: [email protected]
Subject: [exslt] EXSLT: Date/time
Hi,
I'm new to extensions, I have the "sets" exslt extensions
working without having to download anything for Apache Xalan-J, however
date/time does not work!
Here is my code for date/time:
<?xml version=" 1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:date=" http://exslt.org/dates-and-times
<http://exslt.org/dates-and-times> >">
<xsl:output method="text"/>
Documentation Generated: <xsl:value-of select="date:date()"/>
...(truncated)
This produces the error:
XalanXPathException: The function number
'http://exslt.org/dates-and-times>:date' is not available.
(file:///C:/p4/dev/aaros/devmain_aa/SimTools/SimulatorTools/Generate_Co
nfigDocumentation_TEXT.xsl, line 16, column 62)
1>Error generating TEXT documentation, return code: 65280
Yet when I use "sets", it works fine just like this:
<xsl:stylesheet version="1.0"
xmlns:xsl=" http://www.w3.org/1999/XSL/Transform
<http://www.w3.org/1999/XSL/Transform> "
xmlns:set="http://exslt.org/sets">
...(truncated)
Any ideas why date/time doesn't work out of the box for
Xalan-J?
Thanks a lot
--
Attila
Software Developer
[email protected]
_______________________________________________
exslt mailing list
[email protected]
http://www.exslt.org/list