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

Re: Extended links in RDFa

From: Leif Warner <abimelech@gmail.com>
Date: Thu, 3 Mar 2011 15:42:29 -0800
Message-ID: <AANLkTimUMHOYr2UYRLWeh8a7pOPnyPz1zVA7W3B+UU2m@mail.gmail.com>
To: public-rdfa@w3.org
That snippet generates the following RDF graph:

(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.)

By arc, do you mean the edges/links between the graph nodes/resources?  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.
-Leif Warner

On Thu, Mar 3, 2011 at 12:14 PM, Eric van der Vlist <vdv@dyomedea.com>wrote:

> Hi,
> Reading the archives, it's not obvious that requests for guidance belong
> to this list, but I am posting on this list based on the description
> found at
> http://rdfa.info/2008/03/15/a-new-rdfa-mailing-list-for-web-publishers/:
> "Just found out about RDFa from the Yahoo announcement? Read the Primer
> and have some questions? Deploying RDFa on your web site and want some
> guidance with specific examples? We’ve got a new mailing list for you:
> public-rdfa@w3.org"
> Please bear with me if that's no longer the case!
> I'd like to express extended links in RDFa and my requirements are:
>      * To express inline links with multiple arcs between (X)HTML
>        fragments and several link ends.
>      * The markup should be easy to process by a simple JavaScript
>        library to be presented in a fancy way.
>      * It should also degrade nicely and remain readable when not
>        processed by such a library.
>      * It should play well with search engines.
>      * If possible, it should provide a way to annotate the arcs (to
>        provide arc roles, the language of link ends or other
>        informations).
>      * If possible, it should support overlapping links.
> My first naive attempt is to write something such as:
> <span typeof="nhrefs:link">
>  <span property="nhrefs:source">XQuery</span>
>  [<a href="http://en.wikipedia.org/wiki/XQuery"
>     rel="nhrefs:arc">XQuery on Wikipedia</a>,
>   <a href="http://www.w3.org/TR/xquery/" rel="nhrefs:arc"
>            >XQuery W3C Recommendation</a>]
> </span>
> When I try to run this (in a complete XHTML page) through RDFa2RDFXML or
> operator, I get:
>   <rdf:Description rdf:nodeID="d2e352">
>      <rdf:type rdf:resource="http://nhrefs.org/link"/>
>   </rdf:Description>
>   <rdf:Description rdf:nodeID="d2e352">
>      <nhrefs:source
> xmlns:nhrefs="http://nhrefs.org/">XQuery</nhrefs:source>
>   </rdf:Description>
>   <rdf:Description rdf:nodeID="d2e352">
>      <nhrefs:arc xmlns:nhrefs="http://nhrefs.org/"
>                  rdf:resource="http://en.wikipedia.org/wiki/XQuery"/>
>   </rdf:Description>
>   <rdf:Description rdf:nodeID="d2e352">
>      <nhrefs:arc xmlns:nhrefs="http://nhrefs.org/"
> rdf:resource="http://www.w3.org/TR/xquery/"/>
>   </rdf:Description>
> This is a good start, but I am stuck when I try to move ahead...
> Among other things I have tried to wrap the <a/> elements within <span
> property="nbhrefs:arc"/> elements hoping to create new nodes that could
> themselves have properties, but that generates xml literal properties...
> In fact to meet my requirements I need to attach properties to these
> arcs:
>      * roles
>      * language
>      * a label that ideally should be the text within the (X)HTML link.
> Is that possible while keeping the markup as simple as possible?
> Thanks,
> Eric
> --
> Eric van der Vlist <vdv@dyomedea.com>
> Dyomedea (http://dyomedea.com)
Received on Thursday, 3 March 2011 23:43:04 UTC

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