[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ANN] DoctypeChanger: pre-parse DOCTYPE manipulation
- To: email@example.com
- Subject: [ANN] DoctypeChanger: pre-parse DOCTYPE manipulation
- From: Jeff Turner <firstname.lastname@example.org>
- Date: Mon, 19 Nov 2001 20:29:59 +1100
- Mail-followup-to: email@example.com
- User-agent: Mutt/1.3.23i
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,
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