Re: Attribute uniqueness test: a radical proposal

> In XML documents conforming to this specification, no tag
> may contain two attributes that:

that attribute test is actually the least of the worries,
the question is mainly (or as much) about whether

<xsl:template match="x:xxx" xmlns:x="namespace-1">
in a stylesheet matches
an element
<y:xxx xmlns:y="namespace-2"/>
in a document.


But I don't understand this:
> 2. have qualified names whose local parts are the same and
> whose prefixes are bound to the same namespace declaration.

prefixes are bound to namespace names by namespace declarations.
So if you mean "prefixes are bound by the same namespace declaration"
then you mean it's the same prefix. If you mean bound to the same
namespace name then you have to decide what "same" means which is the
subject of this list.

Even though I don't understand your construct I do understand this

> The effect of this change is to
> allow attribute combinations that are disallowed under the
> current specification because they aren't unique.

Al Gilman replied also suggesting that this restriction should go,
and says
> And as Paul points out, this is a _compatible_ change.

It doesn't seem very compatible to me.

Currently if you take a well formed XML 1.0 document that complies to
the namespace spec, then you can normalise the prefixes, using a
distinct prefix for each namespace used, and linearise the document.
Without this duplicated attribute restriction this procedure could
turn a well formed document into a non well formed one.

> The uniqueness test is best thought of as catching the
> obvious ``no'' cases, leaving all the others as ``maybe''s.

There are no "maybes" in namespace processing.
That is the whole point of it.

>  For example, suppose that http://www.smith.org/docA is just a
> mirror of http://www.jones.org/docB.

It doesn't matter whether they are mirrors or not.

> It seems to me that this approach cuts the Gordian knot
> entirely.

?????????
But it just makes one incompatible change to the namespace
rec and doesn't address the question that caused Tim Berners-Lee to
start this list which is


Does
<xsl:template match="x:xxx" xmlns:x="foo">
in a stylesheet match
an element
<y:xxx xmlns:y="foo"/>
in a document if the stylesheet and document are located such that
the two relative URI references "foo" produce different absolute URI.

The namespace rec, common sense (ie me:-), and user expectations say
yes.

the xpath spec, James Clark, Tim Berners-Lee and Dan Connolly say no.

That's the knot you have to cut.

David

Received on Saturday, 27 May 2000 16:59:35 UTC