<!-- OddRef.DTD:  tagdoc, attdoc etc. for ODD documents.      -->
<!-- This DTD defines tags to add to standard prose for ODD   -->
<!-- documents; it differs from P2XRef.dtd in content models, -->
<!-- but defines the same set of tags; both embed ComRef.dtd. -->
 
<!-- Revisions:                                               -->
<!-- 94-03-19 : MSM : Add def for CLASSES                     -->
<!-- 25 Feb 94 : MSM : clean up attlist for PART              -->
<!--  1 Apr 93 : MSM : redo type and name atts for Part       -->
<!-- 29 Feb 93 : MSM : add ce as legal tag set for Part       -->
<!-- 23 Nov 92 : MSM : add graphics as legal tag set for Part -->
<!-- 26 May 92 : MSM : catch up with LB by adding ana         -->
<!-- 18 Apr 92 :  LB : add ana as legal value for part        -->
<!--  9 Jan 92 : MSM : add Type attr, comment to ClassDoc.    -->
<!--  8 Jan 92 : MSM : tentatively require DESC in TagDoc.    -->
<!--    add EXT as value for Part name.                       -->
<!--  4 Jan 92 : LB, MSM : further minor changes.             -->
<!--  3 Jan 92 : LB, MSM : many changes.                      -->
<!--      kill DEF in all crystals (followed DESC)            -->
<!--      kill USAGE in most Xdocs, make attribute on TagDoc  -->
<!--      make PART empty, kill BOUND, STRUCT                 -->
<!-- 29 Dec 91 : MSM : clarify relation pedoc, classdoc       -->
<!--  7 Dec 91 : MSM : rename class as classes, suppress rep  -->
<!--      within classdoc, add new Classes element after Part -->
<!--         for superclasses (use this not parents)          -->
<!--  6 Dec 91 : MSM : require explicit end-tags on crystals  -->
<!--      change external entity names.                       -->
<!-- 29 Nov 91 : MSM : add comment to ClassDoc                -->
<!-- 27 Nov 91 : MSM : add xref to tagdoc etc.                -->
<!-- 26 Nov 91 : MSM : change globals to global passim        -->
<!--    make GI attribute optional on TAGDOC (it is no longer -->
<!--         the ID and it need not be used at all.  When we  -->
<!--         have a working ODD SYSTEM we can perhaps make    -->
<!--         GI the ID attribute of TAGDOCs.                  -->
<!-- 25 Nov 91 : MSM : made file from old tagdoc.dtd          -->
<!--                                                          -->
 
<!-- include material common to OddRef and P2XRef DTDs.       -->
<!ENTITY % comref  SYSTEM 'comref.dtd'                          >
%comref;
 
<!-- TagDoc:  gives a SYSTEMatic documentation for a given element.
This is based on TEI ED W5, the Formex manual, the MaJour manual, and
the appendices to ED W18 and ED W21 (Living with the Guidelines). -->
 
<!-- Version 1:  tagdoc is very permissive, so the first draft is easier
to construct.  The DtdOdd processor should produce values for all
elements required here, and start and end tags (no content) for all
elements additionally required in P2XREF.dtd.  -->
 
<!ELEMENT tagDoc        - -  (gi,
                             name?,
                             desc,
                             attList,
                             exemplum*,
                             remarks?,
                             part,
                             classes,
                             dataDesc?,
                             elemDecl,
                             xref+,
                             equiv*)                            >
<!ATTLIST tagDoc             %global;
          usage              (req | mwa | rec | rwa | opt) opt  >
 
<!-- Part:  what module (base, topping) is this element in?   -->
<!ELEMENT part          - O  EMPTY                              >
<!ATTLIST part               %global
          type               (common | base | top | aux)
                                                 #REQUIRED
          name               NAMES               #REQUIRED      >
 
<!-- Name att should use chapter codes:                       -->
<!--   ATTLIST part               %global;                    -->
<!--           type               (common | base | top | aux) -->
<!--                                                #REQUIRED -->
<!--           name               (ch, hd, co, ds,            -->
<!--                              pr, ve, dr, ts,             -->
<!--                              lm, di, lx, te,             -->
<!--                              cbge, cbmx, ud,             -->
<!--                              sa, ai, fs, ce, ph,         -->
<!--                              tc, nd, gd, gf,             -->
<!--                              ft, cc,                     -->
<!--                              sh, wd, fd, td,             -->
<!--                              ext)              #REQUIRED -->
 
 
<!-- Classes:  assigns an element to one or more classes; the -->
<!-- membership of a class is controlled from here, not from  -->
<!-- Members element of the ClassDoc crystal.                 -->
<!-- In Odd, name only direct-membership classes.             -->
<!-- In P2X, take transitive closure, possibly in parens      -->
<!ELEMENT classes       - O  EMPTY                              >
<!ATTLIST classes            %global;
          names              IDREFS              #IMPLIED       >
 
<!-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * -->
<!-- AttList:  list attributes for a given element.  All elements
are defined in ComRef.DTD.  -->
 
<!-- AttDoc does not occur within ODD documents; AttDoc elements in REF
files are generated by OddRef processors from TagDoc and AttList
elements in the ODD. -->
 
<!-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * --> <!--
EntDoc:  SYSTEMatic documentation of an entity entity.  OddRef will
generate an EntDoc from this, as well as from ClassDoc elements.  (i.e.
do not include an EntDoc element in an ODD for an element class.
Include EntDocs only for entities used for other things, whatever those
might be.)  In the normal course of events, a PEDecl in some DTDFrag
will refer to each EntDoc representing parameter entity.  -->
<!ELEMENT entDoc        - -  (entName,
                             name?,
                             desc,
                             remarks?,
                             string,
                             xref*,
                             equiv*)                            >
<!ATTLIST entDoc             %global;
          type               (pe | ge)           #REQUIRED      >
 
<!-- * * * * * * * * * * * * * * * * * * * * * * * * * * * *  -->
<!-- ClassDoc:  SYSTEMatic documentation of an element class; OddRef
will use this to generate a P2X ClassDoc with part, file, parents, and
members.  OddDTD and OddP2X will generate a parameter entity for this
class, however, only if some DTDfrag contains a PEDecl with a CLASS
attribute naming this class.  Superordinate classes are listed in
CLASSES.  PARENTS includes, as usual, names of GIs which use this class
in their content models.  PART is the name of the part in whose
documentation you will find this class documented; it is *not*
guaranteed that all members of the class will belong to that part.
Xref is required; in case of doubt, use P2.134 (general discussion of
classes, etc. -->
 
<!ELEMENT classDoc      - -  (class,
                             name?,
                             desc,
                             attList,
                             remarks?,
                             part,
                             classes,
                             xref+,
                             equiv*)                            >
<!ATTLIST classDoc           %global;
          type               (model | atts | both) #REQUIRED    >
 
<!-- N.B.  ClassDoc needs to carry type information in order that OddDTD
and OddP2X can process individual chapters of a document conveniently.
Without the Type attribute, one cannot know, in generating an attribute
list declaration for an element, whether its class memberships should
generate %a.class; references or not.  With the type attribute, one can
consult the classdoc crystal; if type = atts | both, then yes, the
attribute lists of all members should contain %a.class; references.
Without the type attribute, this information is available only from
ClaDecl elements within DTDfrags, and there is much greater chance that
they will be somewhere else and unavailable when needed for an
individual chapter or section.  -->
 
<!-- Attribute classes should either have local attribute definitions or
inherit attributes from their superclasses.  The members of an attribute
class should include at least one GI or at least one attribute class.
The PE for an attribute class is the concatenation of the names of the
superclasses from which it inherits attributes followed by the attdefs
it contains.  Complications for local overrides.  Attribute-only classes
should not be members of non-attribute classes, and it is pointless for
them to have non-attribute classes among their members.  -->
 
<!-- Model classes place no constraints on their superclasses, but must
have GIs or model classes among their members.  Model-only classes
should not have attribute-only classes among their members.  The PE for
a model class is the alternation of its members (elements represented
by their GIs, model classes represented by '%m.' || classname || ';',
non-model classes unrepresented). -->



