This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Java method call error


Hello,
below is the error I get

"XSLT Error (javax.xml.transform.TransformerException): Instance method call
to method todays requires an Object instance as first argument"

Can any one please find out what causes this error and whats the solution to
it.
below is the xsl code

<xsl:stylesheet
  version = "1.0"
         xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
         <xsl:script language="java" implements-prefix="Date"
         src="http://localhost:8100/servlet/systemstart.DateHandler";

xmlns:Date="http://localhost:8100/servlet/systemstart.DateHandler"/>

 <xsl:output method="html"/>
 <xsl:template match = "."><!-- -IN data.xml -XSL testdates.xsl -->

  <xsl:apply-templates select = "person-name"/>

  <xsl:apply-templates select = "person-address"/>
 </xsl:template>

 <xsl:template match = "person-name">
  <xsl:variable name ="today" select = "Date:todaysDate()"
xmlns:Date="http://localhost:8100/servlet/systemstart.DateHandler"/>
  <xsl:value-of select = "concat('todays date is : ',$today)"/>

  <xsl:value-of select = "."/>
 </xsl:template>

 <xsl:template match = "person-address">
  <xsl:value-of select = "."/>
 </xsl:template>
</xsl:stylesheet>

<xsl:stylesheet
  version = "1.0"
         xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
         <xsl:script language="java" implements-prefix="Date"
         src="http://localhost:8100/servlet/systemstart.DateHandler";

xmlns:Date="http://localhost:8100/servlet/systemstart.DateHandler"/>

 <xsl:output method="html"/>
 <xsl:template match = ".">
  <xsl:apply-templates select = "person-name"/>

  <xsl:apply-templates select = "person-address"/>
 </xsl:template>

 <xsl:template match = "person-name">
  <xsl:variable name ="today" select = "Date:todaysDate()"
xmlns:Date="http://localhost:8100/servlet/systemstart.DateHandler"/>
  <xsl:value-of select = "concat('todays date is : ',$today)"/>

  <xsl:value-of select = "."/>
 </xsl:template>

 <xsl:template match = "person-address">
  <xsl:value-of select = "."/>
 </xsl:template>
</xsl:stylesheet>



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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]