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

 


Help: OASIS Mailing Lists Help | MarkMail Help

dita message

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


Subject: DTD Formatting: Element Alignment


ELEMENT alignment:

1) It's personal I know, Eliot, and I can live with your format.
It is more important that we be consistent than that we agree.
But in a large and complicated content model (20-50 elements)
the every line format is, IMO, very hard to read.

When I need to read your models, I use a graphical tool.


2) Quickly, now, is foo on the same level as bar or as the group:

<!ELEMENT foo
   ((bar |
     baz)+,
    foo*)
>

<!ELEMENT bar
   ((foo |
     baz)+,
    woo*)
>

See what I mean?

2) The models above may not be too different from:


<!ELEMENT  foo    ( (bar | baz)+, foo*)
>

<!ELEMENT  bar    ( (foo | baz)+, woo*)
>

But I know which I'd rather read, especially if there are multiple
element declarations and I want to eyeball the result as a comparison.
Further, I can scan element names quickly, even if the models are long.

3) The "as much as seems reasonable on a line" also lets you edit for
readability and do things like the example below. Admittedly, this is
a TERRIBLE content model used for teaching and not for real, but you
get the idea:

( (title,
     ( (chptitle, para*)+ |
       (sectitle, para*, (chptitle, para*)+ )+
     )
   )*, index
)


versus

((title,
   ((chptitle,
     para*)+ |
     (sectitle,
      para*,
      (chptitle,
       para*)+)+))*,
    index)

One can read either, but...

--debbie
-- 
======================================================================
Deborah Aleyne Lapeyre               mailto:dalapeyre@mulberrytech.com
Mulberry Technologies, Inc.                http://www.mulberrytech.com
17 West Jefferson Street                    Direct Phone: 301/315-9633
Suite 207                                          Phone: 301/315-9631
Rockville, MD  20850                                 Fax: 301/315-8285
----------------------------------------------------------------------
   Mulberry Technologies: A Consultancy Specializing in XML and SGML
======================================================================


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