<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                xmlns:axml="file://xml.namespace.alias"
                xmlns:a="file://attributes.to.be.stripped.in.first.pass"
                xmlns:my="http://example.org/xxx"
                xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
                xmlns:xhtml2="http://www.w3.org/2002/06/xhtml2"
                xmlns:x="file://attributes.to.be.stripped.in.second.pass"
                version="2.0">
   <xsl:import href="base.xsl"/>
   <xsl:output method="xml" indent="no"/>
   <xsl:template match="/*">
      <xsl:text>
</xsl:text>
      <rdf:RDF>
         <xsl:text>
</xsl:text>
         <xsl:apply-templates select="*"/>
         <xsl:text>
</xsl:text>
      </rdf:RDF>
   </xsl:template>
   <xsl:template priority="2"
                 match="*[@about or @nodeID or @rel or @rev or @content or @href or @property]">
      <xsl:copy-of select="my:toRDF(.)"/>
      <xsl:apply-templates select="*"/>
   </xsl:template>
   <xsl:template match="*">
      <xsl:apply-templates select="*"/>
   </xsl:template>
   <xsl:function name="my:resolve-uri">
      <xsl:param name="u"/>
      <xsl:param name="b"/>
      <xsl:if test="$u eq ''">
         <xsl:value-of select="$b"/>
      </xsl:if>
      <xsl:if test="$u ne ''">
         <xsl:value-of select="resolve-uri($u,$b)"/>
      </xsl:if>
   </xsl:function>
   <xsl:function xmlns:xs="http://www.w3.org/2001/XMLSchema" name="my:about" as="xs:string">
      <xsl:param name="n"/>
      <xsl:if test="$n[@about]">
         <xsl:value-of select="$n/@about"/>
      </xsl:if>
      <xsl:if test="$n[self::xhtml2:head][not(@about)]">
         <xsl:value-of select="''"/>
      </xsl:if>
   </xsl:function>
   <xsl:function name="my:toRDF">
      <xsl:param name="n"/>
      <xsl:for-each select="$n">
         <xsl:if test="self::xhtml2:*[@about][@property][@content][not(@datatype)]">
            <xsl:text>  </xsl:text>
            <rdf:Description>
               <xsl:if test="string-length(my:resolve-uri-curie(@about,.)) &gt; 0">
                  <xsl:attribute name="rdf:about" select="my:resolve-uri-curie(@about,.)"/>
               </xsl:if>
               <xsl:if test="string-length(my:bnode-uri-curie(@about)) &gt; 0">
                  <xsl:attribute name="rdf:nodeID" select="my:bnode-uri-curie(@about)"/>
               </xsl:if>
               <xsl:text>
    </xsl:text>
               <xsl:element name="{my:curie-to-qname(@property,.)}"
                            namespace="{namespace-uri-for-prefix(substring-before(my:curie-to-qname(@property,.),':'),.)}">
                  <xsl:attribute name="xml:lang" select="ancestor-or-self::*[@xml:lang][1]/@xml:lang"/>
                  <xsl:value-of select="@content"/>
               </xsl:element>
               <xsl:text>
  </xsl:text>
            </rdf:Description>
            <xsl:text>
</xsl:text>
         </xsl:if>
         <xsl:if test="self::xhtml2:*[@about][@property][@content][@datatype]">
            <xsl:text>  </xsl:text>
            <rdf:Description>
               <xsl:if test="string-length(my:resolve-uri-curie(@about,.)) &gt; 0">
                  <xsl:attribute name="rdf:about" select="my:resolve-uri-curie(@about,.)"/>
               </xsl:if>
               <xsl:if test="string-length(my:bnode-uri-curie(@about)) &gt; 0">
                  <xsl:attribute name="rdf:nodeID" select="my:bnode-uri-curie(@about)"/>
               </xsl:if>
               <xsl:text>
    </xsl:text>
               <xsl:element name="{my:curie-to-qname(@property,.)}"
                            namespace="{namespace-uri-for-prefix(substring-before(my:curie-to-qname(@property,.),':'),.)}">
                  <xsl:if test="string-length(my:resolve-bare-curie(@datatype,.)) &gt; 0">
                     <xsl:attribute name="rdf:datatype" select="my:resolve-bare-curie(@datatype,.)"/>
                  </xsl:if>
                  <xsl:value-of select="@content"/>
               </xsl:element>
               <xsl:text>
  </xsl:text>
            </rdf:Description>
            <xsl:text>
</xsl:text>
         </xsl:if>
         <xsl:if test="self::xhtml2:*[@about][@property][not(@content)][not(@datatype)]">
            <xsl:text>  </xsl:text>
            <rdf:Description>
               <xsl:if test="string-length(my:resolve-uri-curie(@about,.)) &gt; 0">
                  <xsl:attribute name="rdf:about" select="my:resolve-uri-curie(@about,.)"/>
               </xsl:if>
               <xsl:if test="string-length(my:bnode-uri-curie(@about)) &gt; 0">
                  <xsl:attribute name="rdf:nodeID" select="my:bnode-uri-curie(@about)"/>
               </xsl:if>
               <xsl:text>
    </xsl:text>
               <xsl:element name="{my:curie-to-qname(@property,.)}"
                            namespace="{namespace-uri-for-prefix(substring-before(my:curie-to-qname(@property,.),':'),.)}">
                  <xsl:if test="string-length('Literal') &gt; 0">
                     <xsl:attribute name="rdf:parseType" select="'Literal'"/>
                  </xsl:if>
                  <xsl:copy-of select="node()"/>
               </xsl:element>
               <xsl:text>
  </xsl:text>
            </rdf:Description>
            <xsl:text>
