This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
<test-case name="parse-xml-fragment-022" xmlns="http://www.w3.org/2010/09/qt-fots-catalog"> <description>parse-xml-fragment test - result is parentless</description> <created by="Michael Kay, Saxonica" on="2013-01-07"/> <environment name="empty"/> <test><![CDATA[parse-xml-fragment("<a/>")/..]]></test> <result> <assert-empty/> </result> </test-case> This test should also allow XPST0005 (During the analysis phase, it is a static error if the static type assigned to an expression other than the expression () or data(()) is empty-sequence()). The return type of parse-xml-fragment is document-node()?.
Technically you should create two versions of the test, with dependencies on static type checking being enabled/disabled, and different results for the two cases, rather than simply defining two permitted results.
At the very least, there seems to be a strong precedent for allowing XPST0005 in such cases without tagging the test with the static typing feature. Bug 21620 is one example but there appear to be many cases throughout the test suite. I think in this case we should keep with the precedent and simply add the alternate result.
The precedent is there because many of the tests were written before we had the ability to define fine-grained dependencies. Adding an error as a possible result is that it makes it very easy for test failures to go unnoticed, since generating the wrong error code is not something that gets reported as a test failure.
Applied fix suggested in Comment 1.