Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > XML > XSLT
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old October 10th, 2006, 02:26 AM
Authorized User
 
Join Date: Oct 2006
Location: , , .
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)
...
************************************************** ***********

Reply With Quote
  #2 (permalink)  
Old October 10th, 2006, 03:13 AM
joefawcett's Avatar
Wrox Author
Points: 9,763, Level: 42
Points: 9,763, Level: 42 Points: 9,763, Level: 42 Points: 9,763, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Exeter, , United Kingdom.
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)
Reply With Quote
  #3 (permalink)  
Old October 10th, 2006, 03:15 AM
mhkay's Avatar
Wrox Author
Points: 18,481, Level: 59
Points: 18,481, Level: 59 Points: 18,481, Level: 59 Points: 18,481, Level: 59
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2004
Location: Reading, Berks, United Kingdom.
Posts: 4,960
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
Reply With Quote
  #4 (permalink)  
Old October 10th, 2006, 04:18 AM
Authorized User
 
Join Date: Oct 2006
Location: , , .
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?)?



Reply With Quote
  #5 (permalink)  
Old October 10th, 2006, 06:07 AM
mhkay's Avatar
Wrox Author
Points: 18,481, Level: 59
Points: 18,481, Level: 59 Points: 18,481, Level: 59 Points: 18,481, Level: 59
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2004
Location: Reading, Berks, United Kingdom.
Posts: 4,960
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
Reply With Quote
  #6 (permalink)  
Old October 10th, 2006, 06:20 AM
Authorized User
 
Join Date: Oct 2006
Location: , , .
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!

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



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


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