Date.xsl - incorrect function reference in example

Subject: Date.xsl - incorrect function reference in example
From: Brigitte Fenton <bfenton@xxxxxxxxxxxxx>
Date: Mon, 30 Aug 1999 13:31:52 -0400
Hi:

Being that I just spent about an hour trying to figure out what was going
wrong with the "date.xsl" example from J. Clark
(http://www.jclark.com/xml/xt.html - see: Extension Functions), I thought
I'd save 'someone' a bit of time by pointing out the error.

In the example given, i.e. 


   <xsl:stylesheet
     xmlns:xsl="http://www.w3.org/XSL/Transform/1.0";
     xmlns:date="http://www.jclark.com/xt/java/java.util.Date";
     xmlns="http://www.w3.org/TR/REC-html40";
     result-ns="">

   <xsl:template match="/">
     <html>
       <xsl:if test="function-available('date:to-string') and
function-available('date:new')">
         <p><xsl:value-of select="date:to-string(date:new())"/></p>
       </xsl:if>
     </html>
   </xsl:template>

   </xsl:stylesheet>


change "function-available..." to "extension-function-available".  (I don't
know if it makes a difference, but I also removed the 'result-ns=""'.  Note
that I'm using the LATEST win32 version of xt.)


good luck,
brigitte


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread