<?xml version='1.0'?><!-- -*- mode: indented-text;-*- -->
<xsl:transform
    xmlns:xsl  ="http://www.w3.org/1999/XSL/Transform" version="1.0"
    xmlns:rdf  ="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    >

<xsl:variable
  name="RDF_ns"
  select='"http://www.w3.org/1999/02/22-rdf-syntax-ns#"'/>

<div xmlns="http://www.w3.org/1999/xhtml">

<p>fix resource= to become rdf:resource=</p>

<address>Dan Connolly <br class=""/>
$Id: fixAttrs.xsl,v 1.1 2001/05/24 14:55:02 connolly Exp $</address>
</div>

<!-- based on identity transformation, taken from 
     http://www.w3.org/TR/xslt#copying
  -->
<xsl:template match="*">
  <xsl:variable name="eltNS" select='namespace-uri()'/>

  <xsl:element name="{name()}" namespace="{$eltNS}">
    <xsl:for-each select="@*">
      <xsl:variable name="attrNS" select='namespace-uri()'/>

      <xsl:variable name="fixNS">
        <xsl:choose>
	  <xsl:when test='$eltNS = $RDF_ns and $attrNS = ""'>
	    <xsl:value-of select='$RDF_ns'/>
	  </xsl:when>
	  <xsl:otherwise>
	    <xsl:value-of select='$attrNS'/>
	  </xsl:otherwise>
	</xsl:choose>
      </xsl:variable>

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

<xsl:template match="text()">
  <xsl:value-of select="."/>
</xsl:template>

<xsl:template match="comment()">
  <xsl:copy/>
</xsl:template>

</xsl:transform>
