K2-NamespaceURIForPrefixFunc-2 test fails

Bug #872732 reported by Sorin Marian Nasoi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zorba
Fix Released
Medium
Sorin Marian Nasoi

Bug Description

this is the ctest output:

test w3c_testsuite/XQuery/Functions/QNameFunc/NamespaceURIForPrefixFunc/K2-NamespaceURIForPrefixFunc-2
=== Query: ===
(:*******************************************************:)
(: Test: K2-NamespaceURIForPrefixFunc-2 :)
(: Written by: Frans Englich :)
(: Date: 2007-11-22T11:31:21+01:00 :)
(: Purpose: Test that the correct default namespace is picked up(#2). :)
(:*******************************************************:)
namespace-uri-for-prefix("", exactly-one(<e xmlns="http://www.example.com/A" xmlns:A="http://www.example.com/C">
              <b xmlns:B="http://www.example.com/C" xmlns=""/>
      </e>/b)) eq ""
=== end of Query ===
=== Result: ===
true
=== end of result ===
testdriver: non-canonical result for reference result # 1 doesn't match.

Actual and Reference canonical results are not identical

Actual Canonical Result:

<root>true</root>

Reference Canonical Result:

<root></root>

See line 1, col 6 of expected result.
Actual: <<root>true</root>>
Expected: <<root></root>>
testdriver: canonical result for reference result # 1 doesn't match.
testdriver: none of the reference results matched

Related branches

Changed in zorba:
assignee: nobody → Sorin Marian Nasoi (sorin.marian.nasoi)
Revision history for this message
Sorin Marian Nasoi (sorin.marian.nasoi) wrote :

In XQTS_1_0_3 the expected result for this test is 'true'.
According to the:
- W3C F&O Spec: http://www.w3.org/TR/xpath-functions-30/#func-namespace-uri-for-prefix
- decisions taken in bug 11590: http://www.w3.org/Bugs/Public/show_bug.cgi?id=11590

The correct result in this case is the empty sequence: because () eq "" returns ()

Because of the fact that at this moment the RQ uses XQTS_1_0_3, the test test/rbkt/w3c_testsuite/XQuery/Functions/QNameFunc/NamespaceURIForPrefixFunc/K2-NamespaceURIForPrefixFunc-2
is marked as an expected failure in
test/tbkt/Queries/CMakeLists.txt.
Also the test was manually added in the test/tbkt/Queries/w3c_known_failures.txt in order for the change to go through the RQ.

The proposed changes for this bug can be found on this public branch: lp:~zorba-coders/zorba/bug_872732

Changed in zorba:
milestone: none → 2.1
importance: Undecided → Medium
Changed in zorba:
status: New → In Progress
Changed in zorba:
milestone: 2.1 → none
Revision history for this message
Matthias Brantner (matthias-brantner) wrote :

Attached, please find a patch that simplifies the function a bit (apply using bzr merge name.diff).

Revision history for this message
Sorin Marian Nasoi (sorin.marian.nasoi) wrote :

Fixed by commit #10524.

Changed in zorba:
status: In Progress → Fix Committed
Changed in zorba:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.