atom feed4 messages in net.sourceforge.lists.saxon-helpRE: [saxon] Ignore Doctype tag
FromSent OnAttachments
vikr...@kodak.comMar 7, 2002 11:51 am 
Michael KayMar 9, 2002 1:34 am 
vikr...@kodak.comMar 11, 2002 10:30 am 
Michael KayMar 11, 2002 11:21 am 
Subject:RE: [saxon] Ignore Doctype tag
From:Michael Kay (
Date:Mar 11, 2002 11:21:02 am

No, I can't see anything obviously wrong with this. How did you nominate this EntityResolver for Saxon (or rather AElfred) to use?

-----Original Message----- From: []On Behalf Of Sent: 11 March 2002 18:03 To: Cc: Subject: RE: [saxon] Ignore Doctype tag

From: Vikram Kekre

Hi Michael, thanks for the help. I tried implementing the EntityResolver as you suggested. I did so as follow's:

import org.xml.sax.*;

public class myResolver implements EntityResolver {

public InputSource resolveEntity(String publicId, String systemId) {

if (systemId.equals("..\..\Checkout\accessory_version3-3.dtd") { return new InputSource(""); } else { return null; }



However when I run saxon using this code (which I saved as a .java file) I get an error (It just says Transformation failed). Can you see anything wrong with my above code? Thanks in advance.


"Michael Kay" <> on 03/09/2002 04:33:53 AM

Please respond to <>

To: <>, <> cc: Subject: RE: [saxon] Ignore Doctype tag

The AElfred XML parser that is built-in to Saxon will always try to read the DTD. You might be able to find another XML parser that doesn't, but your best bet is either to preprocess the XML to remove the DTD reference, or to write an EntityResolver that returns a dummy DTD when the relevant URL is requested. See the SAX parser documentation for how to do this.

-----Original Message----- From: []On Behalf Of Sent: 07 March 2002 19:50 To: Subject: [saxon] Ignore Doctype tag

From: Vikram Kekre

The XSLT's I have written to transform a series of XML's fail because the DOCTYPE tag in the XML's point to a DTD that I do not have. Is there a way for Saxon to ignore the doctype tag and not try to resolve its path? If so how? When I currently run the process I get a exception.

Thanks for the help.