dmarston    00/12/15 13:31:02

  Added:       test/tests/conf/variable/err variableerr20.xsl
                        variableerr01.xsl variableerr02.xml
                        variableerr02.xsl variableerr03.xml
                        variableerr03.xsl variableerr04.xml
                        variableerr04.xsl variableerr05.xml
                        variableerr05.xsl variableerr06.xml
                        variableerr06.xsl variableerr07.xml
                        variableerr07.xsl variableerr08.xml
                        variableerr08.xsl variableerr09.xml
                        variableerr09.xsl variableerr10.xml
                        variableerr10.xsl variableerr11.xml
                        variableerr11.xsl variableerr12.xml
                        variableerr12.xsl variableerr13.xml
                        variableerr13.xsl variableerr14.xml
                        variableerr14.xsl variableerr15.xml
                        variableerr15.xsl variableerr16.xml
                        variableerr16.xsl variableerr17.xml
                        variableerr17.xsl variableerr18.xml
                        variableerr18.xsl variableerr19.xml
                        variableerr19.xsl variableerr20.xml
                        variableerr01.xml
  Log:
  Copy of tests in Lotus/IBM repository
  
  Revision  Changes    Path
  1.1                  xml-xalan/test/tests/conf/variable/err/variableerr20.xsl
  
  Index: variableerr20.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">
  
    <!-- FileName: variableerr20 -->
    <!-- Document: http://www.w3.org/TR/xslt -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 11.6 -->
    <!-- Purpose: Try to set same param twice inside a template, after setting 
via with-param. -->
    <!-- ExpectedException: Variable is already declared in this template -->
    <!-- Author: David Marston -->
  
  <xsl:template match="doc">
    <out>
      <xsl:call-template name="secondary">
        <xsl:with-param name="a" select="'zero'"/><!-- Two sets of quotes make 
it a string -->
      </xsl:call-template>
    </out>
  </xsl:template>
  
  <xsl:template name="secondary">
    <xsl:param name="a" select="'first'" />
    <xsl:param name="a" select="'second'" />
    <xsl:value-of select="$a" />
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  1.1                  xml-xalan/test/tests/conf/variable/err/variableerr01.xsl
  
  Index: variableerr01.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">
  
    <!-- FileName: variableerr01 -->
    <!-- Document: http://www.w3.org/TR/xslt -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 11.2 Values of Variables and Parameters -->
    <!-- Purpose: Negative test, attempt to access undefined variable. -->
    <!-- ExpectedException: VariableReference given for variable out of context 
or without definition! -->
    <!-- Author: David Marston -->
  
  <xsl:template match="doc">
    <out>
      <xsl:value-of select="$input"/>
    </out>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/conf/variable/err/variableerr02.xml
  
  Index: variableerr02.xml
  ===================================================================
  <?xml version="1.0"?>
  <doc>
    <inner/>
  </doc>
  
  
  1.1                  xml-xalan/test/tests/conf/variable/err/variableerr02.xsl
  
  Index: variableerr02.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">
  
    <!-- FileName: variableerr02 -->
    <!-- Document: http://www.w3.org/TR/xslt -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 11.2 Values of Variables and Parameters -->
    <!-- Purpose: Negative test, attempt to access variable that's not in 
scope. -->
    <!-- ExpectedException: VariableReference given for variable out of context 
