org.xml.sax.AttributeMap

Don Park donpark at quake.net
Wed Feb 25 02:00:39 GMT 1998


David,

>The last five methods are much more of a problem, and I'm still
>agonizing over what to do.  Why do we have binary entities in XML at
>all?  Is anyone going to use them, or will everything be done with
>href's?
>
>Attributes are the _only_ way to get at binary entities in XML, so if
>I don't provide some way to get access to them here, then SAX parsers
>and applications make it impossible to use binary (NDATA) entities at
>all.  I am very reluctant to create a new class or interface just for
>entities (and yet another for notations), when other types of objects
>do not have their own classes, and I certainly don't want to re-invent
>(or pre-invent) the DOM.

How about replacing the five with following method and three constants?

public static final int NAME = 0;
public static final int PUBLIC_ID = 1;
public static final int SYSTEM_ID = 2;

public abstract String[] getDataInfo (int index);

Since AttributeList is valid only within startElement method, you can reuse
a single string array rather allocate a new one per getEntityInfo method.
If the method returns null, then it is attribute has no info.

If you haven't guessed by now, the constants above are used to index into
the returned array.  Implementations should take steps to make sure the size
of the returned array is 3 and stuff null for NAME if it is not a notation.

Does this help?

Don Park
http://www.quake.net/~donpark/index.html

>
>
>HELP!!!
>
>
>David
>
>--
>David Megginson                 ak117 at freenet.carleton.ca
>Microstar Software Ltd.         dmeggins at microstar.com
>      http://home.sprynet.com/sprynet/dmeggins/
>
>xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at ic.ac.uk
>Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
>To (un)subscribe, mailto:majordomo at ic.ac.uk the following message;
>(un)subscribe xml-dev
>To subscribe to the digests, mailto:majordomo at ic.ac.uk the following
message;
>subscribe xml-dev-digest
>List coordinator, Henry Rzepa (mailto:rzepa at ic.ac.uk)
>
>


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




More information about the Xml-dev mailing list