QUERY1: This gives an error.  Encountered "<VAR> ?parent at line 2 was
expecting...."  However, according to SPARQL standard as I've read it,
this is permissible.
SELECT ?child ?title
WHERE {
        ?child :isAlive :Living; :hasAge 10.
        ?parent :hasChild ?child; :reads ?book.
        ?book sods:hasTitle ?title.
}

QUERY2: This works.
SELECT ?child ?title
WHERE {
        ?parent :hasChild ?child; :reads ?book.
        ?book sods:hasTitle ?title.
        ?child :isAlive :Living; :hasAge 10.
}



QUERY3: This works.
SELECT ?child ?title
WHERE {
        ?child :isAlive :Living; :hasAge ?age.
        FILTER(?age = 10).
        ?parent :hasChild ?child; :reads ?book.
        ?book sods:hasTitle ?title.
}

QUERY4: This works

SELECT ?child ?title
WHERE {
        ?child :isAlive :Living; :hasAge "50227"^^<http://www.w3.org/
2001/XMLSchema#integer>.
        ?parent :hasChild ?child; :reads ?book.
        ?book sods:hasTitle ?title.
}


QUERY5: This works.
SELECT ?child ?title
WHERE {
        {?child :isAlive :Living; :hasAge 10.}
        ?parent :hasChild ?child; :reads ?book.
        ?book sods:hasTitle ?title.
}


source: http://www.w3.org/TR/rdf-sparql-query/#matchingRDFLiterals
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TopBraid Composer Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/topbraid-composer-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to