[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Announcement: SAX 1.0gamma

  • From: James Clark <jjc@j...>
  • To: "XML Developers' List" <xml-dev@i...>
  • Date: Sun, 03 May 1998 18:03:12 +0700

eps parser
I did a first pass at implementing a SAX 1.0gamma driver for XP today.

Some nits:

It should be specified whether a byte order mark at the beginning of a
XML byte stream is included as part of the character stream.  I don't
think it should be since the byte-order mark isn't included the XML
document production, and the XML spec says explicitly that the byte
order mark "is an encoding signature, not part of either the markup or
the character data of the XML document".

How are relative system identifiers supposed to be handled in
DTDHandler?  Suppose I have a DTD with a system id of dir/foo.dtd, which
declares an unparsed entity with a system id of foo.eps (which refers to
dir/foo.eps). If the systemId argument to DTDHandler.unparsedEntityDecl
is foo.eps, then the application is going to have problems.  There's a
similar issue with EntityResolver.resolveEntity.

Parser.parse should be allowed to throw IOException in addition to
SAXException.  Since InputSource includes a Reader and InputStream, and 
methods on Reader and InputStream throw IOException, parse needs to
throw IOException.  It's ridiculous to require the parser to wrap an
IOException in a SAXException when you know that the parser needs to
throw IOException.

There's nothing in the XML spec that says parsers have to make attribute
types available. So I think the doc for AttributeList.getType should say
that CDATA may be returned not only if the parser has not read the
declaration, but also if the parser does not make this information
available (alternatively it could return null in this case).

Supporting changing of Locale in the middle of a parse would require me
to redesign my native interface in a way I consider very undesirable,
and I don't see any need for this, so I don't plan to support this.  The
basic issue is that my counterpart of Parser is reentrant unlike SAX's
and I want to keep it that way. I think changing of Locale mid-parse is
going to be difficult for anyone with a similar style of interface.

It's probably too late for this, but I'm having problems seeing the
logic in the exception handling design.  The design seems to make things
inconvenient for both users and implementors: implementors have to wrap
SAXException in order to pass it up through their parsers, and in
handler methods users have to wrap their exceptions in SAXException.


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


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.

Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.