Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 10th, 2006, 02:26 AM
Authorized User
 
Join Date: Oct 2006
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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"
                xmlns:msxsl="urn:schemas-microsoft-com:xslt"
                xmlns:user="http://mycompany.com/mynamespace"
                version="1.0">
  <msxsl:script language="JScript" implements-prefix="user">
    function xml(nodelist) {
      return nodelist.nextNode().xml;
    }
  </msxsl:script>

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

... 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)
...
************************************************** ***********

 
Old October 10th, 2006, 03:13 AM
joefawcett's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

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)
 
Old October 10th, 2006, 03:15 AM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

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

Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference
 
Old October 10th, 2006, 04:18 AM
Authorized User
 
Join Date: Oct 2006
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,

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?)?



 
Old October 10th, 2006, 06:07 AM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

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
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference
 
Old October 10th, 2006, 06:20 AM
Authorized User
 
Join Date: Oct 2006
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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!






Similar Threads
Thread Thread Starter Forum Replies Last Post
Show CURRENT DATE when transforming XML using XSLT richieWolf XSLT 0 October 20th, 2007 07:47 PM
Exception when transforming using ksskumar XSLT 1 October 10th, 2006 02:33 AM
problem transforming XML using xslt micky3248 XSLT 7 August 18th, 2006 03:52 AM
Please help, xml transforming using xslt !!! daula7 XSLT 0 May 11th, 2006 01:29 PM
Transforming a result tree with yet another Xslt ballo XSLT 2 March 7th, 2006 09:42 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.