xsl-list
[Top] [All Lists]

Scripting in XSL

2004-07-22 09:58:23
Hello

I want to do some scripting in xsl using Java. (and this is my first time!!!)

I am getting Namespace 'xalan:java.util.Date' does not contain any functions.

I am using XMLSPY EE version 2004 rel 3.

Also modified tools --> options > c:\xyz\xalan.jar org.apache.xalan.xslt.Process -IN %1 -XSL %3 -OUT %2

Here is my xsl

--------------------
<?xml version="1.0" encoding="UTF-8"?>

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
               xmlns:xalan="http://xml.apache.org/xalan";
               version="1.0">

<xsl:output method="xml" indent="yes" omit-xml-declaration="yes" />

<xalan:script language="javaclass" src="xalan:java.util.Date"  />

<xsl:template match="DOB">

<xsl:variable name="date" select="Date:toString(Date:new())" xmlns:Date="xalan:java.util.Date" />
         <DOB>$date</DOB>

</xsl:template>


<xsl:template match="@* | node()">

          <xsl:copy>

            <xsl:apply-templates select="node()" />
            <xsl:apply-templates select="@*" />

          </xsl:copy>

</xsl:template>

</xsl:stylesheet>
-----------------

I would like to use core java classes

Do I need to modify classpath etc.

Any help would be appreciated

Thanks
Ajit

_________________________________________________________________
Want to block unwanted pop-ups? Download the free MSN Toolbar now! http://toolbar.msn.co.uk/



<Prev in Thread] Current Thread [Next in Thread>