cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gerritjan <gerritjankoekk...@mac.com>
Subject Xalan ESLT function date:date-add
Date Fri, 22 Oct 2004 19:34:05 GMT
Hello,

This XSLT:
<?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"
                 extension-element-prefixes="date xsl" >
   <xsl:import href="date.add.function.xsl" />
   <xsl:output method="xml"/>
   <xsl:param name="p_dagen_terug"/>

   <xsl:template match="onderwerpen">
     <xsl:variable name="d1"><xsl:value-of 
select="date:date()"/></xsl:variable>
     <xsl:variable name="d2"><xsl:value-of select="substring-before 
($d1, '+02:00')"/></xsl:variable>
     <xsl:variable name="d5"><xsl:value-of 
select="date:date-add($d2,'-P50D')"/></xsl:variable>
     <basis>
     1
     <xsl:value-of select="$d1"/>
     2
     <xsl:value-of select="$d2"/>
     5
     <xsl:value-of select="$d5"/>
     </basis>
   </xsl:template>

</xsl:stylesheet>

Gives this error;
org.apache.cocoon.ProcessingException: Failed to execute pipeline.: 
java.lang.RuntimeException: java.lang.RuntimeException: 
java.lang.NullPointerException

I'm not sure if Xalan supports this EXSLT function natively , but with 
'import' I was hoping to use this EXSLT function anyway
by the way: without the 'import' line I get the same error...
The 'imported' file is downloadable from www.exslt.org

Gerritjan Koekkoek
Mime
View raw message