Date: Mon, 26 Jun 1995 12:15:13 CDT Reply-To: Richard@light.demon.co.uk Sender: Text Encoding Initiative public discussion list From: Richard Light Subject: Re: RulesBuilder In message djbpitt+@pitt.edu writes: > > ***** BTW, a plea: someone said last year (?) that they had flattened > > ***** the TEI DTD to avoid all the inclusions (?) so that it > > ***** would load in Rules Builder for A/E. I can't find the ref > > ***** to this: can anyone point me at an FTP site? > ... > So, can anyone answer the original question? Or, to extend that question, > is there an efficient way to automate this DTD "flattening"? I am still > using an old version of the TEI DTDs, and I'd like a simple system for > taking revised DTD source, making the modifications required by > RulesBuilder, and rebuilding the rules files with my customizations. I've just had to deal with exactly this problem (of getting Rules Builder to compile a TEI-based DTD) for a museum-oriented TEI application. The problem is not actually the inclusions, it's the elements in content models which are not declared in their own right. TEI tends to have content models which include all possible elements - including ones you don't want to use and so 'IGNORE' in your custom DTD. This is valid SGML, but Rules Builder considers it a fatal error and won't continue. I've just written a program which writes out a 'flattened' version of a DTD, *and* removes all undeclared elements from content models. This worked with our DTD, apart from one element where *all* the alternatives in a model group were deleted, leaving an invalid empty model group: ()?, Rules Builder reported this, I deleted the offending characters, and it compiled. Presto! I'm happy in principle to make this program freely available to TEI users (and others?), but there is a problem. It works on the lookup files generated by the SGML Tagger program which I wrote a couple of years ago, so you would need a copy of that program as well. The SGML Tagger is a commercial (though not expensive) package, so I'm not allowed to give that away. Any comments or advice would be welcomed. [*Note: see http://www.sil.org/sgml/publicSW.html#normdtd ] Richard Light Museum information and SGML consultancy richard@light.demon.co.uk