[Bug 29582] New: [QT3] relative URIs in app-Walmsley tests

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

            Bug ID: 29582
           Summary: [QT3] relative URIs in app-Walmsley tests
           Product: XPath / XQuery / XSLT
           Version: Candidate Recommendation
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XQuery 3 & XPath 3 Test Suite
          Assignee: oneil@saxonica.com
          Reporter: mike@saxonica.com
        QA Contact: public-qt-comments@w3.org
  Target Milestone: ---

The way in which the tests in test-set app-Walmsley use relative URIs is
inconsistent with other parts of the test suite and creates difficulties for
the test driver.

A typical example is test d1e11215, which includes the function call

doc("catalog.xml")

This is intended as a reference to the resource described in the environment as

<source role="." file="Walmsley/catalog.xml" uri="catalog.xml"/>

The query is in an XML file

/some/path/app/Walmsley.xml

and the required file can be found in

/some/path/app/Walmsley/catalog.xml

The problem is that the doc() function is supposed to resolve the relative URI
against the base URI of the query, and the base URI of the query is
file:///some/path/app/Walmsley.xml. The absolute URI is therefore 

file:///some/path/app/catalog.xml

and it's difficult from this to identify the <source> element in the
environment. It works if (in JAXP, for example) you can write a URIResolver
that is given the base URI and the relative URI separately, but the language
specs don't encourage that: whereas it's fine for the absolute URI to be
redirected by some external lookup mechanism ("the static context") there's no
suggestion in our specs of the JAXP mechanism where the relative and base URI
are separately available to the lookup mechanism.

It's tempting to suggest fixing this by adding a <static-base-uri> element to
the environment, but the test catalog specification says that this must be an
absolute URI.

I therefore suggest that we should change these tests to use relative URIs that
resolve properly, without redirection, to the documents that the tests are
intended to use.

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

Received on Wednesday, 20 April 2016 17:55:00 UTC