</xsl:text>
         </xsl:if>
         <xsl:if test="self::xhtml2:*[@about][@property][not(@content)][@datatype]">
            <xsl:text>  </xsl:text>
            <rdf:Description>
               <xsl:if test="string-length(my:resolve-uri-curie(@about,.)) &gt; 0">
                  <xsl:attribute name="rdf:about" select="my:resolve-uri-curie(@about,.)"/>
               </xsl:if>
               <xsl:if test="string-length(my:bnode-uri-curie(@about)) &gt; 0">
                  <xsl:attribute name="rdf:nodeID" select="my:bnode-uri-curie(@about)"/>
               </xsl:if>
               <xsl:text>
    </xsl:text>
               <xsl:element name="{my:curie-to-qname(@property,.)}"
                            namespace="{namespace-uri-for-prefix(substring-before(my:curie-to-qname(@property,.),':'),.)}">
                  <xsl:if test="string-length(my:resolve-bare-curie(@datatype,.)) &gt; 0">
                     <xsl:attribute name="rdf:datatype" select="my:resolve-bare-curie(@datatype,.)"/>
                  </xsl:if>
                  <xsl:value-of select=".//text()"/>
               </xsl:element>
               <xsl:text>
  </xsl:text>
            </rdf:Description>
            <xsl:text>
</xsl:text>
         </xsl:if>
         <xsl:if test="self::xhtml2:*[@about][@rel][@href]">
            <xsl:text>  </xsl:text>
            <rdf:Description>
               <xsl:if test="string-length(my:resolve-uri-curie(@about,.)) &gt; 0">
                  <xsl:attribute name="rdf:about" select="my:resolve-uri-curie(@about,.)"/>
               </xsl:if>
               <xsl:if test="string-length(my:bnode-uri-curie(@about)) &gt; 0">
                  <xsl:attribute name="rdf:nodeID" select="my:bnode-uri-curie(@about)"/>
               </xsl:if>
               <xsl:text>
    </xsl:text>
               <xsl:element name="{my:curie-to-qname(@rel,.)}"
                            namespace="{namespace-uri-for-prefix(substring-before(my:curie-to-qname(@rel,.),':'),.)}">
                  <xsl:if test="string-length(my:resolve-uri-curie(@href,.)) &gt; 0">
                     <xsl:attribute name="rdf:resource" select="my:resolve-uri-curie(@href,.)"/>
                  </xsl:if>
                  <xsl:if test="string-length(my:bnode-uri-curie(@href)) &gt; 0">
                     <xsl:attribute name="rdf:nodeID" select="my:bnode-uri-curie(@href)"/>
                  </xsl:if>
               </xsl:element>
               <xsl:text>
  </xsl:text>
            </rdf:Description>
            <xsl:text>
</xsl:text>
         </xsl:if>
         <xsl:if test="self::xhtml2:*[@about][@rev][@href]">
            <xsl:text>  </xsl:text>
            <rdf:Description>
               <xsl:if test="string-length(my:resolve-uri-curie(@href,.)) &gt; 0">
                  <xsl:attribute name="rdf:about" select="my:resolve-uri-curie(@href,.)"/>
               </xsl:if>
               <xsl:if test="string-length(my:bnode-uri-curie(@href)) &gt; 0">
                  <xsl:attribute name="rdf:nodeID" select="my:bnode-uri-curie(@href)"/>
               </xsl:if>
               <xsl:text>
    </xsl:text>
               <xsl:element name="{my:curie-to-qname(@rev,.)}"
                            namespace="{namespace-uri-for-prefix(substring-before(my:curie-to-qname(@rev,.),':'),.)}">
                  <xsl:if test="string-length(my:resolve-uri-curie(@about,.)) &gt; 0">
                     <xsl:attribute name="rdf:resource" select="my:resolve-uri-curie(@about,.)"/>
                  </xsl:if>
                  <xsl:if test="string-length(my:bnode-uri-curie(@about)) &gt; 0">
                     <xsl:attribute name="rdf:nodeID" select="my:bnode-uri-curie(@about)"/>
                  </xsl:if>
               </xsl:element>
               <xsl:text>
  </xsl:text>
            </rdf:Description>
            <xsl:text>
</xsl:text>
         </xsl:if>
         <xsl:if test="self::xhtml2:*[not(self::xhtml2:meta)][not(self::xhtml2:link)][not(@about)][ancestor::*[@about]][@property][@content][not(@datatype)]">
            <xsl:text>  </xsl:text>
            <rdf:Description>
               <xsl:if test="string-length(my:resolve-uri-curie(ancestor::*[@about][1]/@about,ancestor::*[@about][1])) &gt; 0">
                  <xsl:attribute name="rdf:about"
                                 select="my:resolve-uri-curie(ancestor::*[@about][1]/@about,ancestor::*[@about][1])"/>
               </xsl:if>
               <xsl:if test="string-length(my:bnode-uri-curie(ancestor::*[@about][1]/@about)) &gt; 0">
                  <xsl:attribute name="rdf:nodeID" select="my:bnode-uri-curie(ancestor::*[@about][1]/@about)"/>
               </xsl:if>
               <xsl:text>
    </xsl:text>
               <xsl:element name="{my:curie-to-qname(@property,.)}"
                            namespace="{namespace-uri-for-prefix(substring-before(my:curie-to-qname(@property,.),':'),.)}">
                  <xsl:attribute name="xml:lang" select="ancestor-or-self::*[@xml:lang][1]/@xml:lang"/>
                  <xsl:value-of select="@content"/>
               </xsl:element>
               <xsl:text>
  </xsl:text>
            </rdf:Description>
            <xsl:text>
</xsl:text>
         </xsl:if>
         <xsl:if test="self::xhtml2:*[not(self::xhtml2:meta)][not(self::xhtml2:link)][not(@about)][ancestor::*[@about]][@property][@content][@datatype]">
            <xsl:text>  </xsl:text>
            <rdf:Description>
               <xsl:if test="string-length(my:resolve-uri-curie(ancestor::*[@about][1]/@about,ancestor::*[@about][1])) &gt; 0">
                  <xsl:attribute name="rdf:about"
                                 select="my:resolve-uri-curie(ancestor::*[@about][1]/@about,ancestor::*[@about][1])"/>
               </xsl:if>
               <xsl:if test="string-length(my:bnode-uri-curie(ancestor::*[@about][1]/@about)) &gt; 0">
                  <xsl:attribute name="rdf:nodeID" select="my:bnode-uri-curie(ancestor::*[@about][1]/@about)"/>
               </xsl:if>
               <xsl:text>
    </xsl:text>
               <xsl:element name="{my:curie-to-qname(@property,.)}"
                            namespace="{namespace-uri-for-prefix(substring-before(my:curie-to-qname(@property,.),':'),.)}">
                  <xsl:if test="string-length(my:resolve-bare-curie(@datatype,.)) &gt; 0">
                     <xsl:attribute name="rdf:datatype" select="my:resolve-bare-curie(@datatype,.)"/>
                  </xsl:if>
                  <xsl:value-of select="@content"/>
               </xsl:element>
               <xsl:text>
  </xsl:text>
            </rdf:Description>
            <xsl:text>
