Re: gnu.xml.dom.DomText implements Text and NodeList.

2006-01-10 Thread Mark Wielaard
Hi Pedro, On Tue, 2006-01-10 at 04:31 -0400, Pedro Izecksohn wrote: We ask that people agree to the GNU Classpath Hackers requirements before granting CVS commit permissions. You can find them at: http://www.gnu.org/software/classpath/docs/hacking.html#SEC2 I'm submiting source code to

Re: gnu.xml.dom.DomText implements Text and NodeList.

2006-01-10 Thread Chris Burdess
Pedro Izecksohn wrote: And maybe we can share one instance of the EmptyNodeList for the whole dom tree so if a tree contains lots of empty node list we only allocate one. I was thinking on this issue. The cast in getChildNode() isn't necessary since EmptyNodeList already is a NodeList.

Re: gnu.xml.dom.DomText implements Text and NodeList.

2006-01-10 Thread Pedro Izecksohn
Em Ter 10 Jan 2006 04:50, Chris Burdess escreveu: I would prefer: final class EmptyNodeList implements NodeList { static final EmptyNodeList instance = new EmptyNodeList(); public final int getLength() {return 0;} public final Node item(int index) {return null;} } That way:

Re: gnu.xml.dom.DomText implements Text and NodeList.

2006-01-09 Thread Pedro Izecksohn
We ask that people agree to the GNU Classpath Hackers requirements before granting CVS commit permissions. You can find them at: http://www.gnu.org/software/classpath/docs/hacking.html#SEC2 I'm submiting source code to this list to be included in the GNU classpath project, assuring that I wrote

Re: gnu.xml.dom.DomText implements Text and NodeList.

2006-01-04 Thread Mark Wielaard
Hi, On Wed, 2006-01-04 at 07:16 +, Chris Burdess wrote: My proposed solution is: Add to gnu.xml.dom.DomText: import org.w3c.dom.NodeList; /** * Returns an EmptyNodeList. * * @author Pedro Izecksohn */ public NodeList getChildNodes() { return

gnu.xml.dom.DomText implements Text and NodeList.

2006-01-03 Thread Pedro Izecksohn
DomText implements Text and NodeList. The problem is that method getLength() from interfaces NodeList and Text have different meanings. Text.getLength() must return the text content length in characters. NodeList.getLength() must return the number of nodes it contains. From DOM Level 3 Core

Re: gnu.xml.dom.DomText implements Text and NodeList.

2006-01-03 Thread Chris Burdess
Pedro Izecksohn wrote: DomText implements Text and NodeList. The problem is that method getLength() from interfaces NodeList and Text have different meanings. Text.getLength() must return the text content length in characters. NodeList.getLength() must return the number of nodes it