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: XDI contexts and cross-references


Another question that came up on today’s call involved the meaning of the following statement (a simplified version of the example we were discussing from the XDI RDF Model doc, http://wiki.oasis-open.org/xdi/XdiRdfModel):

 

      =drummond/+email//=drummond/+email+home

 

Does that mean that =drummond/+email is an equivalent XDI statement to =drummond/+email+home?

 

No, it only means that the statement =drummond/+email is the parent context for the statement =drummond/+email+home. =drummond/+email could also be the parent context for the statement =drummond/+email+work. In X3 Simple, this would graph as:

 

=drummond

      +email

            /

                  =drummond

                        +email+home

                        +email+work

 

So if you did an XDI $get on =drummond/+email, the response would be the entire graph above. That graph in turn could be part of this larger graph:

 

=drummond

      +email

            /

                  =drummond

                        +email+home

                        +email+work

      +email+home

            "dsr.example@gmail.com"

      +email+work

            "drummond.example@cordance.net"

      +email$

            (/+email+work)

 

This larger graph includes the cross-reference “(/+email+work)”. This reads as, “relative to the same XDI subject, refer to the +email+work predicate”. Unlike a subcontext, this statement IS saying that one XDI statement refers directly to another one, i.e., the first XDI statement below refers to the second one:

 

      =drummond/+email$/(/+email+work)

      =drummond/+email+work

 

So, for purposes of illustration of these two concepts – XDI contexts and XDI cross-references, an XDI request/response pattern against the full graph above, translated from English into X3, might be:

 

Q: "Markus would like Drummond's email address."

 

=markus

      $get

            /

                  =drummond

                        +email

 

A: "Drummond has two email addresses, home and work."

 

=drummond

      +email

            /

                  =drummond

                        +email+home

                        +email+work

 

Q: "Then Markus would like Drummond's home email address."

 

=markus

      $get

            /

                  =drummond

                        +email+home

 

A: "Here is the value."

 

=drummond

      +email+home

            "dsr.example@gmail.com"

 

*************

A different request response pattern against the same path might be:

 

Q: "Markus would like Drummond's canonical email address."

 

=markus

      $get

            /

                  =drummond

                        +email$

 

A: "Drummond's canonical email address is his work email address."

 

=drummond

      +email$

            (/+email+work)

 

Q: "Then Markus would like Drummond's work email address."

 

=markus

      $get

            /

                  =drummond

                        +email+work

 

A: "Here is the value."

 

=drummond

      +email+work

            "drummond.example@cordance.net"

 

***********

Note that one of the last two roundtrips could be eliminated by the simple rule that the server would resolve xrefs within the same XDI context. This would result in the following request/response:

 

Q: "Markus would like Drummond's canonical email address."

 

=markus

      $get

            /

                  =drummond

                        +email$

 

A: "Drummond's canonical email address is his work email address, and here is the value."

 

=drummond

      +email$

            (/+email+work)

      +email+work

            "drummond.example@cordance.net"

 

 

 



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