Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

document-node(a|b) is the same type as document-node(a)|document-node(b) #1624

Open
michaelhkay opened this issue Nov 29, 2024 · 1 comment
Labels
Bug Something that doesn't work in the current specification XPath An issue related to XPath XQuery An issue related to XQuery

Comments

@michaelhkay
Copy link
Contributor

document-node(a|b) is the same type as document-node(a) | document-node(b) but the current subtyping rules don't say this.

Revealed by test case misc/subtyping-076

Note, this problem existed before we introduced document-node(X), the same is true of the expansion:

document-node(element(a|b)) is the same type as document-node(element(a)) | document-node(element(b))

@michaelhkay michaelhkay added Bug Something that doesn't work in the current specification XPath An issue related to XPath XQuery An issue related to XQuery labels Nov 29, 2024
@michaelhkay
Copy link
Contributor Author

michaelhkay commented Dec 15, 2024

In fact there are other cases where A | B ⊆ C is false despite the value space of A | B being contained within the value space of C, and we identify some of these cases in §3.3.2.4. This is just another example, which we could add to the notes in §3.3.2.4.

Under the current rules document-node(a) | document-node(b) ⊆ document-node(a|b) is true, but the converse document-node(a|b) ⊆ document-node(a) | document-node(b) is not. The same applies to element(a|b) ⊆ element(a) | element(b).

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Bug Something that doesn't work in the current specification XPath An issue related to XPath XQuery An issue related to XQuery
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant