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 January 12th, 2004, 04:01 AM
Registered User
 
Join Date: Jan 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Exception in generating a new transformer

When switching to jre 1.4.2 I have a problem to generate a new transformer using:

TransformerFactory transformerFactory =
        javax.xml.transform.TransformerFactory.newInstance ();
Source xsl = new StreamSource(...);
transformerFactory.newTransformer(xsl);

The exception thrown is ConfigurationTransformerExcpetion: A location step was expected following the '/' or '//' token.

This exception does not occur in earlier JDKs and in any case it occurs only for part of my XSL files.

Is there a change in the XSL format that causes this exception?
 
Old January 17th, 2004, 07:18 PM
Authorized User
 
Join Date: Jan 2004
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I am not sure if it has anything to do with / or //. However, i know that when jdk1.4 was packed, it was shipped with older version of Xalan processor (which has TransformerFactory class) ver. 1.4 i think, and apache foundation has been using 2.0+. So, i think u need to put ur xalan-XXx.jar file b4 xxxx/tools.jar and xxxx/rt.jar and xxx/dt.jar. Try this. I had problems with Xalan package and jdk 1.4 when i was using XML database, Xindice, and after i changed the classpath it worked fine.

-Nikolas

 
Old August 9th, 2004, 08:14 AM
Registered User
 
Join Date: Aug 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to pspraveen_99 Send a message via Yahoo to pspraveen_99
Default

I'm using latest java(1.4.2_04) and xalan(2.6) versions and I'm also gettting the same error. I have also put xalan and xerces jars on top in the classpath.

" org.mortbay.util.MultiException[javax.servlet.ServletException: javax.xml.transform.TransformerConfigurationExcept ion: javax.xml.transform.TransformerException: javax.xml.transform.TransformerException: A location step was expected following the '/' or '//' token"

Please help if anyone knows about the solution...



Praveen
 
Old September 22nd, 2004, 04:21 PM
Registered User
 
Join Date: Sep 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi am getting the same problem. javax.xml.transform.TransformerConfigurationExcept ion: javax.xml.transform.Trans
formerException: javax.xml.transform.TransformerException: A location step was e
xpected following the '/' or '//' token. I am using latest xalan . Does any one find solution on this. please post here
Thanks
 
Old September 23rd, 2004, 12:57 AM
Registered User
 
Join Date: Jan 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

To fix this problem I had to remove any relative path from the XSL script, such as
<xsl:variable name="location" select="../results/" />

 
Old September 23rd, 2004, 04:51 AM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

A path expression never ends in "/", except for "/" used on its own to refer to the root node.

Michael Kay
http://www.saxonica.com/





Similar Threads
Thread Thread Starter Forum Replies Last Post
XSLT 2.0 Transformer for Java albinjoseph XSLT 1 March 2nd, 2007 04:05 AM
transformer does not detect some tags in my srcXML mishoch XSLT 0 August 9th, 2006 09:08 AM
Transformer.transform throws DOM006 error saladin XML 0 October 13th, 2004 08:53 AM
generating words kozam C++ Programming 1 September 30th, 2003 12:55 PM
generating words kozam C++ Programming 1 September 30th, 2003 12:54 PM





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