W3C home > Mailing lists > Public > www-dom-ts@w3.org > November 2001

Re: L2-core-getElementsByTagNameNS02

From: Curt Arnold <carnold@houston.rr.com>
Date: Fri, 16 Nov 2001 23:33:14 -0600
Message-ID: <04e001c16f29$5ac49720$7600a8c0@CurtMicron>
To: "David Brownell" <david-b@pacbell.net>, <www-dom-ts@w3.org>
From the narrative of the test, the author clearly expected
getElementsByTagNameNS to return five elements.  Xerces-J 1.4.3, Crimson
1.1.3 and a recently nightly build of Mozilla (the only implementations have
tested so far) returned 5 elements interpreting the call to be equivalent to
the XPath expression descendent::*[local-name() = $tagname] not
decendent::*[namespace-uri() and local-name() = $tagname]

There should be only one right answer to the result of the query, either 5
or 2 elements.  Changing the test so that the assertion is nodelist.size >=
2 doesn't help anyone.  Since the test narrative clearly says it expects 5
elements, I added a corresponding assertion to the body of the test.  If the
ultimate correct answer is 2, then the test should be changed to require
exactly 2 elements in the node list.

I would agree that your interpretation of the recommendation text is
reasonable and possibly what the WG was trying to say, but if all (or almost
all) the implementations read it a different way, then I would suggest an
errata to ratify the defacto behavior.  Will need to get more data points on
the implementations.


The level 2 core tests are pretty fresh.  They were committed by NIST about
3 weeks ago and I've only worked through them enough to fix compilation
problems (at that time) and to analyze the test failures for Xerces-J 1.4.3
(last couple of nights).  I've only superficially looked at the test
failures from Mozilla (http://home.houston.rr.com/curta/mozilla-l2.txt) and
Crimson (http://home.houston.rr.com/curta/crimson-l2.txt) to see what their
response to getElementsByTagNameNS02.

I've updated test-to-ecmascript.xsl to reflect the changes in
test-to-java.xsl from 3 weeks ago and last night.  Running the tests from
Mozilla will require you to punch the OK button around 100 times, but you
will finally get through.

I've never configured Ant to use Saxon.  The stuff about Ant and Xalan
versions were specific combinations that have worked for me.  Any other
combinations of Ant and Xalan have had problems, either locking up on two
specific tests (documentcreatecdatasection and importNode02 specifically)
that other versions of Xalan and Saxon process without incident or Xalan-J
2.2 throwing spurious XPath errors when a transform uses document() a lot.
If you could pass along some quick notes on using Saxon with Ant, I'd be

----- Original Message -----
From: "David Brownell" <david-b@pacbell.net>
To: <www-dom-ts@w3.org>
Sent: Friday, November 16, 2001 8:02 PM
Subject: L2-core-getElementsByTagNameNS02

> I was looking at this and I think either the test needs to change
> or the specification does.  The relevant parts of the test (in Java):
>     newList = doc.getElementsByTagNameNS ("*", "employee");
>     newElement = (Element)newList.item (3);
> The problem is that only two elements have a namespace URI,
> and that "*" is supposed to match "all namespaces".  Those two
> elements are:
>     - <employee> ... EMP0001, Margaret Martin
>     - <emp:employee> ... EMP0004, Jeny Oconnor
> Now, either the spec should be changed so that "*" means to
> ignore any namespaces (and thereby match elements that are
> not in any namespace), or (preferably) the test should change
> so that it accesses item 1, not item 3.
> - Dave
Received on Saturday, 17 November 2001 00:34:23 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:34:03 UTC