or without definition! -->
    <!-- Author: David Marston -->
  
  <xsl:template match="doc">
    <out>
      <xsl:apply-templates/>
      Back to doc template.
      <xsl:value-of select="$input"/>
    </out>
  </xsl:template>
  
  <xsl:template match="inner">
    <xsl:variable name="input" select="2"/>
    Now in inner template.
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/conf/variable/err/variableerr03.xml
  
  Index: variableerr03.xml
  ===================================================================
  <?xml version="1.0"?>
  <doc>
  </doc>
  
  
  1.1                  xml-xalan/test/tests/conf/variable/err/variableerr03.xsl
  
  Index: variableerr03.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">
  
    <!-- FileName: VARerr03 -->
    <!-- Document: http://www.w3.org/TR/xslt -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 11.2 Values of Variables and Parameters  -->
    <!-- Purpose: Test for missing name attribute in xsl:variable -->
    <!-- ExpectedException: xsl:variable must have a name attribute. -->
  
  <xsl:variable select="'ABC'"/>
  
  <xsl:template match="doc">
    <out>
      <xsl:value-of select="$ExpressionTest"/>
    </out>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  1.1                  xml-xalan/test/tests/conf/variable/err/variableerr04.xml
  
  Index: variableerr04.xml
  ===================================================================
  <?xml version="1.0"?>
  <doc>
  </doc>
  
  
  1.1                  xml-xalan/test/tests/conf/variable/err/variableerr04.xsl
  
  Index: variableerr04.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">
  
    <!-- FileName: variableerr04 -->
    <!-- Document: http://www.w3.org/TR/xslt -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 11.2 Values of Variables and Parameters -->
    <!-- Purpose: Negative test, attempt to use variable RTF as a nodeset. -->
    <!-- ExpectedException: XPATH: Can not convert #RTREEFRAG to a NodeList! -->
    <!-- Author: Paul Dick -->
  
  <xsl:template match="doc">
    <out>
      <xsl:variable name="foo">
         <foo><bar>some text</bar></foo>
      </xsl:variable>
      <xsl:apply-templates select="$foo/*"/>
    </out>
  </xsl:template>
  
  <xsl:template match="*">
    <xsl:value-of select="."/>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/conf/variable/err/variableerr05.xml
  
  Index: variableerr05.xml
  ===================================================================
  <?xml version="1.0"?>
  <doc>
    <item>1</item>
    <item>2</item>
    <item>3</item>
  </doc>
  
  
  1.1                  xml-xalan/test/tests/conf/variable/err/variableerr05.xsl
  
  Index: variableerr05.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">
  
    <!-- FileName: variableerr05 -->
    <!-- Document: http://www.w3.org/TR/xslt -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 11.2 Values of Variables and Parameters  -->
    <!-- Purpose: Test for xsl:variable with both content and select. -->
    <!-- ExpectedException: xsl:variable cannot have both content and select 
attribute. -->
    <!-- Author: David Marston -->
  
  <xsl:template match="doc">
    <xsl:variable name="n" select="3">2</xsl:variable>
    <out>
      <xsl:value-of select="item[$n]"/>
    </out>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  1.1                  xml-xalan/test/tests/conf/variable/err/variableerr06.xml
  
  Index: variableerr06.xml
  ===================================================================
  <?xml version="1.0"?>
  <doc>
    <item>1</item>
    <item>2</item>
    <item>3</item>
  </doc>
  
  
  1.1                  xml-xalan/test/tests/conf/variable/err/variableerr06.xsl
  
  Index: variableerr06.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">
  
    <!-- FileName: variableerr06 -->
    <!-- Document: http://www.w3.org/TR/xslt -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 11.2 Values of Variables and Parameters  -->
    <!-- Purpose: Test for xsl:param with both content and select. -->
    <!-- ExpectedException: xsl:param cannot have both content and select 
attribute. -->
    <!-- Author: David Marston -->
  
  <xsl:param name="n" select="3">2</xsl:param>
  
  <xsl:template match="doc">
    <out>
      <xsl:value-of select="item[$n]"/>
    </out>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  1.1                  xml-xalan/test/tests/conf/variable/err/variableerr07.xml
  
  Index: variableerr07.xml
  ===================================================================
  <?xml version="1.0"?>
  <doc>
    <item>1</item>
    <item>2</item>
    <item>3</item>
  </doc>
  
  
  1.1                  xml-xalan/test/tests/conf/variable/err/variableerr07.xsl
  
  Index: variableerr07.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">
  
    <!-- FileName: VARerr07 -->
    <!-- Document: http://www.w3.org/TR/xslt -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 11.2 Values of Variables and Parameters  -->
    <!-- Purpose: Test for xsl:variable with more than one select. -->
    <!-- ExpectedException: XSLT: Attribute "select" was already specified for 
