OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: Comments within DTDs (Teapot not tempest)

[ Lists Home | Date Index | Thread Index ]
  • From: Deborah Aleyne Lapeyre <dalapeyre@mulberrytech.com>
  • To: xml-dev@ic.ac.uk
  • Date: Thu, 9 Apr 1998 12:26:44 -0700 (PDT)

Chris and company,

1)  We do the same.  Element name comment just before
element. Attribute value comment between the element
declaration and the ATTLIST.  It's fine:

<!--                     NAME OF ELEMENT                -->
<!ELEMENT thiselement    (contentmodel)                   >
<!--         id:         Unique identifier for the element
             role:       One of
                          good:  looks like Toshiro Mifune
                          bad:   looks like Clint Eastwood
                          ugly:  looks like Paula Jones
             whatever    I don't care; put something
                         here                           -->
<!ATTLIST thiselement
             id          ID                  #IMPLIED
             role        (good|bad|ugly)     "good"
             whatever    CDATA               #REQUIRED    >

Like good typesetting, we try for a small number of
verticals.  This also lets you scan quickly for full
element name, tag name, or attribute name.

2) But I confess that I miss the old SGML days, where
our house style looked more like this:

<!--                     NAME OF ELEMENT                -->
<!ELEMENT thiselement    (contentmodel)                   >
<!ATTLIST thiselement

          -- id          Unique identifier for element  --
             id          ID                #IMPLIED

          -- role        One of:
                         good  looks like Toshiro Mifune
                         bad   looks like Clint Eastwood
                         ugly  looks like Paula Jones  --
             role        (good|bad|ugly)   "good"

          -- whatever    I don't care; put something
                         here                           --
             whatever    CDATA             #REQUIRED      >

Which was:
   1)  Easier to scan for elements (at least to my eye)
   2)  Put the attribute comment directly with its
       attribute, very nice if there are more than 10
       attributes.
   3)  Easier (for me the weak programmer) to write a
       hack that would pull of the attrbute and its
       comment together.

We lost this battle in the "ease of parsing" wars.
No biggie, the new way works fine.


--Debbie












======================================================================
Deborah A. Lapeyre                   Phone: 301/315-9631
Mulberry Technologies, Inc.          Fax:   301/315-8285
17 West Jefferson Street, Suite 207  E-mail: dalapeyre@mulberrytech.com
Rockville, MD  20850                 WWW: http://www.mulberrytech.com
======================================================================



xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo@ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS