Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: XSLT: Relative URI "my.dtd" can not be resolved without a base URI

From: Peter Flynn <peter.no-sp@-.--------.-->
To: NULL
Date: 8/4/2004 12:41:00 AM
Pavel wrote:

> Greetings to all -
> 
> I'm having a problem processing xml with relative dtd URI specified
> using XSLT:
> 
> <?xml version="1.0" encoding="utf-8" ?>
> <!DOCTYPE mydoc SYSTEM "my.dtd">
> <mydoc>
> ...
> </mydoc>
> 
> I do not have a control over the original xml but I have my.dtd in the
> app classpath. I'm getting the TransformerException: Relative URI
> "my.dtd" can not be resolved without a base URI.
> 
> How do I tell to javax.xml.transform.Transformer where to find the dtd
> file w/out specifying the base URI (or any other modifications of the
> original xml)?

The default is usually to look for the DTD in the same place as the document
instance. If you can work out where Java thinks the document is coming from,
and put the DTD in the same place (directory/pipe/stream) then it should 
find it.

///Peter
-- 
"The cat in the box is both a wave and a particle"
      -- Terry Pratchett, introducing quantum physics in _The Authentic Cat_


transparent
Print
Mail
Digg
delicious
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent