essential test cases?

I don't find anything objectionable in the recent
summary[1], but as to whether it's a complete enough
description, I'm not sure. Meanwhile, as much as I'd like
to continue to discuss the more subtle issues of
naming and semantics, I'd rather take that up in
a forum-to-be on architectural principles or whatever,
rather than making that discussion critical
path for advancing DOM2 and the Infoset specs.

[1] 1343 messages later Simon St.Laurent (Mon, Jun 12 2000) 
http://lists.w3.org/Archives/Public/xml-uri/2000Jun/0537.html

I'd like to focus on test cases again. I'm still not
aware of any test cases for DOM2 that allow me to see
the impact of the various interpretations. Would
somebody please conjure some up?

While mulling over the recent proposal[2], I realized
that the namespaces spec (ironically) doesn't currently
specify any interactions between multiple documents, and as long
as that remains its scope, I think the proposed wording
is adequate. I have to get used to the fact that
"namespace name" doesn't mean "absolute form
of the URI reference in the namespace declaration"
and folks that intend to compare namespace names
across documents will have to get used to taking
the base URI into account (cf my 16 May case of 2 bats[3])
I suspect we'll all live, as long as the specs
that are layered on top work together well enough.

[2] David Turner Thu, 8 Jun 2000 11:11:19 -0700
http://lists.w3.org/Archives/Public/xml-uri/2000Jun/0406.html

[3] http://lists.w3.org/Archives/Public/xml-uri/2000May/0137.html), but

All the motivational material in the namespaces spec
aside, the black-and-white import of the spec is that
certain documents don't conform:

===
excerpt from
http://www.w3.org/TR/1999/REC-xml-names-19990114/

For example, each of the bad start-tags is illegal in the following: 

  <!-- http://www.w3.org is bound to n1 and n2 -->
  <x xmlns:n1="http://www.w3.org" 
     xmlns:n2="http://www.w3.org" >
    <bad a="1"     a="2" />
    <bad n1:a="1"  n2:a="2" />
  </x>
===

A sort of extreme view of the "absolutize" proposal would
add the following to the set of non-conforming documents:

  <x xmlns:n1="./xyz" 
     xmlns:n2="././xyz" >
    <bad a="1"     a="2" />
    <bad n1:a="1"  n2:a="2" />
  </x>

While I still find it more consistent with conventional
usage of URIs to consider n1 and n2 to refer to the same thing
and hence n1:a and n2:a should be considered to collide,
(a) that's not what the Recommendation of 14 Jan 1999
says, and (b) I'm not going to lose a lot of sleep over it.
I'm happy for authors to be obliged to write

  <x xmlns:n1="./xyz" 
     xmlns:n2="./xyz" >
    <bad a="1"     a="2" />
    <bad n1:a="1"  n2:a="2" />
  </x>

if they want their document to fail to conform to the
namespaces spec. 1/2 :-)

Paul Grosso contributed a case that seems to
force the issue, but a straightfoward reading
of the namespaces spec shows that this document
doesn't conform (y and z are both bound
to "foo" in elem2), so it doesn't have an infoset,
so the infoset spec doesn't have to say anything
about it:

====
Tue, 16 May 2000 15:12:52 -0500
http://lists.w3.org/Archives/Public/xml-uri/2000May/0056

<doc xml:base="http://example.com/" xmlns:y="foo">
 <elem1 xml:base="./bar/">
  <x:E xmlns:x="../foo" xmlns:z="foo">
    <elem2 x:a="1" y:a="2" z:a="3"/>
  </x:E>
 </elem1>
</doc>

The namespace names associated with the prefixes y and z in the
example above will be the same with the literal string interpretation,
but different if the relative URI refs are absolutized.
====

So... as far as I can tell
	(a) noone has disputed the example above excerpted from
	the namespace spec, nor any other example from the namespace
	spec

	(b) Paul Grosso's base/xmlns test case is an interesting
	puzzle, but it doesn't conform to the namespace spec
	as written, so John Cowan (infoset editor) needn't address
	it directly.

	(c) noone has disputed that the the two bats are distinct in
	http://lists.w3.org/Archives/Public/xml-uri/2000May/0137.html

	and in particular, James Clark noted that his implementation
	wasn't conforming in this regard[4] and folks from Microsoft,
	the vendor of another popular XSLT processor, agreed[5] that no change
	to the the XSTL/XPath specs is in order.

	If anybody doesn't think that the two bats should be treated
	as distinct by XSLT implementations, please speak up.

	(d) about DOM2... I don't know, and I'm not sufficiently
	familiar with the spec to design test cases. Help?

	(e) I suspect we could come up with some interesting
	test cases regarding schemas, but I haven't done so yet.
	Anybody have any handy?



[4]  in the XT source, in sax/XMLProcessorImpl.java:
253                vec[j++] = nsMap.expandAttributeName(tem, this);
254                // FIXME resolve relative URL

[5] Frystyk <frystyk@microsoft.com>
Thu, 8 Jun 2000 15:42:04 -0700 
http://lists.w3.org/Archives/Public/xml-uri/2000Jun/0431.html

-- 
Dan Connolly, W3C http://www.w3.org/People/Connolly/

Received on Tuesday, 13 June 2000 15:14:15 UTC