[Bug 20340] [XT3TS] element-0306

https://www.w3.org/Bugs/Public/show_bug.cgi?id=20340

Abel Braaksma <abel.braaksma@xs4all.nl> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
                 CC|                            |abel.braaksma@xs4all.nl

--- Comment #4 from Abel Braaksma <abel.braaksma@xs4all.nl> ---
We too were struggling understanding the full depth of this test. Our current
output generates the following:

<?xml version="1.0" encoding="UTF-8"?>
<out xmlns:easy="http://www.easyJobs.com" xmlns:fun="http://www.funJobs.com">
    <profession xmlns="http://www.dummy_ns.com">
        <IT_Architect/>
        <IT_Specialist xmlns="http://www.all.com">
            <dogsbody xmlns="http://www.dummy_ns.com"/>
        </IT_Specialist>
        <Business_Analyst xmlns=""/>
    </profession>
</out>

Looking at Jim Mills' comment #2, I belief this is correct, taking into account
the following snippet of the spec: "unless that element or an intermediate
element already has a namespace node with the same name (or absence of a
name)". In the above output, each element node has, or has not, the namespaces
as defined in comment #2. 

If we take all assertions currently in that test and run it against that
output, we get the following:

true: /out/namespace::* = "http://www.funJobs.com"
true: /out/namespace::* = "http://www.easyJobs.com"
true: /out/namespace::* = "http://www.w3.org/XML/1998/namespace"
true: count(/out/namespace::*) = 3
true: /out/*:profession/namespace::* = "http://www.funJobs.com"
true: /out/*:profession/namespace::* = "http://www.easyJobs.com"
true: /out/*:profession/namespace::* = "http://www.dummy_ns.com"
true: /out/*:profession/namespace::* = "http://www.w3.org/XML/1998/namespace"
true: count(/out/*:profession/namespace::*) = 4
true: /out/*:profession/*:IT_Architect/namespace::* =
"http://www.w3.org/XML/1998/namespace"
true: /out/*:profession/*:IT_Architect/namespace::* = "http://www.dummy_ns.com"
false: count(/out/*:profession/*:IT_Architect/namespace::*) = 2
true: /out/*:profession/*:IT_Specialist/namespace::* =
"http://www.w3.org/XML/1998/namespace"
true: /out/*:profession/*:IT_Specialist/namespace::* = "http://www.all.com"
false: count(/out/*:profession/*:IT_Specialist/namespace::*) = 2
true: /out/*:profession/*:IT_Specialist/*:dogsbody/namespace::* =
"http://www.w3.org/XML/1998/namespace"
true: /out/*:profession/*:IT_Specialist/*:dogsbody/namespace::* =
"http://www.funJobs.com"
true: /out/*:profession/*:IT_Specialist/*:dogsbody/namespace::* =
"http://www.easyJobs.com"
true: /out/*:profession/*:IT_Specialist/*:dogsbody/namespace::* =
"http://www.dummy_ns.com"
true: count(/out/*:profession/*:IT_Specialist/*:dogsbody/namespace::*) = 4
true: /out/*:profession/Business_Analyst/namespace::* =
"http://www.w3.org/XML/1998/namespace"
false: count(/out/*:profession/Business_Analyst/namespace::*) = 1

The three ones failing are:

- false: count(/out/*:profession/*:IT_Architect/namespace::*) = 2
  this seems indeed incorrect. It should be 4 (easy, fun, dummy_ns and xml)

- false: count(/out/*:profession/*:IT_Specialist/namespace::*) = 2
  same as the previous. The count should be 4 here.

- false: count(/out/*:profession/Business_Analyst/namespace::*) = 1
  count should be 3 (easy, fun, xml)


If you agree with my assertions, I'd like to go ahead and push the changes to
the repository, so that we can close this bug.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Wednesday, 27 November 2013 22:19:51 UTC