I have a DTD with lots of ENTITY's, and want to explore the possible performance improvement during validation parsing by getting rid of them. Does anyone have a tool or a technique for pre-processing a DTD, yielding a new DTD without the ENTITY's? Ron
Do you just want to remove the entities, or transform them to something else?. Just to remove them is a job for something like a simple sed script, but is that a wise move? Presumably they are in the data for a reason.
Frank, The preprocessor must create a DTD that is *exactly* equivalent to the original DTD. For example, a DTD that contained this <!ENTITY % NAME "(FirstName, LastName)"> <!ELEMENT Mom (%NAME ;) > <!ELEMENT Dad (%NAME ;) > would instead contain this <!ELEMENT Mom (FirstName, LastName) > <!ELEMENT Dad (FirstName, LastName) > So, just like #define does its work in a C preprocessor and then disappears, the ENTITY definition would do it's thing in a DTD preprocessor and then disappear. Of course, in the DTD case preprocessing would just be a one time deal - done only if the master DTD changed. Ron [This message has been edited by Ron Olson (edited March 15, 2001).]