SAX: Method Name Collisions

Peter Murray-Rust peter at
Thu Apr 16 17:11:13 BST 1998

At 10:12 13/04/98 -0400, David Megginson wrote:
>The first, "getAttributeListLength", is the ugliest.  It is simple to
>avoid this problem by creating a separate class for SAXAttributeList,
>rather than implementing it in the main driver -- what does everyone
>else think about this question?
I've been away for some days, so ignore this if you've come to a conclusion...

I have been gently struggling with the naming problem whilst developing
JUMBO2 which is now based on the SwingSet classes. I though about names
like jumbo.xml.Tree and so on, but rejected them in favour of a small
uniquifying prefix (XTree, etc.). This is rather similar to the swing use
of JTree. The likelihood of collision between Tree, Node, Element,
Attribute, and a few others is very high and the result is that there may
have to be lines of the form:
	jumbo.xml.Tree tree = new
which is the appropriate way to uniquify them. The short names are
difficult to search for - searching for Tree in all files will return a
large number of unwanted hits.  Therefore I'm mildly in favour of SAXFoo.

I'm not passionate on this, but I also support Stroustrup's philosophy that
well devised names are often better than comments.  So
getAttributeListLength() may possibly avoid the use of a comment.

Also, where possible, anything that has the same 'feel' as the Java class
libraries is a help to learning.

As we all know this is a subjective matter and I'll trust David to make a
good job of it.

Peter Murray-Rust, Director Virtual School of Molecular Sciences, domestic
net connection
VSMS, Virtual Hyperglossary

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at
Archived as:
To (un)subscribe, mailto:majordomo at the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo at the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at

More information about the Xml-dev mailing list