[Home] [By Thread] [By Date] [Recent Entries]

  • From: Chris Maloney <voldrani@g...>
  • To: John Cowan <cowan@c...>
  • Date: Tue, 14 Jul 2015 15:33:46 -0400

With Jeff Beck's help on the XSLT, I went ahead and implemented this in our DtdAnalyzer. For the record, in case anyone else is interested, it is here: http://dtd.nlm.nih.gov/ncbi/dtdanalyzer/. The new utility is called "dtdflatten".

One known limitation is that it does not preserve any NOTATION declarations.

John, I had a look at your DTDCrunch, and yes, I think that's more than we want -- I definitely want to preserve the ability to validate against the flattened DTD.  Also, it looks like maybe you have an escaping problem.  In xhtml1-crunched.dtd, you have
    <!ENTITY quot """ >
You need to escape the quote mark.  We ran into this same problem in our first iteration.

Cheers!
Chris Maloney

On Tue, Jul 14, 2015 at 10:04 AM, John Cowan <cowan@c...> wrote:
Scripsit Chris Maloney:

> Yes, I just did, without luck. Trying to flatten NLM DTD journal publishing
> 3.0, it hung on `Element mml:none`. I poked around a little bit in the perl
> code, but couldn't figure it out.

My DTDCrunch might do more than you want: it crunches a (potentially multi-file)
DTD into the minimal information required by a non-validating parser.  Entity
declarations are preserved; attribute declarations are preserved unless they are
of type CDATA and have no default value; element declarations are preserved only
if the element has element-only content, and then in the trivial form
<!ELEMENT foo (foo)>.  There is one declaration per output line.

--
John Cowan          http://www.ccil.org/~cowan        cowan@c...
                .e'osai ko sarji la lojban.
                Please support Lojban!          http://www.lojban.org





[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member