<test-group xmlns="http://www.w3.org/2005/02/query-test-XQTSCatalog" name="LocalNameFromQNameFunc" featureOwner="Microsoft and Frans Englich">
   <GroupInfo>
      <title>fn:local-name-from-QName</title>
      <description>Function Returns an xs:NCName representing the local-name part of the single xs:QName argument</description>
   </GroupInfo>
   <test-case is-XPath2="false" name="LocalNameFromQNameFunc001" FilePath="Functions/QNameFunc/LocalNameFromQNFunc/" scenario="standard" Creator="Mike Rorke">
      <description>Test function fn:local-name-from-QName. Using QName element as input.</description>
      <spec-citation spec="FuncOps" section-number="11.2.3" section-title="fn:local-name-from-QName" section-pointer="func-local-name-from-QName"/>
      <query name="LocalNameFromQNameFunc001" date="2005-09-28"/>
      <input-file role="principal-data" variable="input-context">QNameSource</input-file>
      <output-file role="principal" compare="Text">LocalNameFromQNameFunc001.txt</output-file>
   </test-case>
   <test-case is-XPath2="false" name="LocalNameFromQNameFunc002" FilePath="Functions/QNameFunc/LocalNameFromQNFunc/" scenario="standard" Creator="Mike Rorke">
      <description>Test function fn:local-name-from-QName. Using QName attribute as input.</description>
      <spec-citation spec="FuncOps" section-number="11.2.3" section-title="fn:local-name-from-QName" section-pointer="func-local-name-from-QName"/>
      <query name="LocalNameFromQNameFunc002" date="2005-09-28"/>
      <input-file role="principal-data" variable="input-context">QNameSource</input-file>
      <output-file role="principal" compare="Text">LocalNameFromQNameFunc002.txt</output-file>
   </test-case>
   <test-case is-XPath2="false" name="LocalNameFromQNameFunc003" FilePath="Functions/QNameFunc/LocalNameFromQNFunc/" scenario="standard" Creator="Mike Rorke">
      <description>Test function fn:local-name-from-QName. Using element derived from QName as input.</description>
      <spec-citation spec="FuncOps" section-number="11.2.3" section-title="fn:local-name-from-QName" section-pointer="func-local-name-from-QName"/>
      <query name="LocalNameFromQNameFunc003" date="2005-09-28"/>
      <input-file role="principal-data" variable="input-context">QNameSource</input-file>
      <output-file role="principal" compare="Text">LocalNameFromQNameFunc003.txt</output-file>
   </test-case>
   <test-case is-XPath2="false" name="LocalNameFromQNameFunc004" FilePath="Functions/QNameFunc/LocalNameFromQNFunc/" scenario="standard" Creator="Mike Rorke">
      <description>Test function fn:local-name-from-QName. Using attribute derived from QName as input.</description>
      <spec-citation spec="FuncOps" section-number="11.2.3" section-title="fn:local-name-from-QName" section-pointer="func-local-name-from-QName"/>
      <query name="LocalNameFromQNameFunc004" date="2005-09-28"/>
      <input-file role="principal-data" variable="input-context">QNameSource</input-file>
      <output-file role="principal" compare="Text">LocalNameFromQNameFunc004.txt</output-file>
   </test-case>
   <test-case is-XPath2="false" name="LocalNameFromQNameFunc005" FilePath="Functions/QNameFunc/LocalNameFromQNFunc/" scenario="standard" Creator="Mike Rorke">
      <description>Test function fn:local-name-from-QName. Check return type of function is xs:NCName.</description>
      <spec-citation spec="FuncOps" section-number="11.2.3" section-title="fn:local-name-from-QName" section-pointer="func-local-name-from-QName"/>
      <query name="LocalNameFromQNameFunc005" date="2005-09-28"/>
      <input-file role="principal-data" variable="input-context">QNameSource</input-file>
      <output-file role="principal" compare="Text">LocalNameFromQNameFunc005.txt</output-file>
   </test-case>
   <test-case name="LocalNameFromQNameFunc006" FilePath="Functions/QNameFunc/LocalNameFromQNFunc/" scenario="standard" Creator="Mike Rorke" is-XPath2="false">
      <description>Test function fn:local-name-from-QName. Empty sequence literal as input.</description>
      <spec-citation spec="FuncOps" section-number="11.2.3" section-title="fn:local-name-from-QName" section-pointer="func-local-name-from-QName"/>
      <query name="LocalNameFromQNameFunc006" date="2005-09-28"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <output-file role="principal" compare="XML">LocalNameFromQNameFunc006.xml</output-file>
   </test-case>
   <test-case name="LocalNameFromQNameFunc007" FilePath="Functions/QNameFunc/LocalNameFromQNFunc/" scenario="standard" Creator="Mike Rorke" is-XPath2="false">
      <description>Test function fn:local-name-from-QName. Empty sequence literal as input.</description>
      <spec-citation spec="FuncOps" section-number="11.2.3" section-title="fn:local-name-from-QName" section-pointer="func-local-name-from-QName"/>
      <query name="LocalNameFromQNameFunc007" date="2005-09-28"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <output-file role="principal" compare="XML">LocalNameFromQNameFunc007.xml</output-file>
   </test-case>
   <test-case is-XPath2="true" name="LocalNameFromQNameFunc009" FilePath="Functions/QNameFunc/LocalNameFromQNFunc/" scenario="runtime-error" Creator="Mike Rorke">
      <description>Test function fn:local-name-from-QName. Error case - invalid parameter type (string).</description>
      <spec-citation spec="FuncOps" section-number="11.2.3" section-title="fn:local-name-from-QName" section-pointer="func-local-name-from-QName"/>
      <query name="LocalNameFromQNameFunc009" date="2005-09-28"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <expected-error>XPTY0004</expected-error>
   </test-case>
   <test-case is-XPath2="false" name="LocalNameFromQNameFunc010" FilePath="Functions/QNameFunc/LocalNameFromQNFunc/" scenario="runtime-error" Creator="Mike Rorke">
      <description>Test function fn:local-name-from-QName. Error case - multiple input values.</description>
      <spec-citation spec="FuncOps" section-number="11.2.3" section-title="fn:local-name-from-QName" section-pointer="func-local-name-from-QName"/>
      <query name="LocalNameFromQNameFunc010" date="2005-09-28"/>
      <input-file role="principal-data" variable="input-context">QNameSource</input-file>
      <expected-error>XPTY0004</expected-error>
   </test-case>
   <test-case is-XPath2="true" name="LocalNameFromQNameFunc011" FilePath="Functions/QNameFunc/LocalNameFromQNFunc/" scenario="runtime-error" Creator="Mike Rorke">
      <description>Test function fn:local-name-from-QName. Error case - no input parameter.</description>
      <spec-citation spec="FuncOps" section-number="11.2.3" section-title="fn:local-name-from-QName" section-pointer="func-local-name-from-QName"/>
      <query name="LocalNameFromQNameFunc011" date="2005-09-28"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <expected-error>XPST0017</expected-error>
   </test-case>
   <test-case is-XPath2="false" name="LocalNameFromQNameFunc012" FilePath="Functions/QNameFunc/LocalNameFromQNFunc/" scenario="runtime-error" Creator="Mike Rorke">
      <description>Test function fn:local-name-from-QName. Error case - typo in function name.</description>
      <spec-citation spec="FuncOps" section-number="11.2.3" section-title="fn:local-name-from-QName" section-pointer="func-local-name-from-QName"/>
      <query name="LocalNameFromQNameFunc012" date="2005-09-28"/>
      <input-file role="principal-data" variable="input-context">QNameSource</input-file>
      <expected-error>XPST0017</expected-error>
   </test-case>
   <test-case is-XPath2="false" name="LocalNameFromQNameFunc013" FilePath="Functions/QNameFunc/LocalNameFromQNFunc/" scenario="runtime-error" Creator="Mike Rorke">
      <description>Test function fn:local-name-from-QName. Error case - typo in function name.</description>
      <spec-citation spec="FuncOps" section-number="11.2.3" section-title="fn:local-name-from-QName" section-pointer="func-local-name-from-QName"/>
      <query name="LocalNameFromQNameFunc013" date="2005-09-28"/>
      <input-file role="principal-data" variable="input-context">QNameSource</input-file>
      <expected-error>XPST0017</expected-error>
   </test-case>
   <test-case is-XPath2="false" name="LocalNameFromQNameFunc014" FilePath="Functions/QNameFunc/LocalNameFromQNFunc/" scenario="runtime-error" Creator="Mike Rorke">
      <description>Test function fn:local-name-from-QName. Error case - typo in function name.</description>
      <spec-citation spec="FuncOps" section-number="11.2.3" section-title="fn:local-name-from-QName" section-pointer="func-local-name-from-QName"/>
      <query name="LocalNameFromQNameFunc014" date="2005-09-28"/>
      <input-file role="principal-data" variable="input-context">QNameSource</input-file>
      <expected-error>XPST0017</expected-error>
   </test-case>
   <test-case is-XPath2="true" name="LocalNameFromQNameFunc015" FilePath="Functions/QNameFunc/LocalNameFromQNFunc/" scenario="runtime-error" Creator="Mike Rorke">
      <description>Test function fn:local-name-from-QName. Error case - invalid parameter type (simple type).</description>
      <spec-citation spec="FuncOps" section-number="11.2.3" section-title="fn:local-name-from-QName" section-pointer="func-local-name-from-QName"/>
      <query name="LocalNameFromQNameFunc015" date="2005-09-28"/>
      <input-file role="principal-data" variable="input-context">fsx</input-file>
      <expected-error>XPTY0004</expected-error>
   </test-case>
   <test-case is-XPath2="true" name="LocalNameFromQNameFunc016" FilePath="Functions/QNameFunc/LocalNameFromQNFunc/" scenario="runtime-error" Creator="Mike Rorke">
      <description>Test function fn:local-name-from-QName. Error case - invalid parameter type (integer).</description>
      <spec-citation spec="FuncOps" section-number="11.2.3" section-title="fn:local-name-from-QName" section-pointer="func-local-name-from-QName"/>
      <query name="LocalNameFromQNameFunc016" date="2005-09-28"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <expected-error>XPTY0004</expected-error>
   </test-case>
   <test-case is-XPath2="true" name="LocalNameFromQNameFunc017" FilePath="Functions/QNameFunc/LocalNameFromQNFunc/" scenario="runtime-error" Creator="Mike Rorke">
      <description>Test function fn:local-name-from-QName. Error case - invalid parameter type (time).</description>
      <spec-citation spec="FuncOps" section-number="11.2.3" section-title="fn:local-name-from-QName" section-pointer="func-local-name-from-QName"/>
      <query name="LocalNameFromQNameFunc017" date="2005-09-28"/>
      <input-file role="principal-data" variable="input-context">emptydoc</input-file>
      <expected-error>XPTY0004</expected-error>
   </test-case>
   <test-case is-XPath2="false" name="LocalNameFromQNameFunc018" FilePath="Functions/QNameFunc/LocalNameFromQNFunc/" scenario="standard" Creator="Mike Rorke">
      <description>Test function fn:local-name-from-QName. Explicit call to data to extract simple typed QName value.</description>
      <spec-citation spec="FuncOps" section-number="11.2.3" section-title="fn:local-name-from-QName" section-pointer="func-local-name-from-QName"/>
      <query name="LocalNameFromQNameFunc018" date="2005-09-28"/>
      <input-file role="principal-data" variable="input-context">QNameSource</input-file>
      <output-file role="principal" compare="Text">LocalNameFromQNameFunc018.txt</output-file>
   </test-case>
   <test-case is-XPath2="false" name="LocalNameFromQNameFunc019" FilePath="Functions/QNameFunc/LocalNameFromQNFunc/" scenario="standard" Creator="Mike Rorke">
      <description>Test function fn:local-name-from-QName. Conditional expression as parameter where both branches result in QName value.</description>
      <spec-citation spec="FuncOps" section-number="11.2.3" section-title="fn:local-name-from-QName" section-pointer="func-local-name-from-QName"/>
      <query name="LocalNameFromQNameFunc019" date="2005-09-28"/>
      <input-file role="principal-data" variable="input-context">QNameSource</input-file>
      <output-file role="principal" compare="Text">LocalNameFromQNameFunc019.txt</output-file>
   </test-case>
   <test-case is-XPath2="false" name="LocalNameFromQNameFunc020" FilePath="Functions/QNameFunc/LocalNameFromQNFunc/" scenario="standard" Creator="Mike Rorke">
      <description>Test function fn:local-name-from-QName. Conditional expression as parameter where both branches result in QName value.</description>
      <spec-citation spec="FuncOps" section-number="11.2.3" section-title="fn:local-name-from-QName" section-pointer="func-local-name-from-QName"/>
      <query name="LocalNameFromQNameFunc020" date="2005-09-28"/>
      <input-file role="principal-data" variable="input-context">QNameSource</input-file>
      <output-file role="principal" compare="Text">LocalNameFromQNameFunc020.txt</output-file>
   </test-case>
   <test-case is-XPath2="false" name="LocalNameFromQNameFunc021" FilePath="Functions/QNameFunc/LocalNameFromQNFunc/" scenario="runtime-error" Creator="Mike Rorke">
      <description>Test function fn:local-name-from-QName. Conditional expression as parameter where one branch does NOT result in a QName value.</description>
      <spec-citation spec="FuncOps" section-number="11.2.3" section-title="fn:local-name-from-QName" section-pointer="func-local-name-from-QName"/>
      <query name="LocalNameFromQNameFunc021" date="2005-09-28"/>
      <input-file role="principal-data" variable="input-context">QNameSource</input-file>
      <expected-error>XPTY0004</expected-error>
   </test-case>
   <test-case is-XPath2="true" Creator="Frans Englich" name="K-LocalNameFromQNameFunc-1" FilePath="Functions/QNameFunc/LocalNameFromQNFunc/" scenario="runtime-error">
      <description>A test whose essence is: `local-name-from-QName()`.</description>
      <query name="K-LocalNameFromQNameFunc-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-LocalNameFromQNameFunc-2" FilePath="Functions/QNameFunc/LocalNameFromQNFunc/" scenario="runtime-error">
      <description>A test whose essence is: `local-name-from-QName(1, 2)`.</description>
      <query name="K-LocalNameFromQNameFunc-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-LocalNameFromQNameFunc-3" FilePath="Functions/QNameFunc/LocalNameFromQNFunc/" scenario="standard">
      <description>A test whose essence is: `empty(local-name-from-QName( () ))`.</description>
      <query name="K-LocalNameFromQNameFunc-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-LocalNameFromQNameFunc-3.txt</output-file>
   </test-case>
   <test-case is-XPath2="true" Creator="Frans Englich" name="K-LocalNameFromQNameFunc-4" FilePath="Functions/QNameFunc/LocalNameFromQNFunc/" scenario="standard">
      <description>A test whose essence is: `local-name-from-QName( QName("example.com/", "pre:lname")) eq "lname"`.</description>
      <query name="K-LocalNameFromQNameFunc-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-LocalNameFromQNameFunc-4.txt</output-file>
   </test-case>
</test-group>