[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Xalan complains about relative DTD URL in transfor

Subject: RE: Xalan complains about relative DTD URL in transformed document
From: "Michael Kay" <michael.h.kay@xxxxxxxxxxxx>
Date: Fri, 30 Aug 2002 23:13:05 +0100
saxparseexception relative uri
This isn't actually an XSLT problem, it's a JAXP/SAX problem...

Specify a base URI for the source document by calling setSystemId() on
the SAXSource object, and perhaps on the InputSource object as well.

Note that a SAX parser must convert a relative URI to an absolute URI
before it calls your EntityResolver.

Michael Kay
Software AG
home: Michael.H.Kay@xxxxxxxxxxxx
work: Michael.Kay@xxxxxxxxxxxxxx 

> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx 
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of 
> David Byrden
> Sent: 30 August 2002 13:26
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  Xalan complains about relative DTD URL in 
> transformed document
> 
> 
> 
> 
>          I'm using JDK14 to transform some XML
> documents that reference a DTD with a relative URL.
> 
>          I'm getting this exception:
> org.xml.sax.SAXParseException: Relative URI "../../text 
> bodies.dtd"; can 
> not be resolved without a base URI.
> 
>          Believe me I've spent time on this, and the
> code I'm using now is from a solution posted to this
> list by J.Pietschmann:
> 
> 
> Transformer tr = 
> TransformerFactory.newInstance().newTransformer( transform ) 
> ; SAXParserFactory saxParserFactory = 
> SAXParserFactory.newInstance() ; 
> saxParserFactory.setValidating( false ) ; XMLReader xmlReader 
> = saxParserFactory.newSAXParser().getXMLReader() ; 
> xmlReader.setEntityResolver( new MyResolver() ) ; 
> tr.transform( new SAXSource( xmlReader, src ), res ) ;
> 
> Unfortunately it does not work, in that the MyResolver
> is not even called on to resolve anything before
> the exception occurs.
> 
> Any ideas? I do want to use a relative URL for the DTD.
> 
>                                                          David
> 
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> 


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.