using locations with XPath

Hi,

when applying XPaths on namespace XML documents, it is necessary to map 
a namespace prefix to a namespace URI. With a namespace-aware parser the 
expression

   /html/body/h1

won't select anything in an XHTML document. So here's a proposal about 
namespaced XPaths in RDF:

<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:earl="http://www.w3.org/WAI/ER/EARL/nmg-strawman#"
   xmlns:xpath="http://www.example.org/ns/xpath#"
   xmlns:ns="http://www.example.org/ns/namespace#"
   >
   <earl:TestResult>
     <earl:singleLocation>
       <xpath:XPath rdf:about="http://www.example.org/location0">
         <xpath:expression>/x:html/x:body/x:h1</xpath:expression>
         <ns:namespace rdf:resource="http://www.example.org/ns0"/>
       </xpath:XPath>
     </earl:singleLocation>
   </earl:TestResult>
   <ns:Namespace rdf:about="http://www.example.org/ns0">
     <ns:prefix>x</ns:prefix>
     <ns:uri>http://www.w3.org/1999/xhtml</ns:uri>
   </ns:Namespace>
</rdf:RDF>

-- 
Johannes Koch - Competence Center BIKA
Fraunhofer Institute for Applied Information Technology (FIT.LIFE)
Schloss Birlinghoven, D-53757 Sankt Augustin, Germany
Phone: +49-2241-142628

Received on Thursday, 27 October 2005 08:33:43 UTC