[jdom-interest] getChild() vs. getChildElements()

Brett McLaughlin brett.mclaughlin at lutris.com
Tue Aug 1 15:25:23 PDT 2000


Joe Gangemi wrote:
> 
> I am new to JDOM and have been following this discussion. I am also
> teaching myself JAVA (C is my background), but I am a long-time SGML
> and, by extension, XML heavy.
> 
> I have no problem with getChild because I consider elements as
> children. An earlier e-mail suggested this is confusing because PIs
> and Comments are also children. Well, that's news to me. Since when is
> a PI or Comment a child of an element. If that's in the standard, it
> must be in the small print 'cause I missed it. Also, since PIs and
> Comments are not part of the document's structure and cannot be
> declared in a DTD, they cannot be considered "children."
> 
> The point is moot. getChildElement is redundant. The only "legitimate"
> children of a parent element are other elements. Where is the
> confusion?

Entities. The XML specification. The XSLT specification. The XPath
specification. And many others. I think what is most notable is that you
may be heavy into SGML (I'm sorry ;-) ), but haven't done as much with
the XML vocabularies, as that community (I have one foot in it, I
suppose) is very used to seeing PIs, Comments, whitespace, text,
entites, etc., as children of an Element.

-Brett

> 
>         Joe G.
> 
> At 09:03 PM 7/31/00 -0700, you wrote:
> 
> > > OK, I'm going to say something that hopefully James understands
> > (OK,
> > > James? ;-) ). If someone isn't a committer on this project, we
> > really
> > > can't lend them all this extra weight.
> >
> > You misunderstand.  I can use whatever outside resources and
> > opinions I
> > want on deciding how to cast my vote.  Now my vote only carries with
> > it
> > the weight of one vote (although as a -1 veto that's all the weight
> > it
> > needs).
> >
> > > I know that I've been guilty as
> > > anyone - for example, I tend to really listen up when Simon St.
> > > Laurent talks, because I think he is top notch in XML land.
> >
> > That's nothing to be guilty of.  He is top notch, and his opinion
> > should
> > weigh into your vote.  :-)
> >
> > > But  votes are first you and I (on core). Then it's the testers
> > and
> > > contribers - Elliotte, Jools, Werner, some others... and thnose
> > > people decide it. If we still can't get consensus or majority,
> > > or whatever, /then/ we go to non-committers.
> >
> > Following Apache standards, one committer proposes a change, and
> > people
> > vote.  It takes three +1 votes and no -1 votes to proceed with the
> > change.  (Since we have just two core committers, two +1 votes will
> > suffice.)  We've already had a -1 vote here (that'd be me), so
> > there's
> > no need for looking to non-core voters.
> >
> > For point of reference, on the earlier null vote you and I were not
> > fully decided and so looked for outside opinion.  (Which again, is a
> > good thing.)
> >
> > Here I'm up to be swayed by outside opinion.  Please continue
> > sending in
> > opinions (for and against).  But, like I said, I put time into this
> > project in the hope that it will make my XML coding life easier and
> > save
> > me time and effort.  Anything that goes against JDOM making my life
> > easier makes me less inclined to put time into JDOM.
> >
> > I think (like Philip said) a beginner can figure out that "Element
> > getChild(String name)" will return an Element, and it makes my code
> > look
> > better and gets my job done faster. And since we looked at the
> > Collections APIs for whether to return null or not, let me point out
> > they shortened the "addElement" name down to just "add".  :-)
> >
> > > Once James is a committer (something I hope he throws some patches
> >
> > > in for so we could make happen), then I'll listen to him equally
> > > as well; until then, it's not fair to the community.
> >
> > I just have to say again:  Listen to people you know are smart!  I
> > don't
> > think anyone in this community wants you to ignore expert outside
> > opinion because the person hasn't contributed patches.  The expert
> > may
> > not have a binding vote, but you don't need to shut them out.
> >
> > -jh-
> > _______________________________________________
> > To control your jdom-interest membership:
> > http://lists.denveronline.net
> > mailman/options/jdom-interest/youraddr at yourhost.com

-- 
Brett McLaughlin, Enhydra Strategist
Lutris Technologies, Inc. 
1200 Pacific Avenue, Suite 300 
Santa Cruz, CA 95060 USA 
http://www.lutris.com
http://www.enhydra.org



More information about the jdom-interest mailing list