[XML-SIG] Re: using character entities in external DTD without validating

Kevin Russell krussll@cc.UManitoba.CA
Tue, 10 Apr 2001 16:30:29 -0500 (CDT)


Instead of trying to coerce a single set of tools to work on your files
without validation, it might be a better use of your time to come up with
a maximally vacuous DTD for your documents.  That way you'd still be able
to use your character references, but because you now have validatable
documents you wouldn't be tying yourself to any single toolset.

I'm thinking of a trivial DTD that's little more than a reference to the
external character sets plus the following for every element you've ever
used.

   <!ELEMENT xyz ANY>
   <!ATTLIST xyz
       ...stock list of every possible attribute you've ever used
       in any document... >

It probably wouldn't be too hard to write a Python program to read all
your files using a non-validating parser and generate such a DTD based
on the elements and attributes it encountered.

-- Kevin Russell