How can i parse a RDFa fragment?

35 views
Skip to first unread message

VicMan

unread,
Nov 22, 2010, 7:17:15 AM11/22/10
to rdfQuery
Hi all,

Can someone show me how to parse a rdfa fragment with rdfquery?

I have tried this:

<div id="#content">
<span about="http://purl.org/ontology/mo/Vic" id="890651"
typeof="http://purl.org/ontology/mo/MusicArtist">VicMan<span
property="http://xmlns.com/foaf/0.1/age" content="18" datatype="http://
www.w3.org/2000/01/rdf-schema#Literal" id="303062">18 years old</
span></span>
</div>

$('#content').rdf().where('?a ?b ?c').length

=> 0

Thanks.

VicMan

unread,
Nov 26, 2010, 8:19:12 AM11/26/10
to rdfQuery
It seems to work when the rdfa attributes are CURIEs

<span about="mo:TestArtist" typeof="mo:MusicArtist">This is a text
about a <span property="rdfs:label">Test Artist</span></span>

$('#content').rdf().databank.size()
=> 2

But when I use URIs they are ignored by rdfQuery:

<span about="http://purl.org/ontology/mo/TestArtist" typeof="http://
purl.org/ontology/mo/MusicArtist">This is a text about a
<span property="http://www.w3.org/2000/01/rdf-schema#label">Test
Artist</span></span>

$('#content').rdf().databank.size()
=> 0

Does anyone know what's wrong?

On 22 nov, 13:17, VicMan <vicman.l...@gmail.com> wrote:
> Hi all,
>
> Can someone show me how to parse a rdfa fragment with rdfquery?
>
> I have tried this:
>
> <div id="#content">
> <span about="http://purl.org/ontology/mo/Vic" id="890651"
> typeof="http://purl.org/ontology/mo/MusicArtist">VicMan<span
> property="http://xmlns.com/foaf/0.1/age" content="18" datatype="http://www.w3.org/2000/01/rdf-schema#Literal" id="303062">18 years old</

Michael Hausenblas

unread,
Nov 26, 2010, 8:23:26 AM11/26/10
to rdfq...@googlegroups.com

Well, see [1] for the details - rdfQuery just happens to follow the spec ;)

Cheers,
Michael

[1] http://www.w3.org/TR/rdfa-syntax/#rdfa-attributes

--
Dr. Michael Hausenblas, Research Fellow
LiDRC - Linked Data Research Centre
DERI - Digital Enterprise Research Institute
NUIG - National University of Ireland, Galway
Ireland, Europe
Tel. +353 91 495730
http://linkeddata.deri.ie/
http://sw-app.org/about.html

> --
> You received this message because you are subscribed to the Google Groups
> "rdfQuery" group.
> To post to this group, send email to rdfq...@googlegroups.com.
> To unsubscribe from this group, send email to
> rdfquery+u...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/rdfquery?hl=en.
>

Reply all
Reply to author
Forward
0 new messages