The use of fn: functions in XSL - XPath

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Rutger Claes

    The use of fn: functions in XSL - XPath

    Hello,

    In an XSL stylesheet, that I apply using an XSLTProcessor() in PHP5, I would
    like to use the function fn:month-from-dateTime( ). I found this function
    at: http://www.w3schools.com/xpath/xpath...s.asp#datetime
    I get the error message:
    xmlXPathCompOpE val: function month-from-dateTime not found

    Is the use of these functions not supported in php? Or am I using them
    wrong?

    I use it as follows:
    xml data:
    <entry>
    <submitDate>
    2005-01-10T12:30-04:10
    </submitDate>
    </entry>

    xsl stylesheet:
    <xsl:styleshe et version="1.0"
    xmlns:xsl="http ://www.w3.org/1999/XSL/Transform"
    xmlns:fn="http://www.w3.org/2005/02/xpath-functions">
    ...
    <xsl:template match="entry">
    <xsl:value-of select="fn:mont h-from-dateTime( submitDate )" />
    </xsl:template>
    ...
    </xsl:stylesheet>

    Thanks in advance,
    Rutger Claes
    --
    Rutger Claes rgc@rgc.tld
    Replace tld with top level domain of belgium to contact me pgp:0x3B7D6BD6
    Do not reply to the from address. It's read by /dev/null and sa-learn only

Working...