xml style questions

Marcus Carr mrc at allette.com.au
Mon Mar 1 21:26:47 GMT 1999


Mark D. Anderson wrote:

> any words of wisdom regarding:
>
> 1) having an extra collection layer in the xml tree, like
> <root><things><thing></thing><thing></thing></things><another></another></root>
> vs.
> <root>><thing></thing><thing></thing><another></another></root>

Would you consider <thing> and <another> to be siblings? If so, I wouldn't compartmentalise.
Alternatively, if <thing> can appear after <another> but these have different significance, I
would compartmentalise.

> 2) having PCDATA vs. having a distinct "comment" or "description" element child:
> <thing a="1" b="2">
> this is the description of this thing
> <some_child></some_child>
> </thing>
> vs.
> <thing a="1" b="2">
> <desc>this is the description of this thing</desc>
> <some_child></some_child>
> </thing>

If you are going to have a need to deal with <desc> in some way and it could get mixed up with
other #PCDATA, I'd create an element. My instinct would be to mark it up as an element unless
the overhead was excessive, but I think that sort of thing is driven by (a) immediate or
forseeable requirements, followed by (b) personal taste.


--
Regards,

Marcus Carr                      email:  mrc at allette.com.au
___________________________________________________________________
Allette Systems (Australia)      www:    http://www.allette.com.au
___________________________________________________________________
"Everything should be made as simple as possible, but not simpler."
       - Einstein



xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To (un)subscribe, mailto:majordomo at ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo at ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at ic.ac.uk)




More information about the Xml-dev mailing list