Getting a predicate from an ID

9 views
Skip to first unread message

melvincarvalho

unread,
Aug 6, 2009, 6:14:34 AM8/6/09
to rdfQuery
Quick question: I'm trying to systematically extract a fully
qualified (string) predicate from an RDFa ID.

$("#id").rdf().databank.triples()[0].property.value._string

Is this correct, or would you suggest a better way?

Jeni Tennison

unread,
Aug 6, 2009, 6:50:30 AM8/6/09
to rdfq...@googlegroups.com
Use the toString() method, as is standard in Javascript, instead:

$('#id').rdf().databank.triples()[0].property.value.toString();

Jeni
--
Jeni Tennison
http://www.jenitennison.com

Reply all
Reply to author
Forward
0 new messages