[jdom-interest] Bug in Document.setRootElement

Rick Nucci rick_nucci at boomi.com
Wed Jun 7 12:14:23 PDT 2000


In the Jun-5 build, it seems like Document.setRootElement is wrong:
(Sorry if this has already been logged)

public Document setRootElement(Element rootElement) {
         // If existing root element, tell it that it's no longer root
         if (this.rootElement != null) {
             rootElement.setIsRootElement(false);
         }
 
         this.rootElement = rootElement;
 
         if (rootElement != null) {
             rootElement.setIsRootElement(true);
             content.add(rootElement);
         }
 
         return this;
     }


Shouldn't it be:

// If existing root element, tell it that it's no longer root
         if (this.rootElement != null) {
             this.rootElement.setIsRootElement(false);
         }

Rick


______________________________________________

Rick Nucci
Partner, Boomi Inc.
rick_nucci at boomi.com
http://www.boomi.com 

Received: from alice.DenverOnline.com (alice [204.144.168.130])
	by dorothy.denveronline.net (8.9.3/8.9.3) with ESMTP id CAA00733
	for <jdom-interest at jdom.org>; Wed, 7 Jun 2000 02:42:17 -0600 (MDT)
Received: from peterpan2.oleane.net (peterpan2.oleane.net [195.25.12.27])  by alice.DenverOnline.com  with ESMTP id BAA03795 for <jdom-interest at jdom.org>; Wed, 7 Jun 2000 01:50:03 -0600 (MDT)
Received: from altair.local (dyn-1-1-063.Lyn.dialup.oleane.fr [62.161.7.63])
        by peterpan2.oleane.net  with SMTP id e577nkt21696
        for <jdom-interest at jdom.org>; Wed, 7 Jun 2000 09:49:50 +0200
From: Didier Bretin <dbr at informactis.com>
Organization: Informactis
To: jdom-interest at jdom.org
Date: Wed, 7 Jun 2000 09:20:14 +0200
X-Mailer: KMail [version 1.0.29]
Content-Type: text/plain
MIME-Version: 1.0
Message-Id: <00060709442000.03120 at altair.local>
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by dorothy.denveronline.net id CAA00737
Subject: [jdom-interest] search function
Sender: jdom-interest-admin at jdom.org
Errors-To: jdom-interest-admin at jdom.org
X-BeenThere: jdom-interest at jdom.org
X-Mailman-Version: 2.0beta2
Precedence: bulk
List-Id: JDOM Mailing List for General Issues and Updates <jdom-interest.jdom.org>

Hello,

  I have just download jdom, and I would like to know if you plan to code some
utils like search function ?

Thanks.

Didier

Received: from web114.yahoomail.com (web114.yahoomail.com [205.180.60.86])
	by dorothy.denveronline.net (8.9.3/8.9.3) with SMTP id PAA29227
	for <jdom-interest at jdom.org>; Wed, 7 Jun 2000 15:39:02 -0600 (MDT)
Received: (qmail 15705 invoked by uid 60001); 7 Jun 2000 21:39:01 -0000
Message-ID: <20000607213901.15704.qmail at web114.yahoomail.com>
Received: from [128.64.18.13] by web114.yahoomail.com; Wed, 07 Jun 2000 14:39:01 PDT
Date: Wed, 7 Jun 2000 14:39:01 -0700 (PDT)
From: Jason Hunter <servlets at yahoo.com>
Reply-To: jhunter at acm.org
Subject: Re: [jdom-interest] moving elements in the jdom tree
To: Jakob Schwendner <jschwendner at picturesafe.de>, jdom-interest at jdom.org
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Sender: jdom-interest-admin at jdom.org
Errors-To: jdom-interest-admin at jdom.org
X-BeenThere: jdom-interest at jdom.org
X-Mailman-Version: 2.0beta2
Precedence: bulk
List-Id: JDOM Mailing List for General Issues and Updates <jdom-interest.jdom.org>

> I am missing some kind of addChild(index, Element) as a member
> of the
> Element class to allow appending of elements at specified
> positions in the
> list.
> any hints?

elt.getChildren().add(int, Element);

-jh-


__________________________________________________
Do You Yahoo!?
Yahoo! Photos -- now, 100 FREE prints!
http://photos.yahoo.com

Received: from alice.DenverOnline.com (alice [204.144.168.130])
	by dorothy.denveronline.net (8.9.3/8.9.3) with ESMTP id CAA00733
	for <jdom-interest at jdom.org>; Wed, 7 Jun 2000 02:42:17 -0600 (MDT)
