[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Scripting in XSL

Subject: Scripting in XSL
From: "Ajit Sawant" <adsawant@xxxxxxxxxxx>
Date: Thu, 22 Jul 2004 17:58:23 +0100
scripting in xsl
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/


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.