• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Devaka Cooray
  • Ron McLeod
  • paul wheaton
Saloon Keepers:
  • Tim Moores
  • Piet Souris
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Frits Walraven
  • Scott Selikoff

Getting error in XSL Transformation

 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
author and iconoclast
Posts: 24204
44
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Marshal
Posts: 27450
88
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you very much for your valuable inputs.
I am working on this.....
 
It will give me the powers of the gods. Not bad for a tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic