<xsl:stylesheet 
    xmlns:xsl  ="http://www.w3.org/1999/XSL/Transform" version="1.0"
    xmlns:h    ="http://www.w3.org/1999/xhtml"
    xmlns      ="http://www.w3.org/1999/xhtml"
    xmlns:shoe ="http://www.cs.umd.edu/projects/plus/SHOE/"
    xmlns:rdf  ="http://www.w3.org/1999/02/22-rdf-syntax-ns#">

<h:p>$Id: shoe-ns.xsl,v 1.4 2000/07/15 05:10:50 connolly Exp $</h:p>
<h:p>cf <a href="http://www.cs.umd.edu/projects/plus/SHOE/spec.html">shoe spec</a></h:p>

<xsl:output method="xml" indent="yes"/>

<xsl:template match="html[//meta/@http-equiv='SHOE' and //meta/@content='VERSION=1.0']">
 <html>
   <xsl:apply-templates/>
 </html>
</xsl:template>

<xsl:template priority="2"
	match="arg | category | comparison | def-arg | def-category | def-constant | def-inference | def-relation | def-rename | def-type | inf-if | inf-then | ontology | relation | use-ontology | instance
">
  <xsl:element name="{name(.)}" namespace="http://www.cs.umd.edu/projects/plus/SHOE/">
	<xsl:for-each select="@*">
	  <xsl:choose>
	    <xsl:when test='name(.)="var"'>
	      <xsl:attribute name="usage"><xsl:value-of select="."/></xsl:attribute>
	    </xsl:when>
	    <xsl:otherwise>
	      <xsl:attribute name="{name(.)}"><xsl:value-of select="."/></xsl:attribute>
	    </xsl:otherwise>
	  </xsl:choose>
	</xsl:for-each>
	<xsl:apply-templates/>
  </xsl:element>
</xsl:template>

<xsl:template match="*">
  <xsl:element name="{name(.)}">
	<xsl:for-each select="@*">
	  <xsl:attribute name="{name(.)}"><xsl:value-of select="."/></xsl:attribute>
	</xsl:for-each>
	<xsl:apply-templates/>
  </xsl:element>
</xsl:template>

</xsl:stylesheet>
