You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If 'descriptor' is declared at the top level of an ALPS document,
then a client SHOULD assume that 'descriptor' can appear anywhere in
a runtime message.
If 'descriptor' is nested, i.e. declared as a child of another
descriptor, then:
A client SHOULD assume them to appear in any sibling 'descriptor'
element and recursively in their child descriptors.
A client SHOULD NOT assume that it can appear anywhere outside of
parent descriptor, unless it was explicitly referenced by another
descriptor in 'href' attribute. In that case the same rules are
applied to 'descriptor' containing 'href' attribute.
A nested item may not occur outside its parent, except when explicitly referenced from the outside. (seems clear)
But I have difficulties to understand statement 1.
When I read the word "them" in 1. as "A client SHOULD assume that the nested descriptor may appear in any sibling 'descriptor' element and recursively in their child descriptors"
It seems to say that 'child' implicitly is also present within 'sibling' and within 'grandchild2' and any deeper level below 'sibling', but not implicitly present below 'child'. Do I read that correctly? If so, what is the purpose of this?
Cheers
The text was updated successfully, but these errors were encountered:
this is an attempt to give some guidance (not spec, i guess) on how to
handle "scoping" issues for ALPS documents. the point we're trying to make
here is:
nesting descriptors is limiting their assumed scope. if i declare
at the top of the document, then it should be assumed to have a scope of global. however, if i declare within another descriptor (e.g. ....) then it should be assumed to be within the
scope of "person", not the global document.
this is still open for discussion but i hope this helps clear it up.
if you'd like to suggest an improvement feel free to do a fork/PR on that.
If 'descriptor' is declared at the top level of an ALPS document,
then a client SHOULD assume that 'descriptor' can appear anywhere in
a runtime message.
If 'descriptor' is nested, i.e. declared as a child of another
descriptor, then:
A client SHOULD assume them to appear in any sibling 'descriptor'
element and recursively in their child descriptors.
2.
A client SHOULD NOT assume that it can appear anywhere outside of
parent descriptor, unless it was explicitly referenced by another
descriptor in 'href' attribute. In that case the same rules are
applied to 'descriptor' containing 'href' attribute.
I have difficulties to understand statement 1.
A nested item may not occur outside its parent, except when explicitly
referenced from the outside. (seems clear)
But when I read "them" in 1. as: A nested descriptor may "appear in any
sibling 'descriptor' element and recursively in their child descriptors"
It seems to say that 'child' implicitly is also present within 'sibling'
and within 'grandchild2' and any deeper level below 'sibling', but not
implicitly present below 'child' . Do I read that correctly? If so, what is
the purpose of this?
Cheers
Dietrich
—
Reply to this email directly or view it on GitHub #80.
Quote from the spec:
--- snip ---
If 'descriptor' is declared at the top level of an ALPS document,
then a client SHOULD assume that 'descriptor' can appear anywhere in
a runtime message.
If 'descriptor' is nested, i.e. declared as a child of another
descriptor, then:
element and recursively in their child descriptors.
parent descriptor, unless it was explicitly referenced by another
descriptor in 'href' attribute. In that case the same rules are
applied to 'descriptor' containing 'href' attribute.
A nested item may not occur outside its parent, except when explicitly referenced from the outside. (seems clear)
But I have difficulties to understand statement 1.
When I read the word "them" in 1. as "A client SHOULD assume that the nested descriptor may appear in any sibling 'descriptor' element and recursively in their child descriptors"
It seems to say that 'child' implicitly is also present within 'sibling' and within 'grandchild2' and any deeper level below 'sibling', but not implicitly present below 'child'. Do I read that correctly? If so, what is the purpose of this?
Cheers
The text was updated successfully, but these errors were encountered: