prefix rdf: prefix foaf: prefix pkg: select ?s ?p ?o where { ?s pkg:idref ?xmlid . ?s ?p ?o . filter( str(?xmlid) = str("rdfid4") ) }