OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

xdi message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: Re: [xdi] XDI Graph Model Rules

Ok, let's consider everything but definition and variable.

r e-i a-i c s v
root x x x x
e-inst x x x
a-inst x x x x
class x x x
single x x x a

Which sequences are legal? I think this formula expresses it, do you agree? Attribute and entity classes are not distinguished as there don't seem to be any separate constraints on each - or can attribute instances only follow attribute classes and entity instances only follow entity classes?

*r   *( es / as / ( c *ei ) / ( c *ai ) )   [ ( as / ( c 1*ai ) ) v ]

On May 22, 2013, at 7:55 PM, Drummond Reed <drummond.reed@xdi.org> wrote:

On Wed, May 22, 2013 at 4:45 PM, Joseph Boyle <planetwork@josephboyle.net> wrote:

On May 22, 2013, at 4:12 PM, Drummond Reed <drummond.reed@xdi.org> wrote:

Joseph, nice table. I was just discussing it w/Markus and here's our answers to your questions:
  1. A singleton cannot contain an instance (only classes can contain instances).
Is the following on the page incorrect then?
  1. An entity singleton context MAY have the following types of subcontexts: classentity instancesingletondefinitionvariable.
  1. An attribute singleton context MAY have the following types of subcontexts: classattribute instancesingletonvaluedefinitionvariable.

Good catch! Yes, "entity instance" should be dropped in the first and "attribute instance" dropped in the second. I just fixed that on the wiki page. 
Also, can you confirm whether or not instances can contain instances?

Yes, they can. That allows us to easily model nested JSON arrays. 
  1. Since variables can be typed, a typed variable can contain anything that the type of context that the variable represents can contain. For example, a variable representing a root context can contain anything a root context can contain. However, variables can also be untyped. An untyped variable can contain anything that would be valid for its position in the XDI graph model. For example, an untyped variable representing a context below the root level cannot represent a root. And an untyped variable whose parent is not a class cannot represent an instance.
  2. You are correct that a value context cannot contain any subcontexts. It's truly a leaf context node that can contain zero-or-one XDI literal node.
Maybe I should drop variable and value from the matrix and treat them separately.

You could. They are pretty unique.

When not covered by the above, anything can contain anything.

I don't think there is such a case, i.e., everything is one of the seven node types above. It would concern me if there was another option, i.e., an "other" node type that didn't have any of these constraints. Am I missing something, i.e., is there any other option you know of?

I didn't mean beyond those seven - I meant that class, singleton, definition can all include each other freely.

Agreed. Also, we need to think more about what actually should be able to contain definitions. I haven't given it enough thought yet, but I'm beginning to think they should be treated like other roots, i.e., only roots can contain definitions, and only definitions can contain other definitions. But I need to think about it more.

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]