Lists Home |
Date Index |
- From: Deborah Aleyne Lapeyre <firstname.lastname@example.org>
- To: "XML Dev" <email@example.com>
- Date: Mon, 1 Mar 1999 18:52:31 -0400
Mark Anderson wrote:
>any words of wisdom regarding:
>1) having an extra collection layer in the xml tree, like
If you have ANY reason to think you may need the collection layer,
put it in. Reasons you might want it include things like:
a) Reuse - <thing>s are frequently used together
and you want electronic cut-and-paste and/or
even a really stupid parsing algorithm to be
able to find them all easily.
The converse is the same, if you want to ignore
all <thing>s, group them.
b) You need some sort of behavior or formatting
at the collection level. This could be as simple
as wanting a new indent level in the
generated toc. This is the most
common reason in practice.
c) For correct hierarchical layering, <thing>s
just aren't as big and important as <another>s
so they don't belong at the same level.
etc. Yes, much of this could also be done by asking
if you are the first <thing> among your siblings, etc.
But sometimes event-driven processing is easier or faster
than tree walking, and a containing element gives you
>2) having PCDATA vs. having a distinct "comment" or "description" element
><thing a="1" b="2">this is the description of this thing
><thing a="1" b="2"><desc>this is the description of this thing</desc>
As a style issue, I favor the explicit description. Makes programming life
easier all around, costs next to nothing. Programs can easily find the two
equivalent, but, in my experience, people don't.
Deborah Aleyne Lapeyre mailto:firstname.lastname@example.org
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 SGML and XML
xml-dev: A list for W3C XML Developers. To post, mailto:email@example.com
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To (un)subscribe, mailto:firstname.lastname@example.org the following message;
To subscribe to the digests, mailto:email@example.com the following message;
List coordinator, Henry Rzepa (mailto:firstname.lastname@example.org)