</xsl:text>
         </xsl:if>
         <xsl:if test="self::xhtml2:*[not(self::xhtml2:meta)][not(self::xhtml2:link)][not(@about)][ancestor::*[@about]][@property][not(@content)][not(@datatype)]">
            <xsl:text>  </xsl:text>
            <rdf:Description>
               <xsl:if test="string-length(my:resolve-uri-curie(ancestor::*[@about][1]/@about,ancestor::*[@about][1])) &gt; 0">
                  <xsl:attribute name="rdf:about"
                                 select="my:resolve-uri-curie(ancestor::*[@about][1]/@about,ancestor::*[@about][1])"/>
               </xsl:if>
               <xsl:if test="string-length(my:bnode-uri-curie(ancestor::*[@about][1]/@about)) &gt; 0">
                  <xsl:attribute name="rdf:nodeID" select="my:bnode-uri-curie(ancestor::*[@about][1]/@about)"/>
               </xsl:if>
               <xsl:text>
    </xsl:text>
               <xsl:element name="{my:curie-to-qname(@property,.)}"
                            namespace="{namespace-uri-for-prefix(substring-before(my:curie-to-qname(@property,.),':'),.)}">
                  <xsl:if test="string-length('Literal') &gt; 0">
                     <xsl:attribute name="rdf:parseType" select="'Literal'"/>
                  </xsl:if>
                  <xsl:copy-of select="node()"/>
               </xsl:element>
               <xsl:text>
  </xsl:text>
            </rdf:Description>
            <xsl:text>
</xsl:text>
         </xsl:if>
         <xsl:if test="self::xhtml2:*[not(self::xhtml2:meta)][not(self::xhtml2:link)][not(@about)][ancestor::*[@about]][@property][not(@content)][@datatype]">
            <xsl:text>  </xsl:text>
            <rdf:Description>
               <xsl:if test="string-length(my:resolve-uri-curie(ancestor::*[@about][1]/@about,ancestor::*[@about][1])) &gt; 0">
                  <xsl:attribute name="rdf:about"
                                 select="my:resolve-uri-curie(ancestor::*[@about][1]/@about,ancestor::*[@about][1])"/>
               </xsl:if>
               <xsl:if test="string-length(my:bnode-uri-curie(ancestor::*[@about][1]/@about)) &gt; 0">
                  <xsl:attribute name="rdf:nodeID" select="my:bnode-uri-curie(ancestor::*[@about][1]/@about)"/>
               </xsl:if>
               <xsl:text>
    </xsl:text>
               <xsl:element name="{my:curie-to-qname(@property,.)}"
                            namespace="{namespace-uri-for-prefix(substring-before(my:curie-to-qname(@property,.),':'),.)}">
                  <xsl:if test="string-length(my:resolve-bare-curie(@datatype,.)) &gt; 0">
                     <xsl:attribute name="rdf:datatype" select="my:resolve-bare-curie(@datatype,.)"/>
                  </xsl:if>
                  <xsl:value-of select=".//text()"/>
               </xsl:element>
               <xsl:text>
  </xsl:text>
            </rdf:Description>
            <xsl:text>
</xsl:text>
         </xsl:if>
         <xsl:if test="self::xhtml2:*[not(self::xhtml2:meta)][not(self::xhtml2:link)][not(@about)][ancestor::*[@about]][@rel][@href]">
            <xsl:text>  </xsl:text>
            <rdf:Description>
               <xsl:if test="string-length(my:resolve-uri-curie(ancestor::*[@about][1]/@about,ancestor::*[@about][1])) &gt; 0">
                  <xsl:attribute name="rdf:about"
                                 select="my:resolve-uri-curie(ancestor::*[@about][1]/@about,ancestor::*[@about][1])"/>
               </xsl:if>
               <xsl:if test="string-length(my:bnode-uri-curie(ancestor::*[@about][1]/@about)) &gt; 0">
                  <xsl:attribute name="rdf:nodeID" select="my:bnode-uri-curie(ancestor::*[@about][1]/@about)"/>
               </xsl:if>
               <xsl:text>
    </xsl:text>
               <xsl:element name="{my:curie-to-qname(@rel,.)}"
                            namespace="{namespace-uri-for-prefix(substring-before(my:curie-to-qname(@rel,.),':'),.)}">
                  <xsl:if test="string-length(my:resolve-uri-curie(@href,.)) &gt; 0">
                     <xsl:attribute name="rdf:resource" select="my:resolve-uri-curie(@href,.)"/>
                  </xsl:if>
                  <xsl:if test="string-length(my:bnode-uri-curie(@href)) &gt; 0">
                     <xsl:attribute name="rdf:nodeID" select="my:bnode-uri-curie(@href)"/>
                  </xsl:if>
               </xsl:element>
               <xsl:text>
  </xsl:text>
            </rdf:Description>
            <xsl:text>
