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

Re: Extended links in RDFa

From: Eric van der Vlist <vdv@dyomedea.com>
Date: Fri, 04 Mar 2011 14:29:43 +0100
To: public-rdfa <public-rdfa@w3.org>
Message-ID: <1299245383.25020.551.camel@studio>

Le jeudi 03 mars 2011 à 15:42 -0800, Leif Warner a écrit :
> That snippet generates the following RDF graph:
> http://musicpath.org/foo/graph.svg

Yes, that's equivalent to what I saw with RDFa2RDFXML or operator.

> (That was generated with the command 
> rapper -i rdfa -o dot file.xhtml | circo -Tsvg  > graph.svg
> where the 'rapper' and 'circo' commands come from the Raptor RDF and
> Graphviz packages, respectively.)

Thanks for the tip, these graphical outputs are very handy!

> By arc, do you mean the edges/links between the graph nodes/resources?

I meant arcs like those defined in extended XLinks (see below)...

>   The "property" attribute is for attaching a named text/literal value
> to a node, e.g. a label. The value of "rel" should be the URI id for
> the link between two nodes.  You could in turn treat that id as a new
> node, and attach other things to that.
> You can use typeof to generate a new blank node, or use one of
> href/src/about/resouce with a URI to generate a new node with an id
> that you can talk about elsewhere.
> Hope that helps.

Yes, it did (together with re-reading the spec...).

According to Raptor (and operator),

<span typeof="nhrefs:link">
    <span property="nhrefs:source">XQuery</span> 
    <span rel="nhrefs:hasarc">
        [<span typeof="nhrefs:arc">
            <a href="http://en.wikipedia.org/wiki/XQuery" 
               property="nhrefs:title">XQuery on Wikipedia</a> 
            <span rel="nhrefs:role" resource="nhrefs:wikipedia" />
        <span typeof="typeof:arc">
            <a href="http://www.w3.org/TR/xquery/" rel="nhrefs:dest" 
               property="nhrefs:title">XQuery W3C Recommendation</a>
            <span rel="nhrefs:role" resource="nhrefs:authoritative" />

Gives something that close to what I want to achieve:

However, I still have a couple of questions:

      * Empty span elements to define properties look like a hack. Is
        there a better way to achieve the same effect?
      * RDFa2RDFXML doesn't parse this correctly. Is that a bug
        RDFa2RDFXML or is this snippet invalid (or border line)?



> -Leif Warner
Received on Friday, 4 March 2011 13:30:20 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:15:08 UTC