Re: [xsl] Generate Dynamic long value

Subject: Re: [xsl] Generate Dynamic long value
From: Matthew Hailstone <matthew.hailstone@xxxxxxxxx>
Date: Fri, 31 Jul 2009 13:43:47 -0600
We're using XALAN. I've downloaded the date.zip file
(http://www.exslt.org/date/date.html), but do I need to extract all
that and put it in a related path to the stylesheet? I'm getting IO
errors, and I probably need to resolve the hierarchy if needed.
Are you suggesting below that the processors have the functionality
already built in, and I should be able to use the element definitions
without importing?

i.e.

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
version="1.0" xmlns:date="http://exslt.org/dates-and-times";
extension-element-prefixes="date">
<xsl:import href="date/date.xsl" />

<xsl:template match="/">
<xsl:element name="dynamiclongvalue"><xsl:value-of
select="date:year"/></xsl:element>

</xsl:stylesheet>

OR

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
version="1.0" xmlns:date="http://exslt.org/dates-and-times";
extension-element-prefixes="date">

<xsl:template match="/">
<xsl:element name="dynamiclongvalue"><xsl:value-of
select="date:year"/></xsl:element>

</xsl:stylesheet>


Well.... I just tried it, and XALAN supports the date:year function

On Thu, Jul 30, 2009 at 2:34 PM, Michael Kay<mike@xxxxxxxxxxxx> wrote:
>>
>> I'm using XSLT 1.0 actually. What the extension functions to use?
>>
>
> Extension functions depend entirely on which XSLT processor you are using.
>
> Check whether your processor supports the EXSLT library (www.exslt.org).
>
> However, you should also note that XSLT 1.0 does not have a "long" data
> type: it only has double-precision floating point numbers.
>
> Regards,
>
> Michael Kay
> http://www.saxonica.com/
> http://twitter.com/michaelhkay

Current Thread