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


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:


Documentation and examples here:


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

All feedback appreciated :)


PS: I'm looking forward to the SAX people fixing this once and for all
with something like

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