[Prev][Next][Index][Thread]

Name groups in ELEMENT and ATTLIST Decls




I have ploughed through the mail archive of this group looking for any arguments for or against
the removal of name groups in the element type part of an ELEMENT and ATTLIST declaration. 
i.e. <!ELEMENT (a|b|c|d)  ...........
I was suprised to find none, considering how widely used this construction is in SGML DTDs.
I have looked at many of the popular DTDs, ISO12083, AECMA, IBMIDDOC, DOCBOOK, HTML, etc.
Every DTD I have looked at (with one exception) used name groups in their declarations to a greater or lesser extent.

While popularity is not the main reason for promoting a feature, I believe that this piece of syntax
is useful in XML for a number of reasons:

- Losing this feature would entail expanding out name groups in the DTD. In cases where this feature is extensively used
   the DTD would grow significantly and in some cases the maintainability of the structure would be greatly reduced. 
   e.g. The number of element declarations in ISO12083 DTD for articles would nearly double without this feature.

- Parameter entities to 'name' sets of elements is used by those who have to scan the DTD text 'in the raw' are a great boon 
   to the clarity of the DTD. 
   e.g. from ISO12083 DTD for articles
   <!ENTITY % pub.ph  "fpage|lpage|coden|acqno|issn|acidfree|price|extent|artid|category|pubid" 
                  -- publication related front matter material            -->
  .
  .
  <!ELEMENT (%pub.ph;)  - O  (#PCDATA) >

- Remarks have been made about re-admitting tag minimisation characters into the syntax to preserve
   compatibility between SGML and XML DTDs. Although I realise that DTDs for both languages can be written
   without using name groups, I believe there is an argument for them being placed in the same class of compatibility
   features.

- I believe that until more graphic DTD creation tools abound the use of name groups, coupled with parameter entities
   is significant in easing the creation of new DTDs.



        Martin Pike,     Stilo Technology      
        -------------------------------------
        Email: mp@stilo.demon.co.uk
        Phone/Fax: +44 (0) 1222 483530
        WWW:  http://www.demon.co.uk/stilo
        -------------------------------------