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

Purpose of nested descriptor siblings not clear #80

Open
dschulten opened this issue Oct 28, 2015 · 1 comment
Open

Purpose of nested descriptor siblings not clear #80

dschulten opened this issue Oct 28, 2015 · 1 comment
Labels

Comments

@dschulten
Copy link

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:

  1. 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.

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"

<descriptor id="parent">
  <descriptor id="child" >
    <descriptor id="grandchild1"/>
  </descriptor>
  <descriptor id="sibling" >
     <descriptor id="grandchild2"/>
  </descriptor>  
</descriptor>

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

@mamund
Copy link
Member

mamund commented Oct 31, 2015

DS:

sorry for the long silence on this.

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.

cheers.

mamund
Mike Amundsen
+1.859.757.1449
skype: mca.amundsen
http://amundsen.com/blog/
http://twitter.com/mamund
https://github.com/mamund
http://linkedin.com/in/mamund

On Wed, Oct 28, 2015 at 4:21 PM, Dietrich Schulten <notifications@github.com

wrote:

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:

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants