Re: [xsl] Tools to Flatten a DTD

Subject: Re: [xsl] Tools to Flatten a DTD
From: "C. M. Sperberg-McQueen cmsmcq@xxxxxxxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 23 May 2023 16:41:14 -0000
"rick@xxxxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> writes:

> Hi All,

> I have a DTD with a bunch of external references. I need to modify the
> DTD and distribute it to a client. Can you recommend any tools for
> flattening a DTD? Thank you.

Does the output need to retain internal parameter entity references, or
may all parameter entity references be expanded?

If the latter, I think there was a program by the name of neko that
should be handy, if you have better luck finding it than I just did: it
translates to XML, expanding all PE references, and you can write a
stylesheet to re-serialize its output in DTD notation.

You could do the same thing with the DTD parser I wrote many years ago
(and last updated about ten years ago), but when I put the source on the
web I seem not to have included any documentation, so you're on your
own:

  https://blackmesatech.com/2013/02/dpp/src/

Sometimes I think I should dust it off and document it, but every time I
do, I also think the time could be more usefully spent writing a
recursive-descent parser for DTDs in XSLT or XQuery.  Someday.

Michael Sperberg-McQueen

-- 
C. M. Sperberg-McQueen
Black Mesa Technologies LLC
http://blackmesatech.com

Current Thread