p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   XSLT (http://p2p.wrox.com/forumdisplay.php?f=86)
-   -   Exception when transforming using XSLT (http://p2p.wrox.com/showthread.php?t=48830)

ksskumar October 10th, 2006 02:26 AM

Exception when transforming using XSLT
When I am trying to transform an XML using the following XSLT ...

************************************************** ****************
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  <msxsl:script language="JScript" implements-prefix="user">
    function xml(nodelist) {
      return nodelist.nextNode().xml;

  <xsl:template match="/">
    <xsl:value-of select="user:xml(.)"/>
************************************************** ***********

... I am getting the below exception,
"The URI javascript does not identify an external Java class"

This is happening whenever I invoke a function written in an <msxsl:script> block.

Please help.

The full exception is:

************************************************** *
javax.xml.transform.TransformerException: javax.xml.transform.TransformerException: The URI http://mycompany.com/mynamespace does not identify an external Java class
        at com.icl.saxon.IdentityTransformer.transform(Identi tyTransformer.java:92)
        at com.logistics.javalib.xml.XSLFilterChainTransforme r.transform(XSLFilterChainTransformer.java:185)
        at com.logistics.messaging.router.translators.XMLToXM LTranslator.translateOutbound(XMLToXMLTranslator.j ava:253)
        at RouterOperations.TranslateAndSend(RouterOperations .java:2581)
        at sun.reflect.GeneratedMethodAccessor21.invoke(Unkno wn Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at com.wm.app.b2b.server.JavaService.baseInvoke(JavaS ervice.java:287)
        at com.wm.app.b2b.server.invoke.InvokeManager.process (InvokeManager.java:587)
        at com.wm.app.b2b.server.invoke.StatisticsProcessor.p rocess(StatisticsProcessor.java:44)
        at com.wm.app.b2b.server.invoke.ServiceCompletionImpl .process(ServiceCompletionImpl.java:229)
************************************************** ***********

joefawcett October 10th, 2006 03:13 AM

As far as I know only the MSXML family of processors support using msxml:script blocks. Java processors tend to support Java script (NOT JavaScript!).


Joe (Microsoft MVP - XML)

mhkay October 10th, 2006 03:15 AM

Your stylesheet contains proprietary Microsoft extensions but you are running it through Saxon which does not recognize those extensions.

Michael Kay
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference

ksskumar October 10th, 2006 04:18 AM


Thanks for the prompt response.

We already have a setup wherein we use a webMethods server which internally invokes the Saxon parser.

The XSLT has the <msxsl:script> block and it is beyond our control to modify the XSLT.

Could you please suggest a work-around for the problem (,if any?)?

mhkay October 10th, 2006 06:07 AM

You can either modify the stylesheet so it doesn't depend on the Microsoft parser, or you can modify your application setup so that the stylesheet is processed by the Microsoft parser instead of Saxon.

If neither of those is easy, then I'm sorry, but there's nothing I can do to make it easier.

Michael Kay
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference

ksskumar October 10th, 2006 06:20 AM

Thanks for your reply.

Unfortunately, both these options are not possible! No question of these being easy or not!

We probably have to ask the department concerned to modify their XSLT.

Thanks again!

All times are GMT -4. The time now is 12:56 PM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.