-
Notifications
You must be signed in to change notification settings - Fork 20
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
Define descendant list semantics #233
Conversation
* the `..[<filter>]` form selects those descendants that are array elements or object values selected by the given filter. | ||
* the `..[*]` and `..*` forms select all the descendants. | ||
|
||
An _array-sequenced preorder_ of the descendants of a node is a sequence of all the descendants in which: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR removes the need for the term "array-sequenced preorder" by talking instead about a nodelist of the descendants with the same properties. I think this is easier to read and gives the same ordering properties.
@@ -1326,7 +1326,7 @@ list-entry = ( quoted-member-name / | |||
#### Semantics | |||
{: unnumbered} | |||
|
|||
A list selector selects the nodes that are selected by at least one of | |||
A list selector selects the nodes that are selected by |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Major semantics change here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That wasn't my intention. The "at least one of" wording was vestigial and related to when we were considering removing duplicates. Now that duplicate nodes and values are retained, the wording is no longer needed.
Or am I missing something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a change fixing vestigial text
c7c833d
to
4101d7b
Compare
@timbray Just a gentle reminder to re-review as I'd like to get this PR merged. Thanks. |
4101d7b
to
32d279e
Compare
|
||
* nodes of any array appear in array order, | ||
* nodes appear immediately before all their descendants. | ||
|
||
This definition does not stipulate the order in which the children of an object appear, since JSON objects are unordered. | ||
This definition does not stipulate the order in which the children of an object appear, since | ||
JSON objects are unordered. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Slightly more correct I think: The order of the members in a JSON object is not information-bearing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The sentence "The order of the members in a JSON object is not information-bearing." is a bit tricky because it refers to "The order of the members in a JSON object" as if that was somehow well defined. Also, I'm not sure how many people would understand the sentence because the term "information-bearing" is a little unusual. I think I'll stick with the informal language for now.
Also tweak the wording of the list semantics section.
Fixes #232
Reviewers may find the rendered version useful.