Post details: Generating RDFa from RDF
2008-10-21
Generating RDFa from RDF
Can you suggest tools or web services for generating RDFa content from RDF?
Extracting RDF statements from (X)HTML+RDFa is a common task and that’s what many RDFa tools do. An example of such service is the W3C RDFa distiller service by Ivan Herman.
What about a “RDFa fusion” tool which gets (X)HTML and RDF content as input and produces (X)HTML+RDFa?
In domain specific situations one can use templating for inserting bits of RDFa in relevant places of (X)HTML markup. An example is the FOAF/RDF to FOAF/RDFa converter by Michael Hausenblas.
But that will not work in a general case when the structure of (X)HTML document is not known in advance.
Related:
- RDFa in XHTML is a W3C Recommendation [W3C Semantic Web Activity news]
- Templating Microformats from RDF by Danny Ayers where I spotted a link to Michael’s FOAF/RDF to RDFa converter
Comments, Pingbacks:
Rendering RDF without domain information usually doesn't produce very good results. Therefore, I wonder a bit how useful such a service would be.
Maybe you can explain why you want to do this in the first place.
An example situation is FOAF and SIOC data which many sites currently expose as external metadata. It might take a bit before all these sites convert to RDFa but it would be good if services which can consume RDFa (e.g., SearchMonkey) could make use of this data right away.
Can you not encode arbitrary RDF as HTML+RDFa? Assuming that humans are only concerned with what is visible and machines are only concerned with statements extracted from the document (visibility of which is not a requirement as such) is there any "stakeholder" who cares if RDF statements are associated with a particular DOM node?
P.S. I am not talking here about a UI for visualizing RDF which may not have a good generic solution. This post is just about using a web page as a carrier of RDF data for consumption by RDFa-aware applications.
- presenting them to humans (i.e. as XHTML)
- extracting RDF structures from them (for queries)
From my point of view it makes sense to let the RDF and HTML representation of certain data seperated, because they must not necessarily describe the data with the same detail level, and relate them only via few RDFa statemants. These RDFa statemants simply relate roughly DOM nodes with external resource description. Maybe this mixed approach would allow combining the advantages of external RDF descriptions (e.g. easy to parse, no layout issues) with the advantages of embedded RDF (e.g. positional information).
I wrote a related posting: http://www.clauwa.info/2009/01/09/embedded-versus-external-semantic-metadata/