[jdom-interest] children as List
Murray.Altheim at eng.sun.com
Fri Sep 1 13:25:21 PDT 2000
"Rosen, Alex" wrote:
> > What is the definition of List if not an
> > ordered set of items, the items normally being called the children
> > of the list? Element contains children in a particular order. Things
> > that have ordered children are lists. Therefore Element is a list.
> > QED.
> The things in a List are not usually called its children, but its elements or contents.
> (Talk about overloaded words - maybe "items" is better here.) So the system you propose
> would mean that you'd ask for an Element's second item, not its second child, which
> feels wrong.
> A List *contains* things. You *could* say that an Element contains other Elements, but
> it's much more natural to say that the Elements are children of the parent Element.
> When I think of a List, I think of a long, rectangular box with other boxes inside;
> when I think of Elements, I think of a box with other boxes drawn below it, as
> To me, the more relevent problem is that you'd get rid of the word
> "child" from the code:
I'd really prefer we not do that.
You're using language regarding markup in a way that is very inconsistent
with my experience, and seemingly different from the way it is commonly
used in SGML and XML specifications. Perhaps a look at the XPath
specification [XPATH] would provide some hints on how the W3C (and by
extension) a substantial plurality of the XML community uses language.
An element may contain children. If the element type happens to
semantically represent a list (which typically has 'list items'), its
children usually include elements that represent list items. This is
pretty clear from DocBook, for example.
Murray Altheim, SGML/XML Grease Monkey <mailto:firstname.lastname@example.org>
XML Technology Center
Sun Microsystems, 1601 Willow Rd., MS UMPK17-102, Menlo Park, CA 94025
In the evening
The rice leaves in the garden
Rustle in the autumn wind
That blows through my reed hut. -- Minamoto no Tsunenobu
More information about the jdom-interest