Relaxng refAtt resolver.xslt

This stylesheet reads in a TEI P4 RELAX NG schema (XML syntax) — such a thing would be created by converting a flat TEI P4 DTD with a tool like trang — and writes out the same schema with references to attribute lists resolved.

This is not generally a useful thing to do, but makes it easier to process the schema further, e.g. with GenerateDefaultAttributeRemover.xslt.

 

  

    

 deleted define  </xsl:template>

 <xsl:apply-templates/> </xsl:template>

 resolved define <xsl:value-of select="@name"/></xsl:comment> <xsl:variable name="name" select="@name"/> <xsl:apply-templates mode="referred" select="//rng:define[@name=$name]"/> </xsl:template>

</xsl:stylesheet>