<xsl:stylesheet xmlns:src="http://www.sdml.info/srcML/src" xmlns:cpp="http://www.sdml.info/srcML/cpp" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xd="http://www.pnp-software.com/XSLTdoc" xmlns:ax="http://control.ee.ethz.ch/XWeaver/AspectX" version="2.0">
  
  <xd:doc type="stylesheet">
    
<xd:short>Restriction of type 'isDefinitionOf'</xd:short>
    
<xd:detail>This restriction can be applied to joinPoints of type unit only.
  It must contain a pointcut or pointcutRef element of type 
<code>src:unit</code> or <code>src:class</code>.</xd:detail>
    
<xd:cvsId>$Id: isDefinitionOf.xsl 116 2005-07-19 14:13:22Z rohlik $</xd:cvsId>
    
<xd:author>ibirrer</xd:author>
    
<xd:copyright>2004, P&amp;P Software GmbH</xd:copyright>
  
</xd:doc>

    
  
  <xd:doc>Restriction of type 'isDefinitionOf'. Aborts with an error message if it is not a pointcut of type <code>src:unit</code> 
  or does not contain a pointcut or pointcutRef element of type 
  
<code>src:unit</code> or <code>src:class</code></xd:doc>

  
<xsl:template match="ax:restriction[@type='isDefinitionOf']" mode="pointcutXPath">
    
<xsl:text>$definition='this' and </xsl:text>
    
<xsl:choose>
      
<xsl:when test="(ax:pointcut | ax:pointcutRef)[@type='src:unit']">
        
<xsl:text>document(resolve-uri( $declaration, escape-uri(base-uri(/), false()) ))/</xsl:text>
        
<xsl:value-of select="@type" />
        
<xsl:apply-templates select="*" mode="pointcutXPath" />
      
</xsl:when>
      
<xsl:when test="(ax:pointcut | ax:pointcutRef)[@type='src:class']">
        
<xsl:text>document(resolve-uri( $declaration, escape-uri(base-uri(/), false()) ))//</xsl:text>
        
<xsl:apply-templates select="*" mode="pointcutXPath" />
      
</xsl:when>
      
<xsl:otherwise>
        
<xsl:message terminate="yes">ERROR: Fatal Error in isDefinitionOf.xsl</xsl:message>
      
</xsl:otherwise>
    
</xsl:choose>
    
  
</xsl:template>    
</xsl:stylesheet>






































v