<test-group xmlns="http://www.w3.org/2005/02/query-test-XQTSCatalog" name="MatchesFunc" featureOwner="NIST and Frans Englich">
   <GroupInfo>
      <title>fn:matches</title>
      <description/>
   </GroupInfo>
   <test-case is-XPath2="true" name="fn-matches2args-1" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="standard" Creator="Carmelo Montanez">
      <description>Evaluates the "matches" function with the arguments set as follows: $input = xs:string(lower bound) $pattern = xs:string(lower bound).</description>
      <spec-citation spec="FuncOps" section-number="7.6.2" section-title="fn:matches" section-pointer="func-matches"/>
      <query name="fn-matches2args-1" date="2004-12-13"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <output-file role="principal" compare="Text">fn-matches2args-1.txt</output-file>
   </test-case>
   <test-case is-XPath2="true" name="fn-matches2args-2" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="standard" Creator="Carmelo Montanez">
      <description>Evaluates the "matches" function with the arguments set as follows: $input = xs:string(mid range) $pattern = xs:string(lower bound).</description>
      <spec-citation spec="FuncOps" section-number="7.6.2" section-title="fn:matches" section-pointer="func-matches"/>
      <query name="fn-matches2args-2" date="2004-12-13"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <output-file role="principal" compare="Text">fn-matches2args-2.txt</output-file>
   </test-case>
   <test-case is-XPath2="true" name="fn-matches2args-3" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="standard" Creator="Carmelo Montanez">
      <description>Evaluates the "matches" function with the arguments set as follows: $input = xs:string(upper bound) $pattern = xs:string(lower bound).</description>
      <spec-citation spec="FuncOps" section-number="7.6.2" section-title="fn:matches" section-pointer="func-matches"/>
      <query name="fn-matches2args-3" date="2004-12-13"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <output-file role="principal" compare="Text">fn-matches2args-3.txt</output-file>
   </test-case>
   <test-case is-XPath2="true" name="fn-matches2args-4" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="standard" Creator="Carmelo Montanez">
      <description>Evaluates the "matches" function with the arguments set as follows: $input = xs:string(lower bound) $pattern = xs:string(mid range).</description>
      <spec-citation spec="FuncOps" section-number="7.6.2" section-title="fn:matches" section-pointer="func-matches"/>
      <query name="fn-matches2args-4" date="2004-12-13"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <output-file role="principal" compare="Text">fn-matches2args-4.txt</output-file>
   </test-case>
   <test-case is-XPath2="true" name="fn-matches2args-5" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="standard" Creator="Carmelo Montanez">
      <description>Evaluates the "matches" function with the arguments set as follows: $input = xs:string(lower bound) $pattern = xs:string(upper bound).</description>
      <spec-citation spec="FuncOps" section-number="7.6.2" section-title="fn:matches" section-pointer="func-matches"/>
      <query name="fn-matches2args-5" date="2004-12-13"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <output-file role="principal" compare="Text">fn-matches2args-5.txt</output-file>
   </test-case>
   <test-case is-XPath2="true" name="fn-matchesErr-1" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="runtime-error" Creator="Carmelo Montanez">
      <description>Invalid flag for the "matches" function third argument.</description>
      <spec-citation spec="FuncOps" section-number="7.6.2" section-title="fn:matches" section-pointer="func-matches"/>
      <query name="fn-matchesErr-1" date="2005-10-04"/>
      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
      <expected-error>FORX0001</expected-error>
   </test-case>
   <test-case is-XPath2="true" name="fn-matchesErr-2" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="runtime-error" Creator="Michael Kay">
      <description>Invalid back-reference within square brackets.</description>
      <spec-citation spec="FuncOps" section-number="7.6.2" section-title="fn:matches" section-pointer="func-matches"/>
      <query name="fn-matchesErr-2" date="2009-03-04"/>
      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
      <expected-error>FORX0002</expected-error>
   </test-case>
   <test-case is-XPath2="true" name="fn-matchesErr-3" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="runtime-error" Creator="Michael Kay">
      <description>Invalid single-digit back-reference.</description>
      <spec-citation spec="FuncOps" section-number="7.6.2" section-title="fn:matches" section-pointer="func-matches"/>
      <query name="fn-matchesErr-3" date="2009-03-04"/>
      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
      <expected-error>FORX0002</expected-error>
   </test-case>
   <test-case is-XPath2="true" name="fn-matchesErr-4" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="runtime-error" Creator="Michael Kay">
      <description>Invalid single-digit back-reference.</description>
      <spec-citation spec="FuncOps" section-number="7.6.2" section-title="fn:matches" section-pointer="func-matches"/>
      <query name="fn-matchesErr-4" date="2009-03-04"/>
      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
      <expected-error>FORX0002</expected-error>
   </test-case>
   <test-case is-XPath2="true" name="fn-matchesErr-5" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="runtime-error" Creator="Michael Kay">
      <description>Invalid double-digit back-reference.</description>
      <spec-citation spec="FuncOps" section-number="7.6.2" section-title="fn:matches" section-pointer="func-matches"/>
      <query name="fn-matchesErr-5" date="2009-03-04"/>
      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
      <expected-error>FORX0002</expected-error>
   </test-case>      
   <test-case is-XPath2="true" name="fn-matches-1" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="standard" Creator="Carmelo Montanez">
      <description>Evaluation of matches function as per example 1 (for this function).</description>
      <spec-citation spec="FuncOps" section-number="7.6.2" section-title="fn:matches" section-pointer="func-matches"/>
      <query name="fn-matches-1" date="2005-10-14"/>
      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
      <output-file role="principal" compare="Text">fn-matches-1.txt</output-file>
   </test-case>
   <test-case is-XPath2="true" name="fn-matches-2" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="standard" Creator="Carmelo Montanez">
      <description>Evaluation of matches function as per example 2 (for this function). Pattern set to "^a.*a$".</description>
      <spec-citation spec="FuncOps" section-number="7.6.2" section-title="fn:matches" section-pointer="func-matches"/>
      <query name="fn-matches-2" date="2005-10-14"/>
      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
      <output-file role="principal" compare="Text">fn-matches-2.txt</output-file>
   </test-case>
   <test-case is-XPath2="true" name="fn-matches-3" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="standard" Creator="Carmelo Montanez">
      <description>Evaluation of matches function as per example 3 (for this function). Pattern set to "^bra".</description>
      <spec-citation spec="FuncOps" section-number="7.6.2" section-title="fn:matches" section-pointer="func-matches"/>
      <query name="fn-matches-3" date="2005-10-14"/>
      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
      <output-file role="principal" compare="Text">fn-matches-3.txt</output-file>
   </test-case>
   <test-case is-XPath2="true" name="fn-matches-4" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="standard" Creator="Carmelo Montanez">
      <description>Test that calling the function with flags set to the empty string is the same as ommiting the flags.</description>
      <spec-citation spec="FuncOps" section-number="7.6.2" section-title="fn:matches" section-pointer="func-matches"/>
      <query name="fn-matches-4" date="2005-10-14"/>
      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
      <output-file role="principal" compare="Text">fn-matches-4.txt</output-file>
   </test-case>
   <test-case is-XPath2="true" name="fn-matches-5" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="standard" Creator="Carmelo Montanez">
      <description>Evaluation of fn:matches with the input string set to the empty sequence.</description>
      <spec-citation spec="FuncOps" section-number="7.6.2" section-title="fn:matches" section-pointer="func-matches"/>
      <query name="fn-matches-5" date="2005-10-14"/>
      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
      <output-file role="principal" compare="Text">fn-matches-5.txt</output-file>
   </test-case>
   <test-case is-XPath2="true" name="fn-matches-6" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="standard" Creator="Carmelo Montanez">
      <description>Evaluation of matches function with pattern set to "\^".</description>
      <spec-citation spec="FuncOps" section-number="7.6.2" section-title="fn:matches" section-pointer="func-matches"/>
      <query name="fn-matches-6" date="2005-10-14"/>
      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
      <output-file role="principal" compare="Text">fn-matches-6.txt</output-file>
   </test-case>
   <test-case is-XPath2="true" name="fn-matches-7" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="standard" Creator="Carmelo Montanez">
      <description>Evaluation of matches function with pattern set to "\?" for an input string that contains "?".</description>
      <spec-citation spec="FuncOps" section-number="7.6.2" section-title="fn:matches" section-pointer="func-matches"/>
      <query name="fn-matches-7" date="2005-10-14"/>
      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
      <output-file role="principal" compare="Text">fn-matches-7.txt</output-file>
   </test-case>
   <test-case is-XPath2="true" name="fn-matches-8" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="standard" Creator="Carmelo Montanez">
      <description>Evaluation of matches function with pattern set to "\*" for an input string that contains "*".</description>
      <spec-citation spec="FuncOps" section-number="7.6.2" section-title="fn:matches" section-pointer="func-matches"/>
      <query name="fn-matches-8" date="2005-10-14"/>
      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
      <output-file role="principal" compare="Text">fn-matches-8.txt</output-file>
   </test-case>
   <test-case is-XPath2="true" name="fn-matches-9" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="standard" Creator="Carmelo Montanez">
      <description>Evaluation of matches function with pattern set to "\+" for an input string that contains "+".</description>
      <spec-citation spec="FuncOps" section-number="7.6.2" section-title="fn:matches" section-pointer="func-matches"/>
      <query name="fn-matches-9" date="2005-10-14"/>
      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
      <output-file role="principal" compare="Text">fn-matches-9.txt</output-file>
   </test-case>
   <test-case is-XPath2="true" name="fn-matches-10" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="standard" Creator="Carmelo Montanez">
      <description>Evaluation of matches function with pattern set to "\{" for an input string that contains "{".</description>
      <spec-citation spec="FuncOps" section-number="7.6.2" section-title="fn:matches" section-pointer="func-matches"/>
      <query name="fn-matches-10" date="2005-10-14"/>
      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
      <output-file role="principal" compare="Text">fn-matches-10.txt</output-file>
   </test-case>
   <test-case is-XPath2="true" name="fn-matches-11" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="standard" Creator="Carmelo Montanez">
      <description>Evaluation of matches function with pattern set to "\}" for an input string that contains "}".</description>
      <spec-citation spec="FuncOps" section-number="7.6.2" section-title="fn:matches" section-pointer="func-matches"/>
      <query name="fn-matches-11" date="2005-10-14"/>
      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
      <output-file role="principal" compare="Text">fn-matches-11.txt</output-file>
   </test-case>
   <test-case is-XPath2="true" name="fn-matches-12" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="standard" Creator="Carmelo Montanez">
      <description>Evaluation of matches function with pattern set to "\(" for an input string that contains "(".</description>
      <spec-citation spec="FuncOps" section-number="7.6.2" section-title="fn:matches" section-pointer="func-matches"/>
      <query name="fn-matches-12" date="2005-10-14"/>
      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
      <output-file role="principal" compare="Text">fn-matches-12.txt</output-file>
   </test-case>
   <test-case is-XPath2="true" name="fn-matches-13" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="standard" Creator="Carmelo Montanez">
      <description>Evaluation of matches function with pattern set to "\)" for an input string that contains ")".</description>
      <spec-citation spec="FuncOps" section-number="7.6.2" section-title="fn:matches" section-pointer="func-matches"/>
      <query name="fn-matches-13" date="2005-10-14"/>
      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
      <output-file role="principal" compare="Text">fn-matches-13.txt</output-file>
   </test-case>
   <test-case is-XPath2="true" name="fn-matches-14" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="standard" Creator="Carmelo Montanez">
      <description>Evaluation of matches function with pattern set to "\[" for an input string that contains "[".</description>
      <spec-citation spec="FuncOps" section-number="7.6.2" section-title="fn:matches" section-pointer="func-matches"/>
      <query name="fn-matches-14" date="2005-10-14"/>
      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
      <output-file role="principal" compare="Text">fn-matches-14.txt</output-file>
   </test-case>
   <test-case is-XPath2="true" name="fn-matches-15" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="standard" Creator="Carmelo Montanez">
      <description>Evaluation of matches function with pattern set to "\]" for an input string that contains "]".</description>
      <spec-citation spec="FuncOps" section-number="7.6.2" section-title="fn:matches" section-pointer="func-matches"/>
      <query name="fn-matches-15" date="2005-10-14"/>
      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
      <output-file role="principal" compare="Text">fn-matches-15.txt</output-file>
   </test-case>
   <test-case is-XPath2="true" name="fn-matches-16" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="standard" Creator="Carmelo Montanez">
      <description>Evaluation of matches function with pattern set to "\-" for an input string that contains "-".</description>
      <spec-citation spec="FuncOps" section-number="7.6.2" section-title="fn:matches" section-pointer="func-matches"/>
      <query name="fn-matches-16" date="2005-10-14"/>
      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
      <output-file role="principal" compare="Text">fn-matches-16.txt</output-file>
   </test-case>
   <test-case is-XPath2="true" name="fn-matches-17" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="standard" Creator="Carmelo Montanez">
      <description>Evaluation of matches function with pattern set to "\." for an input string that contains ".".</description>
      <spec-citation spec="FuncOps" section-number="7.6.2" section-title="fn:matches" section-pointer="func-matches"/>
      <query name="fn-matches-17" date="2005-10-14"/>
      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
      <output-file role="principal" compare="Text">fn-matches-17.txt</output-file>
   </test-case>
   <test-case is-XPath2="true" name="fn-matches-18" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="standard" Creator="Carmelo Montanez">
      <description>Evaluation of matches function with pattern set to "\|" for an input string that contains "|".</description>
      <spec-citation spec="FuncOps" section-number="7.6.2" section-title="fn:matches" section-pointer="func-matches"/>
      <query name="fn-matches-18" date="2005-10-14"/>
      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
      <output-file role="principal" compare="Text">fn-matches-18.txt</output-file>
   </test-case>
   <test-case is-XPath2="true" name="fn-matches-19" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="standard" Creator="Carmelo Montanez">
      <description>Evaluation of matches function with pattern set to "\\" for an input string that contains "\".</description>
      <spec-citation spec="FuncOps" section-number="7.6.2" section-title="fn:matches" section-pointer="func-matches"/>
      <query name="fn-matches-19" date="2005-10-14"/>
      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
      <output-file role="principal" compare="Text">fn-matches-19.txt</output-file>
   </test-case>
   <test-case is-XPath2="true" name="fn-matches-20" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="standard" Creator="Carmelo Montanez">
      <description>Evaluation of matches function with pattern set to "\t" for an input string that contains the tab character.</description>
      <spec-citation spec="FuncOps" section-number="7.6.2" section-title="fn:matches" section-pointer="func-matches"/>
      <query name="fn-matches-20" date="2005-10-14"/>
      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
      <output-file role="principal" compare="Text">fn-matches-20.txt</output-file>
   </test-case>
   <test-case is-XPath2="true" name="fn-matches-21" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="standard" Creator="Carmelo Montanez">
      <description>Evaluation of matches function with pattern set to "\n" for an input string that contains the newline character.</description>
      <spec-citation spec="FuncOps" section-number="7.6.2" section-title="fn:matches" section-pointer="func-matches"/>
      <query name="fn-matches-21" date="2005-10-14"/>
      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
      <output-file role="principal" compare="Text">fn-matches-21.txt</output-file>
   </test-case>
   <test-case is-XPath2="true" name="fn-matches-22" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="standard" Creator="Carmelo Montanez">
      <description>Evaluation of matches function with pattern set to "aa{1}" (exact quantity) for an input string that contains the "aa" string.</description>
      <spec-citation spec="FuncOps" section-number="7.6.2" section-title="fn:matches" section-pointer="func-matches"/>
      <query name="fn-matches-22" date="2005-10-14"/>
      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
      <output-file role="principal" compare="Text">fn-matches-22.txt</output-file>
   </test-case>
   <test-case is-XPath2="true" name="fn-matches-23" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="standard" Creator="Carmelo Montanez">
      <description>Evaluation of matches function with pattern set to "aa{1,}" (min quantity) for an input string that contains the "aa" string twice.</description>
      <spec-citation spec="FuncOps" section-number="7.6.2" section-title="fn:matches" section-pointer="func-matches"/>
      <query name="fn-matches-23" date="2005-10-14"/>
      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
      <output-file role="principal" compare="Text">fn-matches-23.txt</output-file>
   </test-case>
   <test-case is-XPath2="true" name="fn-matches-24" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="standard" Creator="Carmelo Montanez">
      <description>Evaluation of matches function with pattern set to "aa{1,2}" (range quantity) for an input string that contains the "aa" string twice.</description>
      <spec-citation spec="FuncOps" section-number="7.6.2" section-title="fn:matches" section-pointer="func-matches"/>
      <query name="fn-matches-24" date="2005-10-14"/>
      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
      <output-file role="principal" compare="Text">fn-matches-24.txt</output-file>
   </test-case>
   <test-case is-XPath2="true" name="fn-matches-25" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="runtime-error" Creator="Carmelo Montanez">
      <description>Evaluation of matches function with an invalid pattern.</description>
      <spec-citation spec="FuncOps" section-number="7.6.2" section-title="fn:matches" section-pointer="func-matches"/>
      <query name="fn-matches-25" date="2005-12-07"/>
      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
      <expected-error>FORX0002</expected-error>
   </test-case>
   <test-case is-XPath2="true" name="fn-matches-26" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="standard" Creator="Andrew Eisenberg">
      <description>Check for the correct behavior of ^ and $ in multi-line mode</description>
      <spec-citation spec="FuncOps" section-number="7.6.2" section-title="fn:matches" section-pointer="func-matches"/>
      <reflects-resolution>http://www.w3.org/Bugs/Public/show_bug.cgi?id=4543</reflects-resolution>
      <query name="fn-matches-26" date="2006-09-25"/>
      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
      <output-file role="principal" compare="Text">fn-matches-26.txt</output-file>
   </test-case>
   <test-case is-XPath2="false" name="fn-matches-27" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="standard" Creator="Andrew Eisenberg">
      <description>Check for the correct behavior of ^ and $ in multi-line mode</description>
      <spec-citation spec="FuncOps" section-number="7.6.2" section-title="fn:matches" section-pointer="func-matches"/>
      <reflects-resolution>http://www.w3.org/Bugs/Public/show_bug.cgi?id=4543</reflects-resolution>
      <query name="fn-matches-27" date="2006-09-25"/>
      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
      <output-file role="principal" compare="Text">fn-matches-27.txt</output-file>
   </test-case>
   <test-case is-XPath2="false" name="fn-matches-28" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="standard" Creator="Andrew Eisenberg">
      <description>Check for the correct behavior of ^ and $ in multi-line mode</description>
      <spec-citation spec="FuncOps" section-number="7.6.2" section-title="fn:matches" section-pointer="func-matches"/>
      <reflects-resolution>http://www.w3.org/Bugs/Public/show_bug.cgi?id=4543</reflects-resolution>
      <query name="fn-matches-28" date="2006-09-25"/>
      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
      <output-file role="principal" compare="Text">fn-matches-28.txt</output-file>
   </test-case>
   <test-case is-XPath2="true" name="fn-matches-29" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="standard" Creator="Michael Kay">
      <description>Two digits not treated as back-reference</description>
      <spec-citation spec="FuncOps" section-number="7.6.2" section-title="fn:matches" section-pointer="func-matches"/>
      <reflects-resolution>http://www.w3.org/Bugs/Public/show_bug.cgi?id=4543</reflects-resolution>
      <query name="fn-matches-29" date="2009-03-05"/>
      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
      <output-file role="principal" compare="Text">fn-matches-29.txt</output-file>
   </test-case>
   <test-case is-XPath2="true" name="fn-matches-30" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="standard" Creator="Michael Kay">
      <description>Two digits treated as back-reference</description>
      <spec-citation spec="FuncOps" section-number="7.6.2" section-title="fn:matches" section-pointer="func-matches"/>
      <reflects-resolution>http://www.w3.org/Bugs/Public/show_bug.cgi?id=4543</reflects-resolution>
      <query name="fn-matches-30" date="2009-03-05"/>
      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
      <output-file role="principal" compare="Text">fn-matches-30.txt</output-file>
   </test-case>
   <test-case is-XPath2="false" name="fn-matches-31" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="standard" Creator="Michael Kay">
      <description>Call on matches with non-capturing groups (allowed in XQuery 1.1)</description>
      <spec-citation spec="FuncOps" section-number="7.6.2" section-title="fn:matches" section-pointer="func-matches"/>
      <query name="fn-matches-31" date="2009-10-23"/>
      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
      <output-file spec-version="1.1" role="principal" compare="Text">fn-matches-31.txt</output-file>
      <expected-error spec-version="1.0">XQST0031</expected-error>
      <expected-error spec-version="1.0">FORX0002</expected-error>
   </test-case>   
   <test-case is-XPath2="false" name="fn-matches-32" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="standard" Creator="Michael Kay">
      <description>Call on matches with "q" flag (allowed in XQuery 1.1)</description>
      <spec-citation spec="FuncOps" section-number="7.6.2" section-title="fn:matches" section-pointer="func-matches"/>
      <query name="fn-matches-32" date="2009-10-23"/>
      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
      <output-file spec-version="1.1" role="principal" compare="Text">fn-matches-32.txt</output-file>
      <expected-error spec-version="1.0">XQST0031</expected-error>
      <expected-error spec-version="1.0">FORX0002</expected-error>
   </test-case>      
   <test-case is-XPath2="false" name="fn-matches-33" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="standard" Creator="Michael Kay">
      <description>Call on matches with "q" flag (allowed in XQuery 1.1)</description>
      <spec-citation spec="FuncOps" section-number="7.6.2" section-title="fn:matches" section-pointer="func-matches"/>
      <query name="fn-matches-33" date="2009-10-23"/>
      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
      <output-file spec-version="1.1" role="principal" compare="Text">fn-matches-33.txt</output-file>
      <expected-error spec-version="1.0">XQST0031</expected-error>
      <expected-error spec-version="1.0">FORX0002</expected-error>
   </test-case>         
   <test-case is-XPath2="false" name="fn-matches-34" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="standard" Creator="Michael Kay">
      <description>Call on matches with "q" flag (allowed in XQuery 1.1)</description>
      <spec-citation spec="FuncOps" section-number="7.6.2" section-title="fn:matches" section-pointer="func-matches"/>
      <query name="fn-matches-34" date="2009-10-23"/>
      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
      <output-file spec-version="1.1" role="principal" compare="Text">fn-matches-34.txt</output-file>
      <expected-error spec-version="1.0">XQST0031</expected-error>
      <expected-error spec-version="1.0">FORX0002</expected-error>
   </test-case>            
   <test-case is-XPath2="true" name="fn-matches-35" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="runtime-error" Creator="Zhen Hua  Liu">
      <description>Test for bug fix of 5348 in Errata for FO</description>
      <spec-citation spec="FuncOps" section-number="7.6.2" section-title="fn:matches" section-pointer="func-matches"/>
      <reflects-resolution>http://www.w3.org/Bugs/Public/show_bug.cgi?id=5348</reflects-resolution>
      <query name="fn-matches-35" date="2009-11-15"/>
      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
      <expected-error>FORX0002</expected-error>
   </test-case>
   <test-case is-XPath2="true" name="fn-matches-36" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="standard" Creator="Zhen Hua  Liu">
      <description>Test for bug fix of 5348 in Errata for FO</description>
      <spec-citation spec="FuncOps" section-number="7.6.2" section-title="fn:matches" section-pointer="func-matches"/>
      <reflects-resolution>http://www.w3.org/Bugs/Public/show_bug.cgi?id=5348</reflects-resolution>
      <query name="fn-matches-36" date="2009-11-15"/>
      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
      <output-file role="principal" compare="Text">fn-matches-36.txt</output-file>
   </test-case>
   <test-case is-XPath2="true" name="fn-matches-37" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="runtime-error" Creator="Zhen Hua  Liu">
      <description>Test for bug fix of 5348 in Errata for FO</description>
      <spec-citation spec="FuncOps" section-number="7.6.2" section-title="fn:matches" section-pointer="func-matches"/>
      <reflects-resolution>http://www.w3.org/Bugs/Public/show_bug.cgi?id=5348</reflects-resolution>
      <query name="fn-matches-37" date="2009-11-15"/>
      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
      <expected-error>FORX0002</expected-error>
   </test-case>
   <test-case is-XPath2="true" name="fn-matches-38" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="runtime-error" Creator="Andrew Eisenberg">
      <description>Test for bug fix of 5348 in Errata for FO</description>
      <spec-citation spec="FuncOps" section-number="7.6.2" section-title="fn:matches" section-pointer="func-matches"/>
      <reflects-resolution>http://www.w3.org/Bugs/Public/show_bug.cgi?id=5348</reflects-resolution>
      <query name="fn-matches-38" date="2009-12-23"/>
      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
      <expected-error>FORX0002</expected-error>
   </test-case>
   <test-case is-XPath2="true" name="fn-matches-39" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="runtime-error" Creator="Andrew Eisenberg">
      <description>Test for bug fix of 5348 in Errata for FO</description>
      <spec-citation spec="FuncOps" section-number="7.6.2" section-title="fn:matches" section-pointer="func-matches"/>
      <reflects-resolution>http://www.w3.org/Bugs/Public/show_bug.cgi?id=5348</reflects-resolution>
      <query name="fn-matches-39" date="2009-12-23"/>
      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
      <expected-error>FORX0002</expected-error>
   </test-case>
   <test-case is-XPath2="true" name="fn-matches-40" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="runtime-error" Creator="Andrew Eisenberg">
      <description>Test for bug fix of 5348 in Errata for FO</description>
      <spec-citation spec="FuncOps" section-number="7.6.2" section-title="fn:matches" section-pointer="func-matches"/>
      <reflects-resolution>http://www.w3.org/Bugs/Public/show_bug.cgi?id=5348</reflects-resolution>
      <query name="fn-matches-40" date="2009-12-23"/>
      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
      <expected-error>FORX0002</expected-error>
   </test-case>

   
   <test-case is-XPath2="true" name="caselessmatch01" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="standard" Creator="Michael Kay, Saxonica">
      <description>Simple call of matches() with "i" flag set.</description>
      <spec-citation spec="FuncOps" section-number="7.6.1.1" section-title="Flags" section-pointer="flags"/>
      <query name="caselessmatch01" date="2006-02-01"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <output-file role="principal" compare="Text">caselessmatch-true.txt</output-file>
   </test-case>
   <test-case is-XPath2="true" name="caselessmatch02" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="standard" Creator="Michael Kay, Saxonica">
      <description>Call of matches() with "i" flag and a character range.</description>
      <spec-citation spec="FuncOps" section-number="7.6.1.1" section-title="Flags" section-pointer="flags"/>
      <query name="caselessmatch02" date="2006-02-01"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <output-file role="principal" compare="Text">caselessmatch-true.txt</output-file>
   </test-case>
   <test-case is-XPath2="true" name="caselessmatch03" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="standard" Creator="Michael Kay, Saxonica">
      <description>Call of matches() with "i" flag and a character range.</description>
      <spec-citation spec="FuncOps" section-number="7.6.1.1" section-title="Flags" section-pointer="flags"/>
      <query name="caselessmatch03" date="2006-02-01"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <output-file role="principal" compare="Text">caselessmatch-true.txt</output-file>
   </test-case>
   <test-case is-XPath2="true" name="caselessmatch04" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="standard" Creator="Michael Kay, Saxonica">
      <description>Description: Call of matches() with "i" flag and Kelvin sign.</description>
      <spec-citation spec="FuncOps" section-number="7.6.1.1" section-title="Flags" section-pointer="flags"/>
      <query name="caselessmatch04" date="2006-02-01"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <output-file role="principal" compare="Text">caselessmatch-true.txt</output-file>
   </test-case>
   <test-case is-XPath2="true" name="caselessmatch05" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="standard" Creator="Michael Kay, Saxonica">
      <description>Description: Call of matches() with "i" flag and Kelvin sign.</description>
      <spec-citation spec="FuncOps" section-number="7.6.1.1" section-title="Flags" section-pointer="flags"/>
      <query name="caselessmatch05" date="2006-02-01"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <output-file role="principal" compare="Text">caselessmatch-true.txt</output-file>
   </test-case>
   <test-case is-XPath2="false" name="caselessmatch06" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="standard" Creator="Michael Kay, Saxonica">
      <description>Call of matches() with "i" flag and Kelvin sign.</description>
      <spec-citation spec="FuncOps" section-number="7.6.1.1" section-title="Flags" section-pointer="flags"/>
      <query name="caselessmatch06" date="2006-02-01"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <output-file role="principal" compare="Text">caselessmatch-true.txt</output-file>
   </test-case>
   <test-case is-XPath2="false" name="caselessmatch07" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="standard" Creator="Michael Kay, Saxonica">
      <description>Call of matches() with "i" flag and Kelvin sign.</description>
      <spec-citation spec="FuncOps" section-number="7.6.1.1" section-title="Flags" section-pointer="flags"/>
      <query name="caselessmatch07" date="2006-02-01"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <output-file role="principal" compare="Text">caselessmatch-true.txt</output-file>
   </test-case>
   <test-case is-XPath2="true" name="caselessmatch08" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="standard" Creator="Michael Kay, Saxonica">
      <description>Call of matches() with "i" flag and range subtraction.</description>
      <spec-citation spec="FuncOps" section-number="7.6.1.1" section-title="Flags" section-pointer="flags"/>
      <query name="caselessmatch08" date="2006-02-01"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <output-file role="principal" compare="Text">caselessmatch-true.txt</output-file>
   </test-case>
   <test-case is-XPath2="true" name="caselessmatch09" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="standard" Creator="Michael Kay, Saxonica">
      <description>Call of matches() with "i" flag and range subtraction.</description>
      <spec-citation spec="FuncOps" section-number="7.6.1.1" section-title="Flags" section-pointer="flags"/>
      <query name="caselessmatch09" date="2006-02-01"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <output-file role="principal" compare="Text">caselessmatch-true.txt</output-file>
   </test-case>
   <test-case is-XPath2="true" name="caselessmatch10" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="standard" Creator="Michael Kay, Saxonica">
      <description>Call of matches() with "i" flag and range subtraction.</description>
      <spec-citation spec="FuncOps" section-number="7.6.1.1" section-title="Flags" section-pointer="flags"/>
      <query name="caselessmatch10" date="2006-02-01"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <output-file role="principal" compare="Text">caselessmatch-false.txt</output-file>
   </test-case>
   <test-case is-XPath2="true" name="caselessmatch11" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="standard" Creator="Michael Kay, Saxonica">
      <description>Call of matches() with "i" flag and range subtraction.</description>
      <spec-citation spec="FuncOps" section-number="7.6.1.1" section-title="Flags" section-pointer="flags"/>
      <query name="caselessmatch11" date="2006-02-01"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <output-file role="principal" compare="Text">caselessmatch-false.txt</output-file>
   </test-case>
   <test-case is-XPath2="true" name="caselessmatch12" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="standard" Creator="Michael Kay, Saxonica">
      <description>Call of matches() with "i" flag and negation.</description>
      <spec-citation spec="FuncOps" section-number="7.6.1.1" section-title="Flags" section-pointer="flags"/>
      <query name="caselessmatch12" date="2006-02-01"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <output-file role="principal" compare="Text">caselessmatch-false.txt</output-file>
   </test-case>
   <test-case is-XPath2="true" name="caselessmatch13" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="standard" Creator="Michael Kay, Saxonica">
      <description>Call of matches() with "i" flag and negation.</description>
      <spec-citation spec="FuncOps" section-number="7.6.1.1" section-title="Flags" section-pointer="flags"/>
      <query name="caselessmatch13" date="2006-02-01"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <output-file role="principal" compare="Text">caselessmatch-false.txt</output-file>
   </test-case>
   <test-case is-XPath2="true" name="caselessmatch14" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="standard" Creator="Michael Kay, Saxonica">
      <description>Call of matches() with "i" flag and upper-case category.</description>
      <spec-citation spec="FuncOps" section-number="7.6.1.1" section-title="Flags" section-pointer="flags"/>
      <query name="caselessmatch14" date="2006-02-01"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <output-file role="principal" compare="Text">caselessmatch-false.txt</output-file>
   </test-case>
   <test-case is-XPath2="true" name="caselessmatch15" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="standard" Creator="Michael Kay, Saxonica">
      <description>Call of matches() with "i" flag and upper-case category.</description>
      <spec-citation spec="FuncOps" section-number="7.6.1.1" section-title="Flags" section-pointer="flags"/>
      <query name="caselessmatch15" date="2006-02-01"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <output-file role="principal" compare="Text">caselessmatch-true.txt</output-file>
   </test-case>
   <test-case is-XPath2="true" Creator="Frans Englich" name="K-MatchesFunc-1" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="runtime-error">
      <description>The pattern can't be the empty sequence.</description>
      <query name="K-MatchesFunc-1" date="2007-11-26+01:00"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <expected-error>XPTY0004</expected-error>
   </test-case>
   <test-case is-XPath2="true" Creator="Frans Englich" name="K-MatchesFunc-2" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="runtime-error">
      <description>fn:matches() takes at least two arguments, not one.</description>
      <query name="K-MatchesFunc-2" date="2007-11-26+01:00"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <expected-error>XPST0017</expected-error>
   </test-case>
   <test-case is-XPath2="true" Creator="Frans Englich" name="K-MatchesFunc-3" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="runtime-error">
      <description>The third argument cannot be the empty sequence.</description>
      <query name="K-MatchesFunc-3" date="2007-11-26+01:00"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <expected-error>XPTY0004</expected-error>
   </test-case>
   <test-case is-XPath2="true" Creator="Frans Englich" name="K-MatchesFunc-4" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="runtime-error">
      <description>Only three arguments are accepted.</description>
      <query name="K-MatchesFunc-4" date="2007-11-26+01:00"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <expected-error>XPST0017</expected-error>
   </test-case>
   <test-case is-XPath2="true" Creator="Frans Englich" name="K-MatchesFunc-5" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="runtime-error">
      <description>The flags argument cannot contain whitespace.</description>
      <query name="K-MatchesFunc-5" date="2007-11-26+01:00"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <expected-error>FORX0001</expected-error>
   </test-case>
   <test-case is-XPath2="true" Creator="Frans Englich" name="K-MatchesFunc-6" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="runtime-error">
      <description>The flags argument cannot contain 'X'.</description>
      <query name="K-MatchesFunc-6" date="2007-11-26+01:00"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <expected-error>FORX0001</expected-error>
   </test-case>
   <test-case is-XPath2="true" Creator="Frans Englich" name="K2-MatchesFunc-1" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="standard">
      <description>Whitespace in the regexp is collapsed.</description>
      <query name="K2-MatchesFunc-1" date="2007-11-26+01:00"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <output-file role="principal" compare="Text">K2-MatchesFunc-1.txt</output-file>
   </test-case>
   <test-case is-XPath2="true" Creator="Frans Englich" name="K2-MatchesFunc-2" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="standard">
      <description>Whitespace(before) in the regexp is collapsed, but not inside a character class.</description>
      <query name="K2-MatchesFunc-2" date="2007-11-26+01:00"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <output-file role="principal" compare="Text">K2-MatchesFunc-2.txt</output-file>
   </test-case>
   <test-case is-XPath2="true" Creator="Frans Englich" name="K2-MatchesFunc-3" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="standard">
      <description>Whitespace(after) in the regexp is collapsed, but not inside a character class.</description>
      <query name="K2-MatchesFunc-3" date="2007-11-26+01:00"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <output-file role="principal" compare="Text">K2-MatchesFunc-3.txt</output-file>
   </test-case>
   <test-case is-XPath2="true" Creator="Frans Englich" name="K2-MatchesFunc-4" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="standard">
      <description>Whitespace(in the middle) in the regexp is collapsed, but not inside a character class.</description>
      <query name="K2-MatchesFunc-4" date="2007-11-26+01:00"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <output-file role="principal" compare="Text">K2-MatchesFunc-4.txt</output-file>
   </test-case>
   <test-case is-XPath2="true" Creator="Frans Englich" name="K2-MatchesFunc-5" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="standard">
      <description>whitespace in the regexp is collapsed, and should therefore compile.</description>
      <query name="K2-MatchesFunc-5" date="2007-11-26+01:00"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <output-file role="principal" compare="Text">K2-MatchesFunc-5.txt</output-file>
   </test-case>
   <test-case is-XPath2="true" Creator="Frans Englich" name="K2-MatchesFunc-6" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="standard">
      <description>whitespace in the regexp is collapsed completely, and should therefore compile and match.</description>
      <query name="K2-MatchesFunc-6" date="2007-11-26+01:00"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <output-file role="principal" compare="Text">K2-MatchesFunc-6.txt</output-file>
   </test-case>
   <test-case is-XPath2="true" Creator="Frans Englich" name="K2-MatchesFunc-7" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="runtime-error">
      <description>whitespace in the regexp is not collapsed, and should therefore not compile.</description>
      <query name="K2-MatchesFunc-7" date="2007-11-26+01:00"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <expected-error>FORX0002</expected-error>
   </test-case>
   <test-case is-XPath2="true" Creator="Frans Englich" name="K2-MatchesFunc-8" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="runtime-error">
      <description>Since no string is captured by the back-reference, the single character is matched.</description>
      <reflects-resolution>http://www.w3.org/Bugs/Public/show_bug.cgi?id=4634</reflects-resolution>
      <query name="K2-MatchesFunc-8" date="2007-11-26+01:00"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <expected-error>FORX0002</expected-error>
   </test-case>
   <test-case is-XPath2="true" Creator="Frans Englich" name="K2-MatchesFunc-9" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="runtime-error">
      <description>Since no string is captured by the back-reference, the single character is matched(#2).</description>
      <reflects-resolution>http://www.w3.org/Bugs/Public/show_bug.cgi?id=4634</reflects-resolution>
      <query name="K2-MatchesFunc-9" date="2007-11-26+01:00"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <expected-error>FORX0002</expected-error>
   </test-case>
   <test-case is-XPath2="true" Creator="Frans Englich" name="K2-MatchesFunc-10" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="runtime-error">
      <description>A non-matching backwards-reference matches the empty string.</description>
      <reflects-resolution>http://www.w3.org/Bugs/Public/show_bug.cgi?id=4634</reflects-resolution>
      <query name="K2-MatchesFunc-10" date="2007-11-26+01:00"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <expected-error>FORX0002</expected-error>
   </test-case>
   <test-case is-XPath2="true" Creator="Frans Englich" name="K2-MatchesFunc-11" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="runtime-error">
      <description>Use a back reference inside a character class.</description>
      <reflects-resolution>http://www.w3.org/Bugs/Public/show_bug.cgi?id=4106</reflects-resolution>
      <query name="K2-MatchesFunc-11" date="2007-11-26+01:00"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <expected-error>FORX0002</expected-error>
   </test-case>
   <test-case is-XPath2="true" Creator="Frans Englich" name="K2-MatchesFunc-12" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="runtime-error">
      <description>Use a back reference inside a character class(#2).</description>
      <reflects-resolution>http://www.w3.org/Bugs/Public/show_bug.cgi?id=4106</reflects-resolution>
      <query name="K2-MatchesFunc-12" date="2007-11-26+01:00"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <expected-error>FORX0002</expected-error>
   </test-case>
   <test-case is-XPath2="true" Creator="Frans Englich" name="K2-MatchesFunc-13" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="runtime-error">
      <description>Use a back reference inside a character class(#3).</description>
      <reflects-resolution>http://www.w3.org/Bugs/Public/show_bug.cgi?id=4106</reflects-resolution>
      <query name="K2-MatchesFunc-13" date="2007-11-26+01:00"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <expected-error>FORX0002</expected-error>
   </test-case>
   <test-case is-XPath2="true" Creator="Frans Englich" name="K2-MatchesFunc-14" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="runtime-error">
      <description>Use a back reference inside a character class(#3).</description>
      <reflects-resolution>http://www.w3.org/Bugs/Public/show_bug.cgi?id=4106</reflects-resolution>
      <query name="K2-MatchesFunc-14" date="2007-11-26+01:00"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <expected-error>FORX0002</expected-error>
   </test-case>
   <test-case is-XPath2="true" Creator="Frans Englich" name="K2-MatchesFunc-15" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="standard">
      <description>A negative character class never match a non-character.</description>
      <query name="K2-MatchesFunc-15" date="2007-11-26+01:00"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <output-file role="principal" compare="Text">K2-MatchesFunc-15.txt</output-file>
   </test-case>
   <test-case is-XPath2="true" Creator="Frans Englich" name="K2-MatchesFunc-16" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="standard">
      <description>Use a pattern whose interpretation is unknown. See public report 4466.</description>
      <query name="K2-MatchesFunc-16" date="2007-11-26+01:00"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <output-file role="principal" compare="Ignore"/>
      <expected-error>*</expected-error>
   </test-case>
   <test-case is-XPath2="true" Creator="Frans Englich" name="K2-MatchesFunc-17" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="standard">
      <description>Caseless match with back-reference.</description>
      <query name="K2-MatchesFunc-17" date="2007-11-26+01:00"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <output-file role="principal" compare="Text">K2-MatchesFunc-17.txt</output-file>
   </test-case>

</test-group>