RDF API - Element Subject?

You can easily get elements by type:

   document.getElementByType("schema:Person");

but once you have an element retrieved as such, deriving the subject
isn't so easy.

I just added to my client API implementation:

   document.getElementSubject(element)

which will return the subject associated with that origin in the
document.  This works well for my implementation as I trace all
subject origins.

I could just as easily added a projection constructor:

   document.getProjectionByType("schema:Person");

and that would return the project along with the subject.  But, as the
projection doesn't have the subject origin (which can be multiple
elements), it does allow you to process documents where you select
elements by type and then use the subject to get additional
properties.

I believe that, according to the RDFa 1.1 Sequence algorithm, a
element will only have a single subject associated with it.

-- 
--Alex Milowski
"The excellence of grammar as a guide is proportional to the paucity of the
inflexions, i.e. to the degree of analysis effected by the language
considered."

Bertrand Russell in a footnote of Principles of Mathematics

Received on Wednesday, 23 May 2012 20:49:21 UTC