</xsl:text>
         </xsl:if>
         <xsl:if test="self::xhtml2:*[not(self::xhtml2:meta)][not(self::xhtml2:link)][not(@about)][ancestor::*[@about]][@rev][@href]">
            <xsl:text>  </xsl:text>
            <rdf:Description>
               <xsl:if test="string-length(my:resolve-uri-curie(@href,.)) &gt; 0">
                  <xsl:attribute name="rdf:about" select="my:resolve-uri-curie(@href,.)"/>
               </xsl:if>
               <xsl:if test="string-length(my:bnode-uri-curie(@href)) &gt; 0">
                  <xsl:attribute name="rdf:nodeID" select="my:bnode-uri-curie(@href)"/>
               </xsl:if>
               <xsl:text>
    </xsl:text>
               <xsl:element name="{my:curie-to-qname(@rev,.)}"
                            namespace="{namespace-uri-for-prefix(substring-before(my:curie-to-qname(@rev,.),':'),.)}">
                  <xsl:if test="string-length(my:resolve-uri-curie(ancestor::*[@about][1]/@about,ancestor::*[@about][1])) &gt; 0">
                     <xsl:attribute name="rdf:resource"
                                    select="my:resolve-uri-curie(ancestor::*[@about][1]/@about,ancestor::*[@about][1])"/>
                  </xsl:if>
                  <xsl:if test="string-length(my:bnode-uri-curie(ancestor::*[@about][1]/@about)) &gt; 0">
                     <xsl:attribute name="rdf:nodeID" select="my:bnode-uri-curie(ancestor::*[@about][1]/@about)"/>
                  </xsl:if>
               </xsl:element>
               <xsl:text>
  </xsl:text>
            </rdf:Description>
            <xsl:text>
</xsl:text>
         </xsl:if>
         <xsl:if test="self::xhtml2:*[not(self::xhtml2:meta)][not(self::xhtml2:link)][not(ancestor-or-self::*[@about])][@property][@content][not(@datatype)]">
            <xsl:text>  </xsl:text>
            <rdf:Description>
               <xsl:if test="string-length(my:resolve-uri-curie(&#34;&#34;,/)) &gt; 0">
                  <xsl:attribute name="rdf:about" select="my:resolve-uri-curie(&#34;&#34;,/)"/>
               </xsl:if>
               <xsl:text>
    </xsl:text>
               <xsl:element name="{my:curie-to-qname(@property,.)}"
                            namespace="{namespace-uri-for-prefix(substring-before(my:curie-to-qname(@property,.),':'),.)}">
                  <xsl:attribute name="xml:lang" select="ancestor-or-self::*[@xml:lang][1]/@xml:lang"/>
                  <xsl:value-of select="@content"/>
               </xsl:element>
               <xsl:text>
  </xsl:text>
            </rdf:Description>
            <xsl:text>
</xsl:text>
         </xsl:if>
         <xsl:if test="self::xhtml2:*[not(self::xhtml2:meta)][not(self::xhtml2:link)][not(ancestor-or-self::*[@about])][@property][@content][@datatype]">
            <xsl:text>  </xsl:text>
            <rdf:Description>
               <xsl:if test="string-length(my:resolve-uri-curie(&#34;&#34;,/)) &gt; 0">
                  <xsl:attribute name="rdf:about" select="my:resolve-uri-curie(&#34;&#34;,/)"/>
               </xsl:if>
               <xsl:text>
    </xsl:text>
               <xsl:element name="{my:curie-to-qname(@property,.)}"
                            namespace="{namespace-uri-for-prefix(substring-before(my:curie-to-qname(@property,.),':'),.)}">
                  <xsl:if test="string-length(my:resolve-bare-curie(@datatype,.)) &gt; 0">
                     <xsl:attribute name="rdf:datatype" select="my:resolve-bare-curie(@datatype,.)"/>
                  </xsl:if>
                  <xsl:value-of select="@content"/>
               </xsl:element>
               <xsl:text>
  </xsl:text>
            </rdf:Description>
            <xsl:text>
</xsl:text>
         </xsl:if>
         <xsl:if test="self::xhtml2:*[not(self::xhtml2:meta)][not(self::xhtml2:link)][not(ancestor-or-self::*[@about])][@property][not(@content)][not(@datatype)]">
            <xsl:text>  </xsl:text>
            <rdf:Description>
               <xsl:if test="string-length(my:resolve-uri-curie(&#34;&#34;,/)) &gt; 0">
                  <xsl:attribute name="rdf:about" select="my:resolve-uri-curie(&#34;&#34;,/)"/>
               </xsl:if>
               <xsl:text>
    </xsl:text>
               <xsl:element name="{my:curie-to-qname(@property,.)}"
                            namespace="{namespace-uri-for-prefix(substring-before(my:curie-to-qname(@property,.),':'),.)}">
                  <xsl:if test="string-length('Literal') &gt; 0">
                     <xsl:attribute name="rdf:parseType" select="'Literal'"/>
                  </xsl:if>
                  <xsl:copy-of select="node()"/>
               </xsl:element>
               <xsl:text>
  </xsl:text>
            </rdf:Description>
            <xsl:text>
</xsl:text>
         </xsl:if>
         <xsl:if test="self::xhtml2:*[not(self::xhtml2:meta)][not(self::xhtml2:link)][not(ancestor-or-self::*[@about])][@property][not(@content)][@datatype]">
            <xsl:text>  </xsl:text>
            <rdf:Description>
               <xsl:if test="string-length(my:resolve-uri-curie(&#34;&#34;,/)) &gt; 0">
                  <xsl:attribute name="rdf:about" select="my:resolve-uri-curie(&#34;&#34;,/)"/>
               </xsl:if>
               <xsl:text>
    </xsl:text>
               <xsl:element name="{my:curie-to-qname(@property,.)}"
                            namespace="{namespace-uri-for-prefix(substring-before(my:curie-to-qname(@property,.),':'),.)}">
                  <xsl:if test="string-length(my:resolve-bare-curie(@datatype,.)) &gt; 0">
                     <xsl:attribute name="rdf:datatype" select="my:resolve-bare-curie(@datatype,.)"/>
                  </xsl:if>
                  <xsl:value-of select=".//text()"/>
               </xsl:element>
               <xsl:text>
  </xsl:text>
            </rdf:Description>
            <xsl:text>
