[XML-SIG] namespace/localpart tuples

Greg Stein gstein@lyra.org
Wed, 5 Jan 2000 15:30:04 -0800 (PST)


On Wed, 5 Jan 2000 uche.ogbuji@fourthought.com wrote:
>...
> The prefix has no semantic value: it is indeed syntactic sugar.  However, it 
> is very important to maintain the "principle of least surprise" for users.
> 
> If a user runs his XSLT stylesheet through a SAX processor and finds that all 
> his "xsl:template" elements have been renamed to "prefix00001:template", he 
> might be very confused indeed.

hehe... agreed on that one :-)

> Note that there is at least one case in which the prefix does matter: XSLT 
> uses the prefix to match declared namespaces in the stylesheet to namespaces 
> in the source document.  Now many people have already railed against this 
> violation of the spirit of XML Namespaces 1.0, but there is no srguing that it 
> was the most elegant solution to a difficult problem that the XSLT WG faced in 
> dealing with namespaces.

Oh, kee-rist. What dickheads.

All right... then there is a reason to keep the prefix. Sigh. The
three-tuple containing the prefix should be used since XSLT applies
semantic meaning to it.

>...
> > IMO, it is much better to regenerate a new set of prefixes for the set of
> > namespace URIs that are present in an XML document.
> 
> Even as a user who knows better about the meaning of prefixes, I would be very 
> annoyed at a processor that did this.  I often deal with documented with 4 or 
> more namespaces (this is not too unusual: very common in RDF) and I give my 
> prefixes mnemonic names to help sort things out.  I don't want processors 
> renaming them to "p01a3", etc.

Yah. DAV typically uses a few namespace, too (DAV: itself plus
product-specific properties), so I'm familiar with this.

If you don't like the renaming, then avoid mod_dav :-)  (it renames stuff
to things like ns0, ns1, i0, i1, ...). I could explain why, but you
probably don't want to hear... hehe

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/