Bug #6244
closed![Author: Michael Kay](https://www.gravatar.com/avatar/db6526d63053f09b62e52c2da8b2230a?rating=PG&size=50&default=https%3A%2F%2Fassets.plan.io%2Fimages%2Fdefault_avatar.png)
![Assignee: Michael Kay](https://www.gravatar.com/avatar/db6526d63053f09b62e52c2da8b2230a?rating=PG&size=22&default=https%3A%2F%2Fassets.plan.io%2Fimages%2Fdefault_avatar.png)
Test case higher-order-functions-034
100%
Description
This test case is failing because it considers that
element(e)? is a subtype of element(e, xs:anyType)*
To quote https://www.w3.org/Bugs/Public/show_bug.cgi?id=21595
, this is not the case, because element(e)
allows a nilled element, while element(e, xs:anyType)
does not.
Updated by Michael Kay 8 months ago
I think that what is happening is that somewhere along the line, we're assuming that because the stylesheet isn't schema-aware, no element is ever going to have the nilled property, and therefore there's no difference between element(E, T)
and element(E, T?)
. However, although there's no difference in what the two types match, there is a difference when it comes to the subtyping relationship.
Updated by Michael Kay 8 months ago
The culprit seems to be XPathParser#3683 which ignores the ", xs:anyType" - code which I added on 2023-07-17 in the course of adding support for name test unions in 4.0.
Fixed for 12.x.
However, the code for 11.x is rather different, but the problem still occurs... Wrong: the test passes in 11.x
Updated by Michael Kay 8 months ago
- Status changed from New to Resolved
- Applies to branch deleted (
11) - Fix Committed on Branch 12, trunk added
- Platforms .NET, Java added
Updated by Michael Kay 8 months ago
Note, this bug never made it into an issued release.
Updated by O'Neil Delpratt 8 months ago
- Status changed from Resolved to Closed
- % Done changed from 0 to 100
- Fixed in Maintenance Release 12.4 added
Bug fix applied in the Saxon 12.4 maintenance release
Please register to edit this issue