[XML-SIG] SAX Namespaces

tpassin@home.com tpassin@home.com
Thu, 6 Jul 2000 22:15:32 -0400


Fred L. Drake, Jr. wrote -
>
>
>   I think there are a couple of issues: is it reasonable to require
> the original order of atttributes, and, if not, what's the right
> dictionary key?  (I'd say (URI,localname) in namespace mode, or
> rawname otherwise, with all other information available in the value.)
> xml.sax.AttributeList can provide all the appropriate query methods
> according to the SAX spec at that point.
>
>
The prefix is not supposed to have absolute significance.  You could use a
prefix of "ZMBW" and bind it to the namespace for "html" and get the same
results, according to the recs.  You could bind both prefixes in the same
document, too, and still get the same results (leaving aside the question
about whether all current tools really work that way, I guess).

So if you are working with namespaces, the only count-on-able thing is the
NS plus the local name.  But if you want to recreate a document, you need
the prefix.  Sigh.  Well, there's no requirement in the recs to be able to
round-trip a document and end up with the same prefixes.

I conclude that -

* We should concentrate on having NS/localname be easy to understand and
use. (like (NS,localname)).

* Passing along the prefix could be very useful for some people, but it is
basically a convenience.  It shouldn't be the driver.

BTW, if you are not in NS mode, but the name includes a prefix anyway,
should the rawname equal prefix:localname?  Or should localname=rawname=the
whole thing?  I **think** the latter is best.  Anyone else have a thought
here?

Cheers,

Tom Passin