I have some doubts about how to publish RDF data in a “semantic” site case study…

The better way

I know that now there is a PERFECT way, that is having an RDF backend and using an RDF Server ( as Sesame, Joseki or RAP for PHP enviroments ) with SPARQL as query language…

But in a small contest, instead of using XML Microformats, how we can do?


Consider this case: a wordpress blog with the StructuredBlogging plugin installed… ( like this one )…

We know that this plugin uses a tag script to add in the post meta-info about the post itself… using this XML code:

<script type="application/x-subnode; charset=utf-8"> <subnode alternate-for-id="sbentry_1"> ... </subnode> </script>

More info about this approach at Technical Resources

The problem is that: there are several ways of including RDF code in a XHTML document, and two are the most important:

  • using of tag link rel=”meta” type=”application/rdf+xml” href=”” : it’s valid also for other RDF formats ( N3, nt .. )* using the tag script with the correct type… as above
    A more detailed duscussion is on this page:

-> RDF in HTML: Approaches

But it’s a quite old document, so using one more recent as SKOS working drafts, for example:

-> Quick Guide to Publishing a Thesaurus on the Semantic Web
we can find an interesting paragraph:

Publishing RDF Data

The simplest way to publish RDF data is to create one or more RDF documents containing your data, and publish them on the web via a normal HTTP server.

Note that, although the examples above all use the RDF/XML serialisation syntax (i.e. file format), there are two other alternative syntaxes for RDF: N3/Turtle [N3][Turtle] and N-Triples [N-Triples]. For documents containg RDF data in the RDF/XML format, the ‘content-type’ field in the HTTP header for that document should be ‘application/rdf+xml’.

You can also publish your RDF data on the web via a dedicated RDF server such as Joseki [Joseki] or Sesame [Sesame]. Publishing via an RDF server allows anyone to query the thesaurus over the web via an RDF query language such as SPARQL [SPARQL].

Current practice dictates that if you use HTTP URIs as identifiers for your thesaurus and its concepts, then those URIs should dereference to an RDF description of the thing they identify.

So, if i have a site with all its RDF stuff accessible via HTTP RDF Server and SPARQL, but also with some pages with the tag script with RDF code is it correct ?


The use of RDF Server is a overlap of the others RDF inclusion tecniques or are two way to offer semantic data with different approaches?

I mean, probably the data inserted in the script tag is data just ready, instead for the server we have to make a query… so different usages… are acceptable IMHO.

Having a way to collect data as soon as it’s available is the context of use of the direct inclusion in a web page ( of the RDF data, of course )…
Probably that’s the difference…

As it is said here,

Neither of the linking (“tag link to the Metadata”) or embedding (“Embed XML RDF Part I: Eschew Validation”, and possibly “Embedding using tag script”) methods can be ruled out, in the author’s opinion.

Linking has the substantial advantage that it is serialization independent, may reduce file sizes when a single set of triples is often referenced (such as contact information), and provides a cascade.

Embedding is useful because it is direct, there are existing implementations to deal with it, plus people will be embedding XML RDF and other languages like it into XHTML for a long time to come.