Andy -

You could create your own SAX reader as shown at
http://xml.apache.org/xalan-j/usagepatterns.html#sax and do a
setEntityResolver() on that reader.  This would at least allow you to
use SAX support and bypass having to create a full DOM in memory.  At
the moment, XalanJ will create a full DTM in memory most likely but this
should save a little.

Gary

> -----Original Message-----
> From: Andy Jefferies [mailto:[EMAIL PROTECTED]
> Sent: Monday, February 18, 2002 3:41 AM
> To: '[EMAIL PROTECTED]'
> Subject: Locating DTD's whilst transforming with Streams
> 
> 
> 
> I'm using the jaxp interfaces to transform using xerces1.4.4
> and xalan2.2.0.  When I try to transform using the 
> Transformer supplying the XML & XSL as StreamSource's - I get 
> a SAXParseException detailing my DTD cannot be found.
> 
> I can solve this creating a Document through a
> DocumentBuilder and setting an EntityResolver to locate my 
> DTD, then suppying the Document to Xalan with a DOMSource, 
> but I was hoping there was a Xalan equivilent to EntityResolver?
> 
> Or is there a better way - some of my Document's can be up to
> 1Mb on disk, so I assume a Stream would be better than DOM.
> 
> Many thanks,
> Andy.
> 

Reply via email to