Re: Extended links in RDFa

Leif,

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" 
               rel="nhrefs:dest" 
               property="nhrefs:title">XQuery on Wikipedia</a> 
            <span rel="nhrefs:role" resource="nhrefs:wikipedia" />
        </span>, 
        <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" />
        </span>]
    </span>
</span>


Gives something that close to what I want to achieve:
http://eric.van-der-vlist.com/blog/wp-content/uploads/2011/03/rdfa-881x1024.png


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

Thanks,

Eric

> -Leif Warner

Received on Friday, 4 March 2011 13:30:20 UTC