[Bug 27734] <assert-xml ignore-prefixes="true"

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

--- Comment #4 from Michael Kay <mike@saxonica.com> ---
The WG asked me to reply (again). I think the situation can be summarised as
follows:

* Test authors should avoid using assert-xml for new tests if the result tree
contains implementation-defined namespace prefixes.

* There may be some existing tests that use assert-xml even though the result
contains implementation-defined prefixes; the presence of the attribute
ignore-prefixes="true" alerts the reader (or test driver software) to the fact
that this is the case. Other attributes that may appear are normalize-space and
xml-version.

* Generally, for new tests, XPath-based assertions are preferred, because they
can distinguish more precisely what aspects of the result are essential to the
success of the test.

* XML canonicalization can be used to implement the assert-xml assertion except
in cases where ignore-prefixes is set; in such cases the test driver must find
some way of comparing the results in such a way that prefixes are not
considered significant.

* Using deep-equal() is not really strong enough to implement assert-xml
properly, although it's probably good enough for most cases; but, for example,
it ignores comments and processing instructions. 

(In the Saxon test driver, we use saxon:deep-equal() to implement assert-xml.
This is a variant of fn:deep-equal() that allows customization of the equality
comparison. For example, we set options to ensure that namespace declarations,
comments, and processing instructions are not ignored; we set a flag to ignore
namespace prefixes if and only if the ignore-prefixes attribute is set to
"true").

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

Received on Tuesday, 15 March 2016 14:52:55 UTC