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

RE: XSLT/Java question

Subject: RE: XSLT/Java question
From: "Michael Kay" <mhk@xxxxxxxxx>
Date: Tue, 23 Dec 2003 17:27:51 -0000
xslt java
Perhaps you invoked the processor using the -jar option? In this case,
Java ignores the classpath setting. Use the "java
com.icl.saxon.Stylesheet" option instead.

This is just one possibility. It's difficult to solve problems like this
remotely. It definitely means that Saxon has asked Java to load the
class and Java is saying it can't; but there could be any number of
reasons for that, from the information given.

Michael Kay


> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx 
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of 
> pcarey@xxxxxxxxxxx
> Sent: 23 December 2003 16:33
> To: XSL-List@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  XSLT/Java question
> 
> 
> 
> Hello XSLT gurus.
> 
> I am using Saxon 6.5.3 and I would like to have access to 
> some java methods I've defined. I looked through the 
> archives, and I think I found the answer
> here: http://www.dpawson.co.uk/xsl/sect4/N9723.html.
> 
> For some reason, though, I cannot seem to get this to work. I 
> have been successful in using the built-in java classes (such 
> as java.lang.Math), but I'm stuck when trying to use my own 
> classes. Below are the relevant portions of XSLT and java. If 
> anyone has any ideas why this fails, I would be extremely grateful.
> 
> Thanks, Pete
> 
> 
> Here is the error: 
> ============================================================
> The URI java:TestClass does not identify an external Java class
> 
> 
> Here is my CLASSPATH: 
> ============================================================
> .;..;E:\XSLT_CLASSES;E:\saxon\saxon.jar
> 
> 
> Here is the java class, compiled in E:\XSLT_CLASSES: 
> ============================================================
> public class TestClass
> {
>     public static String returnMyName(){    }
> }
> 
> Here is the xsl:stylesheet element and its attributes: 
> ============================================================
> <xsl:stylesheet
>     version="1.0"
>     xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>     xmlns:saxon="http://icl.com/saxon"
>     xmlns:java="java:TestClass"
>     extension-element-prefixes="saxon">
> 
> 
> Here is where I attempted to call the returnMyName() method" 
> ============================================================
> <xsl:variable name="test-variable">
>     <xsl:value-of select="java:returnMyName()"/> </xsl:variable>
> 
> 
> 
> 
> 
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> 


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


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.