date/time EXSLT functions "not available"

Discussion in 'XML' started by Chris, Sep 18, 2005.

  1. Chris

    Chris Guest

    Can someone point me the right way? I'm trying to use the date/time
    extensions but with little luck. Here's what I've got:

    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:date="http://exslt.org/dates-and-times" >

    <xsl:template match="/" >
    date-time: <xsl:value-of select="date:date-time()"/>
    <!-- year: <xsl:value-of select="date:year()"/> -->
    </xsl:template>
    </xsl:stylesheet>

    If I execute this I get:
    <?xml version="1.0" encoding="UTF-8"?>
    date-time: 2005-09-18T22:05:57-05:00

    ...which is reasonable. However, if I un-comment the year line I get:
    XalanXPathException: The function number
    'http://exslt.org/dates-and-times:year' is not available.
    (file:///D:/support/xml/date-test.xslt, line 8, column 47)
    I can't seem to call any date-time function other than date-time.

    Why?

    I'm using Xalan-C++ 1.9.

    Thanks very much...
    Chris
     
    Chris, Sep 18, 2005
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Andy Fish
    Replies:
    0
    Views:
    640
    Andy Fish
    Jul 21, 2003
  2. Chris Berg
    Replies:
    0
    Views:
    1,046
    Chris Berg
    Oct 27, 2003
  3. Peter Grison

    Date, date date date....

    Peter Grison, May 28, 2004, in forum: Java
    Replies:
    10
    Views:
    3,756
    Michael Borgwardt
    May 30, 2004
  4. Andy Fish
    Replies:
    0
    Views:
    1,414
    Andy Fish
    Jul 21, 2003
  5. Chris Croughton

    EXSLT and regexp

    Chris Croughton, Jul 25, 2005, in forum: XML
    Replies:
    0
    Views:
    788
    Chris Croughton
    Jul 25, 2005
  6. Prashanth  Ellina

    Problem with EXSLT functions using 4xslt

    Prashanth Ellina, Aug 2, 2005, in forum: XML
    Replies:
    2
    Views:
    638
    Prashanth Ellina
    Aug 2, 2005
  7. Keith Cochrane
    Replies:
    2
    Views:
    835
    Keith Cochrane
    Aug 6, 2006
  8. Summu82
    Replies:
    5
    Views:
    1,096
    Richard Heathfield
    Jun 7, 2006
Loading...