<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- csl.pl - processador de restrições
     jcr - 2001.02.15 -->

<xsl:stylesheet version="1.0"
                xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
                
<xsl:output indent="yes" encoding="iso-8859-1"/>

<xsl:template match="/">
    <xsl:for-each select="//items/items-REG/code">
       <xsl:variable name="key">
           <xsl:value-of select="."/>  
       </xsl:variable>
       
       <xsl:if test="count(//items/items-REG[code = $key]) != 1">  
         <xsl:value-of select="."/> is not a key!
       </xsl:if>  
    </xsl:for-each>
</xsl:template>

</xsl:stylesheet>

