File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes XML and Related Technologies and the fly likes XSLT Relative DTD Problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "XSLT Relative DTD Problem" Watch "XSLT Relative DTD Problem" New topic
Author

XSLT Relative DTD Problem

Michael Daniel Jones
Greenhorn

Joined: May 21, 2004
Posts: 1
Hi,
Hope you guys can help.
I am using XSLT to tranform a huge set of XML files the reflect the changes in a DTD due to the modification of the service that uses them.

Everything is set up but when I try to do the transform it cant find the DTD (because its a relative path for use inside the webapp). The code for the transformation looks like this.

TransformerFactory factory = TransformerFactory.newInstance();
Transformer transformer = factory.newTransformer(xsltSource);
transformer.transform(xmlSource, result);

I have tried to create a URI resolver but it never seems to be called.

My question is really how do I set the base url when using a Transformer?
Or more likely, what am I doing wrong

Thanks in advance.
Mike
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: XSLT Relative DTD Problem
 
Similar Threads
Getting error in XSL Transformation
JAXP transformations
xsl tokenize issue
How to use XSLT having struts tags in Struts
How to resolve conflict between XALAN and SUN trasformer