</xsl:text>
         </xsl:if>
         <xsl:if test="self::xhtml2:*[not(self::xhtml2:meta)][not(self::xhtml2:link)][not(ancestor-or-self::*[@about])][@rel][@href]">
            <xsl:text>  </xsl:text>
            <rdf:Description>
               <xsl:if test="string-length(my:resolve-uri-curie(&#34;&#34;,/)) &gt; 0">
                  <xsl:attribute name="rdf:about" select="my:resolve-uri-curie(&#34;&#34;,/)"/>
               </xsl:if>
               <xsl:text>
    </xsl:text>
               <xsl:element name="{my:curie-to-qname(@rel,.)}"
                            namespace="{namespace-uri-for-prefix(substring-before(my:curie-to-qname(@rel,.),':'),.)}">
                  <xsl:if test="string-length(my:resolve-uri-curie(@href,.)) &gt; 0">
                     <xsl:attribute name="rdf:resource" select="my:resolve-uri-curie(@href,.)"/>
                  </xsl:if>
                  <xsl:if test="string-length(my:bnode-uri-curie(@href)) &gt; 0">
                     <xsl:attribute name="rdf:nodeID" select="my:bnode-uri-curie(@href)"/>
                  </xsl:if>
               </xsl:element>
               <xsl:text>
  </xsl:text>
            </rdf:Description>
            <xsl:text>
</xsl:text>
         </xsl:if>
         <xsl:if test="self::xhtml2:*[not(self::xhtml2:meta)][not(self::xhtml2:link)][not(ancestor-or-self::*[@about])][@rev][@href]">
            <xsl:text>  </xsl:text>
            <rdf:Description>
               <xsl:if test="string-length(my:resolve-uri-curie(@href,.)) &gt; 0">
                  <xsl:attribute name="rdf:about" select="my:resolve-uri-curie(@href,.)"/>
               </xsl:if>
               <xsl:if test="string-length(my:bnode-uri-curie(@href)) &gt; 0">
                  <xsl:attribute name="rdf:nodeID" select="my:bnode-uri-curie(@href)"/>
               </xsl:if>
               <xsl:text>
    </xsl:text>
               <xsl:element name="{my:curie-to-qname(@rev,.)}"
                            namespace="{namespace-uri-for-prefix(substring-before(my:curie-to-qname(@rev,.),':'),.)}">
                  <xsl:if test="string-length(my:resolve-uri-curie(&#34;&#34;,/)) &gt; 0">
                     <xsl:attribute name="rdf:resource" select="my:resolve-uri-curie(&#34;&#34;,/)"/>
                  </xsl:if>
               </xsl:element>
               <xsl:text>
  </xsl:text>
            </rdf:Description>
            <xsl:text>
</xsl:text>
         </xsl:if>
         <xsl:if test="self::xhtml2:*[self::xhtml2:meta or self::xhtml2:link][not(@about)]              [not(parent::xhtml2:meta or parent::xhtml2:link)]              [../@about or parent::xhtml2:head]              [../@xml:id][@property][@content][not(@datatype)]">
            <xsl:text>  </xsl:text>
            <rdf:Description>
               <xsl:if test="string-length(my:resolve-uri-curie(../@about,..)) &gt; 0">
                  <xsl:attribute name="rdf:about" select="my:resolve-uri-curie(../@about,..)"/>
               </xsl:if>
               <xsl:if test="string-length(my:bnode-uri-curie(../@about)) &gt; 0">
                  <xsl:attribute name="rdf:nodeID" select="my:bnode-uri-curie(../@about)"/>
               </xsl:if>
               <xsl:text>
    </xsl:text>
               <xsl:element name="{my:curie-to-qname(@property,.)}"
                            namespace="{namespace-uri-for-prefix(substring-before(my:curie-to-qname(@property,.),':'),.)}">
                  <xsl:attribute name="xml:lang" select="ancestor-or-self::*[@xml:lang][1]/@xml:lang"/>
                  <xsl:value-of select="@content"/>
               </xsl:element>
               <xsl:text>
  </xsl:text>
            </rdf:Description>
            <xsl:text>
</xsl:text>
         </xsl:if>
         <xsl:if test="self::xhtml2:*[self::xhtml2:meta or self::xhtml2:link][not(@about)]              [not(parent::xhtml2:meta or parent::xhtml2:link)]              [../@about or parent::xhtml2:head]              [../@xml:id][@property][@content][@datatype]">
            <xsl:text>  </xsl:text>
            <rdf:Description>
               <xsl:if test="string-length(my:resolve-uri-curie(../@about,..)) &gt; 0">
                  <xsl:attribute name="rdf:about" select="my:resolve-uri-curie(../@about,..)"/>
               </xsl:if>
               <xsl:if test="string-length(my:bnode-uri-curie(../@about)) &gt; 0">
                  <xsl:attribute name="rdf:nodeID" select="my:bnode-uri-curie(../@about)"/>
               </xsl:if>
               <xsl:text>
    </xsl:text>
               <xsl:element name="{my:curie-to-qname(@property,.)}"
                            namespace="{namespace-uri-for-prefix(substring-before(my:curie-to-qname(@property,.),':'),.)}">
                  <xsl:if test="string-length(my:resolve-bare-curie(@datatype,.)) &gt; 0">
                     <xsl:attribute name="rdf:datatype" select="my:resolve-bare-curie(@datatype,.)"/>
                  </xsl:if>
                  <xsl:value-of select="@content"/>
               </xsl:element>
               <xsl:text>
  </xsl:text>
            </rdf:Description>
            <xsl:text>
</xsl:text>
         </xsl:if>
         <xsl:if test="self::xhtml2:*[self::xhtml2:meta or self::xhtml2:link][not(@about)]              [not(parent::xhtml2:meta or parent::xhtml2:link)]              [../@about or parent::xhtml2:head]              [../@xml:id][@property][not(@content)][not(@datatype)]">
            <xsl:text>  </xsl:text>
            <rdf:Description>
               <xsl:if test="string-length(my:resolve-uri-curie(../@about,..)) &gt; 0">
                  <xsl:attribute name="rdf:about" select="my:resolve-uri-curie(../@about,..)"/>
               </xsl:if>
               <xsl:if test="string-length(my:bnode-uri-curie(../@about)) &gt; 0">
                  <xsl:attribute name="rdf:nodeID" select="my:bnode-uri-curie(../@about)"/>
               </xsl:if>
               <xsl:text>
    </xsl:text>
               <xsl:element name="{my:curie-to-qname(@property,.)}"
                            namespace="{namespace-uri-for-prefix(substring-before(my:curie-to-qname(@property,.),':'),.)}">
                  <xsl:if test="string-length('Literal') &gt; 0">
                     <xsl:attribute name="rdf:parseType" select="'Literal'"/>
                  </xsl:if>
                  <xsl:copy-of select="node()"/>
               </xsl:element>
               <xsl:text>
  </xsl:text>
            </rdf:Description>
            <xsl:text>
