Anonymous user [OpenID enabled] [XRI enabled] [LID enabled]

LID 2.0 Traversal Service

From LID Wiki

(Redirected from LID 2.0 Traversal Profile)
Jump to: navigation, search

Overview

A LID URL that supports the LID 2.0 Traversal Service supports traversal and selection using the xpath argument, as well as the lid-meta=vocabularies request.

The value of the xpath argument is an XPath (see XPath specification) according to the XML namespaces defined in the information returned by the lid-meta=vocabularies request from the same LID URL.

Conceptually, the LID Traversal Service can best be understood by considering the LID Object behind the LID URL part of an Object Graph. The XPath specified using the xpath argument defines a traversal from the LID Object to zero, one, or more other objects (which may or may not be LID Objects). The response to a request containing an xpath contains a suitable representation of the found zero, one or more objects. The representation of the found objects in the response depends on their type, the vocabularies that are involved, the requested format and/or other criteria, none of which is defined by this service. The LID 2.0 Traversal Service is thus most often used together with other LID 2.0 Services.

The lid-meta=vocabularies request

A request in which the parameter lid-meta has the value vocabularies is answered with a list of vocabularies that known at the queried LID URL.

{tbd}An example can illustrate the format of the response:

<vocabularies>
  <vocabulary>
   <path xpath="/VCARD"/>
   <doctype name="VCARD" uri="http://lid.netmesh.org/dtds/VCARD.dtd"/>
  </vocabulary>
  <vocabulary>
   <path xpath="/FOAF" />
   <namespace prefix="rdf" uri="http://www.w3.org/1999/02/22-rdf-syntax-ns#"/>
   <namespace prefix="rdfs" uri="http://www.w3.org/2000/01/rdf-schema#"/>
   <namespace prefix="foaf" uri="http://xmlns.com/foaf/0.1/"/>
   <namespace prefix="admin" uri="http://webns.net/mvcb/"/>
  </vocabulary>
 </vocabularies>

This means:

  • At the queried URL, the specified xpaths of /VCARD and /FOAF will lead to the resepective (and different vocabularies).
  • the first vocabulary is defined as a particular XML document type, whose master definition can be found at a particular URI
  • the second vocabulary is defined through a number of XML namespaces, which are used with certain XML namespace prefixes, which in turn are defined at certain URIs.

Example

The request

LID?xpath=/VCARD/N/GIVEN

performed on a LID URL that represents a person, may return the first, or given, name of that person. Which format is used in the HTTP response (such as HTML) is up to the LID Server; the LID 2.0 Format Negotiation Service can be used by the LID Client to indicate which format it wishes the LID Server to return.

By virtue of Yadis, the service URI on which to perform the query may different from the LID URL.

Personal tools