element "xsl:variable". -->
    <!-- Author: David Marston -->
  
  <xsl:template match="doc">
    <xsl:variable name="n" select="3" select="2"/>
    <out>
      <xsl:value-of select="item[$n]"/>
    </out>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  1.1                  xml-xalan/test/tests/conf/variable/err/variableerr08.xml
  
  Index: variableerr08.xml
  ===================================================================
  <?xml version="1.0"?>
  <doc>
    <item>Y</item>
  </doc>
  
  
  1.1                  xml-xalan/test/tests/conf/variable/err/variableerr08.xsl
  
  Index: variableerr08.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">
  
    <!-- FileName: variableerr08 -->
    <!-- Document: http://www.w3.org/TR/xslt -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 11.5 -->
    <!-- Purpose: Put xsl:param somewhere other than first in a template. -->
    <!-- ExpectedException: xsl:param elements must be first inside 
xsl:template -->
    <!-- Author: David Marston -->
  
  <xsl:template match="doc">
    <out>
      <xsl:text>Output before setting param1...</xsl:text>
      <xsl:param name="param1" select="item" />
      <xsl:value-of select="$param1"/>
    </out>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  1.1                  xml-xalan/test/tests/conf/variable/err/variableerr09.xml
  
  Index: variableerr09.xml
  ===================================================================
  <?xml version="1.0"?>
  <doc>
  </doc>
  
  
  1.1                  xml-xalan/test/tests/conf/variable/err/variableerr09.xsl
  
  Index: variableerr09.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">
  
    <!-- FileName: variableerr09 -->
    <!-- Document: http://www.w3.org/TR/xslt -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 11.2 Values of Variables and Parameters  -->
    <!-- Purpose: Try to set same top-level xsl:variable twice -->
    <!-- ExpectedException: Duplicate global variable declaration. -->
    <!-- Author: David Marston -->
  
  <xsl:variable name="ExpressionTest" select="'ABC'"/>
  <xsl:variable name="ExpressionTest" select="'XYZ'"/>
  
  <xsl:template match="doc">
     <out>
        <xsl:value-of select="$ExpressionTest"/>
     </out>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  1.1                  xml-xalan/test/tests/conf/variable/err/variableerr10.xml
  
  Index: variableerr10.xml
  ===================================================================
  <?xml version="1.0"?>
  <doc>
  </doc>
  
  
  1.1                  xml-xalan/test/tests/conf/variable/err/variableerr10.xsl
  
  Index: variableerr10.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">
  
    <!-- FileName: variableerr10 -->
    <!-- Document: http://www.w3.org/TR/xslt -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 11.2 Values of Variables and Parameters  -->
    <!-- Purpose: Try to set same top-level xsl:param twice -->
    <!-- ExpectedException: Duplicate global variable declaration. -->
    <!-- Author: David Marston -->
  
  <xsl:param name="ExpressionTest" select="'ABC'"/>
  <xsl:param name="ExpressionTest" select="'XYZ'"/>
  
  <xsl:template match="doc">
     <out>
        <xsl:value-of select="$ExpressionTest"/>
     </out>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  1.1                  xml-xalan/test/tests/conf/variable/err/variableerr11.xml
  
  Index: variableerr11.xml
  ===================================================================
  <?xml version="1.0"?>
  <doc>
  </doc>
  
  
  1.1                  xml-xalan/test/tests/conf/variable/err/variableerr11.xsl
  
  Index: variableerr11.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">
  
    <!-- FileName: variableerr11 -->
    <!-- Document: http://www.w3.org/TR/xslt -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 11.2 Values of Variables and Parameters  -->
    <!-- Purpose: Try to set same top-level param twice using different 
