OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ANN] DoctypeChanger: pre-parse DOCTYPE manipulation



Hi,

I've extended a Java utility of Simon St.Laurent's[1,2], which allows
manipulating the DOCTYPE declaration of an XML stream before parsing.

This is useful when you want to validate an incoming XML document which
may have an incorrect or inaccessible DTD, or no DOCTYPE declaration at
all. The recent thread on "Interoperability" suggests that this is a
very common problem, only partially solved by custom EntityResolvers,
SOCATS, etc.

The code allows almost arbitrary flexibility; you can add a DOCTYPE
declaration, remove it, modify it (on a per-field basis), or
add/remove/modify conditionally, based on the old value.

It can be downloaded here:

http://opensource.socialchange.net.au/doctypechanger/

Documentation and examples here:

http://opensource.socialchange.net.au/doctypechanger/latest/apidocs/

It's under the Mozilla Public License 1.1, as was the original code.

All feedback appreciated :)

--Jeff

PS: I'm looking forward to the SAX people fixing this once and for all
with something like
http://sax.sourceforge.net/apidoc/org/xml/sax/ext/EntityResolver2.html


[1] http://www.simonstl.com/projects/doctypes/
[2] http://lists.xml.org/archives/xml-dev/200008/msg00145.html