Lists Home |
Date Index |
- From: James Clark <firstname.lastname@example.org>
- To: xml-dev Mailing List <email@example.com>
- Date: Tue, 13 Jan 1998 11:17:48 +0700
Some brief comments on the draft:
EntityHandler.changeEntity belongs in DocumentHandler: it's giving you
information that you need to interpret the information that
DocumentHandler provides. It has nothing to do with resolveEntity.
I don't think the doctype() method is a good idea. A external DTD
subset is just a convenient shorthand for declaring and referencing an
external parameter entity. It shouldn't be singled out for special
treatment. Knowing the external doctype isn't very useful without
knowing anything about the internal subset, since the internal subset
can completely change the effect of an external DTD. I think this
method should be dropped. If you want to provide DTD information, do it
properly with a separate DtdHandler interface.
ErrorHandler needs an error method in addition to fatal and warning. It
would be better if all methods had a single argument of XmlException.
AttributeMap seems way too complicated.
I don't think using Enumeration to get all the attributes is a good
idea. JDK 1.2 replaces Enumeration by Iterator. The method names in
Enumeration are a real disaster in the context of XML: nextElement
returns the name of the next attribute! This is not going to be an
efficient way to get at all the attributes (which is a common
application need). To get at all the attributes, I have first to create
an Enumeration (an unnecessary allocation). Then for each attribute
name: I have to make two non-final method calls (nextElement and
hasMoreElements); I then have a cast (which must be checked) from Object
to String; I then have to look the attribute up using getValue. Compare
this to the simple interface I suggested:
void startElement(String elementName, String attributeNames, String
attributeValues, int nAttributes)
Is AttributeMap required to implement clone? I think it probably ought
How does AttributeMap deal with implied attributes that are not
specified? I think they shouldn't appear at all.
Does isEntity() return true for ENTITIES attributes? Does isIdref()
return true for IDREFS attributes.
AttributeMap.getNotationNameID is not a good name: getEntityNotationName
or getEntityNotation would be better.
PublicID and SystemID in method names should be PublicId and SystemId
(Identifier is one word not two).
In XmlException, getLine should be getLineNumber for consistency with
Is the first column number 0 or 1? (Emacs thinks it's 0, but the first
line is cleatly 1.)
xml-dev: A list for W3C XML Developers. To post, mailto:firstname.lastname@example.org
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:email@example.com the following message;
To subscribe to the digests, mailto:firstname.lastname@example.org the following message;
List coordinator, Henry Rzepa (mailto:email@example.com)