XHTML

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:foaf="http://xmlns.com/foaf/0.1/">
  <head>
		<title>Test 0010</title>
	  	<link about="http://example.org/people#Person1"
          rel="foaf:knows" rev="foaf:knows" href="http://example.org/people#Person2" />
  </head>
  <body>
  	<p></p>
  </body>
</html>

  

N3 Triples


@prefix _5: <http://example.org/people#>.
@prefix foaf: <http://xmlns.com/foaf/0.1/>.

 _5:Person1 foaf:knows _5:Person2. 

 _5:Person2 foaf:knows _5:Person1. 

  

RDF

<?xml version="1.0" encoding="utf-8"?>
<rdf:RDF
  xmlns:foaf='http://xmlns.com/foaf/0.1/'
  xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'
>
  <rdf:Description rdf:about="http://example.org/people#Person2">
    <foaf:knows>
      <rdf:Description rdf:about="http://example.org/people#Person1">
        <foaf:knows rdf:resource="http://example.org/people#Person2"/>
      </rdf:Description>
    </foaf:knows>
  </rdf:Description>
</rdf:RDF>

  

SPARQL (PASSED)

ASK FROM <http://www.w3.org/2007/08/pyRdfa/extract?uri=http%3A//www.w3.org/2006/07/SWD/RDFa/testsuite/xhtml1-testcases/0010.xhtml> WHERE {
	<http://example.org/people#Person1> <http://xmlns.com/foaf/0.1/knows> <http://example.org/people#Person2> .
	<http://example.org/people#Person2> <http://xmlns.com/foaf/0.1/knows> <http://example.org/people#Person1> .
}