Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@www.apache.org Received: (qmail 11022 invoked from network); 8 Jun 2004 10:41:30 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 8 Jun 2004 10:41:30 -0000 Received: (qmail 40048 invoked by uid 500); 8 Jun 2004 10:41:28 -0000 Delivered-To: apmail-jakarta-commons-dev-archive@jakarta.apache.org Received: (qmail 39709 invoked by uid 500); 8 Jun 2004 10:41:26 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 39695 invoked by uid 99); 8 Jun 2004 10:41:26 -0000 Received: from [192.18.33.10] (HELO exchange.sun.com) (192.18.33.10) by apache.org (qpsmtpd/0.27.1) with SMTP; Tue, 08 Jun 2004 03:41:26 -0700 Received: (qmail 28744 invoked by uid 50); 8 Jun 2004 10:42:27 -0000 Date: 8 Jun 2004 10:42:27 -0000 Message-ID: <20040608104227.28743.qmail@nagoya.betaversion.org> From: bugzilla@apache.org To: commons-dev@jakarta.apache.org Cc: Subject: DO NOT REPLY [Bug 29428] - Digester does not keep "root" variable in sync... X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT . ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=29428 Digester does not keep "root" variable in sync... ------- Additional Comments From james@carmanconsulting.com 2004-06-08 10:42 ------- Ahhhh. I see what you mean about the "first object created" stuff. The Catalog example would fail. However, the documentation isn't really clear on how the stack is supposed to work. The idea that the first thing created by the rules will be returned isn't exactly obvious. In my mind, I don't imagine anything to be on the stack at the end of parsing unless I push something on there to begin with, using most of the default rules. So, when I use Digester, I usually push my "root" object onto the stack prior to parsing. I didn't realize that the first object pushed onto the stack is what's supposed to be returned from parse(). That's not clear from the documentation. Or, maybe that was just my misunderstanding. I don't really like that little twist, though. It doesn't seem as clean, if you ask me. But, there's a LOT of code out there using it the way it is now, so we'd better not break it. And, you're right, my implementation WILL break a LOT of stuff. Oops! --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org