</xsl:text>
         </xsl:if>
         <xsl:if test="self::xhtml2:*[self::xhtml2:meta or self::xhtml2:link][not(@about)]              [not(parent::xhtml2:meta or parent::xhtml2:link)]              [../@about or parent::xhtml2:head]              [../@xml:id][@property][not(@content)][@datatype]">
            <xsl:text>  </xsl:text>
            <rdf:Description>
               <xsl:if test="string-length(my:resolve-uri-curie(../@about,..)) &gt; 0">
                  <xsl:attribute name="rdf:about" select="my:resolve-uri-curie(../@about,..)"/>
               </xsl:if>
               <xsl:if test="string-length(my:bnode-uri-curie(../@about)) &gt; 0">
                  <xsl:attribute name="rdf:nodeID" select="my:bnode-uri-curie(../@about)"/>
               </xsl:if>
               <xsl:text>
    </xsl:text>
               <xsl:element name="{my:curie-to-qname(@property,.)}"
                            namespace="{namespace-uri-for-prefix(substring-before(my:curie-to-qname(@property,.),':'),.)}">
                  <xsl:if test="string-length(my:resolve-bare-curie(@datatype,.)) &gt; 0">
                     <xsl:attribute name="rdf:datatype" select="my:resolve-bare-curie(@datatype,.)"/>
                  </xsl:if>
                  <xsl:value-of select=".//text()"/>
               </xsl:element>
               <xsl:text>
  </xsl:text>
            </rdf:Description>
            <xsl:text>
</xsl:text>
         </xsl:if>
         <xsl:if test="self::xhtml2:*[self::xhtml2:meta or self::xhtml2:link][not(@about)]              [not(parent::xhtml2:meta or parent::xhtml2:link)]              [../@about or parent::xhtml2:head]              [../@xml:id][@rel][@href]">
            <xsl:text>  </xsl:text>
            <rdf:Description>
               <xsl:if test="string-length(my:resolve-uri-curie(../@about,..)) &gt; 0">
                  <xsl:attribute name="rdf:about" select="my:resolve-uri-curie(../@about,..)"/>
               </xsl:if>
               <xsl:if test="string-length(my:bnode-uri-curie(../@about)) &gt; 0">
                  <xsl:attribute name="rdf:nodeID" select="my:bnode-uri-curie(../@about)"/>
               </xsl:if>
               <xsl:text>
    </xsl:text>
               <xsl:element name="{my:curie-to-qname(@rel,.)}"
                            namespace="{namespace-uri-for-prefix(substring-before(my:curie-to-qname(@rel,.),':'),.)}">
                  <xsl:if test="string-length(my:resolve-uri-curie(@href,.)) &gt; 0">
                     <xsl:attribute name="rdf:resource" select="my:resolve-uri-curie(@href,.)"/>
                  </xsl:if>
                  <xsl:if test="string-length(my:bnode-uri-curie(@href)) &gt; 0">
                     <xsl:attribute name="rdf:nodeID" select="my:bnode-uri-curie(@href)"/>
                  </xsl:if>
               </xsl:element>
               <xsl:text>
  </xsl:text>
            </rdf:Description>
            <xsl:text>
</xsl:text>
         </xsl:if>
         <xsl:if test="self::xhtml2:*[self::xhtml2:meta or self::xhtml2:link][not(@about)]              [not(parent::xhtml2:meta or parent::xhtml2:link)]              [../@about or parent::xhtml2:head]              [../@xml:id][@rev][@href]">
            <xsl:text>  </xsl:text>
            <rdf:Description>
               <xsl:if test="string-length(my:resolve-uri-curie(@href,.)) &gt; 0">
                  <xsl:attribute name="rdf:about" select="my:resolve-uri-curie(@href,.)"/>
               </xsl:if>
               <xsl:if test="string-length(my:bnode-uri-curie(@href)) &gt; 0">
                  <xsl:attribute name="rdf:nodeID" select="my:bnode-uri-curie(@href)"/>
               </xsl:if>
               <xsl:text>
    </xsl:text>
               <xsl:element name="{my:curie-to-qname(@rev,.)}"
                            namespace="{namespace-uri-for-prefix(substring-before(my:curie-to-qname(@rev,.),':'),.)}">
                  <xsl:if test="string-length(my:resolve-uri-curie(../@about,..)) &gt; 0">
                     <xsl:attribute name="rdf:resource" select="my:resolve-uri-curie(../@about,..)"/>
                  </xsl:if>
                  <xsl:if test="string-length(my:bnode-uri-curie(../@about)) &gt; 0">
                     <xsl:attribute name="rdf:nodeID" select="my:bnode-uri-curie(../@about)"/>
                  </xsl:if>
               </xsl:element>
               <xsl:text>
  </xsl:text>
            </rdf:Description>
            <xsl:text>
</xsl:text>
         </xsl:if>
         <xsl:if test="self::xhtml2:*[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][@property][@content][not(@datatype)]">
            <xsl:text>  </xsl:text>
            <rdf:Description>
               <xsl:if test="string-length(my:resolve-uri(concat('#',../@xml:id),base-uri(..))) &gt; 0">
                  <xsl:attribute name="rdf:about" select="my:resolve-uri(concat('#',../@xml:id),base-uri(..))"/>
               </xsl:if>
               <xsl:text>
    </xsl:text>
               <xsl:element name="{my:curie-to-qname(@property,.)}"
                            namespace="{namespace-uri-for-prefix(substring-before(my:curie-to-qname(@property,.),':'),.)}">
                  <xsl:attribute name="xml:lang" select="ancestor-or-self::*[@xml:lang][1]/@xml:lang"/>
                  <xsl:value-of select="@content"/>
               </xsl:element>
               <xsl:text>
  </xsl:text>
            </rdf:Description>
            <xsl:text>
