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 January 12th, 2004, 04:01 AM
Registered User
 
Join Date: Jan 2004
Location: , , .
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?
Reply With Quote
  #2 (permalink)  
Old January 17th, 2004, 07:18 PM
Authorized User
 
Join Date: Jan 2004
Location: , , .
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

Reply With Quote
  #3 (permalink)  
Old August 9th, 2004, 08:14 AM
Registered User
 
Join Date: Aug 2004
Location: Hyderabad, Andhra Pradesh, India.
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
Reply With Quote
  #4 (permalink)  
Old September 22nd, 2004, 04:21 PM
Registered User
 
Join Date: Sep 2004
Location: , , .
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
Reply With Quote
  #5 (permalink)  
Old September 23rd, 2004, 12:57 AM
Registered User
 
Join Date: Jan 2004
Location: , , .
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/" />

Reply With Quote
  #6 (permalink)  
Old September 23rd, 2004, 04:51 AM
mhkay's Avatar
Wrox Author
Points: 18,487, Level: 59
Points: 18,487, Level: 59 Points: 18,487, Level: 59 Points: 18,487, Level: 59
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Apr 2004
Location: Reading, Berks, United Kingdom.
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/
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
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



All times are GMT -4. The time now is 07:55 PM.


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