OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help



   Re: SAX2 RFD: LexicalHandler draft v.1.1

[ Lists Home | Date Index | Thread Index ]
  • From: David Megginson <david@megginson.com>
  • To: "XML Developers' List" <xml-dev@ic.ac.uk>
  • Date: Tue, 23 Mar 1999 17:33:46 -0500 (EST)

Don Park writes:


 > >  public interface AttributeValueHandler
 > >  {
 > >    public abstract void startEntity (String name)
 > >      throws SAXException;
 > >    public abstract void endEntity (String name)
 > >      throws SAXException;
 > >    public abstract void characters (char ch[], int start, int length)
 > >      throws SAXException;
 > >  }
 > >
 > >  public interface AttributeValue2 extends AttributeValue
 > >  {
 > >    public abstract boolean isSpecified (String name);
 > >    public abstract void accept (AttributeValueHandler handler)
 > >      throws SAXException;
 > >  }


 > I don't think event-based interface is appropriate for this
 > purpose.  Why not introduce an interator or an array-like
 > interface?

Perhaps -- personally, I'm a little annoyed at having to do this at
all.  XML messed up a little here by making attribute values too
difficult to process.  

The problem is that even if you don't care about entity boundaries,
the XML 1.0 REC requires reporting of any entities that are not
expanded (in the case, for example, of a non-validating parser that
hasn't read the declaration in the external DTD subset).  As a result,
in a literal reading of the spec, a fully-conformant XML 1.0 API can
*never* treat attribute values simply as strings.  SAX 1.0 does so,
and no one has ever minded, but conformance is conformance...

All the best,


David Megginson                 david@megginson.com

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To (un)subscribe, mailto:majordomo@ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS