<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:util="http://www.pnp-software.com/util" xmlns:ax="http://control.ee.ethz.ch/XWeaver/AspectX" xmlns:xslt="http://xslt" version="2.0">

  
  <xd:doc type="stylesheet">
    
<xd:short>XSL Variable Declarations for join point of type <code>src:block</code></xd:short>
    
<xd:detail><xd:dollarVariables /></xd:detail>
    
<xd:cvsId>$Id: block.xsl 2 2005-01-19 16:09:12Z ibirrer $</xd:cvsId>
    
<xd:author>ibirrer</xd:author>
    
<xd:copyright>2004, P&amp;P Software GmbH</xd:copyright>
  
</xd:doc>

  
  
<xsl:namespace-alias stylesheet-prefix="xslt" result-prefix="xsl" />
  
  
<xsl:template match="src:block" mode="variableDeclarations">
    
<xslt:variable name="blockBody">
      
<xslt:choose>
        
<xslt:when test="count(child::text()) = 1">
          
<xslt:text />
        
</xslt:when>
        
<xslt:otherwise>
          
<!-- Find out indentation -->
          
<xslt:variable name="indent" select="util:substringAfterLast( text()[1], ' ' )" />
          
<xslt:variable name="return">
            
<xslt:value-of select="util:substringAfterLast( text()[1], ' ' )" />
            
<!-- Strip all xml markup -->
            
<xslt:value-of select="string-join(util:stripXML(child::node()[position() != 1 and position() != last()]), '')" />
            
<xslt:value-of select="substring-before( text()[1], '}}' )" />
          
</xslt:variable>
          
<xslt:value-of select="util:removeTextIndent($return, $indent)" />
        
</xslt:otherwise>
      
</xslt:choose>
    
</xslt:variable>
  
</xsl:template>

</xsl:stylesheet>






































v