W3C home > Mailing lists > Public > public-rdfa-wg@w3.org > March 2010

Re: RDFa Core and RDF/XML

From: Toby Inkster <tai@g5n.co.uk>
Date: Mon, 29 Mar 2010 14:42:00 +0100
To: Ivan Herman <ivan@w3.org>
Cc: W3C RDFa WG WG <public-rdfa-wg@w3.org>
Message-ID: <1269870120.3257.12.camel@ophelia2.g5n.co.uk>
On Mon, 2010-03-29 at 13:04 +0200, Ivan Herman wrote:
> Let us suppose I have a general XML application, using namespaces. I
> use RDFa 1.1 in there, that can be used to generate RDF triples.
> However, because that is a namespace aware XML application, it is
> perfectly feasible that the user includes an RDF/XML portion into the
> XML file, too. The question is: are the triples described by that
> RDF/XML part of what the RDFa processor produces or not? Ie, should
> the RDFa processor take that RDF/XML portion, parse it and add those
> triples to the generated Graph?

My RDFa parser has three options that it can take when it sees RDF/XML
in a document:

* It can plough straight through it, and if any RDFa is found within it
(say in an XML literal), then these will be parsed in the same way that
they would be anywhere in the document.

* It can skip over the element, ignoring its contents.

* It can parse the RDF/XML (or rather it calls another Perl module to do
the job).

Although @xml:base is ignored for resolving relative URIs in RDFa, my
parser does look at this attribute so that it can pass the base URI on
to the RDF/XML parser. (There's also an option to allow <base href> to
be used as a fallback base URI for the RDF/XML.) It also passes the
@xml:lang attribute on.

By default, RDFa triples and RDF/XML triples are added to the same
graph, though there is a multi-graph mode where each RDF/XML chunk is
added to a different graph.

As you can tell from the above description, the parser has a number of
different options that the consumer can fiddle with. For convenience, a
few default sets of options are provided.

The default set of options for XHTML takes the first route with RDF/XML,
ploughing straight through it. The default for SVG parses the RDF/XML,
as do the defaults for Atom and generic XML.

-- 
Toby A Inkster
<mailto:mail@tobyinkster.co.uk>
<http://tobyinkster.co.uk>
Received on Monday, 29 March 2010 13:42:40 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 27 April 2012 04:55:06 GMT