Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Getting error in XSL Transformation

 
Vallidevi Appana
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all

I have one xhtml file and I want to tranform to another xhtml by changing some of the attributes.

So I am using xsl to do this transformation. I have used Xalan XSL Transformer for this.

My input xhtml document has doctype element.

<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>

When I ran Xalan, I got the following error:

(Location of error unknown)XSLT Error (javax.xml.transform.TransformerException)
: java.net.ConnectException: Connection timed out: connect


If I am removing the doctype element from the input xhtml file, then I am getting proper output.

What might be the problem??
Thanks in advance.
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24211
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Vallidevi Appana:

What might be the problem??


You're specifying a DTD out on the Internet, and Xalan's trying to fetch it. Apparently that's not working on your machine, due to some network configuration issue.
 
Paul Clapham
Sheriff
Posts: 21107
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What does that DOCTYPE mean? It says "Get the DTD from this location on the Internet: http://... and use it to validate the document", right? So the parser will try to get the DTD from that location.

And only when you use the DOCTYPE, you get the message "Connection timed out: connect". The logical conclusion is that the parser is trying to get the DTD from the Internet, but it can't connect to that location.

So that probably means your program can't connect to the Internet. (It's also possible that it just couldn't connect to http://www.w3.org, but that is less likely.)

If your program is running in an environment where you have to go through a proxy server to get to the Internet, then you have to tell the program where that proxy server is. Here's an article that explains that:

http://www.javaworld.com/javaworld/javatips/jw-javatip42.html

That is most likely the problem, but it could be something else.
 
Vallidevi Appana
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much for your valuable inputs.
I am working on this.....
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic