atom feed4 messages in net.sourceforge.lists.saxon-helpRE: [saxon] Ignore Doctype tag
FromSent OnAttachments
vikr...@kodak.comMar 7, 2002 11:50 am 
Michael KayMar 9, 2002 1:33 am 
vikr...@kodak.comMar 11, 2002 10:29 am 
Michael KayMar 11, 2002 11:20 am 
Subject:RE: [saxon] Ignore Doctype tag
From:Michael Kay (mich@ntlworld.com)
Date:Mar 11, 2002 11:20:40 am
List:net.sourceforge.lists.saxon-help

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: saxo@lists.sourceforge.net [mailto:saxo@lists.sourceforge.net]On Behalf Of vikr@kodak.com Sent: 11 March 2002 18:03 To: mich@ntlworld.com Cc: saxo@lists.sourceforge.net 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("http://dir.server.com/vkekre/accessory_version3-4.dtd"); } 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.

-Vik

"Michael Kay" <mich@ntlworld.com> on 03/09/2002 04:33:53 AM

Please respond to <mich@ntlworld.com>

To: <vikr@kodak.com>, <saxo@lists.sourceforge.net> 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: saxo@lists.sourceforge.net [mailto:saxo@lists.sourceforge.net]On Behalf Of vikr@kodak.com Sent: 07 March 2002 19:50 To: saxo@lists.sourceforge.net 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 java.io.FileNotFound exception.

Thanks for the help.

Vik