instructions, param first -->
    <!-- ExpectedException: Duplicate global variable declaration. -->
    <!-- Author: David Marston -->
  
  <xsl:param name="ExpressionTest" select="'ABC'"/>
  <xsl:variable name="ExpressionTest" select="'XYZ'"/>
  
  <xsl:template match="doc">
     <out>
        <xsl:value-of select="$ExpressionTest"/>
     </out>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  1.1                  xml-xalan/test/tests/conf/variable/err/variableerr12.xml
  
  Index: variableerr12.xml
  ===================================================================
  <?xml version="1.0"?>
  <doc>
  </doc>
  
  
  1.1                  xml-xalan/test/tests/conf/variable/err/variableerr12.xsl
  
  Index: variableerr12.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">
  
    <!-- FileName: variableerr12 -->
    <!-- Document: http://www.w3.org/TR/xslt -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 11.2 Values of Variables and Parameters  -->
    <!-- Purpose: Try to set same top-level param twice using different 
instructions, variable first -->
    <!-- ExpectedException: Duplicate global variable declaration. -->
    <!-- Author: David Marston -->
  
  <xsl:variable name="ExpressionTest" select="'ABC'"/>
  <xsl:param name="ExpressionTest" select="'XYZ'"/>
  
  <xsl:template match="doc">
     <out>
        <xsl:value-of select="$ExpressionTest"/>
     </out>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  1.1                  xml-xalan/test/tests/conf/variable/err/variableerr13.xml
  
  Index: variableerr13.xml
  ===================================================================
  <?xml version="1.0"?>
  <doc>
  </doc>
  
  
  1.1                  xml-xalan/test/tests/conf/variable/err/variableerr13.xsl
  
  Index: variableerr13.xsl
  ===================================================================
  <?xml version="1.0"?> 
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">
  
    <!-- FileName: variableerr13 -->
    <!-- Document: http://www.w3.org/TR/xslt -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 11.2 Values of Variables and Parameters -->
    <!-- Purpose: Try to set same in-template param twice -->
    <!-- ExpectedException: Duplicate variable declaration. -->
    <!-- Author: David Marston -->
  
  <xsl:template match="doc">
    <xsl:param name="partest" select="contains('foo','of')"/>
    <xsl:param name="partest" select="contains('foo','o')"/>
    <out>
      <xsl:value-of select="$partest"/>
    </out>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/conf/variable/err/variableerr14.xml
  
  Index: variableerr14.xml
  ===================================================================
  <?xml version="1.0"?>
  <doc>
  </doc>
  
  
  1.1                  xml-xalan/test/tests/conf/variable/err/variableerr14.xsl
  
  Index: variableerr14.xsl
  ===================================================================
  <?xml version="1.0"?> 
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">
  
    <!-- FileName: variableerr14 -->
    <!-- Document: http://www.w3.org/TR/xslt -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 11.2 Values of Variables and Parameters -->
    <!-- Purpose: Try to set same in-template variable twice -->
    <!-- ExpectedException: Duplicate variable declaration. -->
    <!-- Author: David Marston -->
  
  <xsl:template match="doc">
    <xsl:variable name="partest" select="contains('foo','of')"/>
    <xsl:variable name="partest" select="contains('foo','o')"/>
    <out>
      <xsl:value-of select="$partest"/>
    </out>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/conf/variable/err/variableerr15.xml
  
  Index: variableerr15.xml
  ===================================================================
  <?xml version="1.0"?>
  <doc>
  </doc>
  
  
  1.1                  xml-xalan/test/tests/conf/variable/err/variableerr15.xsl
  
  Index: variableerr15.xsl
  ===================================================================
  <?xml version="1.0"?> 
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">
  
    <!-- FileName: variableerr15 -->
    <!-- Document: http://www.w3.org/TR/xslt -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 11.2 Values of Variables and Parameters -->
    <!-- Purpose: Try to set same in-template param twice using different 
instructions, param first -->
    <!-- ExpectedException: Duplicate variable declaration. -->
    <!-- Author: David Marston -->
  
  <xsl:template match="doc">
    <xsl:param name="partest" select="contains('foo','of')"/>
    <xsl:variable name="partest" select="contains('foo','o')"/>
    <out>
      <xsl:value-of select="$partest"/>
    </out>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/conf/variable/err/variableerr16.xml
  
  Index: variableerr16.xml
  ===================================================================
  <?xml version="1.0"?>
  <doc>
  </doc>
  
  
  1.1                  xml-xalan/test/tests/conf/variable/err/variableerr16.xsl
  
  Index: variableerr16.xsl
  ===================================================================
  <?xml version="1.0"?> 
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">
  
    <!-- FileName: variableerr16 -->
    <!-- Document: http://www.w3.org/TR/xslt -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 11.2 Values of Variables and Parameters -->
    <!-- Purpose: Try to set same in-template param twice using different 
