<?xml version="1.0" encoding="UTF-8"?>


     
<rules
  xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'
  xmlns:axml='file://xml.namespace.alias'
  xmlns:x='file://attributes.to.be.stripped.in.second.pass'
  xmlns:a='file://attributes.to.be.stripped.in.first.pass'
>
  <subject
    rdf:about='my:resolve-uri-curie(@about,.)'
    rdf:nodeID='my:bnode-uri-curie(@about)'
    x:para='4.3.1'
    a:match='[@about]'
   />
   
  
  <subject
    rdf:about='my:resolve-uri-curie(ancestor::*[@about][1]/@about,ancestor::*[@about][1])'
    rdf:nodeID='my:bnode-uri-curie(ancestor::*[@about][1]/@about)'
     x:para='4.3.2'
    a:match='[not(self::xhtml2:meta)][not(self::xhtml2:link)][not(@about)][ancestor::*[@about]]'
   />
   
   
  
  <subject
    rdf:about='my:resolve-uri-curie("",/)'
    x:para='4.3.2'
    a:match='[not(self::xhtml2:meta)][not(self::xhtml2:link)][not(ancestor-or-self::*[@about])]'
   />
   
   
   
  
  <subject
    rdf:about="my:resolve-uri-curie(../@about,..)"
    rdf:nodeID="my:bnode-uri-curie(../@about)"
    x:para='4.3.3'
    a:match='[self::xhtml2:meta or self::xhtml2:link][not(@about)]
             [not(parent::xhtml2:meta or parent::xhtml2:link)]
             [../@about or parent::xhtml2:head]
             [../@xml:id]'
   /> 
  <subject
    rdf:about="my:resolve-uri(concat('#',../@xml:id),base-uri(..))"
    x:para='4.3.3'
    a:match='[self::xhtml2:meta or self::xhtml2:link][not(@about)]
             [not(parent::xhtml2:meta or parent::xhtml2:link)]
             [not(../@about or parent::xhtml2:head)]
             [../@xml:id]'
   />
  <subject
    rdf:nodeID="concat('g.',generate-id(..))"
    x:para='4.3.3'
    a:match='[self::xhtml2:meta or self::xhtml2:link][not(@about)]
             [not(parent::xhtml2:meta or parent::xhtml2:link)]
             [not(../@about or parent::xhtml2:head)]
             [not(../@xml:id)]'
   />
   
   
  <predicate
    a:object='literal'
    x:para='4.2.1'
    a:match='[@property]'
    name='my:curie-to-qname(@property,.)'
   />
  <predicate
    a:object='resource'
    x:para='4.2.2'
    a:match='[@rel]'
    name='my:curie-to-qname(@rel,.)'
   />
  <predicate
    a:reversed='true'
    a:object='resource'
    x:para='4.2.3'
    a:match='[@rev]'
    name='my:curie-to-qname(@rev,.)'
   />
   
   <!-- TODO reification rules of 5.3 -->
   
  <object
    axml:lang='ancestor-or-self::*[@xml:lang][1]/@xml:lang'
    x:literal='@content'
    a:object='literal'
    x:para='5.1.1.2'
    a:match='[@content][not(@datatype)]'
   />
  <object
    x:literal='@content'
    a:object='literal'
    x:para='5.1.2'
    rdf:datatype="my:resolve-bare-curie(@datatype,.)"
    a:match='[@content][@datatype]'
   />
  <object
    x:literal='#copy'
    rdf:parseType="'Literal'"
    a:object='literal'
    x:para='5.1.1.1'
    a:match='[not(@content)][not(@datatype)]'
   />
   
  <object
    x:literal='.//text()'
    a:object='literal'
    x:para='5.1.2.1'
    rdf:datatype="my:resolve-bare-curie(@datatype,.)"
    a:match='[not(@content)][@datatype]'
   />
   
   <object
    a:object='resource'
    x:para='4.4.2'
    
    rdf:resource="my:resolve-uri-curie(@href,.)"
    rdf:nodeID="my:bnode-uri-curie(@href)"
    a:match='[@href]'
   />
   
   
 
</rules>