Received: from peterpan2.oleane.net (peterpan2.oleane.net [195.25.12.27])  by alice.DenverOnline.com  with ESMTP id BAA03795 for <jdom-interest at jdom.org>; Wed, 7 Jun 2000 01:50:03 -0600 (MDT)
Received: from altair.local (dyn-1-1-063.Lyn.dialup.oleane.fr [62.161.7.63])
        by peterpan2.oleane.net  with SMTP id e577nkt21696
        for <jdom-interest at jdom.org>; Wed, 7 Jun 2000 09:49:50 +0200
From: Didier Bretin <dbr at informactis.com>
Organization: Informactis
To: jdom-interest at jdom.org
Date: Wed, 7 Jun 2000 09:20:14 +0200
X-Mailer: KMail [version 1.0.29]
Content-Type: text/plain
MIME-Version: 1.0
Message-Id: <00060709442000.03120 at altair.local>
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by dorothy.denveronline.net id CAA00737
Subject: [jdom-interest] search function
Sender: jdom-interest-admin at jdom.org
Errors-To: jdom-interest-admin at jdom.org
X-BeenThere: jdom-interest at jdom.org
X-Mailman-Version: 2.0beta2
Precedence: bulk
List-Id: JDOM Mailing List for General Issues and Updates <jdom-interest.jdom.org>

Hello,

  I have just download jdom, and I would like to know if you plan to code some
utils like search function ?

Thanks.

Didier

Received: from alice.DenverOnline.com (alice [204.144.168.130])
	by dorothy.denveronline.net (8.9.3/8.9.3) with ESMTP id CAA00733
	for <jdom-interest at jdom.org>; Wed, 7 Jun 2000 02:42:17 -0600 (MDT)
Received: from peterpan2.oleane.net (peterpan2.oleane.net [195.25.12.27])  by alice.DenverOnline.com  with ESMTP id BAA03795 for <jdom-interest at jdom.org>; Wed, 7 Jun 2000 01:50:03 -0600 (MDT)
Received: from altair.local (dyn-1-1-063.Lyn.dialup.oleane.fr [62.161.7.63])
        by peterpan2.oleane.net  with SMTP id e577nkt21696
        for <jdom-interest at jdom.org>; Wed, 7 Jun 2000 09:49:50 +0200
From: Didier Bretin <dbr at informactis.com>
Organization: Informactis
To: jdom-interest at jdom.org
Date: Wed, 7 Jun 2000 09:20:14 +0200
X-Mailer: KMail [version 1.0.29]
Content-Type: text/plain
MIME-Version: 1.0
Message-Id: <00060709442000.03120 at altair.local>
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by dorothy.denveronline.net id CAA00737
Subject: [jdom-interest] search function
Sender: jdom-interest-admin at jdom.org
Errors-To: jdom-interest-admin at jdom.org
X-BeenThere: jdom-interest at jdom.org
X-Mailman-Version: 2.0beta2
Precedence: bulk
List-Id: JDOM Mailing List for General Issues and Updates <jdom-interest.jdom.org>

Hello,

  I have just download jdom, and I would like to know if you plan to code some
utils like search function ?

Thanks.

Didier

Received: from web114.yahoomail.com (web114.yahoomail.com [205.180.60.86])
	by dorothy.denveronline.net (8.9.3/8.9.3) with SMTP id PAA29227
	for <jdom-interest at jdom.org>; Wed, 7 Jun 2000 15:39:02 -0600 (MDT)
Received: (qmail 15705 invoked by uid 60001); 7 Jun 2000 21:39:01 -0000
Message-ID: <20000607213901.15704.qmail at web114.yahoomail.com>
Received: from [128.64.18.13] by web114.yahoomail.com; Wed, 07 Jun 2000 14:39:01 PDT
Date: Wed, 7 Jun 2000 14:39:01 -0700 (PDT)
From: Jason Hunter <servlets at yahoo.com>
Reply-To: jhunter at acm.org
Subject: Re: [jdom-interest] moving elements in the jdom tree
To: Jakob Schwendner <jschwendner at picturesafe.de>, jdom-interest at jdom.org
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Sender: jdom-interest-admin at jdom.org
Errors-To: jdom-interest-admin at jdom.org
X-BeenThere: jdom-interest at jdom.org
X-Mailman-Version: 2.0beta2
Precedence: bulk
List-Id: JDOM Mailing List for General Issues and Updates <jdom-interest.jdom.org>

> I am missing some kind of addChild(index, Element) as a member
> of the
> Element class to allow appending of elements at specified
> positions in the
> list.
> any hints?

elt.getChildren().add(int, Element);

-jh-


__________________________________________________
Do You Yahoo!?
Yahoo! Photos -- now, 100 FREE prints!
http://photos.yahoo.com



More information about the jdom-interest mailing list