SAX: two alternatives for namespaces

Chris Hubick maillist at chris.hubick.com
Wed Jul 29 04:25:40 BST 1998


On Tue, 28 Jul 1998, David Megginson wrote:

>   What changes to SAX 1.0 are required to support two-part names?
> 
> 2. New Interface
> 
>   Create a new SAX interface to represent a two-part name:

	I vote for something like this (2).

	I am in the camp that as much work should be done by the XML
processor as possible, rather than the application.  I think this is more
of a processor level feature rather than an add on.  As a user, I don't
mind another interface.  I like SAX's design, it is extremely simple to
use.  I think one of the things that makes SAX easy to use is that it
doesn't force me to use all the functionality, I can use DocumentHandler
without having a clue about DTDHandler, EntityResolver, etc.  So yet
another interface doesn't bother me.  And on that note...
	I strongly encourage adding a toString() to this Name interface,
and having it return the full name just as before.  As an application
writer this would allow me to easily get the old funtionality from the new
interface using a simple String cast, effectively allowing me to ignore
namespaces if I don't care about them.
	Naturally I think version 2 of SAX should try to have as minimal
an impact on version 1 features as possible. I think wherever possible it
should extend interfaces by adding methods rather than changing existing
ones.  On the other hand I think that although that makes sence for
providing support for something like comments, namespaces are to
integraded for this approach and I can't see a better way to do it in this
scenario.
	As far as my HXP parser goes, well, I plan on adding SAX 1 support
as soon as I can, and had planned on namespace support anyhow, so I 
welcome this simple addition.  Both of your proposals require the parser
writer to support Namespaces, and as for parsers that don't - fix them :-)

---
Chris Hubick
mailto:chris at hubick.com
http://www.hubick.com/







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