<test-group xmlns="http://www.w3.org/2005/02/query-test-XQTSCatalog" name="SubstringFunc" featureOwner="Frans Englich">
   <GroupInfo>
      <title>fn:substring</title>
      <description/>
   </GroupInfo>
   <test-case is-XPath2="true" name="fn-substring-1" FilePath="Functions/AllStringFunc/GeneralStringFunc/SubstringFunc/" scenario="standard" Creator="Carmelo Montanez">
      <description>Evaluates the "substring" function as per example 1 (for this function) from the F and O specs.</description>
      <spec-citation spec="FuncOps" section-number="7.4.3" section-title="fn:substring" section-pointer="func-substring"/>
      <query name="fn-substring-1" date="2005-08-16"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <output-file role="principal" compare="Text">fn-substring-1.txt</output-file>
   </test-case>
   <test-case is-XPath2="true" name="fn-substring-2" FilePath="Functions/AllStringFunc/GeneralStringFunc/SubstringFunc/" scenario="standard" Creator="Carmelo Montanez">
      <description>Evaluates the "substring" function as per example 2 (for this function) from the F and O specs.</description>
      <spec-citation spec="FuncOps" section-number="7.4.3" section-title="fn:substring" section-pointer="func-substring"/>
      <query name="fn-substring-2" date="2005-08-16"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <output-file role="principal" compare="Text">fn-substring-2.txt</output-file>
   </test-case>
   <test-case is-XPath2="true" name="fn-substring-3" FilePath="Functions/AllStringFunc/GeneralStringFunc/SubstringFunc/" scenario="standard" Creator="Carmelo Montanez">
      <description>Evaluates the "substring" function as per example 3 (for this function) from the F and O specs.</description>
      <spec-citation spec="FuncOps" section-number="7.4.3" section-title="fn:substring" section-pointer="func-substring"/>
      <query name="fn-substring-3" date="2005-08-16"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <output-file role="principal" compare="Text">fn-substring-3.txt</output-file>
   </test-case>
   <test-case is-XPath2="true" name="fn-substring-4" FilePath="Functions/AllStringFunc/GeneralStringFunc/SubstringFunc/" scenario="standard" Creator="Carmelo Montanez">
      <description>Evaluates the "substring" function as per example 4 (for this function) from the F and O specs.</description>
      <spec-citation spec="FuncOps" section-number="7.4.3" section-title="fn:substring" section-pointer="func-substring"/>
      <query name="fn-substring-4" date="2005-08-16"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <output-file role="principal" compare="Text">fn-substring-4.txt</output-file>
   </test-case>
   <test-case is-XPath2="true" name="fn-substring-5" FilePath="Functions/AllStringFunc/GeneralStringFunc/SubstringFunc/" scenario="standard" Creator="Carmelo Montanez">
      <description>Evaluates the "substring" function as per example 5 (for this function) from the F and O specs.</description>
      <spec-citation spec="FuncOps" section-number="7.4.3" section-title="fn:substring" section-pointer="func-substring"/>
      <query name="fn-substring-5" date="2005-08-16"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <output-file role="principal" compare="Text">fn-substring-5.txt</output-file>
   </test-case>
   <test-case is-XPath2="true" name="fn-substring-6" FilePath="Functions/AllStringFunc/GeneralStringFunc/SubstringFunc/" scenario="standard" Creator="Carmelo Montanez">
      <description>Evaluates the "substring" function as per example 6 (for this function) from the F and O specs.</description>
      <spec-citation spec="FuncOps" section-number="7.4.3" section-title="fn:substring" section-pointer="func-substring"/>
      <query name="fn-substring-6" date="2005-08-16"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <output-file role="principal" compare="Text">fn-substring-6.txt</output-file>
   </test-case>
   <test-case is-XPath2="true" name="fn-substring-7" FilePath="Functions/AllStringFunc/GeneralStringFunc/SubstringFunc/" scenario="standard" Creator="Carmelo Montanez">
      <description>Evaluates the "substring" function as per example 7 (for this function) from the F and O specs.</description>
      <spec-citation spec="FuncOps" section-number="7.4.3" section-title="fn:substring" section-pointer="func-substring"/>
      <query name="fn-substring-7" date="2005-08-16"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <output-file role="principal" compare="Text">fn-substring-7.txt</output-file>
   </test-case>
   <test-case is-XPath2="true" name="fn-substring-8" FilePath="Functions/AllStringFunc/GeneralStringFunc/SubstringFunc/" scenario="standard" Creator="Carmelo Montanez">
      <description>Evaluates the "substring" function as per example 8 (for this function) from the F and O specs.</description>
      <spec-citation spec="FuncOps" section-number="7.4.3" section-title="fn:substring" section-pointer="func-substring"/>
      <query name="fn-substring-8" date="2005-08-16"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <output-file role="principal" compare="Text">fn-substring-8.txt</output-file>
   </test-case>
   <test-case is-XPath2="true" name="fn-substring-9" FilePath="Functions/AllStringFunc/GeneralStringFunc/SubstringFunc/" scenario="standard" Creator="Carmelo Montanez">
      <description>Evaluates the "substring" function as per example 9 (for this function) from the F and O specs.</description>
      <spec-citation spec="FuncOps" section-number="7.4.3" section-title="fn:substring" section-pointer="func-substring"/>
      <query name="fn-substring-9" date="2005-08-16"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <output-file role="principal" compare="Text">fn-substring-9.txt</output-file>
   </test-case>
   <test-case is-XPath2="true" name="fn-substring-10" FilePath="Functions/AllStringFunc/GeneralStringFunc/SubstringFunc/" scenario="standard" Creator="Carmelo Montanez">
      <description>Evaluates the "substring" function as per example 10 (for this function) from the F and O specs.</description>
      <spec-citation spec="FuncOps" section-number="7.4.3" section-title="fn:substring" section-pointer="func-substring"/>
      <query name="fn-substring-10" date="2005-08-16"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <output-file role="principal" compare="Text">fn-substring-10.txt</output-file>
   </test-case>
   <test-case is-XPath2="true" name="fn-substring-11" FilePath="Functions/AllStringFunc/GeneralStringFunc/SubstringFunc/" scenario="standard" Creator="Carmelo Montanez">
      <description>Evaluates the "substring" function as per example 11 (for this function) from the F and O specs.</description>
      <spec-citation spec="FuncOps" section-number="7.4.3" section-title="fn:substring" section-pointer="func-substring"/>
      <query name="fn-substring-11" date="2005-08-16"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <output-file role="principal" compare="Text">fn-substring-11.txt</output-file>
   </test-case>
   <test-case is-XPath2="true" name="fn-substring-12" FilePath="Functions/AllStringFunc/GeneralStringFunc/SubstringFunc/" scenario="standard" Creator="Carmelo Montanez">
      <description>Evaluates the "substring" function where the source string is the empty string.</description>
      <spec-citation spec="FuncOps" section-number="7.4.3" section-title="fn:substring" section-pointer="func-substring"/>
      <query name="fn-substring-12" date="2005-08-16"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <output-file role="principal" compare="Text">fn-substring-12.txt</output-file>
   </test-case>
   <test-case is-XPath2="true" name="fn-substring-13" FilePath="Functions/AllStringFunc/GeneralStringFunc/SubstringFunc/" scenario="standard" Creator="Carmelo Montanez">
      <description>Evaluates the "substring" function as an argument to an "fn:boolean" function.</description>
      <spec-citation spec="FuncOps" section-number="7.4.3" section-title="fn:substring" section-pointer="func-substring"/>
      <query name="fn-substring-13" date="2005-08-16"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <output-file role="principal" compare="Text">fn-substring-13.txt</output-file>
   </test-case>
   <test-case is-XPath2="true" name="fn-substring-14" FilePath="Functions/AllStringFunc/GeneralStringFunc/SubstringFunc/" scenario="standard" Creator="Carmelo Montanez">
      <description>Evaluates the "substring" function as an argument to an "fn:not" function.</description>
      <spec-citation spec="FuncOps" section-number="7.4.3" section-title="fn:substring" section-pointer="func-substring"/>
      <query name="fn-substring-14" date="2005-08-16"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <output-file role="principal" compare="Text">fn-substring-14.txt</output-file>
   </test-case>
   <test-case is-XPath2="true" name="fn-substring-15" FilePath="Functions/AllStringFunc/GeneralStringFunc/SubstringFunc/" scenario="standard" Creator="Carmelo Montanez">
      <description>Evaluates the "substring" function as an argument to another "fn:substring" function.</description>
      <spec-citation spec="FuncOps" section-number="7.4.3" section-title="fn:substring" section-pointer="func-substring"/>
      <query name="fn-substring-15" date="2005-08-16"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <output-file role="principal" compare="Text">fn-substring-15.txt</output-file>
   </test-case>
   <test-case is-XPath2="true" name="fn-substring-16" FilePath="Functions/AllStringFunc/GeneralStringFunc/SubstringFunc/" scenario="standard" Creator="Carmelo Montanez">
      <description>Evaluates the "substring" function where the source string is the string "substring".</description>
      <spec-citation spec="FuncOps" section-number="7.4.3" section-title="fn:substring" section-pointer="func-substring"/>
      <query name="fn-substring-16" date="2005-08-16"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <output-file role="principal" compare="Text">fn-substring-16.txt</output-file>
   </test-case>
   <test-case is-XPath2="true" name="fn-substring-17" FilePath="Functions/AllStringFunc/GeneralStringFunc/SubstringFunc/" scenario="standard" Creator="Carmelo Montanez">
      <description>Evaluates the "substring" function as an argument to a concat function.</description>
      <spec-citation spec="FuncOps" section-number="7.4.3" section-title="fn:substring" section-pointer="func-substring"/>
      <query name="fn-substring-17" date="2005-08-16"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <output-file role="principal" compare="Text">fn-substring-17.txt</output-file>
   </test-case>
   <test-case is-XPath2="true" name="fn-substring-18" FilePath="Functions/AllStringFunc/GeneralStringFunc/SubstringFunc/" scenario="standard" Creator="Carmelo Montanez">
      <description>Evaluates the "substring" function as an argument to a contains function.</description>
      <spec-citation spec="FuncOps" section-number="7.4.3" section-title="fn:substring" section-pointer="func-substring"/>
      <query name="fn-substring-18" date="2005-08-16"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <output-file role="principal" compare="Text">fn-substring-18.txt</output-file>
   </test-case>
   <test-case is-XPath2="true" name="fn-substring-19" FilePath="Functions/AllStringFunc/GeneralStringFunc/SubstringFunc/" scenario="standard" Creator="Carmelo Montanez">
      <description>Evaluates the "substring" function with the source string set to the characters "!@#$%^*()".</description>
      <spec-citation spec="FuncOps" section-number="7.4.3" section-title="fn:substring" section-pointer="func-substring"/>
      <query name="fn-substring-19" date="2005-08-16"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <output-file role="principal" compare="Text">fn-substring-19.txt</output-file>
   </test-case>
   <test-case is-XPath2="true" name="fn-substring-20" FilePath="Functions/AllStringFunc/GeneralStringFunc/SubstringFunc/" scenario="standard" Creator="Carmelo Montanez">
      <description>Evaluates the "substring" function, where the starting location uses an "xs:double" constructor function.</description>
      <spec-citation spec="FuncOps" section-number="7.4.3" section-title="fn:substring" section-pointer="func-substring"/>
      <query name="fn-substring-20" date="2005-08-16"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <output-file role="principal" compare="Text">fn-substring-20.txt</output-file>
   </test-case>
   <test-case is-XPath2="true" name="fn-substring-21" FilePath="Functions/AllStringFunc/GeneralStringFunc/SubstringFunc/" scenario="standard" Creator="Carmelo Montanez">
      <description>Evaluates the "substring" function, where the starting location is an addition expression.</description>
      <spec-citation spec="FuncOps" section-number="7.4.3" section-title="fn:substring" section-pointer="func-substring"/>
      <query name="fn-substring-21" date="2005-08-16"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <output-file role="principal" compare="Text">fn-substring-21.txt</output-file>
   </test-case>
   <test-case is-XPath2="false" name="fn-substring-22" FilePath="Functions/AllStringFunc/GeneralStringFunc/SubstringFunc/" scenario="standard" Creator="Carmelo Montanez">
      <description>Evaluates the "substring" function, where (start lt 0) and (start+len lt 0).</description>
      <spec-citation spec="FuncOps" section-number="7.4.3" section-title="fn:substring" section-pointer="func-substring"/>
      <query name="fn-substring-22" date="2005-08-16"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <output-file role="principal" compare="Text">fn-substring-22.txt</output-file>
   </test-case>
   <test-case is-XPath2="true" Creator="Frans Englich" name="K-SubstringFunc-1" FilePath="Functions/AllStringFunc/GeneralStringFunc/SubstringFunc/" scenario="runtime-error">
      <description>A test whose essence is: `sub-string("a string")`.</description>
      <query name="K-SubstringFunc-1" 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-SubstringFunc-2" FilePath="Functions/AllStringFunc/GeneralStringFunc/SubstringFunc/" scenario="runtime-error">
      <description>A test whose essence is: `sub-string("a string", 1, 2, "wrong param")`.</description>
      <query name="K-SubstringFunc-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-SubstringFunc-3" FilePath="Functions/AllStringFunc/GeneralStringFunc/SubstringFunc/" scenario="standard">
      <description>A test whose essence is: `substring((), 1, 2) eq ""`.</description>
      <query name="K-SubstringFunc-3" date="2007-11-26+01:00"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <output-file role="principal" compare="Text">K-SubstringFunc-3.txt</output-file>
   </test-case>
   <test-case is-XPath2="true" Creator="Frans Englich" name="K-SubstringFunc-4" FilePath="Functions/AllStringFunc/GeneralStringFunc/SubstringFunc/" scenario="standard">
      <description>A test whose essence is: `substring((), 1) eq ""`.</description>
      <query name="K-SubstringFunc-4" date="2007-11-26+01:00"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <output-file role="principal" compare="Text">K-SubstringFunc-4.txt</output-file>
   </test-case>
   <test-case is-XPath2="true" Creator="Frans Englich" name="K-SubstringFunc-5" FilePath="Functions/AllStringFunc/GeneralStringFunc/SubstringFunc/" scenario="standard">
      <description>A test whose essence is: `substring("12345", 1.5, 2.6) eq "234"`.</description>
      <query name="K-SubstringFunc-5" date="2007-11-26+01:00"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <output-file role="principal" compare="Text">K-SubstringFunc-5.txt</output-file>
   </test-case>
   <test-case is-XPath2="true" Creator="Frans Englich" name="K-SubstringFunc-6" FilePath="Functions/AllStringFunc/GeneralStringFunc/SubstringFunc/" scenario="standard">
      <description>A test whose essence is: `substring((), 1, 3) eq ""`.</description>
      <query name="K-SubstringFunc-6" date="2007-11-26+01:00"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <output-file role="principal" compare="Text">K-SubstringFunc-6.txt</output-file>
   </test-case>
   <test-case is-XPath2="true" Creator="Frans Englich" name="K-SubstringFunc-7" FilePath="Functions/AllStringFunc/GeneralStringFunc/SubstringFunc/" scenario="standard">
      <description>A test whose essence is: `substring("motor car", 6) eq " car"`.</description>
      <query name="K-SubstringFunc-7" date="2007-11-26+01:00"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <output-file role="principal" compare="Text">K-SubstringFunc-7.txt</output-file>
   </test-case>
   <test-case is-XPath2="true" Creator="Frans Englich" name="K-SubstringFunc-8" FilePath="Functions/AllStringFunc/GeneralStringFunc/SubstringFunc/" scenario="standard">
      <description>A test whose essence is: `substring("12345", 0, 3) eq "12"`.</description>
      <query name="K-SubstringFunc-8" date="2007-11-26+01:00"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <output-file role="principal" compare="Text">K-SubstringFunc-8.txt</output-file>
   </test-case>
   <test-case is-XPath2="true" Creator="Frans Englich" name="K-SubstringFunc-9" FilePath="Functions/AllStringFunc/GeneralStringFunc/SubstringFunc/" scenario="standard">
      <description>A test whose essence is: `substring("metadata", 4, 3) eq "ada"`.</description>
      <query name="K-SubstringFunc-9" date="2007-11-26+01:00"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <output-file role="principal" compare="Text">K-SubstringFunc-9.txt</output-file>
   </test-case>
   <test-case is-XPath2="true" Creator="Frans Englich" name="K-SubstringFunc-10" FilePath="Functions/AllStringFunc/GeneralStringFunc/SubstringFunc/" scenario="standard">
      <description>A test whose essence is: `substring("12345", 0 div 0E0, 3) eq ""`.</description>
      <query name="K-SubstringFunc-10" date="2007-11-26+01:00"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <output-file role="principal" compare="Text">K-SubstringFunc-10.txt</output-file>
   </test-case>
   <test-case is-XPath2="true" Creator="Frans Englich" name="K-SubstringFunc-11" FilePath="Functions/AllStringFunc/GeneralStringFunc/SubstringFunc/" scenario="standard">
      <description>A test whose essence is: `substring("12345", 1, 0 div 0E0) eq ""`.</description>
      <query name="K-SubstringFunc-11" date="2007-11-26+01:00"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <output-file role="principal" compare="Text">K-SubstringFunc-11.txt</output-file>
   </test-case>
   <test-case is-XPath2="true" Creator="Frans Englich" name="K-SubstringFunc-12" FilePath="Functions/AllStringFunc/GeneralStringFunc/SubstringFunc/" scenario="standard">
      <description>A test whose essence is: `substring("12345", -3, 5) eq "1"`.</description>
      <query name="K-SubstringFunc-12" date="2007-11-26+01:00"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <output-file role="principal" compare="Text">K-SubstringFunc-12.txt</output-file>
   </test-case>
   <test-case is-XPath2="true" Creator="Frans Englich" name="K-SubstringFunc-13" FilePath="Functions/AllStringFunc/GeneralStringFunc/SubstringFunc/" scenario="standard">
      <description>A test whose essence is: `substring("12345", -42, 1 div 0E0) eq "12345"`.</description>
      <query name="K-SubstringFunc-13" date="2007-11-26+01:00"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <output-file role="principal" compare="Text">K-SubstringFunc-13.txt</output-file>
   </test-case>
   <test-case is-XPath2="true" Creator="Frans Englich" name="K-SubstringFunc-14" FilePath="Functions/AllStringFunc/GeneralStringFunc/SubstringFunc/" scenario="standard">
      <description>A test whose essence is: `substring("12345", -1 div 0E0, 1 div 0E0) eq ""`.</description>
      <query name="K-SubstringFunc-14" date="2007-11-26+01:00"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <output-file role="principal" compare="Text">K-SubstringFunc-14.txt</output-file>
   </test-case>
   <test-case is-XPath2="true" Creator="Frans Englich" name="K-SubstringFunc-15" FilePath="Functions/AllStringFunc/GeneralStringFunc/SubstringFunc/" scenario="standard">
      <description>A test whose essence is: `substring("12345", 5, -3) eq ""`.</description>
      <query name="K-SubstringFunc-15" date="2007-11-26+01:00"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <output-file role="principal" compare="Text">K-SubstringFunc-15.txt</output-file>
   </test-case>
</test-group>