w3c / qt3tests

Tests for XPath and XQuery
27 stars 17 forks source link

Shouldn't <assert-deep-eq> contains only expressions which are valid to all dependency specs? #64

Open nkutsche opened 1 month ago

nkutsche commented 1 month ago

@michaelhkay The new test cases PathExpr-17, PathExpr-18 and PathExpr-19 contains all:

<result>
   <assert-deep-eq>[<bid>23</bid>, <bid>23</bid>]</assert-deep-eq>
</result>

But they are related also to pure XPath 3.1 (<dependency type="spec" value="XP31+ XQ31+"/>). A test runner for an implementation which supports only XPath 3 would be required to interpret XQuery for this cases. In all other (XPath related) test cases XQuery was not needed.

I didn't found a concrete specification what kind of expressions <assert-deep-eq> has to contain but I think it was just a mistake, right?

michaelhkay commented 1 month ago

Yes, this is incorrect (even for XQuery, it should be in a CDATA section). All assertions should be XPath 3.1 expressions.

nkutsche commented 1 month ago

Oh, yeah. I didn't even noticed that. Actually, if you use only the node value of <assert-deep-eq> they are correct XPath 3.1 expressions - but it wouldn't be the expected result. 🙂 That explains why my test cases are failing and do not lead to a compilation error.

Btw. having a closer look, PathExpr-17 and PathExpr-18 are duplicates.