SAX2: Namespace proposal

Peter Murray-Rust peter at ursus.demon.co.uk
Sun Dec 19 11:16:31 GMT 1999


At 03:45 PM 12/18/99 -0500, David Megginson wrote:
>In my last message, I summarized some of the major positions that have
>emerged on Namespace support in SAX2.  

I am deliberately not taking a position in this.

[...]
>
>Anyway, here's what I'm suggesting.
>
[... spec and example deleted ...]
>
>This is kind-of painful, I know, but please remember that SAX is meant
>to be the equivalent of a low-level device driver, not an elegant,
>high-level API (though those can be and have been built on top of it).

I would like to thank David for coming up with this proposal and I hope
that the community is able to move forward rapidly with it. Namespace
support is an all-or-nothing thing - if you have one critical tool in the
set that doesn't support namespaces, then it is likely that you won't use
namespaces.

To take CML as an example, a typical document *ought to* look something like:
<foo:bar xmlns:foo="http://foo.org">
  <xyzzy:molecule xmlns:xyzzy="http://www.xml-cml.org/cml.dtd">
    <atom ...>
    </atom>
  </xyzzy:molecule>
</foo:bar>

People are now starting to author CML documents, using the DTD and examples
that I and Henry have published. NONE of the authors, including myself uses
namespaces because there is not a consistent toolset. So we actually see:
<html>
  ...
  <molecule>... </molecule>
</html>

and processing programs rely on the likelihood that there will be no
semantic collision with some other document.

My pressing need is to get a workable namespace-processing mechanism before
we get overtaken by well-meant but incorrect attempts to create exemplar
documents *** and code ***. I would expect almost all CML authors to
actually be using code that looks like:
	startElement(name, atts);
	if (name.equals("molecule")) ...

I expect that some may be even be writing:
	if (name.equals("molecule") || name.equals("cml:molecule")) ...
which we all wish to avoid.

One thing that I continue to urge is that things be kept simple. I have
consistently done this because only simple things can be easily implemented
in a community-wide approach. It may sound irresponsible but I think it is
more important that SAX2 gets implemented than that we get every bit
exactly right.

It is worth noting that Namespaces - which apparently involve very little
programming to implement - have taken a surprisingly long time to get
universally implemented.

What David has suggested is something that I can use and will use if it
gets taken forward. 

	P.


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/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo at ic.ac.uk the following message;
unsubscribe 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