[Bug 29589] [QT3] Module import

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

Michael Kay <mike@saxonica.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mike@saxonica.com

--- Comment #1 from Michael Kay <mike@saxonica.com> ---
Unfortuntely (in my view) it is not an error to have two modules with the same
namespace, in fact it is explicitly allowed by the specification, though almost
everything about it is implementation defined, and one could certainly
challenge the test on that basis.

The spec says: Each module import names a target namespace and imports an
implementation-defined set of modules that share this target namespace.

To make modules testable at all, the test driver documentation has to impose
some rules.

As always the test suite documentation isn't quite as specific as it should be.
It says (of test-case/module): Defines an XQuery library module imported by a
test case. The module element gives the module URI and the location of the
module. The query will contain an "import module" declaration referencing the
same module URI, with no "at" location (except where the "at" attribute is
being specifically tested, in which case the results are undefined.)

The unstated assumption is that if there is more than one test-case/module
element with the same uri value, you are expected to import them all.

This does raise the question whether it would be conformant for an
implementation to have no support for multiple modules with the same URI (and
thus be unable to run this test). I think this would indeed be conformant. The
spec says that the implementation loads "an implementation-defined set of
modules" and it would be conformant for this set to be always of size one
(arguably it would also be conformant for it always to be empty, but then
no-one would buy your product...). The reason Saxon allows multiple modules
with the same namespace is for interoperability with other implementations that
allow it, not because it is required for conformance.

So one could argue that (a) these tests should have a dependency
"multiple_modules_for_uri", and (b) that the documentation for test-case/module
should be more explicit.

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

Received on Monday, 25 April 2016 08:08:01 UTC