Re: SAX: org.xml.sax.AttributeMap

Peter Murray-Rust (peter@ursus.demon.co.uk)
Wed, 25 Feb 1998 08:42:39


At 09:42 25/02/98 +0700, James Clark wrote:
>
>> public abstract String getType (int index);
>
>I like this.
>
So do I. As XML grows larger and acquires more extensions (XLL, XSL, etc.)
there will be an increasing number of 'hardcoded' attribute types and
values. For example, the type of HREF/href is effectively determined as
CDATA (it would be perverse to make it ID, for example, even if not in
xml-link context) and xml:lang is required (I think) to be NMTOKEN or
NMTOKENS. Hardcoding all these 'special cases' is a pain and SAX (or DOM)
can help with implementing the prose in the specs.

P.
Peter Murray-Rust, Director Virtual School of Molecular Sciences, domestic
net connection
VSMS http://www.nottingham.ac.uk/vsms, Virtual Hyperglossary
http://www.venus.co.uk/vhg