instructions, variable first -->
    <!-- ExpectedException: Duplicate variable declaration. -->
    <!-- Author: David Marston -->
  
  <xsl:template match="doc">
    <xsl:variable name="partest" select="contains('foo','of')"/>
    <xsl:param name="partest" select="contains('foo','o')"/>
    <out>
      <xsl:value-of select="$partest"/>
    </out>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/conf/variable/err/variableerr17.xml
  
  Index: variableerr17.xml
  ===================================================================
  <?xml version="1.0"?>
  <doc>
  </doc>
  
  
  1.1                  xml-xalan/test/tests/conf/variable/err/variableerr17.xsl
  
  Index: variableerr17.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">
  
    <!-- FileName: variableerr17 -->
    <!-- Document: http://www.w3.org/TR/xslt -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 11.2 Values of Variables and Parameters  -->
    <!-- Purpose: Try to set top-level params with circular references -->
    <!-- ExpectedException: Variable defined using itself -->
    <!-- Author: David Marston -->
  
  <xsl:variable name="circle0" select="concat('help',$circle1)"/>
  <xsl:param name="circle1" select="concat('help',$circle0)"/>
  
  <xsl:template match="doc">
     <out>
        <xsl:value-of select="$circle0"/>
     </out>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  1.1                  xml-xalan/test/tests/conf/variable/err/variableerr18.xml
  
  Index: variableerr18.xml
  ===================================================================
  <?xml version="1.0"?>
  <doc>
  </doc>
  
  
  1.1                  xml-xalan/test/tests/conf/variable/err/variableerr18.xsl
  
  Index: variableerr18.xsl
  ===================================================================
  <?xml version="1.0"?> 
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">
  
    <!-- FileName: variableerr18 -->
    <!-- Document: http://www.w3.org/TR/xslt -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 11.2 Values of Variables and Parameters -->
    <!-- Purpose: Try to set in-template params with circular references -->
    <!-- ExpectedException: Variable defined using itself -->
    <!-- Author: David Marston -->
  
  <xsl:template match="doc">
    <xsl:param name="circle0" select="concat('help',$circle1)"/>
    <xsl:param name="circle1" select="concat('help',$circle0)"/>
    <out>
      <xsl:value-of select="$circle0"/>
    </out>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/conf/variable/err/variableerr19.xml
  
  Index: variableerr19.xml
  ===================================================================
  <?xml version="1.0"?>
  <doc>
  </doc>
  
  
  1.1                  xml-xalan/test/tests/conf/variable/err/variableerr19.xsl
  
  Index: variableerr19.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">
  
    <!-- FileName: variableerr19 -->
    <!-- Document: http://www.w3.org/TR/xslt -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 11.5 -->
    <!-- Purpose: Try to set a variable inside a template based on variable 
defined later in that template. -->
    <!-- ExpectedException: VariableReference given for variable out of context 
or without definition! -->
    <!-- Author: David Marston -->
  
  <xsl:template match="doc">
    <out>
      <xsl:variable name="b" select="$a" />
      <xsl:variable name="a" select="'second'" /><!-- Two sets of quotes make 
it a string -->
      <xsl:value-of select="$b" />
    </out>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  1.1                  xml-xalan/test/tests/conf/variable/err/variableerr20.xml
  
  Index: variableerr20.xml
  ===================================================================
  <?xml version="1.0"?>
  <doc>
  </doc>
  
  
  1.1                  xml-xalan/test/tests/conf/variable/err/variableerr01.xml
  
  Index: variableerr01.xml
  ===================================================================
  <?xml version="1.0"?>
  <doc>
  </doc>
  
  

Reply via email to