On 18 Aug 2004, C. M. Sperberg-McQueen wrote: > [offline] > > > On Tue, 2004-08-17 at 22:25, [EMAIL PROTECTED] wrote: > > Ankit and Bob thanks for your replies. > > > > > > >(Note that some processors interpret the existence of > > >a DOCTYPE declaration as a request to validate the > > >document and abort if it's not valid; you will need > > >either to avoid those processors or find a way to tell > > >them just to read the DTD for the entity declarations.) > > > > > > Hi CM, > > > > > > Yes i think thats exaclty what is happening. Im using the Xalan > > processor. How > > do i get down to tell the processor to read the DTD for entity > > declarations only ? > > and not to look for element definitions ? > > > Good question. I hope someone else on the list knows. > > Can you just trap the error? > > Michael > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] >
This may be a little more complicated than is necessary, but working with collections of DTDs and Schemas is always problematic. Since you're using Xalan, consider using a SAX2SAX transform. In the SAX source set http://xml.org/sax/features/validation to be false. Your entities will come out expanded. In the SAXResult, set Content and LexicalHandler which just wrap around the TransformerHandler(this TransformerHandler will be the input to your actual transformation). Now in the Handlers which wrap the TransformerHandler just dont pass on the DTD events which will be obtained by your lexical handler. If I remember right, you should find code snippets in Xalan samples/trax. If efficiency is an issue you can bypass SAX2SAX and just do a Handler to source transform pretty similarly. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]