</xsl:text>
         </xsl:if>
         <xsl:if test="self::xhtml2:*[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][@property][@content][@datatype]">
            <xsl:text>  </xsl:text>
            <rdf:Description>
               <xsl:if test="string-length(my:resolve-uri(concat('#',../@xml:id),base-uri(..))) &gt; 0">
                  <xsl:attribute name="rdf:about" select="my:resolve-uri(concat('#',../@xml:id),base-uri(..))"/>
               </xsl:if>
               <xsl:text>
    </xsl:text>
               <xsl:element name="{my:curie-to-qname(@property,.)}"
                            namespace="{namespace-uri-for-prefix(substring-before(my:curie-to-qname(@property,.),':'),.)}">
                  <xsl:if test="string-length(my:resolve-bare-curie(@datatype,.)) &gt; 0">
                     <xsl:attribute name="rdf:datatype" select="my:resolve-bare-curie(@datatype,.)"/>
                  </xsl:if>
                  <xsl:value-of select="@content"/>
               </xsl:element>
               <xsl:text>
  </xsl:text>
            </rdf:Description>
            <xsl:text>
</xsl:text>
         </xsl:if>
         <xsl:if test="self::xhtml2:*[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][@property][not(@content)][not(@datatype)]">
            <xsl:text>  </xsl:text>
            <rdf:Description>
               <xsl:if test="string-length(my:resolve-uri(concat('#',../@xml:id),base-uri(..))) &gt; 0">
                  <xsl:attribute name="rdf:about" select="my:resolve-uri(concat('#',../@xml:id),base-uri(..))"/>
               </xsl:if>
               <xsl:text>
    </xsl:text>
               <xsl:element name="{my:curie-to-qname(@property,.)}"
                            namespace="{namespace-uri-for-prefix(substring-before(my:curie-to-qname(@property,.),':'),.)}">
                  <xsl:if test="string-length('Literal') &gt; 0">
                     <xsl:attribute name="rdf:parseType" select="'Literal'"/>
                  </xsl:if>
                  <xsl:copy-of select="node()"/>
               </xsl:element>
               <xsl:text>
  </xsl:text>
            </rdf:Description>
            <xsl:text>
</xsl:text>
         </xsl:if>
         <xsl:if test="self::xhtml2:*[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][@property][not(@content)][@datatype]">
            <xsl:text>  </xsl:text>
            <rdf:Description>
               <xsl:if test="string-length(my:resolve-uri(concat('#',../@xml:id),base-uri(..))) &gt; 0">
                  <xsl:attribute name="rdf:about" select="my:resolve-uri(concat('#',../@xml:id),base-uri(..))"/>
               </xsl:if>
               <xsl:text>
    </xsl:text>
               <xsl:element name="{my:curie-to-qname(@property,.)}"
                            namespace="{namespace-uri-for-prefix(substring-before(my:curie-to-qname(@property,.),':'),.)}">
                  <xsl:if test="string-length(my:resolve-bare-curie(@datatype,.)) &gt; 0">
                     <xsl:attribute name="rdf:datatype" select="my:resolve-bare-curie(@datatype,.)"/>
                  </xsl:if>
                  <xsl:value-of select=".//text()"/>
               </xsl:element>
               <xsl:text>
  </xsl:text>
            </rdf:Description>
            <xsl:text>
</xsl:text>
         </xsl:if>
         <xsl:if test="self::xhtml2:*[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][@rel][@href]">
            <xsl:text>  </xsl:text>
            <rdf:Description>
               <xsl:if test="string-length(my:resolve-uri(concat('#',../@xml:id),base-uri(..))) &gt; 0">
                  <xsl:attribute name="rdf:about" select="my:resolve-uri(concat('#',../@xml:id),base-uri(..))"/>
               </xsl:if>
               <xsl:text>
    </xsl:text>
               <xsl:element name="{my:curie-to-qname(@rel,.)}"
                            namespace="{namespace-uri-for-prefix(substring-before(my:curie-to-qname(@rel,.),':'),.)}">
                  <xsl:if test="string-length(my:resolve-uri-curie(@href,.)) &gt; 0">
                     <xsl:attribute name="rdf:resource" select="my:resolve-uri-curie(@href,.)"/>
                  </xsl:if>
                  <xsl:if test="string-length(my:bnode-uri-curie(@href)) &gt; 0">
                     <xsl:attribute name="rdf:nodeID" select="my:bnode-uri-curie(@href)"/>
                  </xsl:if>
               </xsl:element>
               <xsl:text>
  </xsl:text>
            </rdf:Description>
            <xsl:text>
</xsl:text>
         </xsl:if>
         <xsl:if test="self::xhtml2:*[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][@rev][@href]">
            <xsl:text>  </xsl:text>
            <rdf:Description>
               <xsl:if test="string-length(my:resolve-uri-curie(@href,.)) &gt; 0">
                  <xsl:attribute name="rdf:about" select="my:resolve-uri-curie(@href,.)"/>
               </xsl:if>
               <xsl:if test="string-length(my:bnode-uri-curie(@href)) &gt; 0">
                  <xsl:attribute name="rdf:nodeID" select="my:bnode-uri-curie(@href)"/>
               </xsl:if>
               <xsl:text>
    </xsl:text>
               <xsl:element name="{my:curie-to-qname(@rev,.)}"
                            namespace="{namespace-uri-for-prefix(substring-before(my:curie-to-qname(@rev,.),':'),.)}">
                  <xsl:if test="string-length(my:resolve-uri(concat('#',../@xml:id),base-uri(..))) &gt; 0">
                     <xsl:attribute name="rdf:resource"
                                    select="my:resolve-uri(concat('#',../@xml:id),base-uri(..))"/>
                  </xsl:if>
               </xsl:element>
               <xsl:text>
  </xsl:text>
            </rdf:Description>
            <xsl:text>
