tests/insn/try/try-032.xsl
changeset 1856 067c1e8d801d
equal deleted inserted replaced
1855:c36860b47510 1856:067c1e8d801d
       
     1 <xsl:stylesheet exclude-result-prefixes="#all" version="3.0" 
       
     2   xmlns:err="http://www.w3.org/2005/xqt-errors" xmlns:xs="http://www.w3.org/2001/XMLSchema" 
       
     3   xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
       
     4 
       
     5   <!-- Saxon bug 3791 - reference to $err:code in a predicate -->
       
     6 
       
     7   <xsl:template name="main">
       
     8     <out>
       
     9       <xsl:variable as="xs:QName" name="my-err" select="xs:QName('my-err-local')" />
       
    10       <xsl:try select="error($my-err)">
       
    11         <xsl:catch>
       
    12           <xsl:value-of select="'test:', 'Bang!'[$err:code eq $my-err]" />
       
    13         </xsl:catch>
       
    14       </xsl:try>
       
    15     </out>  
       
    16   </xsl:template>
       
    17 </xsl:stylesheet>