Re: [exslt] EXSLT: Date/time
by Charles V. Holmes other posts by this author
Aug 2 2007 8:41AM messages near this date
[exslt] EXSLT: Date/time
|
Re: [exslt] EXSLT: Date/time
& XSLT 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: exslt-bounces@[...].com
[mailto:exslt-bounces@[...].com] On Behalf Of Attila
Sent: Thursday, August 02, 2007 11:26 AM
To: exslt@[...].com
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
atteeela@[...].com
Thread:
Attila
Charles V. Holmes
Florent Georges
Attila
Florent Georges
Attila
Florent Georges
Florent Georges
|