xsl-list
[Top] [All Lists]

Re: [xsl] Generate Dynamic long value

2009-07-31 15:44:24
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(_at_)saxonica(_dot_)com> 
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


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--