<test-group xmlns="http://www.w3.org/2005/02/query-test-XQTSCatalog" is-XPath2="false" name="ExternalVariablesWith" featureOwner="NIST and Frans Englich">
   <GroupInfo>
      <title>External Variable References with TypeDeclatation</title>
      <description/>
   </GroupInfo>
   <test-case is-XPath2="false" name="extvardeclwithtype-1" FilePath="Expressions/PrologExpr/VariableProlog/ExternalVariablesWith/" scenario="standard" Creator="Carmelo Montanez">
      <description>External Variable with type (xs:string)definition.</description>
      <spec-citation spec="XQuery" section-number="4.14" section-title="Variable Declaration" section-pointer="id-variable-declarations"/>
      <query name="extvardeclwithtype-1" date="2006-02-09"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <input-query variable="x" name="extvardeclwithtypetobind-1" date="2006-02-09"/>
      <output-file role="principal" compare="Text">extvardeclwithtype-1.txt</output-file>
   </test-case>
   <test-case is-XPath2="false" name="extvardeclwithtype-2" FilePath="Expressions/PrologExpr/VariableProlog/ExternalVariablesWith/" scenario="standard" Creator="Carmelo Montanez">
      <description>External Variable with type (xs:date)definition.</description>
      <spec-citation spec="XQuery" section-number="4.14" section-title="Variable Declaration" section-pointer="id-variable-declarations"/>
      <query name="extvardeclwithtype-2" date="2006-02-09"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <input-query variable="x" name="extvardeclwithtypetobind-2" date="2006-02-09"/>
      <output-file role="principal" compare="Text">extvardeclwithtype-2.txt</output-file>
   </test-case>
   <test-case is-XPath2="false" name="extvardeclwithtype-3" FilePath="Expressions/PrologExpr/VariableProlog/ExternalVariablesWith/" scenario="standard" Creator="Carmelo Montanez">
      <description>External Variable with type (xs:integer)definition.</description>
      <spec-citation spec="XQuery" section-number="4.14" section-title="Variable Declaration" section-pointer="id-variable-declarations"/>
      <query name="extvardeclwithtype-3" date="2006-02-09"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <input-query variable="x" name="extvardeclwithtypetobind-3" date="2006-02-09"/>
      <output-file role="principal" compare="Text">extvardeclwithtype-3.txt</output-file>
   </test-case>
   <test-case is-XPath2="false" name="extvardeclwithtype-4" FilePath="Expressions/PrologExpr/VariableProlog/ExternalVariablesWith/" scenario="standard" Creator="Carmelo Montanez">
      <description>External Variable with type (xs:double)definition.</description>
      <spec-citation spec="XQuery" section-number="4.14" section-title="Variable Declaration" section-pointer="id-variable-declarations"/>
      <query name="extvardeclwithtype-4" date="2006-02-09"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <input-query variable="x" name="extvardeclwithtypetobind-4" date="2006-02-09"/>
      <output-file role="principal" compare="Text">extvardeclwithtype-4.txt</output-file>
   </test-case>
   <test-case is-XPath2="false" name="extvardeclwithtype-5" FilePath="Expressions/PrologExpr/VariableProlog/ExternalVariablesWith/" scenario="standard" Creator="Carmelo Montanez">
      <description>External Variable with type (xs:boolean)definition.</description>
      <spec-citation spec="XQuery" section-number="4.14" section-title="Variable Declaration" section-pointer="id-variable-declarations"/>
      <query name="extvardeclwithtype-5" date="2006-02-09"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <input-query variable="x" name="extvardeclwithtypetobind-5" date="2006-02-09"/>
      <output-file role="principal" compare="Text">extvardeclwithtype-5.txt</output-file>
   </test-case>
   <test-case is-XPath2="false" name="extvardeclwithtype-6" FilePath="Expressions/PrologExpr/VariableProlog/ExternalVariablesWith/" scenario="standard" Creator="Carmelo Montanez">
      <description>External Variable with type (xs:float)definition.</description>
      <spec-citation spec="XQuery" section-number="4.14" section-title="Variable Declaration" section-pointer="id-variable-declarations"/>
      <query name="extvardeclwithtype-6" date="2006-02-09"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <input-query variable="x" name="extvardeclwithtypetobind-6" date="2006-02-09"/>
      <output-file role="principal" compare="Text">extvardeclwithtype-6.txt</output-file>
      <output-file role="principal" compare="Text">extvardeclwithtypealt-6.txt</output-file>
   </test-case>
   <test-case is-XPath2="false" name="extvardeclwithtype-7" FilePath="Expressions/PrologExpr/VariableProlog/ExternalVariablesWith/" scenario="standard" Creator="Carmelo Montanez">
      <description>External Variable with type (xs:decimal)definition.</description>
      <spec-citation spec="XQuery" section-number="4.14" section-title="Variable Declaration" section-pointer="id-variable-declarations"/>
      <query name="extvardeclwithtype-7" date="2006-02-09"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <input-query variable="x" name="extvardeclwithtypetobind-7" date="2006-02-09"/>
      <output-file role="principal" compare="Text">extvardeclwithtype-7.txt</output-file>
   </test-case>
   <test-case is-XPath2="false" name="extvardeclwithtype-8" FilePath="Expressions/PrologExpr/VariableProlog/ExternalVariablesWith/" scenario="standard" Creator="Carmelo Montanez">
      <description>External Variable used to evaluate addition operation involving 2 integers (both queries perform operation).</description>
      <spec-citation spec="XQuery" section-number="4.14" section-title="Variable Declaration" section-pointer="id-variable-declarations"/>
      <query name="extvardeclwithtype-8" date="2006-02-09"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <input-query variable="x" name="extvardeclwithtypetobind-8" date="2006-02-09"/>
      <output-file role="principal" compare="Text">extvardeclwithtype-8.txt</output-file>
   </test-case>
   <test-case is-XPath2="false" name="extvardeclwithtype-9" FilePath="Expressions/PrologExpr/VariableProlog/ExternalVariablesWith/" scenario="standard" Creator="Carmelo Montanez">
      <description>External Variable used to evaluate addition expression involving 2 integers (only input query performs operation).</description>
      <spec-citation spec="XQuery" section-number="4.14" section-title="Variable Declaration" section-pointer="id-variable-declarations"/>
      <query name="extvardeclwithtype-9" date="2006-02-09"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <input-query variable="x" name="extvardeclwithtypetobind-9" date="2006-02-09"/>
      <output-file role="principal" compare="Text">extvardeclwithtype-9.txt</output-file>
   </test-case>
   <test-case is-XPath2="false" name="extvardeclwithtype-10" FilePath="Expressions/PrologExpr/VariableProlog/ExternalVariablesWith/" scenario="standard" Creator="Carmelo Montanez">
      <description>External Variable used to evaluate addition expression involving 2 integers (only the main query performs operation).</description>
      <spec-citation spec="XQuery" section-number="4.14" section-title="Variable Declaration" section-pointer="id-variable-declarations"/>
      <query name="extvardeclwithtype-10" date="2006-02-09"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <input-query variable="x" name="extvardeclwithtypetobind-10" date="2006-02-09"/>
      <output-file role="principal" compare="Text">extvardeclwithtype-10.txt</output-file>
   </test-case>
   <test-case is-XPath2="false" name="extvardeclwithtype-11" FilePath="Expressions/PrologExpr/VariableProlog/ExternalVariablesWith/" scenario="standard" Creator="Carmelo Montanez">
      <description>External Variable used to evaluate multiplication operation involving 2 integers (both queries performs operation).</description>
      <spec-citation spec="XQuery" section-number="4.14" section-title="Variable Declaration" section-pointer="id-variable-declarations"/>
      <query name="extvardeclwithtype-11" date="2006-02-09"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <input-query variable="x" name="extvardeclwithtypetobind-11" date="2006-02-09"/>
      <output-file role="principal" compare="Text">extvardeclwithtype-11.txt</output-file>
   </test-case>
   <test-case is-XPath2="false" name="extvardeclwithtype-12" FilePath="Expressions/PrologExpr/VariableProlog/ExternalVariablesWith/" scenario="standard" Creator="Carmelo Montanez">
      <description>External Variable used to evaluate multiplication operation involving 2 integers (both queries performs operation).</description>
      <spec-citation spec="XQuery" section-number="4.14" section-title="Variable Declaration" section-pointer="id-variable-declarations"/>
      <query name="extvardeclwithtype-12" date="2006-02-09"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <input-query variable="x" name="extvardeclwithtypetobind-12" date="2006-02-09"/>
      <output-file role="principal" compare="Text">extvardeclwithtype-12.txt</output-file>
   </test-case>
   <test-case is-XPath2="false" name="extvardeclwithtype-13" FilePath="Expressions/PrologExpr/VariableProlog/ExternalVariablesWith/" scenario="standard" Creator="Carmelo Montanez">
      <description>External Variable used to evaluate division operation (idiv operator) involving 2 integers (both queries performs operation).</description>
      <spec-citation spec="XQuery" section-number="4.14" section-title="Variable Declaration" section-pointer="id-variable-declarations"/>
      <query name="extvardeclwithtype-13" date="2006-02-09"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <input-query variable="x" name="extvardeclwithtypetobind-13" date="2006-02-09"/>
      <output-file role="principal" compare="Text">extvardeclwithtype-13.txt</output-file>
   </test-case>
   <test-case is-XPath2="false" name="extvardeclwithtype-14" FilePath="Expressions/PrologExpr/VariableProlog/ExternalVariablesWith/" scenario="standard" Creator="Carmelo Montanez">
      <description>External Variable used to evaluate division operation (div operator) involving 2 integers (both queries performs operation).</description>
      <spec-citation spec="XQuery" section-number="4.14" section-title="Variable Declaration" section-pointer="id-variable-declarations"/>
      <query name="extvardeclwithtype-14" date="2006-02-09"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <input-query variable="x" name="extvardeclwithtypetobind-14" date="2006-02-09"/>
      <output-file role="principal" compare="Text">extvardeclwithtype-14.txt</output-file>
   </test-case>
   <test-case is-XPath2="false" name="extvardeclwithtype-15" FilePath="Expressions/PrologExpr/VariableProlog/ExternalVariablesWith/" scenario="standard" Creator="Carmelo Montanez">
      <description>External Variable used to evaluate mod operation involving 2 integers (both queries performs operation).</description>
      <spec-citation spec="XQuery" section-number="4.14" section-title="Variable Declaration" section-pointer="id-variable-declarations"/>
      <query name="extvardeclwithtype-15" date="2006-02-09"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <input-query variable="x" name="extvardeclwithtypetobind-15" date="2006-02-09"/>
      <output-file role="principal" compare="Text">extvardeclwithtype-15.txt</output-file>
   </test-case>
   <test-case is-XPath2="false" name="extvardeclwithtype-16" FilePath="Expressions/PrologExpr/VariableProlog/ExternalVariablesWith/" scenario="standard" Creator="Carmelo Montanez">
      <description>External Variable used to evaluate a boolean expression for "and" operator (both queries performs operation).</description>
      <spec-citation spec="XQuery" section-number="4.14" section-title="Variable Declaration" section-pointer="id-variable-declarations"/>
      <query name="extvardeclwithtype-16" date="2006-02-09"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <input-query variable="x" name="extvardeclwithtypetobind-16" date="2006-02-09"/>
      <output-file role="principal" compare="Text">extvardeclwithtype-16.txt</output-file>
   </test-case>
   <test-case is-XPath2="false" name="extvardeclwithtype-17" FilePath="Expressions/PrologExpr/VariableProlog/ExternalVariablesWith/" scenario="standard" Creator="Carmelo Montanez">
      <description>External Variable used to evaluate a boolean expression for "or" operator (both queries performs operation).</description>
      <spec-citation spec="XQuery" section-number="4.14" section-title="Variable Declaration" section-pointer="id-variable-declarations"/>
      <query name="extvardeclwithtype-17" date="2006-02-09"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <input-query variable="x" name="extvardeclwithtypetobind-17" date="2006-02-09"/>
      <output-file role="principal" compare="Text">extvardeclwithtype-17.txt</output-file>
   </test-case>
   <test-case is-XPath2="false" name="extvardeclwithtype-18" FilePath="Expressions/PrologExpr/VariableProlog/ExternalVariablesWith/" scenario="standard" Creator="Carmelo Montanez">
      <description>External Variable used to evaluate results of avg function.</description>
      <spec-citation spec="XQuery" section-number="4.14" section-title="Variable Declaration" section-pointer="id-variable-declarations"/>
      <query name="extvardeclwithtype-18" date="2006-02-09"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <input-query variable="x" name="extvardeclwithtypetobind-18" date="2006-02-09"/>
      <output-file role="principal" compare="Text">extvardeclwithtype-18.txt</output-file>
      <output-file role="principal" compare="Text">extvardeclwithtypealt-18.txt</output-file>
   </test-case>
   <test-case is-XPath2="false" name="extvardeclwithtype-19" FilePath="Expressions/PrologExpr/VariableProlog/ExternalVariablesWith/" scenario="runtime-error" Creator="Carmelo Montanez">
      <description>External Variable used to cast results of avg function and results in cast error.</description>
      <spec-citation spec="XQuery" section-number="4.14" section-title="Variable Declaration" section-pointer="id-variable-declarations"/>
      <query name="extvardeclwithtype-19" date="2006-02-09"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <input-query variable="x" name="extvardeclwithtypetobind-19" date="2006-02-09"/>
      <expected-error>XPTY0004</expected-error>
   </test-case>
   <test-case is-XPath2="false" name="extvardeclwithtype-20" FilePath="Expressions/PrologExpr/VariableProlog/ExternalVariablesWith/" scenario="standard" Creator="Carmelo Montanez">
      <description>External Variable used to reverse the case (to upper) of results given to teh variable.</description>
      <spec-citation spec="XQuery" section-number="4.14" section-title="Variable Declaration" section-pointer="id-variable-declarations"/>
      <query name="extvardeclwithtype-20" date="2006-02-09"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <input-query variable="x" name="extvardeclwithtypetobind-20" date="2006-02-09"/>
      <output-file role="principal" compare="Text">extvardeclwithtype-20.txt</output-file>
   </test-case>
   <test-case is-XPath2="false" name="extvardeclwithtype-21" FilePath="Expressions/PrologExpr/VariableProlog/ExternalVariablesWith/" scenario="standard" Creator="Carmelo Montanez">
      <description>External Variable used to reverse the case (to lower) of results given to teh variable.</description>
      <spec-citation spec="XQuery" section-number="4.14" section-title="Variable Declaration" section-pointer="id-variable-declarations"/>
      <query name="extvardeclwithtype-21" date="2006-02-09"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <input-query variable="x" name="extvardeclwithtypetobind-21" date="2006-02-09"/>
      <output-file role="principal" compare="Text">extvardeclwithtype-21.txt</output-file>
   </test-case>
   <test-case is-XPath2="false" name="extvardeclwithtype-22" FilePath="Expressions/PrologExpr/VariableProlog/ExternalVariablesWith/" scenario="standard" Creator="Carmelo Montanez">
      <description>External Variable casted successfully to be used with fn:not function.</description>
      <spec-citation spec="XQuery" section-number="4.14" section-title="Variable Declaration" section-pointer="id-variable-declarations"/>
      <query name="extvardeclwithtype-22" date="2006-02-09"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <input-query variable="x" name="extvardeclwithtypetobind-22" date="2006-02-09"/>
      <output-file role="principal" compare="Text">extvardeclwithtype-22.txt</output-file>
   </test-case>
   <test-case is-XPath2="false" name="extvardeclwithtype-23" FilePath="Expressions/PrologExpr/VariableProlog/ExternalVariablesWith/" scenario="standard" Creator="Frans Englich">
      <description>Execute a moderately complex query.</description>
      <spec-citation spec="XQuery" section-number="4.14" section-title="Variable Declaration" section-pointer="id-variable-declarations"/>
      <query name="extvardeclwithtype-23" static-name="extvardeclwithtype-23-static-cbcl" date="2007-06-27"/>
      <input-file role="principal-data" variable="inputDocument">CPPGlobals</input-file>
      <output-file role="principal" compare="XML">extvardeclwithtype-23.txt</output-file>
   </test-case>
   <test-case Creator="Frans Englich" is-XPath2="false" name="K2-ExternalVariablesWith-1" FilePath="exprSeqTypes/PrologExpr/VariableProlog/ExternalVariablesWith/" scenario="runtime-error">
      <description>Two external variables with the same name where the first has a type declaration.</description>
      <query name="K2-ExternalVariablesWith-1" date="2007-11-26+01:00"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <expected-error>XQST0049</expected-error>
   </test-case>
   <test-case Creator="Frans Englich" is-XPath2="false" name="K2-ExternalVariablesWith-2" FilePath="exprSeqTypes/PrologExpr/VariableProlog/ExternalVariablesWith/" scenario="runtime-error">
      <description>Two external variables with the same name where the last has a type declaration.</description>
      <query name="K2-ExternalVariablesWith-2" date="2007-11-26+01:00"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <expected-error>XQST0049</expected-error>
   </test-case>
   <test-case Creator="Frans Englich" is-XPath2="false" name="K2-ExternalVariablesWith-3" FilePath="exprSeqTypes/PrologExpr/VariableProlog/ExternalVariablesWith/" scenario="runtime-error">
      <description>Two external variables with the same name where both have a type declaration.</description>
      <query name="K2-ExternalVariablesWith-3" date="2007-11-26+01:00"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <expected-error>XQST0049</expected-error>
   </test-case>
   <test-case Creator="Frans Englich" is-XPath2="false" name="K2-ExternalVariablesWith-4" FilePath="exprSeqTypes/PrologExpr/VariableProlog/ExternalVariablesWith/" scenario="runtime-error">
      <description>Two external variables with the same name where both have a type declaration and the variable is used.</description>
      <query name="K2-ExternalVariablesWith-4" date="2007-11-26+01:00"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <expected-error>XQST0049</expected-error>
   </test-case>
   <test-case Creator="Frans Englich" is-XPath2="false" name="K2-ExternalVariablesWith-5" FilePath="exprSeqTypes/PrologExpr/VariableProlog/ExternalVariablesWith/" scenario="runtime-error">
      <description>Two external variables with the same name where both have a type declaration.</description>
      <query name="K2-ExternalVariablesWith-5" date="2007-11-26+01:00"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <expected-error>XQST0049</expected-error>
   </test-case>
   <test-case Creator="Frans Englich" is-XPath2="false" name="K2-ExternalVariablesWith-6" FilePath="exprSeqTypes/PrologExpr/VariableProlog/ExternalVariablesWith/" scenario="runtime-error">
      <description>Two external variables with the same name where both have a type declaration which are different.</description>
      <query name="K2-ExternalVariablesWith-6" date="2007-11-26+01:00"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <expected-error>XQST0049</expected-error>
   </test-case>
   <test-case Creator="Frans Englich" is-XPath2="false" name="K2-ExternalVariablesWith-7" FilePath="exprSeqTypes/PrologExpr/VariableProlog/ExternalVariablesWith/" scenario="runtime-error">
      <description>If the value for an external variable can't be supplied, XPDY0002 must be raised.</description>
      <query name="K2-ExternalVariablesWith-7" date="2007-11-26+01:00"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <expected-error>XPDY0002</expected-error>
   </test-case>
   <test-case Creator="Frans Englich" is-XPath2="false" name="K2-ExternalVariablesWith-8" FilePath="exprSeqTypes/PrologExpr/VariableProlog/ExternalVariablesWith/" scenario="runtime-error">
      <description>If the value for an external variable can't be supplied, XPDY0002 must be raised(#2).</description>
      <query name="K2-ExternalVariablesWith-8" date="2007-11-26+01:00"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <expected-error>XPDY0002</expected-error>
   </test-case>
   <test-case Creator="Frans Englich" is-XPath2="false" name="K2-ExternalVariablesWith-9" FilePath="exprSeqTypes/PrologExpr/VariableProlog/ExternalVariablesWith/" scenario="standard">
      <description>An implementation may raise XPDY0002 on a declared external variable, although not necessary since it isn't used.</description>
      <query name="K2-ExternalVariablesWith-9" date="2007-11-26+01:00"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <output-file role="principal" compare="Text">K2-ExternalVariablesWith-9.txt</output-file>
      <expected-error>XPDY0002</expected-error>
   </test-case>
   <test-case Creator="Frans Englich" is-XPath2="false" name="K2-ExternalVariablesWith-10" FilePath="exprSeqTypes/PrologExpr/VariableProlog/ExternalVariablesWith/" scenario="standard">
      <description>An implementation may raise XPDY0002 on a declared external variable, although not necessary since it isn't used(#2).</description>
      <query name="K2-ExternalVariablesWith-10" date="2007-11-26+01:00"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <output-file role="principal" compare="Text">K2-ExternalVariablesWith-10.txt</output-file>
      <expected-error>XPDY0002</expected-error>
   </test-case>
   <test-case Creator="Frans Englich" is-XPath2="false" name="K2-ExternalVariablesWith-11" FilePath="exprSeqTypes/PrologExpr/VariableProlog/ExternalVariablesWith/" scenario="parse-error">
      <description>The assignment expression is ExprSingle, not Expr.</description>
      <query name="K2-ExternalVariablesWith-11" date="2007-11-26+01:00"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <expected-error>XPST0003</expected-error>
   </test-case>
   <test-case Creator="Frans Englich" is-XPath2="false" name="K2-ExternalVariablesWith-12" FilePath="exprSeqTypes/PrologExpr/VariableProlog/ExternalVariablesWith/" scenario="runtime-error">
      <description>Variable declarations doesn't cause type conversion.</description>
      <query name="K2-ExternalVariablesWith-12" 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 Creator="Frans Englich" is-XPath2="false" name="K2-ExternalVariablesWith-13" FilePath="exprSeqTypes/PrologExpr/VariableProlog/ExternalVariablesWith/" scenario="runtime-error">
      <description>variable declarations doesn't cause numeric promotion.</description>
      <query name="K2-ExternalVariablesWith-13" 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 Creator="Frans Englich" is-XPath2="false" name="K2-ExternalVariablesWith-14" FilePath="exprSeqTypes/PrologExpr/VariableProlog/ExternalVariablesWith/" scenario="runtime-error">
      <description>variable declarations doesn't cause numeric promotion(#2).</description>
      <query name="K2-ExternalVariablesWith-14" 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 Creator="Frans Englich" is-XPath2="false" name="K2-ExternalVariablesWith-15" FilePath="exprSeqTypes/PrologExpr/VariableProlog/ExternalVariablesWith/" scenario="runtime-error">
      <description>variable declarations doesn't cause numeric promotion(#3).</description>
      <query name="K2-ExternalVariablesWith-15" 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 Creator="Frans Englich" is-XPath2="false" name="K2-ExternalVariablesWith-16" FilePath="exprSeqTypes/PrologExpr/VariableProlog/ExternalVariablesWith/" scenario="runtime-error">
      <description>variable declarations doesn't cause numeric promotion(#4).</description>
      <query name="K2-ExternalVariablesWith-16" 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 Creator="Frans Englich" is-XPath2="false" name="K2-ExternalVariablesWith-17" FilePath="exprSeqTypes/PrologExpr/VariableProlog/ExternalVariablesWith/" scenario="runtime-error">
      <description>variable declarations doesn't cause numeric promotion(#5).</description>
      <query name="K2-ExternalVariablesWith-17" 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 Creator="Frans Englich" is-XPath2="false" name="K2-ExternalVariablesWith-18" FilePath="exprSeqTypes/PrologExpr/VariableProlog/ExternalVariablesWith/" scenario="runtime-error">
      <description>variable declarations doesn't cause string promotion conversion.</description>
      <query name="K2-ExternalVariablesWith-18" 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 Creator="Frans Englich" is-XPath2="false" name="K2-ExternalVariablesWith-19" FilePath="exprSeqTypes/PrologExpr/VariableProlog/ExternalVariablesWith/" scenario="runtime-error">
      <description>variable declarations doesn't cause URI promotion conversion.</description>
      <query name="K2-ExternalVariablesWith-19" 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 Creator="Frans Englich" is-XPath2="false" name="K2-ExternalVariablesWith-20" FilePath="exprSeqTypes/PrologExpr/VariableProlog/ExternalVariablesWith/" scenario="runtime-error">
      <description>The name of an external variable clashing with the name of a variable declared in the query.</description>
      <query name="K2-ExternalVariablesWith-20" date="2008-02-22+01:00"/>
      <input-file role="principal-data" variable="input-context1">TopMany</input-file>
      <expected-error>XQST0049</expected-error>
   </test-case>
   <test-case Creator="Frans Englich" is-XPath2="false" name="K2-ExternalVariablesWith-21" FilePath="exprSeqTypes/PrologExpr/VariableProlog/ExternalVariablesWith/" scenario="runtime-error">
      <description>The name of an external variable clashing with the name of a variable declared in the query(reversed order).</description>
      <query name="K2-ExternalVariablesWith-21" date="2008-02-22+01:00"/>
      <input-file role="principal-data" variable="input-context1">TopMany</input-file>
      <expected-error>XQST0049</expected-error>
   </test-case>
   <test-case Creator="Frans Englich" is-XPath2="false" name="K2-ExternalVariablesWith-22" FilePath="exprSeqTypes/PrologExpr/VariableProlog/ExternalVariablesWith/" scenario="standard">
      <description>A complex type declaration.</description>
      <query name="K2-ExternalVariablesWith-22" date="2009-01-08+01:00"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <output-file role="principal" compare="Text">K2-ExternalVariablesWith-22.txt</output-file>
   </test-case>
   <test-case Creator="Frans Englich" is-XPath2="false" name="K2-ExternalVariablesWith-23" FilePath="exprSeqTypes/PrologExpr/VariableProlog/ExternalVariablesWith/" scenario="standard">
      <description>A complex type declaration.</description>
      <query name="K2-ExternalVariablesWith-23" date="2009-01-08+01:00"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <output-file role="principal" compare="Text">K2-ExternalVariablesWith-23.txt</output-file>
   </test-case>
   <test-case Creator="Frans Englich" is-XPath2="false" name="K2-ExternalVariablesWith-24" FilePath="exprSeqTypes/PrologExpr/VariableProlog/ExternalVariablesWith/" scenario="parse-error">
      <description>'+' is not allowed for the atomic type in element().</description>
      <query name="K2-ExternalVariablesWith-24" date="2009-01-08+01:00"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <expected-error>XPST0003</expected-error>
   </test-case>
   <test-case Creator="Frans Englich" is-XPath2="false" name="K2-ExternalVariablesWith-25" FilePath="exprSeqTypes/PrologExpr/VariableProlog/ExternalVariablesWith/" scenario="parse-error">
      <description>'*' is not allowed for the atomic type in element().</description>
      <query name="K2-ExternalVariablesWith-25" date="2009-01-08+01:00"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <expected-error>XPST0003</expected-error>
   </test-case>
   <test-case Creator="Frans Englich" is-XPath2="false" name="K2-ExternalVariablesWith-26" FilePath="exprSeqTypes/PrologExpr/VariableProlog/ExternalVariablesWith/" scenario="parse-error">
      <description>'+' is not allowed for the atomic type in element().</description>
      <query name="K2-ExternalVariablesWith-26" date="2009-01-08+01:00"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <expected-error>XPST0003</expected-error>
   </test-case>
   <test-case Creator="Frans Englich" is-XPath2="false" name="K2-ExternalVariablesWith-27" FilePath="exprSeqTypes/PrologExpr/VariableProlog/ExternalVariablesWith/" scenario="parse-error">
      <description>'*' is not allowed for the atomic type in element().</description>
      <query name="K2-ExternalVariablesWith-27" date="2009-01-08+01:00"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <expected-error>XPST0003</expected-error>
   </test-case>
</test-group>