[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [RDDL] Java Object Model
- From: Jonathan Borden <jborden@mediaone.net>
- To: Ken MacLeod <ken@bitsko.slc.ut.us>, xml-dev@lists.xml.org
- Date: Sun, 28 Jan 2001 15:33:42 -0500
Ken MacLeod wrote:
>
> Here is a quick translation to the sort-of grovish perspective that
> I've been implementing in Orchard[1], a Grovish Model, if you will :-).
...
>
> In RDDL-JOM, Namespace has several query methods. In Orchard, I
> expect to be able to use XPath-like queries over nodes and their
> properties, so the equivalent queries would look like below. In turn,
> these queries can be re-attached as helper methods that are aliases
> for the queries. The context is an instance of Namespace.
Excellent, and to be clear the implementation I've provided is labelled in
the spec as 'informative' not 'normative'. RDDL is strengthened as more
XML-DEVers provide implementations in various languages and with various
APIs. The implementation I've provided is intended to be minimalistic and
hopefully efficient, and at the same time to hopefully represent the RDDL
'Infoset' or 'grove'.
>
> getResourcesFromNature /resources[@xlink:role="nature"]
> getResourcesFromPurpose /resources[@xlink:arcrole="purpose"]
> getResourcesFromHref /resources[@xlink:href="href"]
> getResourcesFromTitle /resources[@xlink:title="title"]
> getResourcesFromLang /resources[@xml:lang="lang"]
> getResourcesFromId /resources[id("id or id-list")]
>
> (These XPath-like queries are just conceptual, the mapping of queries
> into nodes is not complete yet, and there are some semantic
> differences between trees of elements and attributes, and trees of
> arbitrary nodes.)
>
> An example usage of Orchard RDDL would look like this, in Python:
>
> from Orchard import RDDL
>
> namespace = RDDL.get('http://www.rddl.org/')
>
> xlink = "http://www.w3.org/1999/xlink"
>
> for resource in namespace.resources:
> print "URI: " + resource.uri
> print "Title: " + resource[(xlink, 'title')]
> print "Nature: " + resource[(xlink, 'role')]
> print "Purpose: " + resource[(xlink, 'arcrole')]
> print
>
> These short snippets[2] of Orchard use don't tell a whole story. Much
> of Orchard's capabilities are in working with many different types of
> property sets in a consistent fashion and with shared tools, rather
> than in how any one particular property set is implemented. This
> "bigger picture" won't really be visible until somewhere between
> version 1.0 (in a few weeks) and hopefully 2.0 (a few months).
>
Let us know when you have a project URL for the Orchard/RDDL implementation
and I will add it as a reference (perhaps you can give guidance as to its
nature :-) Your Orchard link is exactly the type of resource list that would
lend itself to RDDL.
-Jonathan