Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

[XPath] [XQuery] Support RecordTest self references without occurrence indicators #44

Closed
rhdunn opened this issue Jan 6, 2021 · 2 comments
Labels
Bug Something that doesn't work in the current specification Editorial Minor typos, wording clarifications, example fixes, etc. XPath An issue related to XPath XQuery An issue related to XQuery

Comments

@rhdunn
Copy link
Contributor

rhdunn commented Jan 6, 2021

This would be useful for defining things like binary trees, where the fields are optional but (if supplied) the values are not. So it is more logical to define them as:

declare item-type binary-tree as record(
    left? as ..,
    right? as ..,
    value as item()*
);
@michaelhkay
Copy link
Contributor

This was the intent, evidenced by the example

record(error-code as xs:QName, message as xs:string, cause? as ..)

but the grammar needs amending to allow it.

@rhdunn
Copy link
Contributor Author

rhdunn commented Jan 16, 2021

The latest editor's draft resolves this issue by making the occurrence indicator optional in the EBNF grammar.

@rhdunn rhdunn closed this as completed Jan 16, 2021
@rhdunn rhdunn added Bug Something that doesn't work in the current specification XPath An issue related to XPath XQuery An issue related to XQuery Editorial Minor typos, wording clarifications, example fixes, etc. Accepted labels Sep 15, 2022
@rhdunn rhdunn added this to the QT 4.0 milestone Sep 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something that doesn't work in the current specification Editorial Minor typos, wording clarifications, example fixes, etc. XPath An issue related to XPath XQuery An issue related to XQuery
Projects
None yet
Development

No branches or pull requests

2 participants