Task #8012 (closed)
Opened 12 years ago
Closed 12 years ago
XML parsing: fail gracefully if DTDs cannot be resolved
Reported by: | mlinkert | Owned by: | mlinkert |
---|---|---|---|
Priority: | minor | Milestone: | OMERO-4.4 |
Component: | Bio-Formats | Version: | n.a. |
Keywords: | n.a. | Cc: | |
Resources: | n.a. | Referenced By: | n.a. |
References: | n.a. | Remaining Time: | n.a. |
Sprint: | n.a. |
Description
There are two ways to handle this, both of which I think involve overriding the resolveEntity method in DefaultHandler?. First option is to just ignore the DTDs entirely:
public org.xml.sax.InputSource resolveEntity(String publicId, String systemId) throws org.xml.sax.SAXException, java.io.IOException { System.out.println("Ignoring: " + publicId + ", " + systemId); return new org.xml.sax.InputSource(new java.io.StringReader("")); }
second option is to timeout if the DTD cannot be resolved within some set amount of time (1 minute? 5 minutes?).
Change History (1)
comment:1 Changed 12 years ago by mlinkert
- Resolution set to fixed
- Status changed from new to closed
Note: See
TracTickets for help on using
tickets.
You may also have a look at Agilo extensions to the ticket.