</xsl:text>
         </xsl:if>
         <xsl:if test="self::xhtml2:*[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)][@property][@content][not(@datatype)]">
            <xsl:text>  </xsl:text>
            <rdf:Description>
               <xsl:if test="string-length(concat('g.',generate-id(..))) &gt; 0">
                  <xsl:attribute name="rdf:nodeID" select="concat('g.',generate-id(..))"/>
               </xsl:if>
               <xsl:text>
    </xsl:text>
               <xsl:element name="{my:curie-to-qname(@property,.)}"
                            namespace="{namespace-uri-for-prefix(substring-before(my:curie-to-qname(@property,.),':'),.)}">
                  <xsl:attribute name="xml:lang" select="ancestor-or-self::*[@xml:lang][1]/@xml:lang"/>
                  <xsl:value-of select="@content"/>
               </xsl:element>
               <xsl:text>
  </xsl:text>
            </rdf:Description>
            <xsl:text>
</xsl:text>
         </xsl:if>
         <xsl:if test="self::xhtml2:*[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)][@property][@content][@datatype]">
            <xsl:text>  </xsl:text>
            <rdf:Description>
               <xsl:if test="string-length(concat('g.',generate-id(..))) &gt; 0">
                  <xsl:attribute name="rdf:nodeID" select="concat('g.',generate-id(..))"/>
               </xsl:if>
               <xsl:text>
    </xsl:text>
               <xsl:element name="{my:curie-to-qname(@property,.)}"
                            namespace="{namespace-uri-for-prefix(substring-before(my:curie-to-qname(@property,.),':'),.)}">
                  <xsl:if test="string-length(my:resolve-bare-curie(@datatype,.)) &gt; 0">
                     <xsl:attribute name="rdf:datatype" select="my:resolve-bare-curie(@datatype,.)"/>
                  </xsl:if>
                  <xsl:value-of select="@content"/>
               </xsl:element>
               <xsl:text>
  </xsl:text>
            </rdf:Description>
            <xsl:text>
</xsl:text>
         </xsl:if>
         <xsl:if test="self::xhtml2:*[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)][@property][not(@content)][not(@datatype)]">
            <xsl:text>  </xsl:text>
            <rdf:Description>
               <xsl:if test="string-length(concat('g.',generate-id(..))) &gt; 0">
                  <xsl:attribute name="rdf:nodeID" select="concat('g.',generate-id(..))"/>
               </xsl:if>
               <xsl:text>
    </xsl:text>
               <xsl:element name="{my:curie-to-qname(@property,.)}"
                            namespace="{namespace-uri-for-prefix(substring-before(my:curie-to-qname(@property,.),':'),.)}">
                  <xsl:if test="string-length('Literal') &gt; 0">
                     <xsl:attribute name="rdf:parseType" select="'Literal'"/>
                  </xsl:if>
                  <xsl:copy-of select="node()"/>
               </xsl:element>
               <xsl:text>
  </xsl:text>
            </rdf:Description>
            <xsl:text>
</xsl:text>
         </xsl:if>
         <xsl:if test="self::xhtml2:*[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)][@property][not(@content)][@datatype]">
            <xsl:text>  </xsl:text>
            <rdf:Description>
               <xsl:if test="string-length(concat('g.',generate-id(..))) &gt; 0">
                  <xsl:attribute name="rdf:nodeID" select="concat('g.',generate-id(..))"/>
               </xsl:if>
               <xsl:text>
    </xsl:text>
               <xsl:element name="{my:curie-to-qname(@property,.)}"
                            namespace="{namespace-uri-for-prefix(substring-before(my:curie-to-qname(@property,.),':'),.)}">
                  <xsl:if test="string-length(my:resolve-bare-curie(@datatype,.)) &gt; 0">
                     <xsl:attribute name="rdf:datatype" select="my:resolve-bare-curie(@datatype,.)"/>
                  </xsl:if>
                  <xsl:value-of select=".//text()"/>
               </xsl:element>
               <xsl:text>
  </xsl:text>
            </rdf:Description>
            <xsl:text>
</xsl:text>
         </xsl:if>
         <xsl:if test="self::xhtml2:*[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)][@rel][@href]">
            <xsl:text>  </xsl:text>
            <rdf:Description>
               <xsl:if test="string-length(concat('g.',generate-id(..))) &gt; 0">
                  <xsl:attribute name="rdf:nodeID" select="concat('g.',generate-id(..))"/>
               </xsl:if>
               <xsl:text>
    </xsl:text>
               <xsl:element name="{my:curie-to-qname(@rel,.)}"
                            namespace="{namespace-uri-for-prefix(substring-before(my:curie-to-qname(@rel,.),':'),.)}">
                  <xsl:if test="string-length(my:resolve-uri-curie(@href,.)) &gt; 0">
                     <xsl:attribute name="rdf:resource" select="my:resolve-uri-curie(@href,.)"/>
                  </xsl:if>
                  <xsl:if test="string-length(my:bnode-uri-curie(@href)) &gt; 0">
                     <xsl:attribute name="rdf:nodeID" select="my:bnode-uri-curie(@href)"/>
                  </xsl:if>
               </xsl:element>
               <xsl:text>
  </xsl:text>
            </rdf:Description>
            <xsl:text>
</xsl:text>
         </xsl:if>
         <xsl:if test="self::xhtml2:*[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)][@rev][@href]">
            <xsl:text>  </xsl:text>
            <rdf:Description>
               <xsl:if test="string-length(my:resolve-uri-curie(@href,.)) &gt; 0">
                  <xsl:attribute name="rdf:about" select="my:resolve-uri-curie(@href,.)"/>
               </xsl:if>
               <xsl:if test="string-length(my:bnode-uri-curie(@href)) &gt; 0">
                  <xsl:attribute name="rdf:nodeID" select="my:bnode-uri-curie(@href)"/>
               </xsl:if>
               <xsl:text>
    </xsl:text>
               <xsl:element name="{my:curie-to-qname(@rev,.)}"
                            namespace="{namespace-uri-for-prefix(substring-before(my:curie-to-qname(@rev,.),':'),.)}">
                  <xsl:if test="string-length(concat('g.',generate-id(..))) &gt; 0">
                     <xsl:attribute name="rdf:nodeID" select="concat('g.',generate-id(..))"/>
                  </xsl:if>
               </xsl:element>
               <xsl:text>
  </xsl:text>
            </rdf:Description>
            <xsl:text>
</xsl:text>
         </xsl:if>
      </xsl:for-each>
   </xsl:function>
</xsl:stylesheet>