W3C home > Mailing lists > Public > public-xml-processing-model-wg@w3.org > March 2013

Semantic Web Steps / Use Cases

From: Alex Milowski <alex@milowski.com>
Date: Tue, 5 Mar 2013 10:44:09 -0800
Message-ID: <CABp3FN+53RBvp8CCMaz05iC3xpbO4d+QDy-RRx5CqXYrtUH1aQ@mail.gmail.com>
To: XProc WG <public-xml-processing-model-wg@w3.org>
The basic use cases are:

1. Harvest information via RDFa from a collection of documents.

2. Translate between RDF and Turtle.

3. Query RDF/Turtle locally via SPARQL.

4. Access SPARQL endpoints and process the results.

This step harvests information from a collection documents via RDFa 1.1
[1].  The input is any kind of markup that utilizes RDFa and the output is
either RDF or Turtle [2].

The step's declaration:

<p:declare-step type="p:harvest-rdfa">
   <p:input port="source" sequence="true" primary="true"/>
   <p:input port="initial-context"/>
   <p:output port="result" primary="true"/>
   <p:option name="output-type" select="'application/rdf+xml'"/>
   <p:option name="profile"/>

Note: I'm not overly attached to the name.

The input is a sequence of documents from which an annotation graph is to
be harvested.  The result is the union of the graphs.

The 'output-type' controls the output vocabulary and can either be RDF
(application/rdf+xml) or Turtle (text/turtle), specified by media type.  If
the output is Turtle, a c:data element will wrap the tuples in Turtle

The 'profile' option can either be the strings 'xml', 'xhtml', or 'html'
for the various defined RDFa profiles.  Other values are implementation

Also, we need steps that go between RDF and Turtle:

<p:declare-step type="p:turtle2rdf">
   <p:input port="source" primary="true"/>
   <p:output port="result" primary="true"/>

<p:declare-step type="p:rdf2turtle">
   <p:input port="source" primary="true"/>
   <p:output port="result" primary="true"/>

I could also imagine a local SPARQL [3] query step:

<p:declare-step type="p:sparql-query">
   <p:input port="source" sequence="true" primary="true"/>
   <p:input port="query"/>
   <p:output port="result" primary="true"/>
   <p:option name="output-type" select="'application/rdf+xml'"/>

I'm not sure what other options people might want on a SPARQL query.

SPARQL end points are often accessed over HTTP and so we already have that
covered.  The results are often in Turtle, RDF, or possibly now RDFa.  The
above steps should help process that information.

[1] http://www.w3.org/TR/rdfa-core/
[2] http://www.w3.org/TR/turtle/
[3] http://www.w3.org/TR/rdf-sparql-query/

--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

Bertrand Russell in a footnote of Principles of Mathematics
Received on Tuesday, 5 March 2013 18:44:37 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:32:51 UTC