You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

 

If you are having a problem with Daffodil, and think that perhaps you have found a bug, then we suggest you:

  • check JIRA (to see if the bug is already reported)
  • create a TDML file for reproducing the bug/issue
  • create a JIRA ticket and attach your TDML
    OR
  • email the issue to daffodil-users@oss.tresys.com

A TDML file is often useful just to ask a question about how something in DFDL works, for example, to get a clarification.

Check JIRA

First you should give a search of our JIRA tickets to see if the problem is already recorded.

Here's the front page: https://opensource.ncsa.illinois.edu/jira/browse/DFDL

Here's a list of all tickets about bugs, new features, and improvements. In reverse chronological order (most recent first). You may want to change the issue type, or status specifications to narrow down the list, but most commonly you would just put some search keywords into the search box.

Don't go crazy with this searching however, because if you can't find it with reasonable effort (a few good guesses at search terms), then whatever is there isn't tagged sufficiently anyway.

If you do find a bug or a closely related issue that is open status, then you can add your information to it as a comment if you prefer, rather than creating a new issue. Just knowing that another person has run into the issue is helpful at assigning fix priorites.

Create a TDML File that Illustrates the Issue

The absolutely best way to report a bug is by creating a TDML test file that demonstrates the problem.

TDML stands for "Test Data Markup Language". It is a way of specifying a DFDL schema, the test data, the expected result or expected error/diagnostic messages, and it is all in a single self-contained XML file.

By convention, a TDML file uses file extension ".tdml".

Below is an annotated TDML file:

<?xml version="1.0" encoding="UTF-8"?>
<!-- 
Example of a self-contained test described in a TDML file
-->
<tdml:testSuite 
  suiteName="Suspected Bugs" 
  description="Illustrates issues found 2013-04-01"
  xmlns:tdml="http://www.ibm.com/xmlns/dfdl/testData" 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:dfdl="http://www.ogf.org/dfdl/dfdl-1.0/" 
  xmlns:xs="http://www.w3.org/2001/XMLSchema"
  xmlns:ex="http://example.com">

  <!--
    Use defineSchema to include a DFDL schema directly inside the TDML file.
    You can alternatively put the DFDL schema in a separate file if you prefer.

    Each defineSchema has a name, so that one TDML file can contain tests which reference
    different DFDL schemas. 

    To embed a schema inside the TDML you don't include the <xs:schema...> element from
    the schema file, nor do you need to wrap the top-level DFDL annotation objects with
    xs:annotation and xs:appinfo.

    In other words, inside a defineSchema you can directly put: 
    dfdl:defineFormat, dfdl:defineEscapeSchema,
    dfdl:format (for the default format), xs:element, xs:simpleType, xs:complexType, xs:group.
   -->

  <tdml:defineSchema name="s1">

    <dfdl:defineFormat name="myDefaults">
      <dfdl:format lengthKind="implicit" representation="text"
        lengthUnits="bytes" encoding="US-ASCII" initiator="" terminator=""
        separator="" ignoreCase="no" textNumberRep="standard" />
    </dfdl:defineFormat>

    <dfdl:format ref="myDefaults" />

	<xs:element name="dateTimeText" type="xs:dateTime" dfdl:calendarPattern="yyyy.MM.dd G 'at' HH:mm:ss ZZZZ" dfdl:calendarPatternKind="explicit"
	  dfdl:lengthKind="explicit" dfdl:length="{ 35 }" />

  </tdml:defineSchema>

  <tdml:parserTestCase name="Long1" root="s"
    model="SimpleTypes-Embedded.dfdl.xsd" description="Section 5 Schema types-long - DFDL-5-012R">

    <tdml:document><![CDATA[2,000,000,000]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset xmlns:xs="http://www.w3.org/2001/XMLSchema"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
        <s xs:type="xs:long">2000000000</s>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="BigInteger1" root="mersenne"
    model="SimpleTypes-Embedded.dfdl.xsd" description="Section 5 Schema types-integer - DFDL-5-011R">

    <tdml:document><![CDATA[686,479,766,013,060,971,498,190,079,908,139,321,726,943,530,014,330,540,939,446,345,918,554,318,339,765,605,212,255,964,066,145,455,497,729,631,139,148,085,803,712,198,799,971,664,381,257,402,829,111,505,715]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset xmlns:xs="http://www.w3.org/2001/XMLSchema"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
        <mersenne xs:type="xs:integer">686479766013060971498190079908139321726943530014330540939446345918554318339765605212255964066145455497729631139148085803712198799971664381257402829111505715</mersenne>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="Integer01" root="integer01"
    model="SimpleTypes-Embedded.dfdl.xsd" description="Section 5 Schema types-integer - DFDL-5-011R">

    <tdml:document><![CDATA[55555555555555555555]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset xmlns:xs="http://www.w3.org/2001/XMLSchema"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
        <integer01 xs:type="xs:integer">55555555555555555555</integer01>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="Int01" root="int01"
    model="SimpleTypes-Embedded.dfdl.xsd" description="Section 5 Schema types-int - DFDL-5-013R">

    <tdml:document><![CDATA[2,147,483,647]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset xmlns:xs="http://www.w3.org/2001/XMLSchema"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
        <int01 xs:type="xs:int">2147483647</int01>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="int_error" root="int02"
    model="SimpleTypes-Embedded.dfdl.xsd" description="Section 5 Schema types-int - DFDL-5-013R">

    <tdml:document><![CDATA[-2147483649]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="int_error_03" root="int04"
    model="SimpleTypes-Embedded.dfdl.xsd" description="Section 5 Schema types-int - DFDL-5-013R">

    <tdml:document><![CDATA[2147483648]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="warning_exercise" root="int03"
    model="SimpleTypes-Embedded.dfdl.xsd"
    description="A warning message should be generated - use of binaryNumperRep 'binary' with representation 'text'- DFDL-2-012R">

    <tdml:document>
      <tdml:documentPart type="byte">00000025</tdml:documentPart>
    </tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset xmlns:xs="http://www.w3.org/2001/XMLSchema"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
        <int03 xs:type="xs:int">37</int03>
      </tdml:dfdlInfoset>
    </tdml:infoset>
    <tdml:warnings>
      <tdml:warning /><!-- don't care what message is -->
    </tdml:warnings>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="UnsignedNumbers1" root="limits"
    model="SimpleTypes-Embedded.dfdl.xsd" description="Section 5 Schema types-unsigned integer types - DFDL-5-014R">

    <tdml:document><![CDATA[255:65,535:4,294,967,295:18446744073709551615]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset xmlns:xs="http://www.w3.org/2001/XMLSchema"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
        <limits>
          <unsigned-byte>255</unsigned-byte>
          <unsigned-short>65535</unsigned-short>
          <unsigned-int>4294967295</unsigned-int>
          <unsigned-long>18446744073709551615</unsigned-long>
        </limits>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="unsignedLong_01" root="uL_01"
    model="SimpleTypes-Embedded.dfdl.xsd" description="Section 5 Schema types-unsignedLong - DFDL-5-017R">

    <tdml:document><![CDATA[18446744073709551616]]></tdml:document>
    <tdml:errors>
      <tdml:error>Out of Range</tdml:error>
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="unsignedLong_02" root="uL_02"
    model="SimpleTypes-Embedded.dfdl.xsd" description="Section 5 Schema types-unsignedLong - DFDL-5-017R">

    <tdml:document><![CDATA[-1]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="unsignedLong_03" root="uL_03"
    model="SimpleTypes-Embedded.dfdl.xsd" description="Section 5 Schema types-unsignedLong - DFDL-5-017R">

    <tdml:document>a</tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="Long2" root="l_2"
    model="SimpleTypes-Embedded.dfdl.xsd" description="Section 5 Schema types-long - DFDL-5-012R">

    <tdml:document><![CDATA[1         ]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="Long3" root="l_3"
    model="SimpleTypes-Embedded.dfdl.xsd" description="Section 5 Schema types-long - DFDL-5-012R">

    <tdml:document><![CDATA[-9223372036854775809]]></tdml:document>
    <tdml:errors>
      <tdml:error>Invalid data</tdml:error>
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="Long4" root="l_3"
    model="SimpleTypes-Embedded.dfdl.xsd" description="Section 5 Schema types-long - DFDL-5-012R">

    <tdml:document><![CDATA[+9223372036854775808]]></tdml:document>
    <tdml:errors>
      <tdml:error>Invalid data</tdml:error>
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="int_error_02" root="e1"
    model="SimpleTypes-Embedded.dfdl.xsd" description="Section 5 Schema types-int - DFDL-5-012R">

    <tdml:document><![CDATA[55.001]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="short_01" root="s_1"
    model="SimpleTypes-Embedded.dfdl.xsd" description="Section 5 Schema types-short - DFDL-5-014R">

    <tdml:document><![CDATA[70000]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="short_02" root="s_2"
    model="SimpleTypes-Embedded.dfdl.xsd" description="Section 5 Schema types-short - DFDL-5-014R">

    <tdml:document><![CDATA[-32769]]></tdml:document>
    <tdml:errors>
      <tdml:error>Out of Range</tdml:error>
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="unsignedInt_01" root="uI_01"
    model="SimpleTypes-Embedded.dfdl.xsd" description="Section 5 Schema types-unsignedInt - DFDL-5-018R">

    <tdml:document><![CDATA[7018631476]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="unsignedInt_02" root="uI_02"
    model="SimpleTypes-Embedded.dfdl.xsd" description="Section 5 Schema types-unsignedInt - DFDL-5-018R">
    <tdml:document><![CDATA[-3]]></tdml:document>
    <tdml:errors>
      <tdml:error>Out of Range</tdml:error>
    </tdml:errors>
  </tdml:parserTestCase>

<!--
     Test Name: negativeUnsignedInt
        Schema: SimpleTypes-Embedded.dfdl.xsd
          Root: uI_03
       Purpose: This test attempts to parse a negative number as an unsignedInt and should fail
-->

  <tdml:parserTestCase name="negativeUnsignedInt"
    root="uI_03" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Section 05 - Simple Types - unsignedInt - DFDL-5-018R">
    <tdml:document><![CDATA[-999]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="characterDuringValidUnsignedInt"
    root="uI_03" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a non numeric character during a valid unsigned int - DFDL-5-018R">
    <tdml:document><![CDATA[9a9]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceAfterLengthExceededUnsignedInt"
    root="uI_03" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character after an invalid unsigned int - DFDL-5-018R">
    <tdml:document><![CDATA[9999 ]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceBeforeLengthExceededUnsignedInt"
    root="uI_03" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character before an invalid unsigned int - DFDL-5-018R">
    <tdml:document><![CDATA[ 9999]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceDuringLengthExceededUnsignedInt"
    root="uI_03" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character during a invalid unsigned int - DFDL-5-018R">
    <tdml:document><![CDATA[99 99]]></tdml:document>
    <tdml:errors>
      <tdml:error>Left over data</tdml:error>
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceAfterValidUnsignedInt"
    root="uI_03" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character after a valid unsigned int - DFDL-5-018R">
    <tdml:document><![CDATA[999 ]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceBeforeValidUnsignedInt"
    root="uI_03" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character before a valid unsigned int - DFDL-5-018R">
    <tdml:document><![CDATA[ 999]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceDuringValidUnsignedInt"
    root="uI_03" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character during a valid unsigned int - DFDL-5-018R">
    <tdml:document><![CDATA[9 99]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <!-- int int05 length 4 -->
  <tdml:parserTestCase name="characterDuringValidInt"
    root="int05" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a non numeric character during a valid int - DFDL-5-013R">
    <tdml:document><![CDATA[9a9]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceAfterLengthExceededInt"
    root="int05" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character after an invalid int - DFDL-5-013R">
    <tdml:document><![CDATA[9999 ]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceBeforeLengthExceededInt"
    root="int05" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character before an invalid int - DFDL-5-013R">
    <tdml:document><![CDATA[ 9999]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceDuringLengthExceededInt"
    root="int05" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character during a invalid int - DFDL-5-013R">
    <tdml:document><![CDATA[99 99]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceAfterValidInt"
    root="int05" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character after a valid int - DFDL-5-013R">
    <tdml:document><![CDATA[999 ]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceBeforeValidInt"
    root="int05" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character before a valid int - DFDL-5-013R">
    <tdml:document><![CDATA[ 999]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceDuringValidInt"
    root="int05" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character during a valid int - DFDL-5-013R">
    <tdml:document><![CDATA[9 99]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <!-- integer integer02 length 4 -->
  <tdml:parserTestCase name="characterDuringValidInteger"
    root="integer02" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a non numeric character during a valid integer - DFDL-5-011R">
    <tdml:document><![CDATA[9a9]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceAfterLengthExceededInteger"
    root="integer02" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character after an invalid integer - DFDL-5-011R">
    <tdml:document><![CDATA[9999 ]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceBeforeLengthExceededInteger"
    root="integer02" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character before an invalid integer - DFDL-5-011R">
    <tdml:document><![CDATA[ 9999]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceDuringLengthExceededInteger"
    root="integer02" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character during a invalid integer - DFDL-5-011R">
    <tdml:document><![CDATA[99 99]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceAfterValidInteger"
    root="integer02" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character after a valid integer - DFDL-5-011R">
    <tdml:document><![CDATA[999 ]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceBeforeValidInteger"
    root="integer02" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character before a valid integer - DFDL-5-011R">
    <tdml:document><![CDATA[ 999]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
       <integer02>999</integer02>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceDuringValidInteger"
    root="integer02" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character during a valid integer - DFDL-5-011R">
    <tdml:document><![CDATA[9 99]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <integer02>999</integer02>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>


  <!-- long l_4 length 4 -->
  <tdml:parserTestCase name="characterDuringValidLong"
    root="l_4" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a non numeric character during a valid long - DFDL-5-012R">
    <tdml:document><![CDATA[9a9]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceAfterLengthExceededLong"
    root="l_4" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character after an invalid long - DFDL-5-012R">
    <tdml:document><![CDATA[9999 ]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceBeforeLengthExceededLong"
    root="l_4" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character before an invalid long - DFDL-5-012R">
    <tdml:document><![CDATA[ 9999]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceDuringLengthExceededLong"
    root="l_4" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character during an invalid long - DFDL-5-012R">
    <tdml:document><![CDATA[99 99]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceAfterValidLong"
    root="l_4" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character after a valid long - DFDL-5-012R">
    <tdml:document><![CDATA[999 ]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceBeforeValidLong"
    root="l_4" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character before a valid long - DFDL-5-012R">
    <tdml:document><![CDATA[ 999]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceDuringValidLong"
    root="l_4" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character during a valid long - DFDL-5-012R">
    <tdml:document><![CDATA[9 99]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <!-- short s_1 length 5 -->
  <tdml:parserTestCase name="characterDuringValidShort"
    root="s_1" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a non numeric character during a valid short - DFDL-5-014R">
    <tdml:document><![CDATA[9a99]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceAfterLengthExceededShort"
    root="s_1" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character after an invalid short - DFDL-5-014R">
    <tdml:document><![CDATA[99999 ]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceBeforeLengthExceededShort"
    root="s_1" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character before an invalid short - DFDL-5-014R">
    <tdml:document><![CDATA[ 99999]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceDuringLengthExceededShort"
    root="s_1" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character during a valid invalid short - DFDL-5-014R">
    <tdml:document><![CDATA[99 999]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceAfterValidShort"
    root="s_1" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character after a valid short - DFDL-5-014R">
    <tdml:document><![CDATA[9999 ]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceBeforeValidShort"
    root="s_1" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character before a valid short - DFDL-5-014R">
    <tdml:document><![CDATA[ 9999]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceDuringValidShort"
    root="s_1" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character during a valid short - DFDL-5-014R">
    <tdml:document><![CDATA[99 99]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <!-- byte b_01 length 4 -->
  <tdml:parserTestCase name="characterDuringValidByte"
    root="b_01" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a non numeric character during a valid byte - DFDL-5-015R">
    <tdml:document><![CDATA[9a9]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceAfterLengthExceededByte"
    root="b_01" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character after an invalid byte - DFDL-5-015R">
    <tdml:document><![CDATA[9999 ]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceBeforeLengthExceededByte"
    root="b_01" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character before an invalid byte - DFDL-5-015R">
    <tdml:document><![CDATA[ 9999]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceDuringLengthExceededByte"
    root="b_01" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character during an invalid byte - DFDL-5-015R">
    <tdml:document><![CDATA[99 99]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceAfterValidByte"
    root="b_01" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character after a valid byte - DFDL-5-015R">
    <tdml:document><![CDATA[999 ]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceBeforeValidByte"
    root="b_01" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character before a valid byte - DFDL-5-015R">
    <tdml:document><![CDATA[ 999]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceDuringValidByte"
    root="b_01" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character during a valid byte - DFDL-5-015R">
    <tdml:document><![CDATA[99 9]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

<!--
     Test Name: negativeUnsignedLong
        Schema: SimpleTypes-Embedded.dfdl.xsd
          Root: uL_01
       Purpose: This test attempts to parse a negative number as an unsignedLong and should fail
-->

  <tdml:parserTestCase name="negativeUnsignedLong"
    root="uL_01" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Section 5 - Simple Types - unsignedLong - DFDL-5-017R">
    <tdml:document><![CDATA[-999]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="characterDuringValidUnsignedLong"
    root="uL_04" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a non numeric character during a valid unsigned long - DFDL-5-017R">
    <tdml:document><![CDATA[9a9]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceAfterLengthExceededUnsignedLong"
    root="uL_04" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character after an invalid insigned long - DFDL-5-017R">
    <tdml:document><![CDATA[9999 ]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceBeforeLengthExceededUnsignedLong"
    root="uL_04" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character before an invalid unsigned long - DFDL-5-017R">
    <tdml:document><![CDATA[ 9999]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceDuringLengthExceededUnsignedLong"
    root="uL_04" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character during a invalid unsigned long - DFDL-5-017R">
    <tdml:document><![CDATA[99 99]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceAfterValidUnsignedLong"
    root="uL_04" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character after a valid unsigned long - DFDL-5-017R">
    <tdml:document><![CDATA[999 ]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceBeforeValidUnsignedLong"
    root="uL_04" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character before a valid unsigned long - DFDL-5-017R">
    <tdml:document><![CDATA[ 999]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <uL_04>999</uL_04>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceDuringValidUnsignedLong"
    root="uL_04" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character during a valid unsigned long - DFDL-5-017R">
    <tdml:document><![CDATA[9 99]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <uL_04>999</uL_04>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: negativeUnsignedShort
        Schema: SimpleTypes-Embedded.dfdl.xsd
          Root: uS_02
       Purpose: This test attempts to parse a negative number as an unsignedShort and should fail
-->

  <tdml:parserTestCase name="negativeUnsignedShort"
    root="uS_02" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Section 5 - Simple Types - unsignedShort - DFDL-5-019R">
    <tdml:document><![CDATA[-999]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="characterDuringValidUnsignedShort"
    root="uS_02" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a non numeric character during a valid unsigned short - DFDL-5-019R">
    <tdml:document><![CDATA[9a9]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceAfterLengthExceededUnsignedShort"
    root="uS_02" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character after an invalid unsigned short - DFDL-5-019R">
    <tdml:document><![CDATA[9999 ]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceBeforeLengthExceededUnsignedShort"
    root="uS_02" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character before an invalid unsigned short - DFDL-5-019R">
    <tdml:document><![CDATA[ 9999]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceDuringLengthExceededUnsignedShort"
    root="uS_02" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character during a invalid unsigned short - DFDL-5-019R">
    <tdml:document><![CDATA[99 99]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceAfterValidUnsignedShort"
    root="uS_02" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character after a valid unsigned short - DFDL-5-019R">
    <tdml:document><![CDATA[999 ]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceBeforeValidUnsignedShort"
    root="uS_02" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character before a valid unsigned short - DFDL-5-019R">
    <tdml:document><![CDATA[ 999]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceDuringValidUnsignedShort"
    root="uS_02" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character during a valid unsigned short - DFDL-5-019R">
    <tdml:document><![CDATA[9 99]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

<!--
     Test Name: negativeUnsignedByte
        Schema: SimpleTypes-Embedded.dfdl.xsd
          Root: uB_01
       Purpose: This test attempts to parse a negative number as an unsignedByte and should fail
-->

  <tdml:parserTestCase name="negativeUnsignedByte"
    root="uB_01" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Section 5 - Simple Types - unsignedByte - DFDL-5-020R">
    <tdml:document><![CDATA[-999]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="characterDuringValidUnsignedByte"
    root="uB_01" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a non numeric character during a valid unsigned byte - DFDL-5-020R">
    <tdml:document><![CDATA[9a]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceAfterLengthExceededUnsignedByte"
    root="uB_01" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character after an invalid unsigned byte - DFDL-5-020R">
    <tdml:document><![CDATA[999 ]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceBeforeLengthExceededUnsignedByte"
    root="uB_01" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character before an invalid unsigned uB_01 - DFDL-5-020R">
    <tdml:document><![CDATA[ 999]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceDuringLengthExceededUnsignedByte"
    root="uB_01" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character during a valid unsigned byte - DFDL-5-020R">
    <tdml:document><![CDATA[99 9]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceAfterValidUnsignedByte"
    root="uB_01" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character after a valid Unsigned byte - DFDL-5-020R">
    <tdml:document><![CDATA[99 ]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceBeforeValidUnsignedByte"
    root="uB_01" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character before a valid Unsigned byte - DFDL-5-020R">
    <tdml:document><![CDATA[ 99]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceDuringValidUnsignedByte"
    root="uB_01" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character during a valid unsigned byte - DFDL-5-020R">
    <tdml:document><![CDATA[9 9]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="unsignedShort_01" root="uS_01"
    model="SimpleTypes-Embedded.dfdl.xsd" description="Section 5 Schema types-unsignedShort - DFDL-5-019R">

    <tdml:document><![CDATA[-1]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="unsignedInt_binary"
    root="uI_01" model="SimpleTypes-binary"
    description="Section 5 Schema types-unsignedInt - DFDL-5-018R">
    <tdml:document>
      <tdml:documentPart type="bits">00000000000000000000000000001000</tdml:documentPart>
    </tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <uI_01>8</uI_01>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="unsignedInt_binary2"
    root="uI_01" model="SimpleTypes-binary"
    description="Section 5 Schema types-unsignedInt - DFDL-5-018R">
    <tdml:document>
      <tdml:documentPart type="bits">10000000000000000000000000001000</tdml:documentPart>
    </tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <uI_01>2147483656</uI_01>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="unsignedShort_binary"
    root="uS_01" model="SimpleTypes-binary"
    description="Section 5 Schema types-unsignedShort - DFDL-5-019R">
    <tdml:document>
      <tdml:documentPart type="bits">0000000000110111</tdml:documentPart>
    </tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <uS_01>55</uS_01>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="unsignedShort_binary2"
    root="uS_01" model="SimpleTypes-binary"
    description="Section 5 Schema types-unsignedShort - DFDL-5-019R">

    <tdml:document>
      <tdml:documentPart type="bits">1111111111111111</tdml:documentPart>
    </tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <uS_01>65535</uS_01>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="signedLong_binary"
    root="l_1" model="SimpleTypes-binary" description="Section 5 Schema types-signedLong - DFDL-5-012R">

    <tdml:document>
      <tdml:documentPart type="bits">0000000000000000000000000000000010000000000000000000000011100101</tdml:documentPart>
    </tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <l_1>2147483877</l_1>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="signedLong_binary2"
    root="l_1" model="SimpleTypes-binary" description="Section 5 Schema types-signedLong - DFDL-5-012R">

    <tdml:document>
      <tdml:documentPart type="bits">1111111111111111111111111111111111111111111111111111111111001001</tdml:documentPart>
    </tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <l_1>-55</l_1>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="signedShort_binary"
    root="s_1" model="SimpleTypes-binary" description="Section 5 Schema types-signedShort - DFDL-5-014R">

    <tdml:document>
      <tdml:documentPart type="bits">1111111111001001</tdml:documentPart>
    </tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <s_1>-55</s_1>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="signedShort_binary2"
    root="s_1" model="SimpleTypes-binary" description="Section 5 Schema types-signedShort - DFDL-5-014R">

    <tdml:document>
      <tdml:documentPart type="bits">0000000111001010</tdml:documentPart>
    </tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <s_1>458</s_1>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="unsignedLong_binary"
    root="uL_01" model="SimpleTypes-binary"
    description="Section 5 Schema types-unsignedShort - DFDL-5-017R">

    <tdml:document>
      <tdml:documentPart type="bits">0000000000000000000000000000000000000000000000000000000000000001</tdml:documentPart>
    </tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <uL_01>1</uL_01>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="unsignedLong_binary2"
    root="uL_01" model="SimpleTypes-binary"
    description="Section 5 Schema types-unsignedShort - DFDL-5-017R">

    <tdml:document>
      <tdml:documentPart type="bits">0000000000000000000000000000000000000000000000000000000000110111</tdml:documentPart>
    </tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <uL_01>55</uL_01>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="unsignedByte_01" root="uB_01"
    model="SimpleTypes-Embedded.dfdl.xsd" description="Section 5 Schema types-unsignedByte - DFDL-5-020R">

    <tdml:document><![CDATA[256]]></tdml:document>
    <tdml:errors>
      <tdml:error>Out of Range</tdml:error>
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="unsignedByte_02" root="uB_01"
    model="SimpleTypes-Embedded.dfdl.xsd" description="Section 5 Schema types-unsignedByte - DFDL-5-020R">

    <tdml:document><![CDATA[-30]]></tdml:document>
    <tdml:errors>
      <tdml:error>Out of Range</tdml:error>
    </tdml:errors>
  </tdml:parserTestCase>
  
  <tdml:parserTestCase name="nonNegativeInteger_text" root="nonNegIntText"
    model="SimpleTypes-Embedded.dfdl.xsd" description="Section 5 Schema types-nonNegativeInteger - DFDL-5-016R">

    <tdml:document><![CDATA[184467440737095516158]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <nonNegIntText>184467440737095516158</nonNegIntText>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>
  
  <tdml:parserTestCase name="nonNegativeInteger_bin" root="nonNegIntBin"
    model="SimpleTypes-Embedded.dfdl.xsd" description="Section 5 Schema types-nonNegativeInteger - DFDL-5-016R">

    <tdml:document><tdml:documentPart type="byte">1999999999999999</tdml:documentPart></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <nonNegIntBin>184467440737095516158</nonNegIntBin>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>
  
  <tdml:parserTestCase name="dateText" root="dateText"
    model="SimpleTypes-Embedded.dfdl.xsd" description="Section 5 Schema types-date - DFDL-5-016R">

    <tdml:document><![CDATA[Wednesday, July 10, '96]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <dateText>1996-07-10</dateText>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="timeText" root="timeText"
    model="SimpleTypes-Embedded.dfdl.xsd" description="Section 5 Schema types-time - DFDL-5-016R">

    <tdml:document><![CDATA[12:08 PM]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <timeText>12:08:00Z</timeText>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="dateTimeText" root="dateTimeText"
    model="SimpleTypes-Embedded.dfdl.xsd" description="Section 5 Schema types-dateTime - DFDL-5-016R">

    <tdml:document><![CDATA[1996.07.10 AD at 15:08:56 GMT-05:00]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <dateTimeText>1996-07-10T20:08:56Z</dateTimeText>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="byte_01" root="b_01"
    model="SimpleTypes-Embedded.dfdl.xsd" description="Section 5 Schema types - byte - DFDL-5-015R">

    <tdml:document><![CDATA[ 128]]></tdml:document>
    <tdml:errors>
      <tdml:error>Out of Range</tdml:error>
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="byte_02" root="b_01"
    model="SimpleTypes-Embedded.dfdl.xsd" description="Section 5 Schema types - byte - DFDL-5-015R">

    <tdml:document><![CDATA[-129]]></tdml:document>
    <tdml:errors>
      <tdml:error>Out of Range</tdml:error>
    </tdml:errors>
  </tdml:parserTestCase>
  
  <!--
    Test name: double_binary_01
    Schema: SimpleTypes-binary
    Purpose: This document does not have the appropriate number of bits for an implicitly-sized double (64) and should fail parsing 
  -->

  <tdml:parserTestCase name="double_binary_01" root="d_01"
      model="SimpleTypes-binary" description="Section 5 Schema types-double - DFDL-5-009R">
    <tdml:document>
      <tdml:documentPart type="bits"><![CDATA[1010101]]></tdml:documentPart>
    </tdml:document>
    <tdml:errors>
      <tdml:error>Insufficient bits</tdml:error>
      <tdml:error>xs:double</tdml:error>
    </tdml:errors>
  </tdml:parserTestCase>
  
  <!--
    Test name: double_binary_02
    Schema: SimpleTypes-binary
    Purpose: This document has the appropriate number of bits for an implicitly-sized double (64) and should be parsed accordingly
  -->

  <tdml:parserTestCase name="double_binary_02" root="d_01"
      model="SimpleTypes-binary" description="Section 5 Schema types-double - DFDL-5-009R">
    <tdml:document>
      <tdml:documentPart type="bits">0100000000010100000000000000000000000000000000000000000000000000</tdml:documentPart>
    </tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <d_01>5.0</d_01>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>
  
  <!--
    Test name: double_binary_03
    Schema: SimpleTypes-binary
    Purpose: This document has the appropriate number of bytes for an implicitly-sized double (4) and should be parsed accordingly
  -->
  
  <tdml:parserTestCase name="double_binary_03" root="d_01"
      model="SimpleTypes-binary" description="Section 5 Schema types-double - DFDL-5-009R">
    <tdml:document>
      <tdml:documentPart type="byte">4014000000000000</tdml:documentPart>
    </tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <d_01>5.0</d_01>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>
  
  <!--
    Test name: double_binary_04
    Schema: SimpleTypes-binary
    Purpose: This document has the appropriate number of bits for an implicitly-sized double (64) but does not actually
             have a numerical value. 
  -->
  
  <tdml:parserTestCase name="double_binary_04" root="d_01"
      model="SimpleTypes-binary" description="Section 5 Schema types-double - DFDL-5-009R">
    <tdml:document>
      <tdml:documentPart type="bits">1111111111111111111111111111111111111111111111111111111111111111</tdml:documentPart>
    </tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <d_01>NaN</d_01>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>
  
  <!--
    Test name: double_binary_05
    Schema: SimpleTypes-binary
    Purpose: This document has more than the appropriate number of bits for an implicitly-sized double (64) and should fail parsing 
  -->
  
  <tdml:parserTestCase name="double_binary_05" root="d_01"
      model="SimpleTypes-binary" description="Section 5 Schema types-double - DFDL-5-009R">
    <tdml:document>
      <tdml:documentPart type="bits">100111111111111110000000011111111111111111111111111111111111111111111111111111111111</tdml:documentPart>
    </tdml:document>
    <tdml:errors>
      <tdml:error>Left over data</tdml:error>
    </tdml:errors>
  </tdml:parserTestCase>
  
  <!--
    Test name: double_07
    Schema: SimpleTypes-Embedded.dfdl.xsd
    Purpose: This document uses a schema with the textual representation of a double and an implicit length, which is not allowed. 
  -->

  <tdml:parserTestCase name="double_07" root="double"
      model="SimpleTypes-Embedded.dfdl.xsd" description="Section 5 Schema types-double - DFDL-5-009R">
    <tdml:document>
      <tdml:documentPart type="text">400</tdml:documentPart>
    </tdml:document>
    <tdml:errors>
      <tdml:error>Schema Definition Error</tdml:error>
      <tdml:error>MaxLength was asked for when isSimpleType(true) and isPrimitiveType(true)</tdml:error>
    </tdml:errors>
  </tdml:parserTestCase>

  <!--
    Test name: byte_binary_01
    Schema: SimpleTypes-binary
    Purpose: This document demonstrates the implicit length of a byte (8 bits), represented by bits 
  -->
  
  <tdml:parserTestCase name="byte_binary_01" root="b_01"
      model="SimpleTypes-binary" description="Section 5 Schema types-byte - DFDL-5-015R">
    <tdml:document>
      <tdml:documentPart type="bits">00001101</tdml:documentPart>
    </tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <b_01>13</b_01>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>
  
  <!--
    Test name: byte_binary_02
    Schema: SimpleTypes-binary
    Purpose: This document has more bits than the implicit length of a byte and should fail
  -->
  
  <tdml:parserTestCase name="byte_binary_02" root="b_01"
      model="SimpleTypes-binary" description="Section 5 Schema types-byte - DFDL-5-015R">
    <tdml:document>
      <tdml:documentPart type="bits">00001101111</tdml:documentPart>
    </tdml:document>
    <tdml:errors>
      <tdml:error>Left over data</tdml:error>
    </tdml:errors>
  </tdml:parserTestCase>

  <!--
    Test name: byte_binary_03
    Schema: SimpleTypes-binary
    Purpose: This document has less bits than the implicit length of a byte and should fail
  -->
  
  <tdml:parserTestCase name="byte_binary_03" root="b_01"
      model="SimpleTypes-binary" description="Section 5 Schema types-byte - DFDL-5-015R">
    <tdml:document>
      <tdml:documentPart type="bits">11111</tdml:documentPart>
    </tdml:document>
    <tdml:errors>
      <tdml:error>Parse Error</tdml:error>
      <tdml:error>Insufficient bits</tdml:error>
      <tdml:error>xs:byte</tdml:error>
    </tdml:errors>
  </tdml:parserTestCase>
  
  <!--
    Test name: byte_binary_04
    Schema: SimpleTypes-binary
    Purpose: This document contains a text representation of 8 bits, which is the correct implicit length of a byte and should be parsed accordingly
  -->
  
  <tdml:parserTestCase name="byte_binary_04" root="b_01"
      model="SimpleTypes-binary" description="Section 5 Schema types-byte - DFDL-5-015R">
    <tdml:document>
      <tdml:documentPart type="text">a</tdml:documentPart>
    </tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <b_01>97</b_01>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>
  
  <!--
    Test name: byte_binary_05
    Schema: SimpleTypes-binary
    Purpose: This document contains a byte representation of 8 bits, which is the correct implicit length of a byte and should be parsed accordingly
             0x28 = 00101000 = 40
  -->
  
  <tdml:parserTestCase name="byte_binary_05" root="b_01"
      model="SimpleTypes-binary" description="Section 5 Schema types-byte - DFDL-5-015R">
    <tdml:document>
      <tdml:documentPart type="byte">28</tdml:documentPart>
    </tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <b_01>40</b_01>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>
  
  <!--
    Test name: byte_implicit
    Schema: SimpleTypes-Embedded.dfdl.xsd
    Purpose: This document attempts to parse a textual representation of byte with implicit length and should fail
  -->
  
  <tdml:parserTestCase name="byte_implicit" root="byte"
      model="SimpleTypes-Embedded.dfdl.xsd" description="Section 5 Schema types-byte - DFDL-5-015R">
    <tdml:document>
      <tdml:documentPart type="bits">11010101</tdml:documentPart>
    </tdml:document>
    <tdml:errors>
      <tdml:error>Schema Definition Error</tdml:error>
      <tdml:error>MaxLength was asked for when isSimpleType(true) and isPrimitiveType(true)</tdml:error>
    </tdml:errors>
  </tdml:parserTestCase>
  
  <!--
    Test name: ubyte_binary_01
    Schema: SimpleTypes-binary
    Purpose: This document demonstrates the implicit length of an unsigned byte (8 bits), represented by bits 
  -->
  
  <tdml:parserTestCase name="ubyte_binary_01" root="uB_01"
      model="SimpleTypes-binary" description="Section 5 Schema types-byte - DFDL-5-015R">
    <tdml:document>
      <tdml:documentPart type="bits">00001101</tdml:documentPart>
    </tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <uB_01>13</uB_01>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>
  
  <!--
    Test name: ubyte_binary_02
    Schema: SimpleTypes-binary
    Purpose: This document has more bits than the implicit length of a byte and should fail
  -->
  
  <tdml:parserTestCase name="ubyte_binary_02" root="uB_01"
      model="SimpleTypes-binary" description="Section 5 Schema types-byte - DFDL-5-015R">
    <tdml:document>
      <tdml:documentPart type="bits">00001101111</tdml:documentPart>
    </tdml:document>
    <tdml:errors>
      <tdml:error>Left over data</tdml:error>
    </tdml:errors>
  </tdml:parserTestCase>

  <!--
    Test name: ubyte_binary_03
    Schema: SimpleTypes-binary
    Purpose: This document has less bits than the implicit length of a byte and should fail
  -->
  
  <tdml:parserTestCase name="ubyte_binary_03" root="uB_01"
      model="SimpleTypes-binary" description="Section 5 Schema types-byte - DFDL-5-015R">
    <tdml:document>
      <tdml:documentPart type="bits">11111</tdml:documentPart>
    </tdml:document>
    <tdml:errors>
      <tdml:error>Parse Error</tdml:error>
      <tdml:error>Insufficient bits</tdml:error>
      <tdml:error>xs:unsignedByte</tdml:error>
    </tdml:errors>
  </tdml:parserTestCase>
  
  <!--
    Test name: ubyte_binary_04
    Schema: SimpleTypes-binary
    Purpose: This document contains a text representation of 8 bits, which is the correct implicit length of a byte and should be parsed accordingly
  -->
  
  <tdml:parserTestCase name="ubyte_binary_04" root="uB_01"
      model="SimpleTypes-binary" description="Section 5 Schema types-byte - DFDL-5-015R">
    <tdml:document>
      <tdml:documentPart type="text">a</tdml:documentPart>
    </tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <uB_01>97</uB_01>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>
  
  <!--
    Test name: ubyte_binary_05
    Schema: SimpleTypes-binary
    Purpose: This document contains a byte representation of 8 bits, which is the correct implicit length of a byte and should be parsed accordingly
             0x28 = 00101000 = 40
  -->
  
  <tdml:parserTestCase name="ubyte_binary_05" root="uB_01"
      model="SimpleTypes-binary" description="Section 5 Schema types-byte - DFDL-5-015R">
    <tdml:document>
      <tdml:documentPart type="byte">28</tdml:documentPart>
    </tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <uB_01>40</uB_01>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>
  
  <!--
    Test name: ubyte_implicit
    Schema: SimpleTypes-Embedded.dfdl.xsd
    Purpose: This document attempts to parse a textual representation of an unsignedByte with implicit length and should fail
  -->
  
  <tdml:parserTestCase name="ubyte_implicit" root="uByte"
      model="SimpleTypes-Embedded.dfdl.xsd" description="Section 5 Schema types- unsignedByte - DFDL-5-020R">
    <tdml:document>
      <tdml:documentPart type="bits">11010101</tdml:documentPart>
    </tdml:document>
    <tdml:errors>
      <tdml:error>Schema Definition Error</tdml:error>
      <tdml:error>MaxLength was asked for when isSimpleType(true) and isPrimitiveType(true)</tdml:error>
    </tdml:errors>
  </tdml:parserTestCase>
  
  <!--
    Test name: int_binary_01
    Schema: SimpleTypes-binary
    Purpose: This document demonstrates the implicit length of an int (32 bits), represented by bits 
  -->
  
  <tdml:parserTestCase name="int_binary_01" root="int01"
      model="SimpleTypes-binary" description="Section 5 Schema types - int - DFDL-5-013R">
    <tdml:document>
      <tdml:documentPart type="bits">00000000 00000000 00000000 00001101</tdml:documentPart>
    </tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <int01>13</int01>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>
  
  <!--
    Test name: int_binary_02
    Schema: SimpleTypes-binary
    Purpose: This document has more bits than the implicit length of an int and should fail
  -->
  
  <tdml:parserTestCase name="int_binary_02" root="int01"
      model="SimpleTypes-binary" description="Section 5 Schema types - int - DFDL-5-013R">
    <tdml:document>
      <tdml:documentPart type="bits">00000000 00000000 00000000 00001101111</tdml:documentPart>
    </tdml:document>
    <tdml:errors>
      <tdml:error>Left over data</tdml:error>
    </tdml:errors>
  </tdml:parserTestCase>

  <!--
    Test name: int_binary_03
    Schema: SimpleTypes-binary
    Purpose: This document has less bits than the implicit length of an int and should fail
  -->
  
  <tdml:parserTestCase name="int_binary_03" root="int01"
      model="SimpleTypes-binary" description="Section 5 Schema types - int - DFDL-5-013R">
    <tdml:document>
      <tdml:documentPart type="bits">11111</tdml:documentPart>
    </tdml:document>
    <tdml:errors>
      <tdml:error>Parse Error</tdml:error>
      <tdml:error>Insufficient bits</tdml:error>
      <tdml:error>xs:int</tdml:error>
    </tdml:errors>
  </tdml:parserTestCase>
  
  <!--
    Test name: int_binary_04
    Schema: SimpleTypes-binary
    Purpose: This document contains a text representation of 32 bits, which is the correct implicit length of an int and should be parsed accordingly
  -->
  
  <tdml:parserTestCase name="int_binary_04" root="int01"
      model="SimpleTypes-binary" description="Section 5 Schema types - int - DFDL-5-013R">
    <tdml:document>
      <tdml:documentPart type="text">000a</tdml:documentPart>
    </tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <int01>808464481</int01>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>
  
  <!--
    Test name: int_binary_05
    Schema: SimpleTypes-binary
    Purpose: This document contains a byte representation of 32 bits, which is the correct implicit length of an int and should be parsed accordingly
  -->
  
  <tdml:parserTestCase name="int_binary_05" root="int01"
      model="SimpleTypes-binary" description="Section 5 Schema types - int - DFDL-5-013R">
    <tdml:document>
      <tdml:documentPart type="byte">00110028</tdml:documentPart>
    </tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <int01>1114152</int01>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>
  
  <!--
    Test name: int_implicit
    Schema: SimpleTypes-Embedded.dfdl.xsd
    Purpose: This document uses a schema with the textual representation of an int and an implicit length, which is not allowed. 
  -->
  
  <tdml:parserTestCase name="int_implicit" root="int"
      model="SimpleTypes-Embedded.dfdl.xsd" description="Section 5 Schema types - int - DFDL-5-013R">
    <tdml:document>
      <tdml:documentPart type="text">1000</tdml:documentPart>
    </tdml:document>
    <tdml:errors>
      <tdml:error>Schema Definition Error</tdml:error>
      <tdml:error>MaxLength was asked for when isSimpleType(true) and isPrimitiveType(true)</tdml:error>
    </tdml:errors>
  </tdml:parserTestCase>
  
  <!--
    Test name: integer_binary_01
       Schema: SimpleTypes-binary
      Purpose: This document contains a binary representation of an integer using implicit length, which is not allowed
  -->
  
  <tdml:parserTestCase name="integer_binary_01" root="integer01"
      model="SimpleTypes-binary" description="Section 5 Schema types - integer - DFDL-5-011R">
    <tdml:document>
      <tdml:documentPart type="bits">01010101</tdml:documentPart>
    </tdml:document>
    <tdml:errors>
      <tdml:error>Schema Definition Error</tdml:error>
      <tdml:error>Size of binary data 'integer' cannot be determined implicitly</tdml:error>
    </tdml:errors>
  </tdml:parserTestCase>
  
  <!--
    Test name: nonNegInt_binary_01
       Schema: SimpleTypes-binary
      Purpose: This document contains a binary representation of an integer using implicit length, which is not allowed
  -->
  
  <tdml:parserTestCase name="nonNegInt_binary_01" root="posint01"
      model="SimpleTypes-binary" description="Section 5 Schema types - non negative integer - DFDL-5-016R">
    <tdml:document>
      <tdml:documentPart type="bits">01010101</tdml:documentPart>
    </tdml:document>
    <tdml:errors>
      <tdml:error>Schema Definition Error</tdml:error>
      <tdml:error>Size of binary data 'integer' cannot be determined implicitly</tdml:error>
    </tdml:errors>
  </tdml:parserTestCase>
  
  <!--
    Test name: hexBinary_01
    Schema: SimpleTypes-binary
    Purpose: This document demonstrates the use of the hexBinary simple type 
  -->

  <tdml:parserTestCase name="hexBinary_01" root="hb_01"
      model="SimpleTypes-binary" description="Section 5 Simple Types - hexBinary - DFDL-5-025R">
    <tdml:document>
      <tdml:documentPart type="byte"><![CDATA[a1b1c1d1]]></tdml:documentPart>
    </tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <hb_01>a1b1c1d1</hb_01>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>
  
  <tdml:defineSchema name="SimpleTypes-padding">
    <dfdl:format ref="ex:daffodilTest1" representation="text"
      lengthUnits="characters" encoding="utf-8" byteOrder="bigEndian" 
      textStringPadCharacter="X" textStringJustification="left" textTrimKind="padChar"
      textNumberJustification="left" textNumberPadCharacter="#" />

    <xs:element name="string" dfdl:lengthKind="explicit" dfdl:length="29" type="xs:string" />
    <xs:element name="string2" dfdl:lengthKind="delimited" type="xs:string" />

    <xs:element name="string3" dfdl:textStringPadCharacter="%NAK;" dfdl:lengthKind="delimited" type="xs:string" />
    <xs:element name="string4" dfdl:textStringPadCharacter="%HT;" dfdl:lengthKind="delimited" type="xs:string" />
    
    <xs:element name="string5">
      <xs:complexType>
        <xs:sequence dfdl:separator="/">
          <xs:element name="first" type="padded" />
          <xs:element name="second" type="xs:string" dfdl:textStringPadCharacter="_" dfdl:textStringJustification="center" dfdl:lengthKind="delimited" />
        </xs:sequence>
      </xs:complexType>
    </xs:element>
    
    <xs:element name="string6">
      <xs:complexType>
        <xs:sequence dfdl:separator="-">
          <xs:element name="first" type="padded2" />
          <xs:element name="second" type="xs:string" dfdl:textStringPadCharacter="_" dfdl:textStringJustification="left" dfdl:lengthKind="delimited" />
        </xs:sequence>
      </xs:complexType>
    </xs:element>
    
    <xs:simpleType name="padded" dfdl:textStringJustification="center" dfdl:textStringPadCharacter="-" dfdl:lengthKind="delimited">
      <xs:restriction base="xs:string" />
    </xs:simpleType>
    
    <xs:simpleType name="padded2" dfdl:textStringJustification="right" dfdl:textStringPadCharacter="_" dfdl:lengthKind="delimited">
      <xs:restriction base="xs:string" />
    </xs:simpleType>

    <xs:element name="string7" dfdl:lengthUnits="bytes" dfdl:textStringPadCharacter="%HT;%CR;" dfdl:lengthKind="delimited" type="xs:string" />
    <xs:element name="string8" dfdl:lengthUnits="characters" dfdl:textStringPadCharacter="o0" dfdl:lengthKind="delimited" type="xs:string" />
    
    <xs:element name="string9" dfdl:textTrimKind="none" dfdl:lengthKind="delimited" type="xs:string" />
    
    <xs:element name="int1" dfdl:lengthKind="explicit" dfdl:length="7" type="xs:int" />
    <xs:element name="int2" dfdl:lengthKind="delimited" type="xs:int" />
    
    <xs:element name="intseq">
      <xs:complexType>
        <xs:sequence dfdl:separator=".">
          <xs:element name="int3" type="xs:int" dfdl:textNumberPadCharacter="=" dfdl:textNumberJustification="left" dfdl:lengthKind="delimited" />
          <xs:element name="int4" type="xs:int" dfdl:textNumberPadCharacter="-" dfdl:textNumberJustification="left" dfdl:lengthKind="delimited" />
        </xs:sequence>
      </xs:complexType>
    </xs:element>
    
    <xs:element name="numseq">
      <xs:complexType>
        <xs:sequence dfdl:separator="~">
          <xs:element name="one" type="xs:int" dfdl:textNumberPadCharacter="." dfdl:textNumberJustification="right" dfdl:lengthKind="delimited" />
          <xs:element name="two" type="xs:unsignedShort" dfdl:textNumberPadCharacter="-" dfdl:textNumberJustification="center" dfdl:lengthKind="delimited" />
          <xs:element name="three" type="xs:float" dfdl:textNumberPadCharacter="." dfdl:textNumberJustification="left" dfdl:lengthKind="delimited" />
        </xs:sequence>
      </xs:complexType>
    </xs:element>
    
    <xs:simpleType name="int5" dfdl:textNumberJustification="right" dfdl:textNumberPadCharacter="_" dfdl:lengthKind="delimited">
      <xs:restriction base="xs:int" />
    </xs:simpleType>
    
    <xs:element name="int6" type="int5" />
    
    <dfdl:defineEscapeScheme name="table1">
      <dfdl:escapeScheme escapeCharacter='/'
        escapeKind="escapeCharacter" escapeEscapeCharacter="["/>
    </dfdl:defineEscapeScheme>
        
    <xs:element name="string10" type="xs:string" dfdl:lengthKind="delimited" dfdl:textStringJustification="center"
      dfdl:textStringPadCharacter="\" dfdl:escapeSchemeRef="ex:table1" />
          
    <xs:element name="nil" nillable="true" dfdl:nilKind="literalValue" dfdl:nilValue="o" type="xs:string" dfdl:lengthKind="explicit" dfdl:length="7"
      dfdl:textStringPadCharacter="/" dfdl:textStringJustification="center" />
    
    <xs:element name="nil2" nillable="true" dfdl:nilKind="literalValue" dfdl:nilValue="o" type="xs:string" dfdl:lengthKind="delimited"
      dfdl:textStringPadCharacter="/" dfdl:textStringJustification="center" />
    
    <xs:element name="seq">
      <xs:complexType>
        <xs:sequence dfdl:separator=".">
          <xs:element name="string11" dfdl:textTrimKind="padChar" dfdl:textStringJustification="left" dfdl:textStringPadCharacter="o"
            dfdl:lengthKind="delimited" type="xs:string" />
          <xs:element name="string12" dfdl:textTrimKind="padChar" dfdl:textStringJustification="right" dfdl:textStringPadCharacter="o"
            dfdl:lengthKind="delimited" type="xs:string" />
          <xs:element name="string13" dfdl:textTrimKind="padChar" dfdl:textStringJustification="center" dfdl:textStringPadCharacter="o"
            dfdl:lengthKind="delimited" type="xs:string" />
        </xs:sequence>
      </xs:complexType>
    </xs:element>    

  </tdml:defineSchema>
  
  <!--
    Test name: literalChar_padding
    Schema: SimpleTypes-padding
    Purpose: This document demonstrates the use of a string literal for a text string pad character
  -->

  <tdml:parserTestCase name="literalChar_padding" root="string"
      model="SimpleTypes-padding" description="Section 13 Simple Types - textStringPadCharacter DFDL-13-042R">
    <tdml:document>
      <tdml:documentPart type="text"><![CDATA[remove padding pleaseXXXXXXXX]]></tdml:documentPart>
    </tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <string>remove padding please</string>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>
  
  <!--
    Test name: literalChar_padding2
    Schema: SimpleTypes-padding
    Purpose: This document demonstrates the use of a string literal for a text string pad character
  -->

  <tdml:parserTestCase name="literalChar_padding2" root="string2"
      model="SimpleTypes-padding" description="Section 13 Simple Types - textStringPadCharacter DFDL-13-042R">
    <tdml:document>
      <tdml:documentPart type="text"><![CDATA[remove padding pleaseXXXXXXXX]]></tdml:documentPart>
    </tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <string2>remove padding please</string2>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>
  
  <!--
    Test name: charEntity_padding1
    Schema: SimpleTypes-padding
    Purpose: This document demonstrates the use of a character entity for a text string pad character
  -->

  <tdml:parserTestCase name="charEntity_padding1" root="string3"
      model="SimpleTypes-padding" description="Section 13 Simple Types - textStringPadCharacter DFDL-13-042R">
    <tdml:document>
      <tdml:documentPart type="byte"><![CDATA[72 65 6D 6F 76 65 20 70 61 64 64 69 6E 67 20 70 6C 65 61 73 65 15 15 15 15 15]]></tdml:documentPart>
    </tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <string3>remove padding please</string3>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>
  
  <!--
    Test name: charEntity_padding2
    Schema: SimpleTypes-padding
    Purpose: This document demonstrates the use of a character entity for a text string pad character
  -->

  <tdml:parserTestCase name="charEntity_padding2" root="string4"
      model="SimpleTypes-padding" description="Section 13 Simple Types - textStringPadCharacter DFDL-13-042R">
    <tdml:document>
      <tdml:documentPart type="byte"><![CDATA[72 65 6D 6F 76 65 20 70 61 64 64 69 6E 67 20 70 6C 65 61 73 65 09 09 09 09]]></tdml:documentPart>
    </tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <string4>remove padding please</string4>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>
  
  <!--
    Test name: charEntity_padding3
    Schema: SimpleTypes-padding
    Purpose: This document demonstrates that it is a schema definition error if more than one byte value entity
             is specified for the textStringPadCharacter when lengthUnits="bytes"

  -->

  <tdml:parserTestCase name="charEntity_padding3" root="string7"
      model="SimpleTypes-padding" description="Section 13 Simple Types - textStringPadCharacter DFDL-13-042R">
    <tdml:document>
      <tdml:documentPart type="byte"><![CDATA[72 65 6D 6F 76 65 20 70 61 64 64 69 6E 67 20 70 6C 65 61 73 65 09 0D 09 0D]]></tdml:documentPart>
    </tdml:document>
      <tdml:errors>
        <tdml:error>Schema Definition Error</tdml:error>
        <tdml:error>Length of string must be exactly 1 character</tdml:error>
      </tdml:errors>
  </tdml:parserTestCase>
  
  <!--
    Test name: literalChar_padding3
    Schema: SimpleTypes-padding
    Purpose: This document demonstrates the use of a string literal for a text string pad character
        within a simpleType contained in a sequence (center justified)
  -->

  <tdml:parserTestCase name="literalChar_padding3" root="string5"
      model="SimpleTypes-padding" description="Section 13 Simple Types - textStringPadCharacter DFDL-13-042R">
    <tdml:document>
      <tdml:documentPart type="text"><![CDATA[---------first---------/________second________]]></tdml:documentPart>
    </tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <string5>
          <first>first</first>
          <second>second</second>
        </string5>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>
  
  <!--
    Test name: literalChar_padding4
    Schema: SimpleTypes-padding
    Purpose: This document demonstrates the use of a string literal for a text string pad character
        within a simpleType contained in a sequence (left and right justified)
  -->

  <tdml:parserTestCase name="literalChar_padding4" root="string6"
      model="SimpleTypes-padding" description="Section 13 Simple Types - textStringPadCharacter DFDL-13-042R">
    <tdml:document>
      <tdml:documentPart type="text"><![CDATA[_______________first-second________]]></tdml:documentPart>
    </tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <string6>
          <first>first</first>
          <second>second</second>
        </string6>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>
  
  <!--
    Test name: literalChar_padding5
    Schema: SimpleTypes-padding
    Purpose: This document demonstrates the use of a string literal for a text string pad character
        within a simpleType contained in a sequence (left and right justified)
  -->

  <tdml:parserTestCase name="literalChar_padding5" root="string8"
      model="SimpleTypes-padding" description="Section 13 Simple Types - textStringPadCharacter DFDL-13-042R">
    <tdml:document>
      <tdml:documentPart type="text"><![CDATA[stringo0o0o0o0o0o0]]></tdml:documentPart>
    </tdml:document>
    <tdml:errors>
      <tdml:error>Schema Definition Error</tdml:error>
      <tdml:error>Length of string must be exactly 1 character</tdml:error>
    </tdml:errors>
  </tdml:parserTestCase>
  
  <!--
    Test name: literalChar_padding6
    Schema: SimpleTypes-padding
    Purpose: This document demonstrates the use of textTrimKind = none to prevent trimming
  -->

  <tdml:parserTestCase name="literalChar_padding6" root="string9"
      model="SimpleTypes-padding" description="Section 13 Simple Types - textStringPadCharacter DFDL-13-042R">
    <tdml:document>
      <tdml:documentPart type="text"><![CDATA[remove padding pleaseXXXXXXXX]]></tdml:documentPart>
    </tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <string9>remove padding pleaseXXXXXXXX</string9>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>
  
  <!--
    Test name: number_padding
    Schema: SimpleTypes-padding
    Purpose: This document demonstrates the use of padding with numbers
  -->

  <tdml:parserTestCase name="number_padding" root="int1"
      model="SimpleTypes-padding" description="Section 13 Simple Types - textNumberPadCharacter DFDL-13-047R">
    <tdml:document>
      <tdml:documentPart type="text"><![CDATA[12345##]]></tdml:documentPart>
    </tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <int1>12345</int1>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>
  
  <!--
    Test name: number_padding2
    Schema: SimpleTypes-padding
    Purpose: This document demonstrates the use of padding with numbers
  -->

  <tdml:parserTestCase name="number_padding2" root="int2"
      model="SimpleTypes-padding" description="Section 13 Simple Types - textNumberPadCharacter DFDL-13-047R">
    <tdml:document>
      <tdml:documentPart type="text"><![CDATA[12345############################]]></tdml:documentPart>
    </tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <int2>12345</int2>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>
  
  <!--
    Test name: number_padding3
    Schema: SimpleTypes-padding
    Purpose: This document demonstrates the use of padding with numbers
  -->

  <tdml:parserTestCase name="number_padding3" root="intseq"
      model="SimpleTypes-padding" description="Section 13 Simple Types - textNumberPadCharacter DFDL-13-047R">
    <tdml:document>
      <tdml:documentPart type="text"><![CDATA[123====.456-----]]></tdml:documentPart>
    </tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <intseq>
          <int3>123</int3>
          <int4>456</int4>
        </intseq>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>
  
  <!--
    Test name: number_padding4
    Schema: SimpleTypes-padding
    Purpose: This document demonstrates the use of padding with multiple number types and justifications
  -->

  <tdml:parserTestCase name="number_padding4" root="numseq"
      model="SimpleTypes-padding" description="Section 13 Simple Types - textNumberPadCharacter DFDL-13-047R">
    <tdml:document>
      <tdml:documentPart type="text"><![CDATA[......55~-----6800-----~49.......]]></tdml:documentPart>
    </tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <numseq>
          <one>55</one>
          <two>6800</two>
          <three>49.0</three>
        </numseq>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>
  
  <!--
    Test name: number_padding5
    Schema: SimpleTypes-padding
    Purpose: This document demonstrates the use of padding with numbers
  -->

  <tdml:parserTestCase name="number_padding5" root="int6"
      model="SimpleTypes-padding" description="Section 13 Simple Types - textNumberPadCharacter DFDL-13-047R">
    <tdml:document>
      <tdml:documentPart type="text"><![CDATA[______5]]></tdml:documentPart>
    </tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
          <int6>5</int6>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>
  
  <!--
    Test name: padding_escape
    Schema: SimpleTypes-padding
    Purpose: This document demonstrates the use of padding with escape characters
  -->

  <tdml:parserTestCase name="padding_escape" root="string10"
      model="SimpleTypes-padding" description="Section 7 - On parsing, the escape scheme is applied after padding characters are trimmed DFDL-7-089R">
    <tdml:document>
      <tdml:documentPart type="text">\\\word/\\\</tdml:documentPart>
    </tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
          <string10>word</string10>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

  <!--
    Test name: padding_nil
    Schema: SimpleTypes-padding
    Purpose: This document demonstrates the use of padding with nils
  -->

  <tdml:parserTestCase name="padding_nil" root="nil"
      model="SimpleTypes-padding" description="Spec errata - On parsing the element value is nil if
      the trimmed data matches one of the literal strings in the list">
    <tdml:document>
      <tdml:documentPart type="text">///o///</tdml:documentPart>
    </tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
          <nil xsi:nil="true"></nil>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>
  
  <!--
    Test name: padding_nil2
    Schema: SimpleTypes-padding
    Purpose: This document demonstrates the use of padding with nils
  -->

  <tdml:parserTestCase name="padding_nil2" root="nil2"
      model="SimpleTypes-padding" description="Spec errata - On parsing the element value is nil if
      the trimmed data matches one of the literal strings in the list">
    <tdml:document>
      <tdml:documentPart type="text">///o///</tdml:documentPart>
    </tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
          <nil2 xsi:nil="true"></nil2>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>
  
  <!--
    Test name: justification_1
    Schema: SimpleTypes-padding
    Purpose: This document demonstrates how padding is trimmed when a pad character is found within the string
  -->

  <tdml:parserTestCase name="justification_1" root="seq"
      model="SimpleTypes-padding" description="Section 5 - Simple Types - textStringJustification DFDL-13-041R">
    <tdml:document>
      <tdml:documentPart type="text">oregano.oregano.oregano</tdml:documentPart>
    </tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <seq>
          <string11>oregan</string11>
          <string12>regano</string12>
          <string13>regan</string13>
        </seq>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>
  
  <tdml:defineSchema name="dateTimeSchema">
    <dfdl:format ref="daffodilTest1" />

<!--
     xs:date      yyyy-MM-dd
     xs:dateTime  yyyy-MM-dd'T'HH:mm:ss
     xs:time      HH:mm:ssZZZ
-->
	
    <xs:element name="dateImp" type="xs:date" dfdl:calendarPatternKind="implicit" dfdl:lengthKind="explicit" dfdl:length="10" />
    <xs:element name="date01" type="xs:date" dfdl:calendarPatternKind="explicit" dfdl:calendarPattern="'Today is the 'dd'th day of 'MMM', year 'yyyy"
                dfdl:lengthKind="explicit" dfdl:length="43" />
    <xs:element name="date01b" type="xs:date" dfdl:calendarPatternKind="explicit" dfdl:calendarPattern="'Today is the 'dd'th day of 'MMM', year 'YYYY"
                dfdl:lengthKind="explicit" dfdl:length="43" />
    <xs:element name="date02" type="xs:date" dfdl:calendarCheckPolicy="lax" dfdl:calendarPatternKind="implicit" dfdl:lengthKind="explicit" dfdl:length="10" />
    <xs:element name="date03" type="xs:date" dfdl:calendarCheckPolicy="lax" dfdl:calendarPatternKind="implicit" dfdl:lengthKind="explicit" dfdl:length="11" />
    <xs:element name="date04" type="xs:date" dfdl:calendarCheckPolicy="strict" dfdl:calendarPatternKind="implicit" dfdl:lengthKind="explicit" dfdl:length="10" />
    <xs:element name="date05" type="xs:date" dfdl:calendarCheckPolicy="lax" dfdl:calendarPatternKind="explicit"
                dfdl:calendarPattern="'day 'e' of the week, month 'MM' year 'yyyy" 
                dfdl:calendarFirstDayOfWeek="Monday" dfdl:lengthKind="delimited" />
    <xs:element name="date06" type="xs:date" dfdl:calendarCheckPolicy="lax" dfdl:calendarPatternKind="explicit"
                dfdl:calendarPattern="'day 'e' of the week, month 'MM' year 'yyyy" 
                dfdl:calendarFirstDayOfWeek="Sunday" dfdl:lengthKind="delimited" />
    <xs:element name="date07" type="xs:date" dfdl:calendarCheckPolicy="lax" dfdl:calendarPatternKind="explicit"
                dfdl:calendarPattern="EEEE', 'MM yyyy" dfdl:lengthKind="delimited" />
    <xs:element name="date08" type="xs:date" dfdl:calendarCheckPolicy="lax" dfdl:calendarPatternKind="explicit"
                dfdl:calendarPattern="...MM...dd...yyyy" dfdl:lengthKind="delimited" />
    <xs:element name="date09" type="xs:date" dfdl:calendarCheckPolicy="lax" dfdl:calendarPatternKind="implicit" dfdl:textTrimKind="padChar"
                dfdl:textCalendarJustification="center" dfdl:textCalendarPadCharacter="." dfdl:lengthKind="delimited" />
    <xs:element name="date10" type="xs:date" dfdl:calendarCheckPolicy="lax" dfdl:calendarPatternKind="implicit" dfdl:textTrimKind="padChar"
                dfdl:textCalendarJustification="left" dfdl:textCalendarPadCharacter="x" dfdl:lengthKind="delimited" />
    <xs:element name="date11" type="xs:date" dfdl:calendarCheckPolicy="lax" dfdl:calendarPatternKind="implicit" dfdl:textTrimKind="padChar"
                dfdl:textCalendarJustification="right" dfdl:textCalendarPadCharacter="d" dfdl:lengthKind="delimited" />

    <xs:element name="date12" type="ex:explicDate" dfdl:calendarPattern="dd MM yyyy, HH:mm:ss"/>
    <xs:element name="date13" type="ex:explicDate" dfdl:calendarPattern="MM-dd-yyyy G"/>
    <xs:element name="date14" type="ex:explicDate" dfdl:calendarPattern="Q yyyy"/>
    <xs:element name="date15" type="ex:explicDate" dfdl:calendarPattern="D yyyy"/>
    <xs:element name="date16" type="ex:explicDate" dfdl:calendarPattern="F MM yyyy"/>
    <xs:element name="date17" type="ex:explicDate7" dfdl:calendarPattern="w yyyy"/>
    <xs:element name="date18" type="ex:explicDate" dfdl:calendarPattern="w yyyy" dfdl:calendarDaysInFirstWeek="5"/>
    <xs:element name="date19" type="ex:explicDate7" dfdl:calendarPattern="W MM yyyy"/>
    <xs:element name="date20" type="ex:explicDate" dfdl:calendarPattern="W MM yyyy" dfdl:calendarDaysInFirstWeek="2"/>

    <xs:element name="date21">
      <xs:complexType>
           <xs:choice>
             <xs:element name="superfull" type="ex:explicDate" dfdl:calendarPattern="'It is day 'dd' of 'MMM, yyyy" />
             <xs:element name="short" type="ex:explicDate" dfdl:calendarPattern="MM-dd-yyyy"/>
             <xs:element name="full" type="ex:explicDate" dfdl:calendarPattern="MMM dd, yyyy"/>
           </xs:choice>
      </xs:complexType>
    </xs:element>
    
    <xs:element name="date22" type="ex:explicDate" dfdl:calendarPattern="MM dd yy" dfdl:calendarCenturyStart="20"/>
    <xs:element name="date23" type="ex:explicDate" dfdl:calendarPattern="MM dd yy" dfdl:calendarCenturyStart="48"/>
    
    <xs:element name="date24" type="ex:explicDate" dfdl:encoding="UTF-8" dfdl:calendarPattern="EEEE MMM yyyy" dfdl:calendarLanguage="de-1996"/>
    <xs:element name="date25" type="ex:explicDate" dfdl:calendarPattern="EEEE MMM yyyy" dfdl:calendarLanguage="es-MX"/>
    <xs:element name="date26" type="ex:explicDate" dfdl:calendarPattern="EEEE MMM yyyy" dfdl:calendarLanguage="en-GB"/>
    
    <xs:element name="date27" type="ex:explicDate" dfdl:calendarPattern="yyyy"/>
    <xs:element name="date28" type="ex:explicDate" dfdl:calendarPattern=""/>
    <xs:element name="date29" type="ex:explicDate" dfdl:calendarPattern="MM"/>

    <xs:element name="date30" type="ex:explicDate" dfdl:calendarPattern="dd...00MM.....yyyy*()*()*()"/>

    <xs:element name="date31" type="ex:explicDate" dfdl:calendarPattern="dd MM yyyy, mm:ss"/>
    
    <xs:simpleType name="explicDate" dfdl:calendarPatternKind="explicit" dfdl:lengthKind="delimited">
      <xs:restriction base="xs:date"/>
    </xs:simpleType>
    
    <xs:simpleType name="explicDate7" dfdl:calendarDaysInFirstWeek="7">
      <xs:restriction base="ex:explicDate"/>
    </xs:simpleType>

    <xs:element name="timeImp" type="xs:time" dfdl:calendarPatternKind="implicit" dfdl:lengthKind="explicit" dfdl:length="11" />
    <xs:element name="time01" type="xs:time" dfdl:calendarCheckPolicy="lax" dfdl:calendarPatternKind="implicit" dfdl:lengthKind="explicit" dfdl:length="11" />
    <xs:element name="time02" type="xs:time" dfdl:calendarCheckPolicy="strict" dfdl:calendarPatternKind="implicit" dfdl:lengthKind="explicit" dfdl:length="11" />
    <xs:element name="time03" type="xs:time" dfdl:calendarCheckPolicy="strict" dfdl:calendarPatternKind="explicit"
                dfdl:calendarPattern="hh:mm:ss.SSSS" dfdl:lengthKind="delimited"/>
    <xs:element name="time04" type="xs:time" dfdl:calendarCheckPolicy="strict" dfdl:calendarPatternKind="explicit" dfdl:calendarPattern="hh:mm.zzz" dfdl:lengthKind="delimited"/>
    <xs:element name="time04b" type="xs:time" dfdl:calendarCheckPolicy="strict" dfdl:calendarPatternKind="explicit" dfdl:calendarPattern="hh:mm.zzzz" dfdl:lengthKind="delimited"/>
    <xs:element name="time05" type="xs:time" dfdl:calendarCheckPolicy="strict" dfdl:calendarPatternKind="explicit" dfdl:calendarPattern="hh:mm.v" dfdl:lengthKind="delimited"/>
    <xs:element name="time05b" type="xs:time" dfdl:calendarCheckPolicy="strict" dfdl:calendarPatternKind="explicit" dfdl:calendarPattern="hh:mm.vvvv" dfdl:lengthKind="delimited"/>
    <xs:element name="time06" type="xs:time" dfdl:calendarCheckPolicy="strict" dfdl:calendarPatternKind="explicit" dfdl:calendarPattern="hh:mm.VVVV" dfdl:lengthKind="delimited"/>
    <xs:element name="time07" type="xs:time" dfdl:calendarCheckPolicy="strict" dfdl:calendarPatternKind="explicit" dfdl:calendarPattern="hh:mm.V" dfdl:lengthKind="delimited"/>

    <xs:element name="time08" type="xs:time" dfdl:calendarCheckPolicy="strict" dfdl:calendarPatternKind="explicit" dfdl:calendarPattern="hh:mm:ss" dfdl:lengthKind="delimited" dfdl:calendarTimeZone="UTC+1"/>
    <xs:element name="time09" type="xs:time" dfdl:calendarCheckPolicy="strict" dfdl:calendarPatternKind="explicit" dfdl:calendarPattern="hh:mm:ss" dfdl:lengthKind="delimited" dfdl:calendarTimeZone="UTC+1:30"/>
    <xs:element name="time10" type="xs:time" dfdl:calendarCheckPolicy="strict" dfdl:calendarPatternKind="implicit" dfdl:textTrimKind="padChar"
                dfdl:textCalendarJustification="center" dfdl:textCalendarPadCharacter="." dfdl:lengthKind="delimited" />
    <xs:element name="time11" type="xs:time" dfdl:calendarCheckPolicy="strict" dfdl:calendarPatternKind="implicit" dfdl:textTrimKind="padChar"
                dfdl:textCalendarJustification="right" dfdl:textCalendarPadCharacter=":" dfdl:lengthKind="delimited" />
    <xs:element name="time12" type="xs:time" dfdl:calendarCheckPolicy="strict" dfdl:calendarPatternKind="explicit" dfdl:calendarPattern="hh:mm:ss.SSS" dfdl:lengthKind="delimited"/>
    <xs:element name="time13" type="xs:time" dfdl:calendarCheckPolicy="strict" dfdl:calendarPatternKind="explicit" dfdl:calendarPattern="hh:mm:ss.SSSSSS" dfdl:lengthKind="delimited"/>
    <xs:element name="time14" type="xs:time" dfdl:calendarCheckPolicy="strict" dfdl:calendarPatternKind="explicit" dfdl:calendarPattern="hh:mm:ss.SSSSSSSSSSSSSSSSSSSSS" dfdl:lengthKind="delimited"/>
    <xs:element name="time15" type="xs:time" dfdl:calendarCheckPolicy="strict" dfdl:calendarPatternKind="explicit" dfdl:calendarPattern="hh:mm:ss.SSSSSSSSSSSSSSSSSSSSSS" dfdl:lengthKind="delimited"/>
    <xs:element name="time16" type="xs:time" dfdl:calendarCheckPolicy="strict" dfdl:calendarPatternKind="explicit" dfdl:calendarPattern="HH:mm" dfdl:lengthKind="delimited"/>
    <xs:element name="time17" type="xs:time" dfdl:calendarCheckPolicy="strict" dfdl:calendarPatternKind="explicit" dfdl:calendarPattern="HH:mmaa" dfdl:lengthKind="delimited"/>
    <xs:element name="time17b" type="xs:time" dfdl:calendarCheckPolicy="strict" dfdl:calendarPatternKind="explicit" dfdl:calendarPattern="hh:mmaa" dfdl:lengthKind="delimited"/>
    <xs:element name="time18" type="xs:time" dfdl:calendarCheckPolicy="strict" dfdl:calendarPatternKind="explicit" dfdl:calendarPattern="KK:mmaa" dfdl:lengthKind="delimited"/>
    <xs:element name="time19" type="xs:time" dfdl:calendarCheckPolicy="strict" dfdl:calendarPatternKind="explicit" dfdl:calendarPattern="kk:mm" dfdl:lengthKind="delimited"/>
    <xs:element name="time20" type="xs:time" dfdl:calendarCheckPolicy="strict" dfdl:calendarPatternKind="explicit" dfdl:calendarPattern='hh@mm$%^&amp;*()s' dfdl:lengthKind="delimited"/>
    <xs:element name="time21" type="xs:time" dfdl:calendarCheckPolicy="strict" dfdl:calendarPatternKind="explicit" dfdl:calendarPattern="hh@mm$%^!@#.,/.''}{}{*()s" dfdl:lengthKind="delimited"/>
    <xs:element name="time22" type="xs:time" dfdl:calendarCheckPolicy="strict" dfdl:calendarPatternKind="explicit" dfdl:calendarPattern="mm" dfdl:lengthKind="delimited"/>
    <xs:element name="time23" type="xs:time" dfdl:calendarCheckPolicy="strict" dfdl:calendarPatternKind="explicit" dfdl:calendarPattern="" dfdl:lengthKind="delimited"/>
    <xs:element name="time24" type="xs:time" dfdl:calendarCheckPolicy="strict" dfdl:calendarPatternKind="explicit" dfdl:calendarPattern="." dfdl:lengthKind="delimited"/>
    <xs:element name="time25" type="xs:time" dfdl:calendarCheckPolicy="strict" dfdl:calendarPatternKind="explicit" dfdl:calendarPattern="yyyy-dd hh:mm" dfdl:lengthKind="delimited"/>
    <xs:element name="time26" type="xs:time" dfdl:calendarCheckPolicy="strict" dfdl:calendarPatternKind="explicit" dfdl:calendarPattern="bb hh:mm" dfdl:lengthKind="delimited"/>

    <xs:element name="dateTimeImp" type="xs:dateTime" dfdl:calendarPatternKind="implicit" dfdl:lengthKind="delimited" />
    <xs:element name="dateTime01" type="xs:dateTime" dfdl:calendarPatternKind="explicit" dfdl:calendarPattern="'It is 'hh:mmaa' on the 'dd'st of 'MMM', year 'yyyy"
                dfdl:lengthKind="explicit" dfdl:length="44" />
    <xs:element name="dateTime02" type="xs:dateTime" dfdl:calendarCheckPolicy="lax" dfdl:calendarPatternKind="implicit" dfdl:lengthKind="explicit" dfdl:length="19" />
    <xs:element name="dateTime03" type="xs:dateTime" dfdl:calendarCheckPolicy="lax" dfdl:calendarPatternKind="explicit" dfdl:lengthKind="delimited"
        dfdl:calendarPattern="'Twas a sunny 'EEEE' at 'hh' O''clock. The year was 'yyyy', and it was the hottest 'MMM' we had ever experienced.'" />
    <xs:element name="dateTime04" type="xs:dateTime" dfdl:calendarCheckPolicy="lax" dfdl:calendarPatternKind="explicit" dfdl:lengthKind="delimited"
        dfdl:calendarPattern="HH:mm:ss MMM-dd-yyyy" />
    <xs:element name="dateTime05" type="xs:dateTime" dfdl:calendarPatternKind="explicit" dfdl:lengthKind="delimited" dfdl:calendarPattern="W MM yyyy" 
        dfdl:calendarFirstDayOfWeek="Tuesday" dfdl:calendarDaysInFirstWeek="5"/>
    <xs:element name="dateTime06" type="xs:dateTime" dfdl:calendarPatternKind="explicit" dfdl:lengthKind="delimited" dfdl:calendarPattern="W MM yyyy" 
        dfdl:calendarFirstDayOfWeek="Thursday" dfdl:calendarDaysInFirstWeek="7"/>
    <xs:element name="dateTime07" type="xs:dateTime" dfdl:calendarPatternKind="explicit" dfdl:lengthKind="delimited" dfdl:calendarPattern="W MM yyyy" 
        dfdl:calendarFirstDayOfWeek="Thursday" dfdl:calendarDaysInFirstWeek="2"/>
    <xs:element name="dateTime08" type="xs:dateTime" dfdl:calendarPatternKind="explicit" dfdl:lengthKind="delimited" dfdl:calendarPattern="W MM yyyy hh:mm:ssaa" 
        dfdl:calendarFirstDayOfWeek="Sunday" dfdl:calendarDaysInFirstWeek="7"/>
    <xs:element name="dateTime09" type="xs:dateTime" dfdl:calendarCheckPolicy="strict" dfdl:calendarPatternKind="explicit" dfdl:textTrimKind="padChar"
                dfdl:textCalendarJustification="center" dfdl:textCalendarPadCharacter="." dfdl:lengthKind="delimited" dfdl:calendarPattern="MM.dd.yyyy hh:mm:ssaa"/>
    <xs:element name="dateTime10" type="xs:dateTime" dfdl:calendarCheckPolicy="strict" dfdl:calendarPatternKind="explicit" dfdl:textTrimKind="padChar"
                dfdl:textCalendarJustification="left" dfdl:textCalendarPadCharacter=":" dfdl:lengthKind="delimited" dfdl:calendarPattern="MM.dd.yyyy hh:mm:ssaa"/>
    <xs:element name="dateTime11" type="xs:dateTime" dfdl:calendarCheckPolicy="strict" dfdl:calendarPatternKind="explicit" dfdl:textTrimKind="padChar"
                dfdl:textCalendarJustification="center" dfdl:textCalendarPadCharacter="%HT;" dfdl:lengthKind="delimited" dfdl:calendarPattern="MM.dd.yyyy hh:mm:ssaa"/>
    <xs:element name="dateTime12" type="xs:dateTime" dfdl:calendarCheckPolicy="lax" dfdl:calendarPatternKind="explicit" dfdl:textTrimKind="padChar"
                dfdl:textCalendarJustification="right" dfdl:textCalendarPadCharacter="%HT;" dfdl:lengthKind="delimited" dfdl:calendarPattern="MM.dd.yyyy hh:mm:ssaa"/>

  </tdml:defineSchema>

<!--
     Test Name: dateImplicitPattern
        Schema: dateTimeSchema
          Root: dateImp
       Purpose: This test demonstrates the date data type with the implicit calendar Pattern.
                The data matches this pattern and should be parsed correctly.
-->
  
  <tdml:parserTestCase name="dateImplicitPattern" root="dateImp"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarPatternKind - DFDL-13-138R">

    <tdml:document><![CDATA[1995-03-24]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <dateImp>1995-03-24</dateImp>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: dateImplicitPatternFail
        Schema: dateTimeSchema
          Root: dateImp
       Purpose: This test demonstrates the date data type with the implicit calendar Pattern.
                The data does NOT match this pattern and should fail parsing.
-->
  
  <tdml:parserTestCase name="dateImplicitPatternFail" root="dateImp"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarPatternKind - DFDL-13-138R">

    <tdml:document><![CDATA[1998-3-Mar]]></tdml:document>
    <tdml:errors>
      <tdml:error>Parse Error:</tdml:error>
      <tdml:error>Convert to Date (for xs:date)</tdml:error>
      <tdml:error>Failed to parse '1998-3-Mar'</tdml:error>
    </tdml:errors>
  </tdml:parserTestCase>

<!--
     Test Name: timeImplicitPattern
        Schema: dateTimeSchema
          Root: timeImp
       Purpose: This test demonstrates the time data type with the implicit calendar Pattern.
                The data matches this pattern and should be parsed correctly.
-->
  
  <tdml:parserTestCase name="timeImplicitPattern" root="timeImp"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarPatternKind - DFDL-13-138R">

    <tdml:document><![CDATA[12:43:20GMT]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <timeImp>12:43:20Z</timeImp>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: timeImplicitPatternFail
        Schema: dateTimeSchema
          Root: timeImp
       Purpose: This test demonstrates the time data type with the implicit calendar Pattern.
                The data does NOT match this pattern and should fail parsing.
-->
  
  <tdml:parserTestCase name="timeImplicitPatternFail" root="timeImp"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarPatternKind - DFDL-13-138R">

    <tdml:document><![CDATA[12:43.45 PM]]></tdml:document>
    <tdml:errors>
      <tdml:error>Parse Error:</tdml:error>
      <tdml:error>Convert to Time (for xs:time)</tdml:error>
      <tdml:error>Failed to parse '12:43.45 PM'</tdml:error>
    </tdml:errors>
  </tdml:parserTestCase>

<!--
     Test Name: dateTimeImplicitPattern
        Schema: dateTimeSchema
          Root: dateTimeImp
       Purpose: This test demonstrates the dateTime data type with the implicit calendar Pattern.
                The data matches this pattern and should be parsed correctly.
-->
  
  <tdml:parserTestCase name="dateTimeImplicitPattern" root="dateTimeImp"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarPatternKind - DFDL-13-138R">

    <tdml:document><![CDATA[2013-03-24T03:45:30]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <dateTimeImp>2013-03-24T03:45:30Z</dateTimeImp>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>


<!--
     Test Name: dateTimeImplicitPatternFail
        Schema: dateTimeSchema
          Root: dateTimeImp
       Purpose: This test demonstrates the dateTime data type with the implicit calendar Pattern.
                The data does NOT match this pattern and should fail parsing.
-->
  
  <tdml:parserTestCase name="dateTimeImplicitPatternFail" root="dateTimeImp"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarPatternKind - DFDL-13-138R">

    <tdml:document><![CDATA[2013.03.24 03:45:30]]></tdml:document>
    <tdml:errors>
      <tdml:error>Parse Error:</tdml:error>
      <tdml:error>Convert to DateTime (for xs:dateTime)</tdml:error>
      <tdml:error>Failed to parse '2013.03.24 03:45:30'</tdml:error>
    </tdml:errors>
  </tdml:parserTestCase>

<!--
     Test Name: dateTimeImplicitPatternFail2
        Schema: dateTimeSchema
          Root: dateTimeImp
       Purpose: This test demonstrates the dateTime data type with the implicit calendar Pattern.
                The data does NOT match this pattern and should fail parsing.
-->
  
  <tdml:parserTestCase name="dateTimeImplicitPatternFail2" root="dateTimeImp"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarPatternKind - DFDL-13-138R">

    <tdml:document><![CDATA[2013-03-24T03:45:30-00:00]]></tdml:document>
    <tdml:errors>
      <tdml:error>Parse Error:</tdml:error>
      <tdml:error>Convert to DateTime (for xs:dateTime)</tdml:error>
    </tdml:errors>
  </tdml:parserTestCase>

<!--
     Test Name: dateTimeImplicitPatternFail3
        Schema: dateTimeSchema
          Root: dateTimeImp
       Purpose: This test demonstrates the dateTime data type with the implicit calendar Pattern.
                The data does NOT match this pattern and should fail parsing.
-->
  
  <tdml:parserTestCase name="dateTimeImplicitPatternFail3" root="dateTimeImp"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarPatternKind - DFDL-13-138R">

    <tdml:document><![CDATA[2013-03-24T03:45:30 Pacific Standard Time]]></tdml:document>
    <tdml:errors>
      <tdml:error>Parse Error:</tdml:error>
      <tdml:error>Convert to DateTime (for xs:dateTime)</tdml:error>
    </tdml:errors>
  </tdml:parserTestCase>

<!--
     Test Name: dateTimeImplicitPatternFail4
        Schema: dateTimeSchema
          Root: dateTimeImp
       Purpose: This test demonstrates the dateTime data type with the implicit calendar Pattern.
                The data does NOT match this pattern and should fail parsing.
-->
  
  <tdml:parserTestCase name="dateTimeImplicitPatternFail4" root="dateTimeImp"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarPatternKind - DFDL-13-138R">

    <tdml:document><![CDATA[2013-03-24T03:45:30GMT]]></tdml:document>
    <tdml:errors>
      <tdml:error>Parse Error:</tdml:error>
      <tdml:error>Convert to DateTime (for xs:dateTime)</tdml:error>
    </tdml:errors>
  </tdml:parserTestCase>

<!--
     Test Name: datePattern01
        Schema: dateTimeSchema
          Root: date01
       Purpose: This test demonstrates the date data type with an explicit calendar Pattern.
-->
  
  <tdml:parserTestCase name="datePattern01" root="date01"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarPattern - DFDL-13-146R">

    <tdml:document><![CDATA[Today is the 25th day of January, year 2013]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <date01>2013-01-25</date01>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: datePattern01b
        Schema: dateTimeSchema
          Root: date01b
       Purpose: This test demonstrates the date data type with an explicit calendar Pattern.
-->
  
  <tdml:parserTestCase name="datePattern01b" root="date01b"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarPattern - DFDL-13-146R">

    <tdml:document><![CDATA[Today is the 25th day of January, year 2013]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <date01>2013-01-25</date01>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: datePattern02
        Schema: dateTimeSchema
          Root: date12
       Purpose: This test demonstrates what happens when you use time formatting markers in a date object
-->
  
  <tdml:parserTestCase name="datePattern02" root="date12"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarPattern - DFDL-13-146R">

    <tdml:document><![CDATA[24 03 1988, 03:45:55]]></tdml:document>
    <tdml:errors>
      <tdml:error>Schema Definition Error</tdml:error>
      <tdml:error>Character 'H' not allowed in dfdl:calendarPattern for date</tdml:error>
    </tdml:errors>
  </tdml:parserTestCase>

<!--
     Test Name: datePattern02b
        Schema: dateTimeSchema
          Root: date1
       Purpose: This test demonstrates what happens when you use time formatting markers in a date object
-->
  
  <tdml:parserTestCase name="datePattern02b" root="date31"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarPattern - DFDL-13-146R">

    <tdml:document><![CDATA[24 03 1988, 45:55]]></tdml:document>
    <tdml:errors>
      <tdml:error>Schema Definition Error</tdml:error>
      <tdml:error>Character 'm' not allowed in dfdl:calendarPattern for date</tdml:error>
    </tdml:errors>
  </tdml:parserTestCase>

<!--
     Test Name: timePattern01
        Schema: dateTimeSchema
          Root: time25
       Purpose: This test demonstrates what happens when you use date formatting markers in a time object
-->
  
  <tdml:parserTestCase name="timePattern01" root="time25"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarPattern - DFDL-13-146R">

    <tdml:document><![CDATA[1999-03 12:34]]></tdml:document>
    <tdml:errors>
      <tdml:error>Schema Definition Error</tdml:error>
      <tdml:error>Character 'y' not allowed in dfdl:calendarPattern for time</tdml:error>
    </tdml:errors>
  </tdml:parserTestCase>

<!--
     Test Name: timePattern01b
        Schema: dateTimeSchema
          Root: time26
       Purpose: This test demonstrates what happens when you use invalid formatting markers in a time object
-->
  
  <tdml:parserTestCase name="timePattern01b" root="time26"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarPattern - DFDL-13-146R">

    <tdml:document><![CDATA[19 12:34]]></tdml:document>
    <tdml:errors>
      <tdml:error>Schema Definition Error</tdml:error>
      <tdml:error>Character 'b' not allowed in dfdl:calendarPattern for time</tdml:error>
    </tdml:errors>
  </tdml:parserTestCase>

<!--
     Test Name: datePattern03
        Schema: dateTimeSchema
          Root: date13
       Purpose: This test demonstrates date formatting markers, primarily with the 'G' (era) symbol
-->
  
  <tdml:parserTestCase name="datePattern03" root="date13"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarPattern - DFDL-13-146R">

    <tdml:document><![CDATA[02-13-2013 BC]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <date13>2013-02-13</date13>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: datePattern04
        Schema: dateTimeSchema
          Root: date14
       Purpose: This test demonstrates date formatting markers, primarily with the 'Q' (quarter) symbol
-->
  
  <tdml:parserTestCase name="datePattern04" root="date14"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarPattern - DFDL-13-146R">

    <tdml:document><![CDATA[Q2 2012]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <date13>2013-02-13</date13>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: datePattern05
        Schema: dateTimeSchema
          Root: date15
       Purpose: This test demonstrates date formatting markers, primarily with the 'D' (day in year) symbol (leap year)
-->
  
  <tdml:parserTestCase name="datePattern05" root="date15"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarPattern - DFDL-13-146R">

    <tdml:document><![CDATA[100 2012]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <date15>2012-04-09</date15>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: datePattern06
        Schema: dateTimeSchema
          Root: date15
       Purpose: This test demonstrates date formatting markers, primarily with the 'D' (day in year) symbol (non leap year)
-->
  
  <tdml:parserTestCase name="datePattern06" root="date15"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarPattern - DFDL-13-146R">

    <tdml:document><![CDATA[100 2011]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <date15>2011-04-10</date15>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: datePattern07
        Schema: dateTimeSchema
          Root: date16
       Purpose: This test demonstrates date formatting markers, primarily with the 'F' (week in month) symbol
-->
  
  <tdml:parserTestCase name="datePattern07" root="date16"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarPattern - DFDL-13-146R">

    <tdml:document><![CDATA[2 02 2013]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <date16>2013-02-10</date16>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: datePattern08
        Schema: dateTimeSchema
          Root: date30
       Purpose: This test demonstrates the use of symbols in date formatting with a byte representation
-->
  
  <tdml:parserTestCase name="datePattern08" root="date30"
    model="dateTimeSchema" description="Section 13 Simple Types - symbols in date formatting - DFDL-13-164R">

    <tdml:document>
      <tdml:documentPart type="byte">33302e2e2e303030342e2e2e2e2e313939382a28292a28292a2829</tdml:documentPart>
    </tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <date30>1998-04-30</date30>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: datePattern08b
        Schema: dateTimeSchema
          Root: date30
       Purpose: This test demonstrates the use of symbols in date formatting
-->
  
  <tdml:parserTestCase name="datePattern08b" root="date30"
    model="dateTimeSchema" description="Section 13 Simple Types - symbols in date formatting - DFDL-13-164R">

    <tdml:document>
      <tdml:documentPart type="text">30...0004.....1998*()*()*()</tdml:documentPart>
    </tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <date30>1998-04-30</date30>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: dateEpochFillIn
        Schema: dateTimeSchema
          Root: date27
       Purpose: This test demonstrates that if a formatting character is not provided, the time is filled in with the epoch time.
-->
  
  <tdml:parserTestCase name="dateEpochFillIn" root="date27"
    model="dateTimeSchema" description="Section 13 Simple Types - epoch fill in - DFDL-13-164R">

    <tdml:document><![CDATA[2013]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <date27>2013-01-01</date27>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: dateEpochFillIn2
        Schema: dateTimeSchema
          Root: date28
       Purpose: This test demonstrates that if a formatting character is not provided, the time is filled in with the epoch time.
-->
  
  <tdml:parserTestCase name="dateEpochFillIn2" root="date28"
    model="dateTimeSchema" description="Section 13 Simple Types - epoch fill in - DFDL-13-164R">

    <tdml:document><![CDATA[]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <date28>1970-01-01</date28>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: dateEpochFillIn3
        Schema: dateTimeSchema
          Root: date29
       Purpose: This test demonstrates that if a formatting character is not provided, the time is filled in with the epoch time.
-->
  
  <tdml:parserTestCase name="dateEpochFillIn3" root="date29"
    model="dateTimeSchema" description="Section 13 Simple Types - epoch fill in - DFDL-13-164R">

    <tdml:document><![CDATA[08]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <date29>1970-08-01</date29>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: datePatternChoice
        Schema: dateTimeSchema
          Root: date21
       Purpose: This test demonstrates the use of a choice whose elements are determined by formatting
-->
  
  <tdml:parserTestCase name="datePatternChoice" root="date21"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarPattern - DFDL-13-146R">

    <tdml:document><![CDATA[It is day 25 of March, 2013]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <date21>
          <superfull>2013-03-25</superfull>
        </date21>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: dateCalendarCenturyStart
        Schema: dateTimeSchema
          Root: date22
       Purpose: This test demonstrates the calendarCenturyStart property. The specified start is 20, so the year
                range is 1920 - 2019. In this case our year is 45. In order for it to fall in our range it
                translates to 1945. 
-->
  
  <tdml:parserTestCase name="dateCalendarCenturyStart" root="date22"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarCentury - DFDL-13-144R">

    <tdml:document><![CDATA[03 22 45]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <date22>1945-03-22</date22>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: dateCalendarCenturyStart2
        Schema: dateTimeSchema
          Root: date23
       Purpose: This test demonstrates the calendarCenturyStart property. The specified start is 48, so the year
                range is 1948 - 2047. In this case our year is 45. In order for it to fall in our range it
                translates to 2045. 
-->
  
  <tdml:parserTestCase name="dateCalendarCenturyStart2" root="date23"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarCenturyStart - DFDL-13-144R">

    <tdml:document><![CDATA[03 22 45]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <date22>2045-03-22</date22>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: dateCalendarLanguage
        Schema: dateTimeSchema
          Root: date24
       Purpose: This test demonstrates the calendarLanguage property with the language set to German.
-->
  
  <tdml:parserTestCase name="dateCalendarLanguage" root="date24"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarLanguage - DFDL-13-145R">

    <tdml:document><![CDATA[Freitag März 2013]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <date24>2013-03-01</date24>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: dateCalendarLanguage2
        Schema: dateTimeSchema
          Root: date25
       Purpose: This test demonstrates the calendarLanguage property with the language set to Spanish.
-->
  
  <tdml:parserTestCase name="dateCalendarLanguage2" root="date25"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarLanguage - DFDL-13-145R">

    <tdml:document><![CDATA[Lunes Noviembre 2013]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <date25>2013-11-04</date25>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: dateCalendarLanguage3
        Schema: dateTimeSchema
          Root: date26
       Purpose: This test demonstrates the calendarLanguage property with the language set to English.
-->
  
  <tdml:parserTestCase name="dateCalendarLanguage3" root="date26"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarLanguage - DFDL-13-145R">

    <tdml:document><![CDATA[Monday November 2013]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <date26>2013-11-04</date26>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: dateCalendarDaysInFirstWeek
        Schema: dateTimeSchema
          Root: date17
       Purpose: This test demonstrates the calendarDaysInFirstWeek property. Since the first week of 2013 is specified, 
                and the calendarDaysInFirstWeek is set to 7, the first full week of 2013 will be selected. In this case
                it starts on January 6th.
-->
  
  <tdml:parserTestCase name="dateCalendarDaysInFirstWeek" root="date17"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarDaysInFirstWeek - DFDL-13-143R">

    <tdml:document><![CDATA[01 2013]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <date17>2013-01-06</date17>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: dateCalendarDaysInFirstWeek2
        Schema: dateTimeSchema
          Root: date18
       Purpose: This test demonstrates the calendarDaysInFirstWeek property. Since the first week of 2013 is specified, 
                and the calendarDaysInFirstWeek is set to 5, the first day of the week that contains the first day of the
                year will be selected. In this case it is December 30th, 2012
-->
  
  <tdml:parserTestCase name="dateCalendarDaysInFirstWeek2" root="date18"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarDaysInFirstWeek - DFDL-13-143R">

    <tdml:document><![CDATA[01 2013]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <date18>2012-12-30</date18>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: dateCalendarDaysInFirstWeek3
        Schema: dateTimeSchema
          Root: date17
       Purpose: This test demonstrates the calendarDaysInFirstWeek property. calendarDaysInFirstWeek is set to 7,
                and in 2012 the first day of the year started the first full week, so we should get January 1st.
-->
  
  <tdml:parserTestCase name="dateCalendarDaysInFirstWeek3" root="date17"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarDaysInFirstWeek - DFDL-13-143R">

    <tdml:document><![CDATA[01 2012]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <date17>2012-01-01</date17>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: dateCalendarDaysInFirstWeek4
        Schema: dateTimeSchema
          Root: date19
       Purpose: This test demonstrates the calendarDaysInFirstWeek property. calendarDaysInFirstWeek is set to 5,
                which is more than the number of days in the first week of March, so the second week is selected,
                which starts on the 3rd.
-->
  
  <tdml:parserTestCase name="dateCalendarDaysInFirstWeek4" root="date19"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarDaysInFirstWeek - DFDL-13-143R">

    <tdml:document><![CDATA[01 03 2013]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <date19>2013-03-03</date19>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: dateCalendarDaysInFirstWeek5
        Schema: dateTimeSchema
          Root: date20
       Purpose: This test demonstrates the calendarDaysInFirstWeek property. calendarDaysInFirstWeek is set to 2,
                which is the number of days in the first week of March, so the first day of the first week is selected,
                which is Feb 24th.
-->
  
  <tdml:parserTestCase name="dateCalendarDaysInFirstWeek5" root="date20"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarDaysInFirstWeek - DFDL-13-143R">

    <tdml:document><![CDATA[01 03 2013]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <date20>2013-02-24</date20>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: dateTimePattern01
        Schema: dateTimeSchema
          Root: dateTime01
       Purpose: This test demonstrates the dateTime data type with an explicit calendar Pattern.
-->
  
  <tdml:parserTestCase name="dateTimePattern01" root="dateTime01"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarPattern - DFDL-13-146R">

    <tdml:document><![CDATA[It is 11:53AM on the 1st of April, year 2013]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <dateTime01>2013-04-01T11:53:00Z</dateTime01>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: timeLaxCheckPolicy01
        Schema: dateTimeSchema
          Root: time01
       Purpose: This test demonstrates a lax calendarCheckPolicy. Any invalid values should be converted to the appropriate value
-->
  
  <tdml:parserTestCase name="timeLaxCheckPolicy01" root="time01"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarCheckPolicy - DFDL-13-139R">

    <tdml:document><![CDATA[05:62:30GMT]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <time01>06:02:30Z</time01>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: timeLaxCheckPolicy02
        Schema: dateTimeSchema
          Root: time01
       Purpose: This test demonstrates a lax calendarCheckPolicy. Any invalid values should be converted to the appropriate value
-->
  
  <tdml:parserTestCase name="timeLaxCheckPolicy02" root="time01"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarCheckPolicy - DFDL-13-139R">

    <tdml:document><![CDATA[28:62:30GMT]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <time01>05:02:30Z</time01>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: timeLaxCheckPolicy03
        Schema: dateTimeSchema
          Root: time01
       Purpose: This test demonstrates a lax calendarCheckPolicy. Any invalid values should be converted to the appropriate value
-->
  
  <tdml:parserTestCase name="timeLaxCheckPolicy03" root="time01"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarCheckPolicy - DFDL-13-139R">

    <tdml:document><![CDATA[28:62:90GMT]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <time01>05:03:30Z</time01>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: dateTimeLaxCheckPolicy01
        Schema: dateTimeSchema
          Root: dateTime02
       Purpose: This test demonstrates a lax calendarCheckPolicy. Any invalid values should be converted to the appropriate value
-->
  
  <tdml:parserTestCase name="dateTimeLaxCheckPolicy01" root="dateTime02"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarCheckPolicy - DFDL-13-139R">

    <tdml:document><![CDATA[2013-01-31T23:62:30]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <dateTime02>2013-02-01T00:02:30Z</dateTime02>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: dateLaxCheckPolicy01
        Schema: dateTimeSchema
          Root: date02
       Purpose: This test demonstrates a lax calendarCheckPolicy. Any invalid values should be converted to the appropriate value
-->
  
  <tdml:parserTestCase name="dateLaxCheckPolicy01" root="date02"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarCheckPolicy - DFDL-13-139R">

    <tdml:document><![CDATA[2000-12-45]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <date02>2001-01-14</date02>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: dateLaxCheckPolicy02
        Schema: dateTimeSchema
          Root: date03
       Purpose: This test demonstrates a lax calendarCheckPolicy. Any invalid values should be converted to the appropriate value
                (fun with leap years)
-->
  
  <tdml:parserTestCase name="dateLaxCheckPolicy02" root="date03"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarCheckPolicy - DFDL-13-139R">

    <tdml:document><![CDATA[2000-01-366]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <date03>2000-12-31</date03>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: dateLaxCheckPolicy03
        Schema: dateTimeSchema
          Root: date03
       Purpose: This test demonstrates a lax calendarCheckPolicy. Any invalid values should be converted to the appropriate value
                (counter to fun with leap years)
-->
  
  <tdml:parserTestCase name="dateLaxCheckPolicy03" root="date03"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarCheckPolicy - DFDL-13-139R">

    <tdml:document><![CDATA[2001-01-366]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <date03>2002-01-01</date03>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: dateLaxCheckPolicy04
        Schema: dateTimeSchema
          Root: date02
       Purpose: This test demonstrates a lax calendarCheckPolicy. Any invalid values should be converted to the appropriate value
                (fun with leap years)
-->
  
  <tdml:parserTestCase name="dateLaxCheckPolicy04" root="date02"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarCheckPolicy - DFDL-13-139R">

    <tdml:document><![CDATA[2000-02-29]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <date02>2000-02-29</date02>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: dateLaxCheckPolicy05
        Schema: dateTimeSchema
          Root: date02
       Purpose: This test demonstrates a lax calendarCheckPolicy. Any invalid values should be converted to the appropriate value
                (counter to fun with leap years)
-->
  
  <tdml:parserTestCase name="dateLaxCheckPolicy05" root="date02"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarCheckPolicy - DFDL-13-139R">

    <tdml:document><![CDATA[2001-02-29]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <date02>2001-03-01</date02>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: dateStrictCheckPolicy01
        Schema: dateTimeSchema
          Root: date04
       Purpose: This test demonstrates a strict calendarCheckPolicy. Any invalid values should result in a parse error.
-->
  
  <tdml:parserTestCase name="dateStrictCheckPolicy01" root="date04"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarCheckPolicy - DFDL-13-139R">

    <tdml:document><![CDATA[2001-03-35]]></tdml:document>
    <tdml:errors>
      <tdml:error/>
    </tdml:errors>
  </tdml:parserTestCase>

<!--
     Test Name: timeStrictCheckPolicy01
        Schema: dateTimeSchema
          Root: time02
       Purpose: This test demonstrates a strict calendarCheckPolicy. Any invalid values should result in a parse error.
-->
  
  <tdml:parserTestCase name="timeStrictCheckPolicy01" root="time02"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarCheckPolicy - DFDL-13-139R">

    <tdml:document><![CDATA[13:99:50-0800]]></tdml:document>
    <tdml:errors>
      <tdml:error/>
    </tdml:errors>
  </tdml:parserTestCase>

<!--
     Test Name: timeStrictCheckPolicy02
        Schema: dateTimeSchema
          Root: time02
       Purpose: This test demonstrates a strict calendarCheckPolicy. Any invalid values should result in a parse error.
-->
  
  <tdml:parserTestCase name="timeStrictCheckPolicy02" root="time02"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarCheckPolicy - DFDL-13-139R">

    <tdml:document><![CDATA[13:30:70GMT]]></tdml:document>
    <tdml:errors>
      <tdml:error>Failed to parse '13:30:70GMT'</tdml:error>
    </tdml:errors>
  </tdml:parserTestCase>

<!--
     Test Name: dateCalendarFirstDayOfWeek01
        Schema: dateTimeSchema
          Root: date05
       Purpose: This test demonstrates the calendarFirstDayOfWeek property. The element specifies 
                the month, year, and day of the week. The day of the week is specified with a number, so the 
                calendarFirstDayOfWeek determines the actual value of this number. Because the day of the month is not specified, 
                the first day of the month that falls on that day of the week is used.
-->
  
  <tdml:parserTestCase name="dateCalendarFirstDayOfWeek01" root="date05"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarFirstDayOfWeek - DFDL-13-142R">

    <tdml:document><![CDATA[day 1 of the week, month 02 year 2013]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <date05>2013-02-04</date05>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: dateCalendarFirstDayOfWeek02
        Schema: dateTimeSchema
          Root: date05
       Purpose: This test demonstrates the calendarFirstDayOfWeek property. The element specifies 
                the month, year, and day of the week. The day of the week is specified with a number, so the 
                calendarFirstDayOfWeek determines the actual value of this number. Because the day of the month is not specified, 
                the first day of the month that falls on that day of the week is used.
-->
  
  <tdml:parserTestCase name="dateCalendarFirstDayOfWeek02" root="date05"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarFirstDayOfWeek - DFDL-13-142R">

    <tdml:document><![CDATA[day 2 of the week, month 02 year 2013]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <date05>2013-02-05</date05>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: dateCalendarFirstDayOfWeek03
        Schema: dateTimeSchema
          Root: date06
       Purpose: This test demonstrates the calendarFirstDayOfWeek property. The element specifies 
                the month, year, and day of the week. The day of the week is specified with a number, so the 
                calendarFirstDayOfWeek determines the actual value of this number. Because the day of the month is not specified, 
                the first day of the month that falls on that day of the week is used.
-->
  
  <tdml:parserTestCase name="dateCalendarFirstDayOfWeek03" root="date06"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarFirstDayOfWeek - DFDL-13-142R">

    <tdml:document><![CDATA[day 1 of the week, month 02 year 2013]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <date06>2013-02-03</date06>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: dateCalendarFirstDayOfWeek04
        Schema: dateTimeSchema
          Root: date06
       Purpose: This test demonstrates the calendarFirstDayOfWeek property. The element specifies 
                the month, year, and day of the week. The day of the week is specified with a number, so the 
                calendarFirstDayOfWeek determines the actual value of this number. Because the day of the month is not specified, 
                the first day of the month that falls on that day of the week is used.
-->
  
  <tdml:parserTestCase name="dateCalendarFirstDayOfWeek04" root="date06"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarFirstDayOfWeek - DFDL-13-142R">

    <tdml:document><![CDATA[day 2 of the week, month 02 year 2013]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <date06>2013-02-04</date06>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: timeZoneFormats
        Schema: dateTimeSchema
          Root: time04
       Purpose: This test demonstrates different formatting for timezone
-->
  
  <tdml:parserTestCase name="timeZoneFormats" root="time04"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarPattern - DFDL-13-146R">

    <tdml:document><![CDATA[08:43.EST]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <time04>13:43:00Z</time04>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: timeZoneFormats2
        Schema: dateTimeSchema
          Root: time04b
       Purpose: This test demonstrates different formatting for timezone
-->
  
  <tdml:parserTestCase name="timeZoneFormats2" root="time04b"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarPattern - DFDL-13-146R">

    <tdml:document><![CDATA[08:43.Eastern Standard Time]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <time04b>13:43:00Z</time04b>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: timeZoneFormats3
        Schema: dateTimeSchema
          Root: time05
       Purpose: This test demonstrates different formatting for timezone
-->
  
  <tdml:parserTestCase name="timeZoneFormats3" root="time05"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarPattern - DFDL-13-146R">

    <tdml:document><![CDATA[08:43.PT]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <time05>16:43:00Z</time05>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: timeFormatting
        Schema: dateTimeSchema
          Root: time16
       Purpose: This test demonstrates different formatting for time, particularly 'HH' to represent hour in day (0~23)
-->
  
  <tdml:parserTestCase name="timeFormatting" root="time16"
    model="dateTimeSchema" description="Section 13 Simple Types - pattern derived from ICU SimpleDatetimeFormat - DFDL-13-147R">

    <tdml:document><![CDATA[22:43]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <time16>22:43:00Z</time16>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: timeFormatting2
        Schema: dateTimeSchema
          Root: time17
       Purpose: This is a test to see what will happen if you specify a military-style hour (HH) AND an AM/PM marker
                If AM, the hour defaults to 00 (midnight), and if PM, the hour defaults to 12 (noon)
-->
  
  <tdml:parserTestCase name="timeFormatting2" root="time17"
    model="dateTimeSchema" description="Section 13 Simple Types - pattern derived from ICU SimpleDatetimeFormat - DFDL-13-147R">

    <tdml:document><![CDATA[03:43PM]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <time17>12:43:00Z</time17>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: timeFormatting2c
        Schema: dateTimeSchema
          Root: time17
       Purpose: This is a test to see what will happen if you specify a military-style hour (HH) AND an AM/PM marker
                If AM, the hour defaults to 00 (midnight), and if PM, the hour defaults to 12 (noon)
-->
  
  <tdml:parserTestCase name="timeFormatting2c" root="time17"
    model="dateTimeSchema" description="Section 13 Simple Types - pattern derived from ICU SimpleDatetimeFormat - DFDL-13-147R">

    <tdml:document><![CDATA[23:43AM]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <time17>00:43:00Z</time17>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: timeFormatting2b
        Schema: dateTimeSchema
          Root: time17b
       Purpose: This test demonstrates different formatting for time, primarily the use of 'aa' to denote an am/pm marker
-->
  
  <tdml:parserTestCase name="timeFormatting2b" root="time17b"
    model="dateTimeSchema" description="Section 13 Simple Types - pattern derived from ICU SimpleDatetimeFormat - DFDL-13-147R">

    <tdml:document><![CDATA[03:43AM]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <time17b>03:43:00Z</time17b>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: timeFormatting3
        Schema: dateTimeSchema
          Root: time17b
       Purpose: This test demonstrates different formatting for time, primarily the use of 'aa' to denote an am/pm marker
-->
  
  <tdml:parserTestCase name="timeFormatting3" root="time17b"
    model="dateTimeSchema" description="Section 13 Simple Types - pattern derived from ICU SimpleDatetimeFormat - DFDL-13-147R">

    <tdml:document><![CDATA[03:43PM]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <time17b>15:43:00Z</time17b>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: timeFormatting4
        Schema: dateTimeSchema
          Root: time18
       Purpose: This test demonstrates different formatting for time, primarily the use of 'KK' to denote the hour in am/pm (0~11)
-->
  
  <tdml:parserTestCase name="timeFormatting4" root="time18"
    model="dateTimeSchema" description="Section 13 Simple Types - pattern derived from ICU SimpleDatetimeFormat - DFDL-13-147R">

    <tdml:document><![CDATA[00:43PM]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <time18>12:43:00Z</time18>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: timeFormatting5
        Schema: dateTimeSchema
          Root: time18
       Purpose: This test demonstrates different formatting for time, primarily the use of 'KK' to denote the hour in am/pm (0~11)
                In this case, the hour specified is 12, which is invalid for 'KK'
-->
  
  <tdml:parserTestCase name="timeFormatting5" root="time18"
    model="dateTimeSchema" description="Section 13 Simple Types - pattern derived from ICU SimpleDatetimeFormat - DFDL-13-147R">

    <tdml:document><![CDATA[12:30AM]]></tdml:document>
    <tdml:errors>
      <tdml:error>Parse Error: Convert to Time</tdml:error>
    </tdml:errors>
  </tdml:parserTestCase>

<!--
     Test Name: timeFormatting6
        Schema: dateTimeSchema
          Root: time16
       Purpose: This test demonstrates different formatting for time, primarily the use of 'hh' to denote the hour in am/pm (1~12)
                In this case, the hour specified is 0, which is invalid for 'hh'
-->
  
  <tdml:parserTestCase name="timeFormatting6" root="time16"
    model="dateTimeSchema" description="Section 13 Simple Types - pattern derived from ICU SimpleDatetimeFormat - DFDL-13-147R">

    <tdml:document><![CDATA[00:30AM]]></tdml:document>
    <tdml:errors>
      <tdml:error>Parse Error: Convert to Time</tdml:error>
    </tdml:errors>
  </tdml:parserTestCase>

<!--
     Test Name: timeFormatting7
        Schema: dateTimeSchema
          Root: time19
       Purpose: This test demonstrates different formatting for time, primarily the use of 'kk' to denote the hour (0~24)
-->
  
  <tdml:parserTestCase name="timeFormatting7" root="time19"
    model="dateTimeSchema" description="Section 13 Simple Types - pattern derived from ICU SimpleDatetimeFormat - DFDL-13-147R">

    <tdml:document><![CDATA[00:43]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <time19>00:43:00Z</time19>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: timeZoneFormats5
        Schema: dateTimeSchema
          Root: time06
       Purpose: This test demonstrates different formatting for timezone
-->
  
  <tdml:parserTestCase name="timeZoneFormats5" root="time06"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarPattern - DFDL-13-146R">

    <tdml:document><![CDATA[08:43.Los Angeles Time]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <time06>16:43:00Z</time06>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: timeZoneFormats6
        Schema: dateTimeSchema
          Root: time07
       Purpose: This test demonstrates different formatting for timezone
-->
  
  <tdml:parserTestCase name="timeZoneFormats6" root="time07"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarPattern - DFDL-13-146R">

    <tdml:document><![CDATA[08:43.PST]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <time07>16:43:00Z</time07>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: timeCalendarTimeZone
        Schema: dateTimeSchema
          Root: time08
       Purpose: This test demonstrates the calendarTimeZone property
-->
  
  <tdml:parserTestCase name="timeCalendarTimeZone" root="time08"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarTimeZone - DFDL-13-140R">

    <tdml:document><![CDATA[08:43:40]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <time08>07:43:40Z</time08>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: timeCalendarTimeZone2
        Schema: dateTimeSchema
          Root: time09
       Purpose: This test demonstrates the calendarTimeZone property
-->
  
  <tdml:parserTestCase name="timeCalendarTimeZone2" root="time09"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarTimeZone - DFDL-13-140R">

    <tdml:document><![CDATA[08:43:40]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <time09>07:13:40Z</time09>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: timeFractionalSeconds01
        Schema: dateTimeSchema
          Root: time03
       Purpose: This test demonstrates the use of fractional seconds; the seconds should be rounded up.
-->
  
  <tdml:parserTestCase name="timeFractionalSeconds01" root="time03"
    model="dateTimeSchema" description="Section 13 Simple Types - fractional seconds - DFDL-13-150R">

    <tdml:document><![CDATA[08:43:30.9678]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <time03>08:43:31Z</time03>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: dateCountDeterminesFormat
        Schema: dateTimeSchema
          Root: date07
       Purpose: This test demonstrates that the count of formatting letters determines the format. 
-->
  
  <tdml:parserTestCase name="dateCountDeterminesFormat" root="date07"
    model="dateTimeSchema" description="Section 13 Simple Types - count determines format - DFDL-13-153R">

    <tdml:document><![CDATA[Mon, 01 2013]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <time03>08:43:31Z</time03>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: dateNonAlphaChars01
        Schema: dateTimeSchema
          Root: date08
       Purpose: This test demonstrates that any non-alphabetic characters will be treated as quoted text. 
-->
  
  <tdml:parserTestCase name="dateNonAlphaChars01" root="date08"
    model="dateTimeSchema" description="Section 13 Simple Types - Non alpha-chars - DFDL-13-159R">

    <tdml:document><![CDATA[...03...24...1988]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <date08>1988-03-24</date08>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: dateTrim01
        Schema: dateTimeSchema
          Root: date09
       Purpose: This test demonstrates the use of the textCalendarJustification and textCalendarPadCharacter properties 
-->
  
  <tdml:parserTestCase name="dateTrim01" root="date09"
    model="dateTimeSchema" description="Section 13 Simple Types - textCalendarJustification - DFDL-13-165R">

    <tdml:document><![CDATA[....2013-03-24....]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <date09>2013-03-24</date09>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: dateTrim02
        Schema: dateTimeSchema
          Root: date10
       Purpose: This test demonstrates the use of the textCalendarJustification and textCalendarPadCharacter properties 
-->
  
  <tdml:parserTestCase name="dateTrim02" root="date10"
    model="dateTimeSchema" description="Section 13 Simple Types - textCalendarJustification - DFDL-13-165R">

    <tdml:document><![CDATA[2013-03-24xxxx]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <date10>2013-03-24</date10>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: dateTrim03
        Schema: dateTimeSchema
          Root: date11
       Purpose: This test demonstrates the use of the textCalendarJustification and textCalendarPadCharacter properties 
-->
  
  <tdml:parserTestCase name="dateTrim03" root="date11"
    model="dateTimeSchema" description="Section 13 Simple Types - textCalendarJustification - DFDL-13-165R">

    <tdml:document><![CDATA[dddddddddddddddddddddddddddddd2013-03-24]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <date11>2013-03-24</date11>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: timeTrim01
        Schema: dateTimeSchema
          Root: time10
       Purpose: This test demonstrates the use of the textCalendarJustification and textCalendarPadCharacter properties on a time object
-->
  
  <tdml:parserTestCase name="timeTrim01" root="time10"
    model="dateTimeSchema" description="Section 13 Simple Types - textCalendarJustification - DFDL-13-165R">

    <tdml:document><![CDATA[....12:30:30GMT....]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <time10>12:30:30Z</time10>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: timeTrim02
        Schema: dateTimeSchema
          Root: time11
       Purpose: This test demonstrates the use of the textCalendarJustification and textCalendarPadCharacter properties on a time object
-->
  
  <tdml:parserTestCase name="timeTrim02" root="time11"
    model="dateTimeSchema" description="Section 13 Simple Types - textCalendarJustification - DFDL-13-165R">

    <tdml:document><![CDATA[::::::12:30:30GMT]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <time11>12:30:30Z</time11>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: millisecondAccuracy
        Schema: dateTimeSchema
          Root: time12
       Purpose: This test demonstrates that DFDL implements at least millisecond accuracy.
-->
  
  <tdml:parserTestCase name="millisecondAccuracy" root="time12"
    model="dateTimeSchema" description="Section 13 Simple Types - at least millisecond accuracy - DFDL-13-152R">

    <tdml:document><![CDATA[3:30:38.001]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <time12>03:30:38Z</time12>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: millisecondAccuracy2
        Schema: dateTimeSchema
          Root: time13
       Purpose: This test demonstrates that DFDL implements at least millisecond accuracy.
-->
  
  <tdml:parserTestCase name="millisecondAccuracy2" root="time13"
    model="dateTimeSchema" description="Section 13 Simple Types - at least millisecond accuracy - DFDL-13-152R">

    <tdml:document><![CDATA[3:30:38.001435]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <time13>03:30:38Z</time13>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: millisecondAccuracy3
        Schema: dateTimeSchema
          Root: time14
       Purpose: This test demonstrates that DFDL implements at least millisecond accuracy.
-->
  
  <tdml:parserTestCase name="millisecondAccuracy3" root="time14"
    model="dateTimeSchema" description="Section 13 Simple Types - at least millisecond accuracy - DFDL-13-152R">

    <tdml:document><![CDATA[3:30:38.002345276891000084763]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <time14>03:30:38Z</time14>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: millisecondAccuracy4
        Schema: dateTimeSchema
          Root: time15
       Purpose: This test demonstrates that DFDL implements at least millisecond accuracy.
-->
  
  <tdml:parserTestCase name="millisecondAccuracy4" root="time15"
    model="dateTimeSchema" description="Section 13 Simple Types - at least millisecond accuracy - DFDL-13-152R">

    <tdml:document><![CDATA[3:30:38.0023452768910087634837]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <time15>03:30:38Z</time15>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: timeSymbols
        Schema: dateTimeSchema
          Root: time20
       Purpose: This test demonstrates that if dfdl:representation is text, any characters in the pattern
                that are not in the ranges of ['a'..'z'] and ['A'..'Z'] will be treated as quoted text.
-->
  
  <tdml:parserTestCase name="timeSymbols" root="time20"
    model="dateTimeSchema" description="Section 13 Simple Types - Symbols with text representation - DFDL-13-164R">

    <tdml:document><![CDATA[03@54$%^&*()5]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <time20>03:54:05Z</time20>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: timeSymbols2
        Schema: dateTimeSchema
          Root: time21
       Purpose: This test demonstrates that if dfdl:representation is text, any characters in the pattern
                that are not in the ranges of ['a'..'z'] and ['A'..'Z'] will be treated as quoted text.
-->
  
  <tdml:parserTestCase name="timeSymbols2" root="time21"
    model="dateTimeSchema" description="Section 13 Simple Types - Symbols with text representation - DFDL-13-164R">

    <tdml:document><![CDATA[03@54$%^!@#.,/.'}{}{*()5]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <time21>03:54:05Z</time21>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: epochFillIn
        Schema: dateTimeSchema
          Root: time22
       Purpose: This test demonstrates that for any pattern that omits components,
                the values for the omitted components are supplied from the Unix epoch 1970-01-01T00:00:00.000
-->
  
  <tdml:parserTestCase name="epochFillIn" root="time22"
    model="dateTimeSchema" description="Section 13 Simple Types - Patterns with ommitted components - DFDL-13-164R">

    <tdml:document><![CDATA[28]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <time22>00:28:00Z</time22>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: epochFillIn2
        Schema: dateTimeSchema
          Root: time23
       Purpose: This test demonstrates that for any pattern that omits components,
                the values for the omitted components are supplied from the Unix epoch 1970-01-01T00:00:00.000
-->
  
  <tdml:parserTestCase name="epochFillIn2" root="time23"
    model="dateTimeSchema" description="Section 13 Simple Types - Patterns with ommitted components - DFDL-13-164R">

    <tdml:document><![CDATA[]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <time23>00:00:00Z</time23>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: epochFillIn3
        Schema: dateTimeSchema
          Root: time24
       Purpose: This test demonstrates that for any pattern that omits components,
                the values for the omitted components are supplied from the Unix epoch 1970-01-01T00:00:00.000
-->
  
  <tdml:parserTestCase name="epochFillIn3" root="time24"
    model="dateTimeSchema" description="Section 13 Simple Types - Patterns with ommitted components - DFDL-13-164R">

    <tdml:document><![CDATA[.]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <time24>00:00:00Z</time24>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: dateTimePattern02
        Schema: dateTimeSchema
          Root: dateTime03
       Purpose: This test demonstrates the dateTime data type with an explicit calendar Pattern.
                The data matches this pattern and should be parsed correctly. Note that it deduces the day of the month based on
                the year, month, and day of the week.
-->
  
  <tdml:parserTestCase name="dateTimePattern02" root="dateTime03"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarPatternKind - DFDL-13-138R">

    <tdml:document><![CDATA[Twas a sunny Wednesday at 11 O'clock. The year was 2008, and it was the hottest December we had ever experienced.]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <dateTime03>2008-12-03T11:00:00Z</dateTime03>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: dateTimePattern03
        Schema: dateTimeSchema
          Root: dateTime03
       Purpose: This test demonstrates the dateTime data type with an explicit calendar Pattern.
                The data matches this pattern and should be parsed correctly. The test also demonstrates the use of
                a lax calendarCheckPolicy
-->
  
  <tdml:parserTestCase name="dateTimePattern03" root="dateTime04"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarPatternKind - DFDL-13-138R">

    <tdml:document><![CDATA[27:30:30 February-29-2012]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <dateTime04>2012-03-01T03:30:30Z</dateTime04>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: dateTimeCalendarDaysInFirstWeek
        Schema: dateTimeSchema
          Root: dateTime05
       Purpose: This test demonstrates the calendarDaysInFirstWeek property when combined with the calendarFirstDayOfWeek property.
                Since the first week of Feb, 2013 is specified, the calendarFirstDayOfWeek is set to Tuesday, and calendarDaysInFirstWeek
                is set to 5, the first full week of Feb will be selected (starting on Tuesday). In this case that will be Feb 5th.
-->
  
  <tdml:parserTestCase name="dateTimeCalendarDaysInFirstWeek" root="dateTime05"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarDaysInFirstWeek - DFDL-13-143R">

    <tdml:document><![CDATA[01 02 2013]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <dateTime05>2013-02-05T00:00:00Z</dateTime05>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: dateTimeCalendarDaysInFirstWeek2
        Schema: dateTimeSchema
          Root: dateTime06
       Purpose: This test demonstrates the calendarDaysInFirstWeek property when combined with the calendarFirstDayOfWeek property.
                Since the first week of Feb, 2013 is specified, the calendarFirstDayOfWeek is set to Thursday, and calendarDaysInFirstWeek
                is set to 7, the first full week of Feb will be selected (starting on Thursday). In this case that will be Feb 7th.
-->
  
  <tdml:parserTestCase name="dateTimeCalendarDaysInFirstWeek2" root="dateTime06"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarDaysInFirstWeek - DFDL-13-143R">

    <tdml:document><![CDATA[01 02 2013]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <dateTime06>2013-02-07T00:00:00Z</dateTime06>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: dateTimeCalendarDaysInFirstWeek3
        Schema: dateTimeSchema
          Root: dateTime07
       Purpose: This test demonstrates the calendarDaysInFirstWeek property when combined with the calendarFirstDayOfWeek property.
                Since the first week of Feb, 2013 is specified, the calendarFirstDayOfWeek is set to Thursday, and calendarDaysInFirstWeek
                is set to 2, the first week that contains 2 Feb days that starts on Thursday will be selected. In this case that will be Jan 31th.
-->
  
  <tdml:parserTestCase name="dateTimeCalendarDaysInFirstWeek3" root="dateTime07"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarDaysInFirstWeek - DFDL-13-143R">

    <tdml:document><![CDATA[01 02 2013]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <dateTime07>2013-01-31T00:00:00Z</dateTime07>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: dateTimeCalendarDaysInFirstWeek4
        Schema: dateTimeSchema
          Root: dateTime08
       Purpose: This test demonstrates the calendarDaysInFirstWeek property when combined with the calendarFirstDayOfWeek property.
                Since the first week of Feb, 2013 is specified, the calendarFirstDayOfWeek is set to Sunday, and calendarDaysInFirstWeek
                is set to 7, the first week that contains 7 Feb days that starts on Sunday will be selected. In this case that will be Feb 3rd.
-->
  
  <tdml:parserTestCase name="dateTimeCalendarDaysInFirstWeek4" root="dateTime08"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarDaysInFirstWeek - DFDL-13-143R">

    <tdml:document><![CDATA[01 02 2013 12:43:30PM]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <dateTime08>2013-02-03T12:43:30Z</dateTime08>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: dateTimeCalendarDaysInFirstWeek5
        Schema: dateTimeSchema
          Root: dateTime08
       Purpose: This test demonstrates the calendarDaysInFirstWeek property when combined with the calendarFirstDayOfWeek property.
                Since the first week of Jan, 2013 is specified, the calendarFirstDayOfWeek is set to Sunday, and calendarDaysInFirstWeek
                is set to 7, the first week that contains 7 Jan days that starts on Sunday will be selected. In this case that will be Jan 6th.
-->
  
  <tdml:parserTestCase name="dateTimeCalendarDaysInFirstWeek5" root="dateTime08"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarDaysInFirstWeek - DFDL-13-143R">

    <tdml:document><![CDATA[01 01 2013 12:43:30PM]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <dateTime08>2013-01-06T12:43:30Z</dateTime08>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: dateTimeCalendarDaysInFirstWeek6
        Schema: dateTimeSchema
          Root: dateTime08
       Purpose: This test demonstrates the calendarDaysInFirstWeek property when combined with the calendarFirstDayOfWeek property.
                Since the second week of Jan, 2013 is specified, the calendarFirstDayOfWeek is set to Sunday, and calendarDaysInFirstWeek
                is set to 7, the second week that contains 7 Jan days that starts on Sunday will be selected. In this case that will be Jan 13th.
-->
  
  <tdml:parserTestCase name="dateTimeCalendarDaysInFirstWeek6" root="dateTime08"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarDaysInFirstWeek - DFDL-13-143R">

    <tdml:document><![CDATA[02 01 2013 12:43:30PM]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <dateTime08>2013-01-13T12:43:30Z</dateTime08>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: dateTimeTrim01
        Schema: dateTimeSchema
          Root: dateTime09
       Purpose: This test demonstrates the use of the textCalendarJustification and textCalendarPadCharacter properties on a dateTime object
-->
  
  <tdml:parserTestCase name="dateTimeTrim01" root="dateTime09"
    model="dateTimeSchema" description="Section 13 Simple Types - textCalendarJustification - DFDL-13-165R">

    <tdml:document><![CDATA[.....03.04.1999 04:31:44PM.....]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <dateTime09>1999-03-04T16:31:44Z</dateTime09>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: dateTimeTrim02
        Schema: dateTimeSchema
          Root: dateTime10
       Purpose: This test demonstrates the use of the textCalendarJustification and textCalendarPadCharacter properties on a dateTime object
-->
  
  <tdml:parserTestCase name="dateTimeTrim02" root="dateTime10"
    model="dateTimeSchema" description="Section 13 Simple Types - textCalendarJustification - DFDL-13-165R">

    <tdml:document><![CDATA[03.04.1999 04:31:44PM:::::::::::::::::::::::::::::::::::::::::]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <dateTime10>1999-03-04T16:31:44Z</dateTime10>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: dateTimeTrim03
        Schema: dateTimeSchema
          Root: dateTime11
       Purpose: This test demonstrates the use of the textCalendarJustification and textCalendarPadCharacter properties on a dateTime object
                The pad character is a DFDL entity and the document uses a byte representation.

-->
  
  <tdml:parserTestCase name="dateTimeTrim03" root="dateTime11"
    model="dateTimeSchema" description="Section 13 Simple Types - textCalendarJustification - DFDL-13-165R">

    <tdml:document>
      <tdml:documentPart type="byte"><![CDATA[09 09 09 09 30 33 2e 30 34 2e 31 39 39 39 20 30 34 3a 33 31 3a 34 34 50 4d 09 09 09 09]]></tdml:documentPart>
    </tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <dateTime11>1999-03-04T16:31:44Z</dateTime11>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: dateTimeTrim04
        Schema: dateTimeSchema
          Root: dateTime12
       Purpose: This test demonstrates the use of the textCalendarJustification and textCalendarPadCharacter properties on a dateTime object
                The pad character is a DFDL entity and the document uses a byte representation.

-->
  
  <tdml:parserTestCase name="dateTimeTrim04" root="dateTime12"
    model="dateTimeSchema" description="Section 13 Simple Types - textCalendarJustification - DFDL-13-165R">

    <tdml:document>
      <tdml:documentPart type="byte"><![CDATA[09 09 09 09 30 33 2e 30 34 2e 31 39 39 39 20 30 34 3a 36 31 3a 34 34 50 4d]]></tdml:documentPart>
    </tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <dateTime12>1999-03-04T17:01:44Z</dateTime12>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

</tdml:testSuite>

 

<?xml version="1.0" encoding="UTF-8"?>
<tdml:testSuite suiteName="SimpleTypes" description="Section 5 - simple types"
  xmlns:tdml="http://www.ibm.com/xmlns/dfdl/testData" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:dfdl="http://www.ogf.org/dfdl/dfdl-1.0/" xmlns:xs="http://www.w3.org/2001/XMLSchema"
  xmlns:ex="http://example.com">

  <tdml:defineSchema name="SimpleTypes-Embedded.dfdl.xsd">
    <dfdl:defineFormat name="daffodilTest1">
      <dfdl:format lengthKind="implicit" representation="text"
        lengthUnits="bytes" encoding="US-ASCII" initiator="" terminator=""
        separator="" ignoreCase="no" textNumberRep="standard" />
    </dfdl:defineFormat>
    <dfdl:format ref="daffodilTest1" />
    <xs:element name="double" type="xs:double"/>
    <xs:element name="int" type="xs:int"/>
    <xs:element name="byte" type="xs:byte"/>
    <xs:element name="uByte" type="xs:unsignedByte"/>
    <xs:element name="s" type="xs:long" dfdl:lengthKind="explicit"
      dfdl:length="{ 13 }" />
    <xs:element name="mersenne" type="xs:integer"
      dfdl:lengthKind="explicit" dfdl:length="{ 207 }" />
    <xs:element name="integer01" type="xs:integer"
      dfdl:lengthKind="explicit" dfdl:length="{ 20 }" />
    <xs:element name="integer02" type="xs:integer"
      dfdl:lengthKind="explicit" dfdl:length="{ 4 }" />
    <xs:element name="int01" type="xs:int" dfdl:lengthKind="explicit"
      dfdl:length="13" />
    <xs:element name="int02" type="xs:int" dfdl:lengthKind="explicit"
      dfdl:length="11" />
    <xs:element name="int03" type="xs:int"
      dfdl:binaryNumberRep="binary" />
    <xs:element name="int04" type="xs:int" dfdl:lengthKind="explicit"
      dfdl:length="10" />
    <xs:element name="int05" type="xs:int" dfdl:lengthKind="explicit"
      dfdl:length="4" />
    <xs:element name="l_2" type="xs:long" dfdl:lengthKind="explicit"
      dfdl:length="{ 10 }" />
    <xs:element name="l_3" type="xs:long" dfdl:lengthKind="explicit"
      dfdl:length="{ 20 }" />
    <xs:element name="l_4" type="xs:long" dfdl:lengthKind="explicit"
      dfdl:length="{ 4 }" />
    <xs:element name="s_1" type="xs:short" dfdl:lengthKind="explicit"
      dfdl:length="{ 5 }" />
    <xs:element name="s_2" type="xs:short" dfdl:lengthKind="explicit"
      dfdl:length="{ 6 }" />
    <xs:element name="b_01" type="xs:byte" dfdl:lengthKind="explicit"
      dfdl:length="{4}" />
    <xs:element name="uI_01" type="xs:unsignedInt"
      dfdl:lengthKind="explicit" dfdl:length="{ 10 }" />
    <xs:element name="uI_02" type="xs:unsignedInt"
      dfdl:lengthKind="explicit" dfdl:length="{ 2 }" />
    <xs:element name="uI_03" type="xs:unsignedInt"
      dfdl:lengthKind="explicit" dfdl:length="{ 4 }" />
    <xs:element name="uS_01" type="xs:unsignedShort"
      dfdl:lengthKind="explicit" dfdl:length="{ 2 }" />
    <xs:element name="uS_02" type="xs:unsignedShort"
      dfdl:lengthKind="explicit" dfdl:length="{ 4 }" />
    <xs:element name="uB_01" type="xs:unsignedByte"
      dfdl:lengthKind="explicit" dfdl:length="{ 3 }" />
    <xs:element name="uL_01" type="xs:unsignedLong"
      dfdl:lengthKind="explicit" dfdl:length="{ 20 }" />
    <xs:element name="uL_02" type="xs:unsignedLong"
      dfdl:lengthKind="explicit" dfdl:length="{ 2 }" />
    <xs:element name="uL_03" type="xs:unsignedLong"
      dfdl:lengthKind="explicit" dfdl:length="{ 1 }" />
    <xs:element name="uL_04" type="xs:unsignedLong"
      dfdl:lengthKind="explicit" dfdl:length="{ 4 }" />
    <xs:element name="nonNegIntText" type="xs:nonNegativeInteger"
      dfdl:lengthKind="explicit" dfdl:length="{ 21 }" />
    <xs:element name="nonNegIntBin" type="xs:nonNegativeInteger"
      dfdl:representation="binary" dfdl:lengthKind="explicit" dfdl:length="{ 16 }" />
    <xs:element name="dateText" type="xs:date" dfdl:calendarPattern="EEEE, MMM d, ''yy" dfdl:calendarPatternKind="explicit"
      dfdl:lengthKind="explicit" dfdl:length="{ 23 }" />
    <xs:element name="timeText" type="xs:time" dfdl:calendarPattern="h:mm a" dfdl:calendarPatternKind="explicit"
      dfdl:lengthKind="explicit" dfdl:length="{ 8 }" />
    <xs:element name="dateTimeText" type="xs:dateTime" dfdl:calendarPattern="yyyy.MM.dd G 'at' HH:mm:ss ZZZZ" dfdl:calendarPatternKind="explicit"
      dfdl:lengthKind="explicit" dfdl:length="{ 35 }" />

    <xs:element name="limits" dfdl:lengthKind="implicit">
      <xs:complexType>
        <xs:sequence dfdl:separator=":"
          dfdl:separatorSuppressionPolicy="never" dfdl:separatorPosition="infix">
          <xs:element name="unsigned-byte" type="xs:unsignedByte"
            dfdl:lengthKind="explicit" dfdl:length="{ 3 }" />
          <xs:element name="unsigned-short" type="xs:unsignedShort"
            dfdl:lengthKind="explicit" dfdl:length="{ 6 }" />
          <xs:element name="unsigned-int" type="xs:unsignedInt"
            dfdl:lengthKind="explicit" dfdl:length="{ 13 }" />
          <xs:element name="unsigned-long" type="xs:unsignedLong"
            dfdl:lengthKind="explicit" dfdl:length="{ 20 }" />
        </xs:sequence>
      </xs:complexType>
    </xs:element>

    <xs:element name="e1" dfdl:lengthKind="explicit">
      <xs:complexType>
        <xs:sequence>
          <xs:element name="s1" type="xs:int"
            dfdl:lengthKind="explicit" dfdl:length="{ 1 }" />
          <xs:element name="s2" type="xs:int"
            dfdl:lengthKind="explicit" dfdl:length="{ 5 }" />
        </xs:sequence>
      </xs:complexType>
    </xs:element>

  </tdml:defineSchema>

  <tdml:defineSchema name="SimpleTypes-binary">
    <dfdl:format ref="ex:daffodilTest1" representation="binary"
      lengthUnits="bytes" />
    <xs:element name="integer01" type="xs:integer" />
    <xs:element name="posint01" type="xs:nonNegativeInteger" />
    <xs:element name="int01" type="xs:int" />
    <xs:element name="l_1" type="xs:long" />
    <xs:element name="s_1" type="xs:short" />
    <xs:element name="b_01" type="xs:byte" />
    <xs:element name="uI_01" type="xs:unsignedInt" />
    <xs:element name="uS_01" type="xs:unsignedShort" />
    <xs:element name="uB_01" type="xs:unsignedByte" />
    <xs:element name="uL_01" type="xs:unsignedLong" />
    <xs:element name="d_01" type="xs:double" />
    <xs:element name="dec_01" type="xs:decimal" />
    <xs:element name="hb_01" type="xs:hexBinary" />
  </tdml:defineSchema>

  <tdml:parserTestCase name="Long1" root="s"
    model="SimpleTypes-Embedded.dfdl.xsd" description="Section 5 Schema types-long - DFDL-5-012R">

    <tdml:document><![CDATA[2,000,000,000]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset xmlns:xs="http://www.w3.org/2001/XMLSchema"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
        <s xs:type="xs:long">2000000000</s>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="BigInteger1" root="mersenne"
    model="SimpleTypes-Embedded.dfdl.xsd" description="Section 5 Schema types-integer - DFDL-5-011R">

    <tdml:document><![CDATA[686,479,766,013,060,971,498,190,079,908,139,321,726,943,530,014,330,540,939,446,345,918,554,318,339,765,605,212,255,964,066,145,455,497,729,631,139,148,085,803,712,198,799,971,664,381,257,402,829,111,505,715]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset xmlns:xs="http://www.w3.org/2001/XMLSchema"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
        <mersenne xs:type="xs:integer">686479766013060971498190079908139321726943530014330540939446345918554318339765605212255964066145455497729631139148085803712198799971664381257402829111505715</mersenne>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="Integer01" root="integer01"
    model="SimpleTypes-Embedded.dfdl.xsd" description="Section 5 Schema types-integer - DFDL-5-011R">

    <tdml:document><![CDATA[55555555555555555555]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset xmlns:xs="http://www.w3.org/2001/XMLSchema"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
        <integer01 xs:type="xs:integer">55555555555555555555</integer01>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="Int01" root="int01"
    model="SimpleTypes-Embedded.dfdl.xsd" description="Section 5 Schema types-int - DFDL-5-013R">

    <tdml:document><![CDATA[2,147,483,647]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset xmlns:xs="http://www.w3.org/2001/XMLSchema"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
        <int01 xs:type="xs:int">2147483647</int01>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="int_error" root="int02"
    model="SimpleTypes-Embedded.dfdl.xsd" description="Section 5 Schema types-int - DFDL-5-013R">

    <tdml:document><![CDATA[-2147483649]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="int_error_03" root="int04"
    model="SimpleTypes-Embedded.dfdl.xsd" description="Section 5 Schema types-int - DFDL-5-013R">

    <tdml:document><![CDATA[2147483648]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="warning_exercise" root="int03"
    model="SimpleTypes-Embedded.dfdl.xsd"
    description="A warning message should be generated - use of binaryNumperRep 'binary' with representation 'text'- DFDL-2-012R">

    <tdml:document>
      <tdml:documentPart type="byte">00000025</tdml:documentPart>
    </tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset xmlns:xs="http://www.w3.org/2001/XMLSchema"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
        <int03 xs:type="xs:int">37</int03>
      </tdml:dfdlInfoset>
    </tdml:infoset>
    <tdml:warnings>
      <tdml:warning /><!-- don't care what message is -->
    </tdml:warnings>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="UnsignedNumbers1" root="limits"
    model="SimpleTypes-Embedded.dfdl.xsd" description="Section 5 Schema types-unsigned integer types - DFDL-5-014R">

    <tdml:document><![CDATA[255:65,535:4,294,967,295:18446744073709551615]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset xmlns:xs="http://www.w3.org/2001/XMLSchema"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
        <limits>
          <unsigned-byte>255</unsigned-byte>
          <unsigned-short>65535</unsigned-short>
          <unsigned-int>4294967295</unsigned-int>
          <unsigned-long>18446744073709551615</unsigned-long>
        </limits>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="unsignedLong_01" root="uL_01"
    model="SimpleTypes-Embedded.dfdl.xsd" description="Section 5 Schema types-unsignedLong - DFDL-5-017R">

    <tdml:document><![CDATA[18446744073709551616]]></tdml:document>
    <tdml:errors>
      <tdml:error>Out of Range</tdml:error>
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="unsignedLong_02" root="uL_02"
    model="SimpleTypes-Embedded.dfdl.xsd" description="Section 5 Schema types-unsignedLong - DFDL-5-017R">

    <tdml:document><![CDATA[-1]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="unsignedLong_03" root="uL_03"
    model="SimpleTypes-Embedded.dfdl.xsd" description="Section 5 Schema types-unsignedLong - DFDL-5-017R">

    <tdml:document>a</tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="Long2" root="l_2"
    model="SimpleTypes-Embedded.dfdl.xsd" description="Section 5 Schema types-long - DFDL-5-012R">

    <tdml:document><![CDATA[1         ]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="Long3" root="l_3"
    model="SimpleTypes-Embedded.dfdl.xsd" description="Section 5 Schema types-long - DFDL-5-012R">

    <tdml:document><![CDATA[-9223372036854775809]]></tdml:document>
    <tdml:errors>
      <tdml:error>Invalid data</tdml:error>
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="Long4" root="l_3"
    model="SimpleTypes-Embedded.dfdl.xsd" description="Section 5 Schema types-long - DFDL-5-012R">

    <tdml:document><![CDATA[+9223372036854775808]]></tdml:document>
    <tdml:errors>
      <tdml:error>Invalid data</tdml:error>
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="int_error_02" root="e1"
    model="SimpleTypes-Embedded.dfdl.xsd" description="Section 5 Schema types-int - DFDL-5-012R">

    <tdml:document><![CDATA[55.001]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="short_01" root="s_1"
    model="SimpleTypes-Embedded.dfdl.xsd" description="Section 5 Schema types-short - DFDL-5-014R">

    <tdml:document><![CDATA[70000]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="short_02" root="s_2"
    model="SimpleTypes-Embedded.dfdl.xsd" description="Section 5 Schema types-short - DFDL-5-014R">

    <tdml:document><![CDATA[-32769]]></tdml:document>
    <tdml:errors>
      <tdml:error>Out of Range</tdml:error>
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="unsignedInt_01" root="uI_01"
    model="SimpleTypes-Embedded.dfdl.xsd" description="Section 5 Schema types-unsignedInt - DFDL-5-018R">

    <tdml:document><![CDATA[7018631476]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="unsignedInt_02" root="uI_02"
    model="SimpleTypes-Embedded.dfdl.xsd" description="Section 5 Schema types-unsignedInt - DFDL-5-018R">
    <tdml:document><![CDATA[-3]]></tdml:document>
    <tdml:errors>
      <tdml:error>Out of Range</tdml:error>
    </tdml:errors>
  </tdml:parserTestCase>

<!--
     Test Name: negativeUnsignedInt
        Schema: SimpleTypes-Embedded.dfdl.xsd
          Root: uI_03
       Purpose: This test attempts to parse a negative number as an unsignedInt and should fail
-->

  <tdml:parserTestCase name="negativeUnsignedInt"
    root="uI_03" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Section 05 - Simple Types - unsignedInt - DFDL-5-018R">
    <tdml:document><![CDATA[-999]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="characterDuringValidUnsignedInt"
    root="uI_03" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a non numeric character during a valid unsigned int - DFDL-5-018R">
    <tdml:document><![CDATA[9a9]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceAfterLengthExceededUnsignedInt"
    root="uI_03" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character after an invalid unsigned int - DFDL-5-018R">
    <tdml:document><![CDATA[9999 ]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceBeforeLengthExceededUnsignedInt"
    root="uI_03" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character before an invalid unsigned int - DFDL-5-018R">
    <tdml:document><![CDATA[ 9999]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceDuringLengthExceededUnsignedInt"
    root="uI_03" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character during a invalid unsigned int - DFDL-5-018R">
    <tdml:document><![CDATA[99 99]]></tdml:document>
    <tdml:errors>
      <tdml:error>Left over data</tdml:error>
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceAfterValidUnsignedInt"
    root="uI_03" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character after a valid unsigned int - DFDL-5-018R">
    <tdml:document><![CDATA[999 ]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceBeforeValidUnsignedInt"
    root="uI_03" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character before a valid unsigned int - DFDL-5-018R">
    <tdml:document><![CDATA[ 999]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceDuringValidUnsignedInt"
    root="uI_03" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character during a valid unsigned int - DFDL-5-018R">
    <tdml:document><![CDATA[9 99]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <!-- int int05 length 4 -->
  <tdml:parserTestCase name="characterDuringValidInt"
    root="int05" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a non numeric character during a valid int - DFDL-5-013R">
    <tdml:document><![CDATA[9a9]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceAfterLengthExceededInt"
    root="int05" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character after an invalid int - DFDL-5-013R">
    <tdml:document><![CDATA[9999 ]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceBeforeLengthExceededInt"
    root="int05" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character before an invalid int - DFDL-5-013R">
    <tdml:document><![CDATA[ 9999]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceDuringLengthExceededInt"
    root="int05" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character during a invalid int - DFDL-5-013R">
    <tdml:document><![CDATA[99 99]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceAfterValidInt"
    root="int05" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character after a valid int - DFDL-5-013R">
    <tdml:document><![CDATA[999 ]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceBeforeValidInt"
    root="int05" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character before a valid int - DFDL-5-013R">
    <tdml:document><![CDATA[ 999]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceDuringValidInt"
    root="int05" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character during a valid int - DFDL-5-013R">
    <tdml:document><![CDATA[9 99]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <!-- integer integer02 length 4 -->
  <tdml:parserTestCase name="characterDuringValidInteger"
    root="integer02" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a non numeric character during a valid integer - DFDL-5-011R">
    <tdml:document><![CDATA[9a9]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceAfterLengthExceededInteger"
    root="integer02" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character after an invalid integer - DFDL-5-011R">
    <tdml:document><![CDATA[9999 ]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceBeforeLengthExceededInteger"
    root="integer02" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character before an invalid integer - DFDL-5-011R">
    <tdml:document><![CDATA[ 9999]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceDuringLengthExceededInteger"
    root="integer02" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character during a invalid integer - DFDL-5-011R">
    <tdml:document><![CDATA[99 99]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceAfterValidInteger"
    root="integer02" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character after a valid integer - DFDL-5-011R">
    <tdml:document><![CDATA[999 ]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceBeforeValidInteger"
    root="integer02" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character before a valid integer - DFDL-5-011R">
    <tdml:document><![CDATA[ 999]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
       <integer02>999</integer02>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceDuringValidInteger"
    root="integer02" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character during a valid integer - DFDL-5-011R">
    <tdml:document><![CDATA[9 99]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <integer02>999</integer02>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>


  <!-- long l_4 length 4 -->
  <tdml:parserTestCase name="characterDuringValidLong"
    root="l_4" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a non numeric character during a valid long - DFDL-5-012R">
    <tdml:document><![CDATA[9a9]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceAfterLengthExceededLong"
    root="l_4" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character after an invalid long - DFDL-5-012R">
    <tdml:document><![CDATA[9999 ]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceBeforeLengthExceededLong"
    root="l_4" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character before an invalid long - DFDL-5-012R">
    <tdml:document><![CDATA[ 9999]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceDuringLengthExceededLong"
    root="l_4" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character during an invalid long - DFDL-5-012R">
    <tdml:document><![CDATA[99 99]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceAfterValidLong"
    root="l_4" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character after a valid long - DFDL-5-012R">
    <tdml:document><![CDATA[999 ]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceBeforeValidLong"
    root="l_4" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character before a valid long - DFDL-5-012R">
    <tdml:document><![CDATA[ 999]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceDuringValidLong"
    root="l_4" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character during a valid long - DFDL-5-012R">
    <tdml:document><![CDATA[9 99]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <!-- short s_1 length 5 -->
  <tdml:parserTestCase name="characterDuringValidShort"
    root="s_1" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a non numeric character during a valid short - DFDL-5-014R">
    <tdml:document><![CDATA[9a99]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceAfterLengthExceededShort"
    root="s_1" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character after an invalid short - DFDL-5-014R">
    <tdml:document><![CDATA[99999 ]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceBeforeLengthExceededShort"
    root="s_1" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character before an invalid short - DFDL-5-014R">
    <tdml:document><![CDATA[ 99999]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceDuringLengthExceededShort"
    root="s_1" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character during a valid invalid short - DFDL-5-014R">
    <tdml:document><![CDATA[99 999]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceAfterValidShort"
    root="s_1" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character after a valid short - DFDL-5-014R">
    <tdml:document><![CDATA[9999 ]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceBeforeValidShort"
    root="s_1" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character before a valid short - DFDL-5-014R">
    <tdml:document><![CDATA[ 9999]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceDuringValidShort"
    root="s_1" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character during a valid short - DFDL-5-014R">
    <tdml:document><![CDATA[99 99]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <!-- byte b_01 length 4 -->
  <tdml:parserTestCase name="characterDuringValidByte"
    root="b_01" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a non numeric character during a valid byte - DFDL-5-015R">
    <tdml:document><![CDATA[9a9]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceAfterLengthExceededByte"
    root="b_01" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character after an invalid byte - DFDL-5-015R">
    <tdml:document><![CDATA[9999 ]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceBeforeLengthExceededByte"
    root="b_01" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character before an invalid byte - DFDL-5-015R">
    <tdml:document><![CDATA[ 9999]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceDuringLengthExceededByte"
    root="b_01" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character during an invalid byte - DFDL-5-015R">
    <tdml:document><![CDATA[99 99]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceAfterValidByte"
    root="b_01" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character after a valid byte - DFDL-5-015R">
    <tdml:document><![CDATA[999 ]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceBeforeValidByte"
    root="b_01" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character before a valid byte - DFDL-5-015R">
    <tdml:document><![CDATA[ 999]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceDuringValidByte"
    root="b_01" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character during a valid byte - DFDL-5-015R">
    <tdml:document><![CDATA[99 9]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

<!--
     Test Name: negativeUnsignedLong
        Schema: SimpleTypes-Embedded.dfdl.xsd
          Root: uL_01
       Purpose: This test attempts to parse a negative number as an unsignedLong and should fail
-->

  <tdml:parserTestCase name="negativeUnsignedLong"
    root="uL_01" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Section 5 - Simple Types - unsignedLong - DFDL-5-017R">
    <tdml:document><![CDATA[-999]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="characterDuringValidUnsignedLong"
    root="uL_04" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a non numeric character during a valid unsigned long - DFDL-5-017R">
    <tdml:document><![CDATA[9a9]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceAfterLengthExceededUnsignedLong"
    root="uL_04" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character after an invalid insigned long - DFDL-5-017R">
    <tdml:document><![CDATA[9999 ]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceBeforeLengthExceededUnsignedLong"
    root="uL_04" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character before an invalid unsigned long - DFDL-5-017R">
    <tdml:document><![CDATA[ 9999]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceDuringLengthExceededUnsignedLong"
    root="uL_04" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character during a invalid unsigned long - DFDL-5-017R">
    <tdml:document><![CDATA[99 99]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceAfterValidUnsignedLong"
    root="uL_04" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character after a valid unsigned long - DFDL-5-017R">
    <tdml:document><![CDATA[999 ]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceBeforeValidUnsignedLong"
    root="uL_04" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character before a valid unsigned long - DFDL-5-017R">
    <tdml:document><![CDATA[ 999]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <uL_04>999</uL_04>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceDuringValidUnsignedLong"
    root="uL_04" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character during a valid unsigned long - DFDL-5-017R">
    <tdml:document><![CDATA[9 99]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <uL_04>999</uL_04>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: negativeUnsignedShort
        Schema: SimpleTypes-Embedded.dfdl.xsd
          Root: uS_02
       Purpose: This test attempts to parse a negative number as an unsignedShort and should fail
-->

  <tdml:parserTestCase name="negativeUnsignedShort"
    root="uS_02" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Section 5 - Simple Types - unsignedShort - DFDL-5-019R">
    <tdml:document><![CDATA[-999]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="characterDuringValidUnsignedShort"
    root="uS_02" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a non numeric character during a valid unsigned short - DFDL-5-019R">
    <tdml:document><![CDATA[9a9]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceAfterLengthExceededUnsignedShort"
    root="uS_02" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character after an invalid unsigned short - DFDL-5-019R">
    <tdml:document><![CDATA[9999 ]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceBeforeLengthExceededUnsignedShort"
    root="uS_02" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character before an invalid unsigned short - DFDL-5-019R">
    <tdml:document><![CDATA[ 9999]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceDuringLengthExceededUnsignedShort"
    root="uS_02" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character during a invalid unsigned short - DFDL-5-019R">
    <tdml:document><![CDATA[99 99]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceAfterValidUnsignedShort"
    root="uS_02" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character after a valid unsigned short - DFDL-5-019R">
    <tdml:document><![CDATA[999 ]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceBeforeValidUnsignedShort"
    root="uS_02" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character before a valid unsigned short - DFDL-5-019R">
    <tdml:document><![CDATA[ 999]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceDuringValidUnsignedShort"
    root="uS_02" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character during a valid unsigned short - DFDL-5-019R">
    <tdml:document><![CDATA[9 99]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

<!--
     Test Name: negativeUnsignedByte
        Schema: SimpleTypes-Embedded.dfdl.xsd
          Root: uB_01
       Purpose: This test attempts to parse a negative number as an unsignedByte and should fail
-->

  <tdml:parserTestCase name="negativeUnsignedByte"
    root="uB_01" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Section 5 - Simple Types - unsignedByte - DFDL-5-020R">
    <tdml:document><![CDATA[-999]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="characterDuringValidUnsignedByte"
    root="uB_01" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a non numeric character during a valid unsigned byte - DFDL-5-020R">
    <tdml:document><![CDATA[9a]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceAfterLengthExceededUnsignedByte"
    root="uB_01" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character after an invalid unsigned byte - DFDL-5-020R">
    <tdml:document><![CDATA[999 ]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceBeforeLengthExceededUnsignedByte"
    root="uB_01" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character before an invalid unsigned uB_01 - DFDL-5-020R">
    <tdml:document><![CDATA[ 999]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceDuringLengthExceededUnsignedByte"
    root="uB_01" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character during a valid unsigned byte - DFDL-5-020R">
    <tdml:document><![CDATA[99 9]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceAfterValidUnsignedByte"
    root="uB_01" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character after a valid Unsigned byte - DFDL-5-020R">
    <tdml:document><![CDATA[99 ]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceBeforeValidUnsignedByte"
    root="uB_01" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character before a valid Unsigned byte - DFDL-5-020R">
    <tdml:document><![CDATA[ 99]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="whiteSpaceDuringValidUnsignedByte"
    root="uB_01" model="SimpleTypes-Embedded.dfdl.xsd"
    description="Test parsing when encountering a whitespace character during a valid unsigned byte - DFDL-5-020R">
    <tdml:document><![CDATA[9 9]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="unsignedShort_01" root="uS_01"
    model="SimpleTypes-Embedded.dfdl.xsd" description="Section 5 Schema types-unsignedShort - DFDL-5-019R">

    <tdml:document><![CDATA[-1]]></tdml:document>
    <tdml:errors>
      <tdml:error />
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="unsignedInt_binary"
    root="uI_01" model="SimpleTypes-binary"
    description="Section 5 Schema types-unsignedInt - DFDL-5-018R">
    <tdml:document>
      <tdml:documentPart type="bits">00000000000000000000000000001000</tdml:documentPart>
    </tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <uI_01>8</uI_01>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="unsignedInt_binary2"
    root="uI_01" model="SimpleTypes-binary"
    description="Section 5 Schema types-unsignedInt - DFDL-5-018R">
    <tdml:document>
      <tdml:documentPart type="bits">10000000000000000000000000001000</tdml:documentPart>
    </tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <uI_01>2147483656</uI_01>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="unsignedShort_binary"
    root="uS_01" model="SimpleTypes-binary"
    description="Section 5 Schema types-unsignedShort - DFDL-5-019R">
    <tdml:document>
      <tdml:documentPart type="bits">0000000000110111</tdml:documentPart>
    </tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <uS_01>55</uS_01>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="unsignedShort_binary2"
    root="uS_01" model="SimpleTypes-binary"
    description="Section 5 Schema types-unsignedShort - DFDL-5-019R">

    <tdml:document>
      <tdml:documentPart type="bits">1111111111111111</tdml:documentPart>
    </tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <uS_01>65535</uS_01>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="signedLong_binary"
    root="l_1" model="SimpleTypes-binary" description="Section 5 Schema types-signedLong - DFDL-5-012R">

    <tdml:document>
      <tdml:documentPart type="bits">0000000000000000000000000000000010000000000000000000000011100101</tdml:documentPart>
    </tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <l_1>2147483877</l_1>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="signedLong_binary2"
    root="l_1" model="SimpleTypes-binary" description="Section 5 Schema types-signedLong - DFDL-5-012R">

    <tdml:document>
      <tdml:documentPart type="bits">1111111111111111111111111111111111111111111111111111111111001001</tdml:documentPart>
    </tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <l_1>-55</l_1>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="signedShort_binary"
    root="s_1" model="SimpleTypes-binary" description="Section 5 Schema types-signedShort - DFDL-5-014R">

    <tdml:document>
      <tdml:documentPart type="bits">1111111111001001</tdml:documentPart>
    </tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <s_1>-55</s_1>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="signedShort_binary2"
    root="s_1" model="SimpleTypes-binary" description="Section 5 Schema types-signedShort - DFDL-5-014R">

    <tdml:document>
      <tdml:documentPart type="bits">0000000111001010</tdml:documentPart>
    </tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <s_1>458</s_1>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="unsignedLong_binary"
    root="uL_01" model="SimpleTypes-binary"
    description="Section 5 Schema types-unsignedShort - DFDL-5-017R">

    <tdml:document>
      <tdml:documentPart type="bits">0000000000000000000000000000000000000000000000000000000000000001</tdml:documentPart>
    </tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <uL_01>1</uL_01>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="unsignedLong_binary2"
    root="uL_01" model="SimpleTypes-binary"
    description="Section 5 Schema types-unsignedShort - DFDL-5-017R">

    <tdml:document>
      <tdml:documentPart type="bits">0000000000000000000000000000000000000000000000000000000000110111</tdml:documentPart>
    </tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <uL_01>55</uL_01>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="unsignedByte_01" root="uB_01"
    model="SimpleTypes-Embedded.dfdl.xsd" description="Section 5 Schema types-unsignedByte - DFDL-5-020R">

    <tdml:document><![CDATA[256]]></tdml:document>
    <tdml:errors>
      <tdml:error>Out of Range</tdml:error>
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="unsignedByte_02" root="uB_01"
    model="SimpleTypes-Embedded.dfdl.xsd" description="Section 5 Schema types-unsignedByte - DFDL-5-020R">

    <tdml:document><![CDATA[-30]]></tdml:document>
    <tdml:errors>
      <tdml:error>Out of Range</tdml:error>
    </tdml:errors>
  </tdml:parserTestCase>
 
  <tdml:parserTestCase name="nonNegativeInteger_text" root="nonNegIntText"
    model="SimpleTypes-Embedded.dfdl.xsd" description="Section 5 Schema types-nonNegativeInteger - DFDL-5-016R">

    <tdml:document><![CDATA[184467440737095516158]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <nonNegIntText>184467440737095516158</nonNegIntText>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>
 
  <tdml:parserTestCase name="nonNegativeInteger_bin" root="nonNegIntBin"
    model="SimpleTypes-Embedded.dfdl.xsd" description="Section 5 Schema types-nonNegativeInteger - DFDL-5-016R">

    <tdml:document><tdml:documentPart type="byte">1999999999999999</tdml:documentPart></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <nonNegIntBin>184467440737095516158</nonNegIntBin>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>
 
  <tdml:parserTestCase name="dateText" root="dateText"
    model="SimpleTypes-Embedded.dfdl.xsd" description="Section 5 Schema types-date - DFDL-5-016R">

    <tdml:document><![CDATA[Wednesday, July 10, '96]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <dateText>1996-07-10</dateText>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="timeText" root="timeText"
    model="SimpleTypes-Embedded.dfdl.xsd" description="Section 5 Schema types-time - DFDL-5-016R">

    <tdml:document><![CDATA[12:08 PM]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <timeText>12:08:00Z</timeText>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="dateTimeText" root="dateTimeText"
    model="SimpleTypes-Embedded.dfdl.xsd" description="Section 5 Schema types-dateTime - DFDL-5-016R">

    <tdml:document><![CDATA[1996.07.10 AD at 15:08:56 GMT-05:00]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <dateTimeText>1996-07-10T20:08:56Z</dateTimeText>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="byte_01" root="b_01"
    model="SimpleTypes-Embedded.dfdl.xsd" description="Section 5 Schema types - byte - DFDL-5-015R">

    <tdml:document><![CDATA[ 128]]></tdml:document>
    <tdml:errors>
      <tdml:error>Out of Range</tdml:error>
    </tdml:errors>
  </tdml:parserTestCase>

  <tdml:parserTestCase name="byte_02" root="b_01"
    model="SimpleTypes-Embedded.dfdl.xsd" description="Section 5 Schema types - byte - DFDL-5-015R">

    <tdml:document><![CDATA[-129]]></tdml:document>
    <tdml:errors>
      <tdml:error>Out of Range</tdml:error>
    </tdml:errors>
  </tdml:parserTestCase>
 
  <!--
    Test name: double_binary_01
    Schema: SimpleTypes-binary
    Purpose: This document does not have the appropriate number of bits for an implicitly-sized double (64) and should fail parsing
  -->

  <tdml:parserTestCase name="double_binary_01" root="d_01"
      model="SimpleTypes-binary" description="Section 5 Schema types-double - DFDL-5-009R">
    <tdml:document>
      <tdml:documentPart type="bits"><![CDATA[1010101]]></tdml:documentPart>
    </tdml:document>
    <tdml:errors>
      <tdml:error>Insufficient bits</tdml:error>
      <tdml:error>xs:double</tdml:error>
    </tdml:errors>
  </tdml:parserTestCase>
 
  <!--
    Test name: double_binary_02
    Schema: SimpleTypes-binary
    Purpose: This document has the appropriate number of bits for an implicitly-sized double (64) and should be parsed accordingly
  -->

  <tdml:parserTestCase name="double_binary_02" root="d_01"
      model="SimpleTypes-binary" description="Section 5 Schema types-double - DFDL-5-009R">
    <tdml:document>
      <tdml:documentPart type="bits">0100000000010100000000000000000000000000000000000000000000000000</tdml:documentPart>
    </tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <d_01>5.0</d_01>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>
 
  <!--
    Test name: double_binary_03
    Schema: SimpleTypes-binary
    Purpose: This document has the appropriate number of bytes for an implicitly-sized double (4) and should be parsed accordingly
  -->
 
  <tdml:parserTestCase name="double_binary_03" root="d_01"
      model="SimpleTypes-binary" description="Section 5 Schema types-double - DFDL-5-009R">
    <tdml:document>
      <tdml:documentPart type="byte">4014000000000000</tdml:documentPart>
    </tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <d_01>5.0</d_01>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>
 
  <!--
    Test name: double_binary_04
    Schema: SimpleTypes-binary
    Purpose: This document has the appropriate number of bits for an implicitly-sized double (64) but does not actually
             have a numerical value.
  -->
 
  <tdml:parserTestCase name="double_binary_04" root="d_01"
      model="SimpleTypes-binary" description="Section 5 Schema types-double - DFDL-5-009R">
    <tdml:document>
      <tdml:documentPart type="bits">1111111111111111111111111111111111111111111111111111111111111111</tdml:documentPart>
    </tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <d_01>NaN</d_01>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>
 
  <!--
    Test name: double_binary_05
    Schema: SimpleTypes-binary
    Purpose: This document has more than the appropriate number of bits for an implicitly-sized double (64) and should fail parsing
  -->
 
  <tdml:parserTestCase name="double_binary_05" root="d_01"
      model="SimpleTypes-binary" description="Section 5 Schema types-double - DFDL-5-009R">
    <tdml:document>
      <tdml:documentPart type="bits">100111111111111110000000011111111111111111111111111111111111111111111111111111111111</tdml:documentPart>
    </tdml:document>
    <tdml:errors>
      <tdml:error>Left over data</tdml:error>
    </tdml:errors>
  </tdml:parserTestCase>
 
  <!--
    Test name: double_07
    Schema: SimpleTypes-Embedded.dfdl.xsd
    Purpose: This document uses a schema with the textual representation of a double and an implicit length, which is not allowed.
  -->

  <tdml:parserTestCase name="double_07" root="double"
      model="SimpleTypes-Embedded.dfdl.xsd" description="Section 5 Schema types-double - DFDL-5-009R">
    <tdml:document>
      <tdml:documentPart type="text">400</tdml:documentPart>
    </tdml:document>
    <tdml:errors>
      <tdml:error>Schema Definition Error</tdml:error>
      <tdml:error>MaxLength was asked for when isSimpleType(true) and isPrimitiveType(true)</tdml:error>
    </tdml:errors>
  </tdml:parserTestCase>

  <!--
    Test name: byte_binary_01
    Schema: SimpleTypes-binary
    Purpose: This document demonstrates the implicit length of a byte (8 bits), represented by bits
  -->
 
  <tdml:parserTestCase name="byte_binary_01" root="b_01"
      model="SimpleTypes-binary" description="Section 5 Schema types-byte - DFDL-5-015R">
    <tdml:document>
      <tdml:documentPart type="bits">00001101</tdml:documentPart>
    </tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <b_01>13</b_01>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>
 
  <!--
    Test name: byte_binary_02
    Schema: SimpleTypes-binary
    Purpose: This document has more bits than the implicit length of a byte and should fail
  -->
 
  <tdml:parserTestCase name="byte_binary_02" root="b_01"
      model="SimpleTypes-binary" description="Section 5 Schema types-byte - DFDL-5-015R">
    <tdml:document>
      <tdml:documentPart type="bits">00001101111</tdml:documentPart>
    </tdml:document>
    <tdml:errors>
      <tdml:error>Left over data</tdml:error>
    </tdml:errors>
  </tdml:parserTestCase>

  <!--
    Test name: byte_binary_03
    Schema: SimpleTypes-binary
    Purpose: This document has less bits than the implicit length of a byte and should fail
  -->
 
  <tdml:parserTestCase name="byte_binary_03" root="b_01"
      model="SimpleTypes-binary" description="Section 5 Schema types-byte - DFDL-5-015R">
    <tdml:document>
      <tdml:documentPart type="bits">11111</tdml:documentPart>
    </tdml:document>
    <tdml:errors>
      <tdml:error>Parse Error</tdml:error>
      <tdml:error>Insufficient bits</tdml:error>
      <tdml:error>xs:byte</tdml:error>
    </tdml:errors>
  </tdml:parserTestCase>
 
  <!--
    Test name: byte_binary_04
    Schema: SimpleTypes-binary
    Purpose: This document contains a text representation of 8 bits, which is the correct implicit length of a byte and should be parsed accordingly
  -->
 
  <tdml:parserTestCase name="byte_binary_04" root="b_01"
      model="SimpleTypes-binary" description="Section 5 Schema types-byte - DFDL-5-015R">
    <tdml:document>
      <tdml:documentPart type="text">a</tdml:documentPart>
    </tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <b_01>97</b_01>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>
 
  <!--
    Test name: byte_binary_05
    Schema: SimpleTypes-binary
    Purpose: This document contains a byte representation of 8 bits, which is the correct implicit length of a byte and should be parsed accordingly
             0x28 = 00101000 = 40
  -->
 
  <tdml:parserTestCase name="byte_binary_05" root="b_01"
      model="SimpleTypes-binary" description="Section 5 Schema types-byte - DFDL-5-015R">
    <tdml:document>
      <tdml:documentPart type="byte">28</tdml:documentPart>
    </tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <b_01>40</b_01>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>
 
  <!--
    Test name: byte_implicit
    Schema: SimpleTypes-Embedded.dfdl.xsd
    Purpose: This document attempts to parse a textual representation of byte with implicit length and should fail
  -->
 
  <tdml:parserTestCase name="byte_implicit" root="byte"
      model="SimpleTypes-Embedded.dfdl.xsd" description="Section 5 Schema types-byte - DFDL-5-015R">
    <tdml:document>
      <tdml:documentPart type="bits">11010101</tdml:documentPart>
    </tdml:document>
    <tdml:errors>
      <tdml:error>Schema Definition Error</tdml:error>
      <tdml:error>MaxLength was asked for when isSimpleType(true) and isPrimitiveType(true)</tdml:error>
    </tdml:errors>
  </tdml:parserTestCase>
 
  <!--
    Test name: ubyte_binary_01
    Schema: SimpleTypes-binary
    Purpose: This document demonstrates the implicit length of an unsigned byte (8 bits), represented by bits
  -->
 
  <tdml:parserTestCase name="ubyte_binary_01" root="uB_01"
      model="SimpleTypes-binary" description="Section 5 Schema types-byte - DFDL-5-015R">
    <tdml:document>
      <tdml:documentPart type="bits">00001101</tdml:documentPart>
    </tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <uB_01>13</uB_01>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>
 
  <!--
    Test name: ubyte_binary_02
    Schema: SimpleTypes-binary
    Purpose: This document has more bits than the implicit length of a byte and should fail
  -->
 
  <tdml:parserTestCase name="ubyte_binary_02" root="uB_01"
      model="SimpleTypes-binary" description="Section 5 Schema types-byte - DFDL-5-015R">
    <tdml:document>
      <tdml:documentPart type="bits">00001101111</tdml:documentPart>
    </tdml:document>
    <tdml:errors>
      <tdml:error>Left over data</tdml:error>
    </tdml:errors>
  </tdml:parserTestCase>

  <!--
    Test name: ubyte_binary_03
    Schema: SimpleTypes-binary
    Purpose: This document has less bits than the implicit length of a byte and should fail
  -->
 
  <tdml:parserTestCase name="ubyte_binary_03" root="uB_01"
      model="SimpleTypes-binary" description="Section 5 Schema types-byte - DFDL-5-015R">
    <tdml:document>
      <tdml:documentPart type="bits">11111</tdml:documentPart>
    </tdml:document>
    <tdml:errors>
      <tdml:error>Parse Error</tdml:error>
      <tdml:error>Insufficient bits</tdml:error>
      <tdml:error>xs:unsignedByte</tdml:error>
    </tdml:errors>
  </tdml:parserTestCase>
 
  <!--
    Test name: ubyte_binary_04
    Schema: SimpleTypes-binary
    Purpose: This document contains a text representation of 8 bits, which is the correct implicit length of a byte and should be parsed accordingly
  -->
 
  <tdml:parserTestCase name="ubyte_binary_04" root="uB_01"
      model="SimpleTypes-binary" description="Section 5 Schema types-byte - DFDL-5-015R">
    <tdml:document>
      <tdml:documentPart type="text">a</tdml:documentPart>
    </tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <uB_01>97</uB_01>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>
 
  <!--
    Test name: ubyte_binary_05
    Schema: SimpleTypes-binary
    Purpose: This document contains a byte representation of 8 bits, which is the correct implicit length of a byte and should be parsed accordingly
             0x28 = 00101000 = 40
  -->
 
  <tdml:parserTestCase name="ubyte_binary_05" root="uB_01"
      model="SimpleTypes-binary" description="Section 5 Schema types-byte - DFDL-5-015R">
    <tdml:document>
      <tdml:documentPart type="byte">28</tdml:documentPart>
    </tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <uB_01>40</uB_01>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>
 
  <!--
    Test name: ubyte_implicit
    Schema: SimpleTypes-Embedded.dfdl.xsd
    Purpose: This document attempts to parse a textual representation of an unsignedByte with implicit length and should fail
  -->
 
  <tdml:parserTestCase name="ubyte_implicit" root="uByte"
      model="SimpleTypes-Embedded.dfdl.xsd" description="Section 5 Schema types- unsignedByte - DFDL-5-020R">
    <tdml:document>
      <tdml:documentPart type="bits">11010101</tdml:documentPart>
    </tdml:document>
    <tdml:errors>
      <tdml:error>Schema Definition Error</tdml:error>
      <tdml:error>MaxLength was asked for when isSimpleType(true) and isPrimitiveType(true)</tdml:error>
    </tdml:errors>
  </tdml:parserTestCase>
 
  <!--
    Test name: int_binary_01
    Schema: SimpleTypes-binary
    Purpose: This document demonstrates the implicit length of an int (32 bits), represented by bits
  -->
 
  <tdml:parserTestCase name="int_binary_01" root="int01"
      model="SimpleTypes-binary" description="Section 5 Schema types - int - DFDL-5-013R">
    <tdml:document>
      <tdml:documentPart type="bits">00000000 00000000 00000000 00001101</tdml:documentPart>
    </tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <int01>13</int01>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>
 
  <!--
    Test name: int_binary_02
    Schema: SimpleTypes-binary
    Purpose: This document has more bits than the implicit length of an int and should fail
  -->
 
  <tdml:parserTestCase name="int_binary_02" root="int01"
      model="SimpleTypes-binary" description="Section 5 Schema types - int - DFDL-5-013R">
    <tdml:document>
      <tdml:documentPart type="bits">00000000 00000000 00000000 00001101111</tdml:documentPart>
    </tdml:document>
    <tdml:errors>
      <tdml:error>Left over data</tdml:error>
    </tdml:errors>
  </tdml:parserTestCase>

  <!--
    Test name: int_binary_03
    Schema: SimpleTypes-binary
    Purpose: This document has less bits than the implicit length of an int and should fail
  -->
 
  <tdml:parserTestCase name="int_binary_03" root="int01"
      model="SimpleTypes-binary" description="Section 5 Schema types - int - DFDL-5-013R">
    <tdml:document>
      <tdml:documentPart type="bits">11111</tdml:documentPart>
    </tdml:document>
    <tdml:errors>
      <tdml:error>Parse Error</tdml:error>
      <tdml:error>Insufficient bits</tdml:error>
      <tdml:error>xs:int</tdml:error>
    </tdml:errors>
  </tdml:parserTestCase>
 
  <!--
    Test name: int_binary_04
    Schema: SimpleTypes-binary
    Purpose: This document contains a text representation of 32 bits, which is the correct implicit length of an int and should be parsed accordingly
  -->
 
  <tdml:parserTestCase name="int_binary_04" root="int01"
      model="SimpleTypes-binary" description="Section 5 Schema types - int - DFDL-5-013R">
    <tdml:document>
      <tdml:documentPart type="text">000a</tdml:documentPart>
    </tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <int01>808464481</int01>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>
 
  <!--
    Test name: int_binary_05
    Schema: SimpleTypes-binary
    Purpose: This document contains a byte representation of 32 bits, which is the correct implicit length of an int and should be parsed accordingly
  -->
 
  <tdml:parserTestCase name="int_binary_05" root="int01"
      model="SimpleTypes-binary" description="Section 5 Schema types - int - DFDL-5-013R">
    <tdml:document>
      <tdml:documentPart type="byte">00110028</tdml:documentPart>
    </tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <int01>1114152</int01>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>
 
  <!--
    Test name: int_implicit
    Schema: SimpleTypes-Embedded.dfdl.xsd
    Purpose: This document uses a schema with the textual representation of an int and an implicit length, which is not allowed.
  -->
 
  <tdml:parserTestCase name="int_implicit" root="int"
      model="SimpleTypes-Embedded.dfdl.xsd" description="Section 5 Schema types - int - DFDL-5-013R">
    <tdml:document>
      <tdml:documentPart type="text">1000</tdml:documentPart>
    </tdml:document>
    <tdml:errors>
      <tdml:error>Schema Definition Error</tdml:error>
      <tdml:error>MaxLength was asked for when isSimpleType(true) and isPrimitiveType(true)</tdml:error>
    </tdml:errors>
  </tdml:parserTestCase>
 
  <!--
    Test name: integer_binary_01
       Schema: SimpleTypes-binary
      Purpose: This document contains a binary representation of an integer using implicit length, which is not allowed
  -->
 
  <tdml:parserTestCase name="integer_binary_01" root="integer01"
      model="SimpleTypes-binary" description="Section 5 Schema types - integer - DFDL-5-011R">
    <tdml:document>
      <tdml:documentPart type="bits">01010101</tdml:documentPart>
    </tdml:document>
    <tdml:errors>
      <tdml:error>Schema Definition Error</tdml:error>
      <tdml:error>Size of binary data 'integer' cannot be determined implicitly</tdml:error>
    </tdml:errors>
  </tdml:parserTestCase>
 
  <!--
    Test name: nonNegInt_binary_01
       Schema: SimpleTypes-binary
      Purpose: This document contains a binary representation of an integer using implicit length, which is not allowed
  -->
 
  <tdml:parserTestCase name="nonNegInt_binary_01" root="posint01"
      model="SimpleTypes-binary" description="Section 5 Schema types - non negative integer - DFDL-5-016R">
    <tdml:document>
      <tdml:documentPart type="bits">01010101</tdml:documentPart>
    </tdml:document>
    <tdml:errors>
      <tdml:error>Schema Definition Error</tdml:error>
      <tdml:error>Size of binary data 'integer' cannot be determined implicitly</tdml:error>
    </tdml:errors>
  </tdml:parserTestCase>
 
  <!--
    Test name: hexBinary_01
    Schema: SimpleTypes-binary
    Purpose: This document demonstrates the use of the hexBinary simple type
  -->

  <tdml:parserTestCase name="hexBinary_01" root="hb_01"
      model="SimpleTypes-binary" description="Section 5 Simple Types - hexBinary - DFDL-5-025R">
    <tdml:document>
      <tdml:documentPart type="byte"><![CDATA[a1b1c1d1]]></tdml:documentPart>
    </tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <hb_01>a1b1c1d1</hb_01>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>
 
  <tdml:defineSchema name="SimpleTypes-padding">
    <dfdl:format ref="ex:daffodilTest1" representation="text"
      lengthUnits="characters" encoding="utf-8" byteOrder="bigEndian"
      textStringPadCharacter="X" textStringJustification="left" textTrimKind="padChar"
      textNumberJustification="left" textNumberPadCharacter="#" />

    <xs:element name="string" dfdl:lengthKind="explicit" dfdl:length="29" type="xs:string" />
    <xs:element name="string2" dfdl:lengthKind="delimited" type="xs:string" />

    <xs:element name="string3" dfdl:textStringPadCharacter="%NAK;" dfdl:lengthKind="delimited" type="xs:string" />
    <xs:element name="string4" dfdl:textStringPadCharacter="%HT;" dfdl:lengthKind="delimited" type="xs:string" />
    
    <xs:element name="string5">
      <xs:complexType>
        <xs:sequence dfdl:separator="/">
          <xs:element name="first" type="padded" />
          <xs:element name="second" type="xs:string" dfdl:textStringPadCharacter="_" dfdl:textStringJustification="center" dfdl:lengthKind="delimited" />
        </xs:sequence>
      </xs:complexType>
    </xs:element>
    
    <xs:element name="string6">
      <xs:complexType>
        <xs:sequence dfdl:separator="-">
          <xs:element name="first" type="padded2" />
          <xs:element name="second" type="xs:string" dfdl:textStringPadCharacter="_" dfdl:textStringJustification="left" dfdl:lengthKind="delimited" />
        </xs:sequence>
      </xs:complexType>
    </xs:element>
    
    <xs:simpleType name="padded" dfdl:textStringJustification="center" dfdl:textStringPadCharacter="-" dfdl:lengthKind="delimited">
      <xs:restriction base="xs:string" />
    </xs:simpleType>
    
    <xs:simpleType name="padded2" dfdl:textStringJustification="right" dfdl:textStringPadCharacter="_" dfdl:lengthKind="delimited">
      <xs:restriction base="xs:string" />
    </xs:simpleType>

    <xs:element name="string7" dfdl:lengthUnits="bytes" dfdl:textStringPadCharacter="%HT;%CR;" dfdl:lengthKind="delimited" type="xs:string" />
    <xs:element name="string8" dfdl:lengthUnits="characters" dfdl:textStringPadCharacter="o0" dfdl:lengthKind="delimited" type="xs:string" />
    
    <xs:element name="string9" dfdl:textTrimKind="none" dfdl:lengthKind="delimited" type="xs:string" />
    
    <xs:element name="int1" dfdl:lengthKind="explicit" dfdl:length="7" type="xs:int" />
    <xs:element name="int2" dfdl:lengthKind="delimited" type="xs:int" />
    
    <xs:element name="intseq">
      <xs:complexType>
        <xs:sequence dfdl:separator=".">
          <xs:element name="int3" type="xs:int" dfdl:textNumberPadCharacter="=" dfdl:textNumberJustification="left" dfdl:lengthKind="delimited" />
          <xs:element name="int4" type="xs:int" dfdl:textNumberPadCharacter="-" dfdl:textNumberJustification="left" dfdl:lengthKind="delimited" />
        </xs:sequence>
      </xs:complexType>
    </xs:element>
    
    <xs:element name="numseq">
      <xs:complexType>
        <xs:sequence dfdl:separator="~">
          <xs:element name="one" type="xs:int" dfdl:textNumberPadCharacter="." dfdl:textNumberJustification="right" dfdl:lengthKind="delimited" />
          <xs:element name="two" type="xs:unsignedShort" dfdl:textNumberPadCharacter="-" dfdl:textNumberJustification="center" dfdl:lengthKind="delimited" />
          <xs:element name="three" type="xs:float" dfdl:textNumberPadCharacter="." dfdl:textNumberJustification="left" dfdl:lengthKind="delimited" />
        </xs:sequence>
      </xs:complexType>
    </xs:element>
    
    <xs:simpleType name="int5" dfdl:textNumberJustification="right" dfdl:textNumberPadCharacter="_" dfdl:lengthKind="delimited">
      <xs:restriction base="xs:int" />
    </xs:simpleType>
    
    <xs:element name="int6" type="int5" />
    
    <dfdl:defineEscapeScheme name="table1">
      <dfdl:escapeScheme escapeCharacter='/'
        escapeKind="escapeCharacter" escapeEscapeCharacter="["/>
    </dfdl:defineEscapeScheme>
        
    <xs:element name="string10" type="xs:string" dfdl:lengthKind="delimited" dfdl:textStringJustification="center"
      dfdl:textStringPadCharacter="\" dfdl:escapeSchemeRef="ex:table1" />
          
    <xs:element name="nil" nillable="true" dfdl:nilKind="literalValue" dfdl:nilValue="o" type="xs:string" dfdl:lengthKind="explicit" dfdl:length="7"
      dfdl:textStringPadCharacter="/" dfdl:textStringJustification="center" />
    
    <xs:element name="nil2" nillable="true" dfdl:nilKind="literalValue" dfdl:nilValue="o" type="xs:string" dfdl:lengthKind="delimited"
      dfdl:textStringPadCharacter="/" dfdl:textStringJustification="center" />
    
    <xs:element name="seq">
      <xs:complexType>
        <xs:sequence dfdl:separator=".">
          <xs:element name="string11" dfdl:textTrimKind="padChar" dfdl:textStringJustification="left" dfdl:textStringPadCharacter="o"
            dfdl:lengthKind="delimited" type="xs:string" />
          <xs:element name="string12" dfdl:textTrimKind="padChar" dfdl:textStringJustification="right" dfdl:textStringPadCharacter="o"
            dfdl:lengthKind="delimited" type="xs:string" />
          <xs:element name="string13" dfdl:textTrimKind="padChar" dfdl:textStringJustification="center" dfdl:textStringPadCharacter="o"
            dfdl:lengthKind="delimited" type="xs:string" />
        </xs:sequence>
      </xs:complexType>
    </xs:element>    

  </tdml:defineSchema>
 
  <!--
    Test name: literalChar_padding
    Schema: SimpleTypes-padding
    Purpose: This document demonstrates the use of a string literal for a text string pad character
  -->

  <tdml:parserTestCase name="literalChar_padding" root="string"
      model="SimpleTypes-padding" description="Section 13 Simple Types - textStringPadCharacter DFDL-13-042R">
    <tdml:document>
      <tdml:documentPart type="text"><![CDATA[remove padding pleaseXXXXXXXX]]></tdml:documentPart>
    </tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <string>remove padding please</string>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>
 
  <!--
    Test name: literalChar_padding2
    Schema: SimpleTypes-padding
    Purpose: This document demonstrates the use of a string literal for a text string pad character
  -->

  <tdml:parserTestCase name="literalChar_padding2" root="string2"
      model="SimpleTypes-padding" description="Section 13 Simple Types - textStringPadCharacter DFDL-13-042R">
    <tdml:document>
      <tdml:documentPart type="text"><![CDATA[remove padding pleaseXXXXXXXX]]></tdml:documentPart>
    </tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <string2>remove padding please</string2>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>
 
  <!--
    Test name: charEntity_padding1
    Schema: SimpleTypes-padding
    Purpose: This document demonstrates the use of a character entity for a text string pad character
  -->

  <tdml:parserTestCase name="charEntity_padding1" root="string3"
      model="SimpleTypes-padding" description="Section 13 Simple Types - textStringPadCharacter DFDL-13-042R">
    <tdml:document>
      <tdml:documentPart type="byte"><![CDATA[72 65 6D 6F 76 65 20 70 61 64 64 69 6E 67 20 70 6C 65 61 73 65 15 15 15 15 15]]></tdml:documentPart>
    </tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <string3>remove padding please</string3>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>
 
  <!--
    Test name: charEntity_padding2
    Schema: SimpleTypes-padding
    Purpose: This document demonstrates the use of a character entity for a text string pad character
  -->

  <tdml:parserTestCase name="charEntity_padding2" root="string4"
      model="SimpleTypes-padding" description="Section 13 Simple Types - textStringPadCharacter DFDL-13-042R">
    <tdml:document>
      <tdml:documentPart type="byte"><![CDATA[72 65 6D 6F 76 65 20 70 61 64 64 69 6E 67 20 70 6C 65 61 73 65 09 09 09 09]]></tdml:documentPart>
    </tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <string4>remove padding please</string4>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>
 
  <!--
    Test name: charEntity_padding3
    Schema: SimpleTypes-padding
    Purpose: This document demonstrates that it is a schema definition error if more than one byte value entity
             is specified for the textStringPadCharacter when lengthUnits="bytes"

  -->

  <tdml:parserTestCase name="charEntity_padding3" root="string7"
      model="SimpleTypes-padding" description="Section 13 Simple Types - textStringPadCharacter DFDL-13-042R">
    <tdml:document>
      <tdml:documentPart type="byte"><![CDATA[72 65 6D 6F 76 65 20 70 61 64 64 69 6E 67 20 70 6C 65 61 73 65 09 0D 09 0D]]></tdml:documentPart>
    </tdml:document>
      <tdml:errors>
        <tdml:error>Schema Definition Error</tdml:error>
        <tdml:error>Length of string must be exactly 1 character</tdml:error>
      </tdml:errors>
  </tdml:parserTestCase>
 
  <!--
    Test name: literalChar_padding3
    Schema: SimpleTypes-padding
    Purpose: This document demonstrates the use of a string literal for a text string pad character
        within a simpleType contained in a sequence (center justified)
  -->

  <tdml:parserTestCase name="literalChar_padding3" root="string5"
      model="SimpleTypes-padding" description="Section 13 Simple Types - textStringPadCharacter DFDL-13-042R">
    <tdml:document>
      <tdml:documentPart type="text"><![CDATA[---------first---------/________second________]]></tdml:documentPart>
    </tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <string5>
          <first>first</first>
          <second>second</second>
        </string5>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>
 
  <!--
    Test name: literalChar_padding4
    Schema: SimpleTypes-padding
    Purpose: This document demonstrates the use of a string literal for a text string pad character
        within a simpleType contained in a sequence (left and right justified)
  -->

  <tdml:parserTestCase name="literalChar_padding4" root="string6"
      model="SimpleTypes-padding" description="Section 13 Simple Types - textStringPadCharacter DFDL-13-042R">
    <tdml:document>
      <tdml:documentPart type="text"><![CDATA[_______________first-second________]]></tdml:documentPart>
    </tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <string6>
          <first>first</first>
          <second>second</second>
        </string6>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>
 
  <!--
    Test name: literalChar_padding5
    Schema: SimpleTypes-padding
    Purpose: This document demonstrates the use of a string literal for a text string pad character
        within a simpleType contained in a sequence (left and right justified)
  -->

  <tdml:parserTestCase name="literalChar_padding5" root="string8"
      model="SimpleTypes-padding" description="Section 13 Simple Types - textStringPadCharacter DFDL-13-042R">
    <tdml:document>
      <tdml:documentPart type="text"><![CDATA[stringo0o0o0o0o0o0]]></tdml:documentPart>
    </tdml:document>
    <tdml:errors>
      <tdml:error>Schema Definition Error</tdml:error>
      <tdml:error>Length of string must be exactly 1 character</tdml:error>
    </tdml:errors>
  </tdml:parserTestCase>
 
  <!--
    Test name: literalChar_padding6
    Schema: SimpleTypes-padding
    Purpose: This document demonstrates the use of textTrimKind = none to prevent trimming
  -->

  <tdml:parserTestCase name="literalChar_padding6" root="string9"
      model="SimpleTypes-padding" description="Section 13 Simple Types - textStringPadCharacter DFDL-13-042R">
    <tdml:document>
      <tdml:documentPart type="text"><![CDATA[remove padding pleaseXXXXXXXX]]></tdml:documentPart>
    </tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <string9>remove padding pleaseXXXXXXXX</string9>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>
 
  <!--
    Test name: number_padding
    Schema: SimpleTypes-padding
    Purpose: This document demonstrates the use of padding with numbers
  -->

  <tdml:parserTestCase name="number_padding" root="int1"
      model="SimpleTypes-padding" description="Section 13 Simple Types - textNumberPadCharacter DFDL-13-047R">
    <tdml:document>
      <tdml:documentPart type="text"><![CDATA[12345##]]></tdml:documentPart>
    </tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <int1>12345</int1>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>
 
  <!--
    Test name: number_padding2
    Schema: SimpleTypes-padding
    Purpose: This document demonstrates the use of padding with numbers
  -->

  <tdml:parserTestCase name="number_padding2" root="int2"
      model="SimpleTypes-padding" description="Section 13 Simple Types - textNumberPadCharacter DFDL-13-047R">
    <tdml:document>
      <tdml:documentPart type="text"><![CDATA[12345############################]]></tdml:documentPart>
    </tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <int2>12345</int2>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>
 
  <!--
    Test name: number_padding3
    Schema: SimpleTypes-padding
    Purpose: This document demonstrates the use of padding with numbers
  -->

  <tdml:parserTestCase name="number_padding3" root="intseq"
      model="SimpleTypes-padding" description="Section 13 Simple Types - textNumberPadCharacter DFDL-13-047R">
    <tdml:document>
      <tdml:documentPart type="text"><![CDATA[123====.456-----]]></tdml:documentPart>
    </tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <intseq>
          <int3>123</int3>
          <int4>456</int4>
        </intseq>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>
 
  <!--
    Test name: number_padding4
    Schema: SimpleTypes-padding
    Purpose: This document demonstrates the use of padding with multiple number types and justifications
  -->

  <tdml:parserTestCase name="number_padding4" root="numseq"
      model="SimpleTypes-padding" description="Section 13 Simple Types - textNumberPadCharacter DFDL-13-047R">
    <tdml:document>
      <tdml:documentPart type="text"><![CDATA[......55~-----6800-----~49.......]]></tdml:documentPart>
    </tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <numseq>
          <one>55</one>
          <two>6800</two>
          <three>49.0</three>
        </numseq>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>
 
  <!--
    Test name: number_padding5
    Schema: SimpleTypes-padding
    Purpose: This document demonstrates the use of padding with numbers
  -->

  <tdml:parserTestCase name="number_padding5" root="int6"
      model="SimpleTypes-padding" description="Section 13 Simple Types - textNumberPadCharacter DFDL-13-047R">
    <tdml:document>
      <tdml:documentPart type="text"><![CDATA[______5]]></tdml:documentPart>
    </tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
          <int6>5</int6>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>
 
  <!--
    Test name: padding_escape
    Schema: SimpleTypes-padding
    Purpose: This document demonstrates the use of padding with escape characters
  -->

  <tdml:parserTestCase name="padding_escape" root="string10"
      model="SimpleTypes-padding" description="Section 7 - On parsing, the escape scheme is applied after padding characters are trimmed DFDL-7-089R">
    <tdml:document>
      <tdml:documentPart type="text">\\\word/\\\</tdml:documentPart>
    </tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
          <string10>word</string10>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

  <!--
    Test name: padding_nil
    Schema: SimpleTypes-padding
    Purpose: This document demonstrates the use of padding with nils
  -->

  <tdml:parserTestCase name="padding_nil" root="nil"
      model="SimpleTypes-padding" description="Spec errata - On parsing the element value is nil if
      the trimmed data matches one of the literal strings in the list">
    <tdml:document>
      <tdml:documentPart type="text">///o///</tdml:documentPart>
    </tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
          <nil xsi:nil="true"></nil>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>
 
  <!--
    Test name: padding_nil2
    Schema: SimpleTypes-padding
    Purpose: This document demonstrates the use of padding with nils
  -->

  <tdml:parserTestCase name="padding_nil2" root="nil2"
      model="SimpleTypes-padding" description="Spec errata - On parsing the element value is nil if
      the trimmed data matches one of the literal strings in the list">
    <tdml:document>
      <tdml:documentPart type="text">///o///</tdml:documentPart>
    </tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
          <nil2 xsi:nil="true"></nil2>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>
 
  <!--
    Test name: justification_1
    Schema: SimpleTypes-padding
    Purpose: This document demonstrates how padding is trimmed when a pad character is found within the string
  -->

  <tdml:parserTestCase name="justification_1" root="seq"
      model="SimpleTypes-padding" description="Section 5 - Simple Types - textStringJustification DFDL-13-041R">
    <tdml:document>
      <tdml:documentPart type="text">oregano.oregano.oregano</tdml:documentPart>
    </tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <seq>
          <string11>oregan</string11>
          <string12>regano</string12>
          <string13>regan</string13>
        </seq>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>
 
  <tdml:defineSchema name="dateTimeSchema">
    <dfdl:format ref="daffodilTest1" />

<!--
     xs:date      yyyy-MM-dd
     xs:dateTime  yyyy-MM-dd'T'HH:mm:ss
     xs:time      HH:mm:ssZZZ
-->
    
    <xs:element name="dateImp" type="xs:date" dfdl:calendarPatternKind="implicit" dfdl:lengthKind="explicit" dfdl:length="10" />
    <xs:element name="date01" type="xs:date" dfdl:calendarPatternKind="explicit" dfdl:calendarPattern="'Today is the 'dd'th day of 'MMM', year 'yyyy"
                dfdl:lengthKind="explicit" dfdl:length="43" />
    <xs:element name="date01b" type="xs:date" dfdl:calendarPatternKind="explicit" dfdl:calendarPattern="'Today is the 'dd'th day of 'MMM', year 'YYYY"
                dfdl:lengthKind="explicit" dfdl:length="43" />
    <xs:element name="date02" type="xs:date" dfdl:calendarCheckPolicy="lax" dfdl:calendarPatternKind="implicit" dfdl:lengthKind="explicit" dfdl:length="10" />
    <xs:element name="date03" type="xs:date" dfdl:calendarCheckPolicy="lax" dfdl:calendarPatternKind="implicit" dfdl:lengthKind="explicit" dfdl:length="11" />
    <xs:element name="date04" type="xs:date" dfdl:calendarCheckPolicy="strict" dfdl:calendarPatternKind="implicit" dfdl:lengthKind="explicit" dfdl:length="10" />
    <xs:element name="date05" type="xs:date" dfdl:calendarCheckPolicy="lax" dfdl:calendarPatternKind="explicit"
                dfdl:calendarPattern="'day 'e' of the week, month 'MM' year 'yyyy"
                dfdl:calendarFirstDayOfWeek="Monday" dfdl:lengthKind="delimited" />
    <xs:element name="date06" type="xs:date" dfdl:calendarCheckPolicy="lax" dfdl:calendarPatternKind="explicit"
                dfdl:calendarPattern="'day 'e' of the week, month 'MM' year 'yyyy"
                dfdl:calendarFirstDayOfWeek="Sunday" dfdl:lengthKind="delimited" />
    <xs:element name="date07" type="xs:date" dfdl:calendarCheckPolicy="lax" dfdl:calendarPatternKind="explicit"
                dfdl:calendarPattern="EEEE', 'MM yyyy" dfdl:lengthKind="delimited" />
    <xs:element name="date08" type="xs:date" dfdl:calendarCheckPolicy="lax" dfdl:calendarPatternKind="explicit"
                dfdl:calendarPattern="...MM...dd...yyyy" dfdl:lengthKind="delimited" />
    <xs:element name="date09" type="xs:date" dfdl:calendarCheckPolicy="lax" dfdl:calendarPatternKind="implicit" dfdl:textTrimKind="padChar"
                dfdl:textCalendarJustification="center" dfdl:textCalendarPadCharacter="." dfdl:lengthKind="delimited" />
    <xs:element name="date10" type="xs:date" dfdl:calendarCheckPolicy="lax" dfdl:calendarPatternKind="implicit" dfdl:textTrimKind="padChar"
                dfdl:textCalendarJustification="left" dfdl:textCalendarPadCharacter="x" dfdl:lengthKind="delimited" />
    <xs:element name="date11" type="xs:date" dfdl:calendarCheckPolicy="lax" dfdl:calendarPatternKind="implicit" dfdl:textTrimKind="padChar"
                dfdl:textCalendarJustification="right" dfdl:textCalendarPadCharacter="d" dfdl:lengthKind="delimited" />

    <xs:element name="date12" type="ex:explicDate" dfdl:calendarPattern="dd MM yyyy, HH:mm:ss"/>
    <xs:element name="date13" type="ex:explicDate" dfdl:calendarPattern="MM-dd-yyyy G"/>
    <xs:element name="date14" type="ex:explicDate" dfdl:calendarPattern="Q yyyy"/>
    <xs:element name="date15" type="ex:explicDate" dfdl:calendarPattern="D yyyy"/>
    <xs:element name="date16" type="ex:explicDate" dfdl:calendarPattern="F MM yyyy"/>
    <xs:element name="date17" type="ex:explicDate7" dfdl:calendarPattern="w yyyy"/>
    <xs:element name="date18" type="ex:explicDate" dfdl:calendarPattern="w yyyy" dfdl:calendarDaysInFirstWeek="5"/>
    <xs:element name="date19" type="ex:explicDate7" dfdl:calendarPattern="W MM yyyy"/>
    <xs:element name="date20" type="ex:explicDate" dfdl:calendarPattern="W MM yyyy" dfdl:calendarDaysInFirstWeek="2"/>

    <xs:element name="date21">
      <xs:complexType>
           <xs:choice>
             <xs:element name="superfull" type="ex:explicDate" dfdl:calendarPattern="'It is day 'dd' of 'MMM, yyyy" />
             <xs:element name="short" type="ex:explicDate" dfdl:calendarPattern="MM-dd-yyyy"/>
             <xs:element name="full" type="ex:explicDate" dfdl:calendarPattern="MMM dd, yyyy"/>
           </xs:choice>
      </xs:complexType>
    </xs:element>
    
    <xs:element name="date22" type="ex:explicDate" dfdl:calendarPattern="MM dd yy" dfdl:calendarCenturyStart="20"/>
    <xs:element name="date23" type="ex:explicDate" dfdl:calendarPattern="MM dd yy" dfdl:calendarCenturyStart="48"/>
    
    <xs:element name="date24" type="ex:explicDate" dfdl:encoding="UTF-8" dfdl:calendarPattern="EEEE MMM yyyy" dfdl:calendarLanguage="de-1996"/>
    <xs:element name="date25" type="ex:explicDate" dfdl:calendarPattern="EEEE MMM yyyy" dfdl:calendarLanguage="es-MX"/>
    <xs:element name="date26" type="ex:explicDate" dfdl:calendarPattern="EEEE MMM yyyy" dfdl:calendarLanguage="en-GB"/>
    
    <xs:element name="date27" type="ex:explicDate" dfdl:calendarPattern="yyyy"/>
    <xs:element name="date28" type="ex:explicDate" dfdl:calendarPattern=""/>
    <xs:element name="date29" type="ex:explicDate" dfdl:calendarPattern="MM"/>

    <xs:element name="date30" type="ex:explicDate" dfdl:calendarPattern="dd...00MM.....yyyy*()*()*()"/>

    <xs:element name="date31" type="ex:explicDate" dfdl:calendarPattern="dd MM yyyy, mm:ss"/>
    
    <xs:simpleType name="explicDate" dfdl:calendarPatternKind="explicit" dfdl:lengthKind="delimited">
      <xs:restriction base="xs:date"/>
    </xs:simpleType>
    
    <xs:simpleType name="explicDate7" dfdl:calendarDaysInFirstWeek="7">
      <xs:restriction base="ex:explicDate"/>
    </xs:simpleType>

    <xs:element name="timeImp" type="xs:time" dfdl:calendarPatternKind="implicit" dfdl:lengthKind="explicit" dfdl:length="11" />
    <xs:element name="time01" type="xs:time" dfdl:calendarCheckPolicy="lax" dfdl:calendarPatternKind="implicit" dfdl:lengthKind="explicit" dfdl:length="11" />
    <xs:element name="time02" type="xs:time" dfdl:calendarCheckPolicy="strict" dfdl:calendarPatternKind="implicit" dfdl:lengthKind="explicit" dfdl:length="11" />
    <xs:element name="time03" type="xs:time" dfdl:calendarCheckPolicy="strict" dfdl:calendarPatternKind="explicit"
                dfdl:calendarPattern="hh:mm:ss.SSSS" dfdl:lengthKind="delimited"/>
    <xs:element name="time04" type="xs:time" dfdl:calendarCheckPolicy="strict" dfdl:calendarPatternKind="explicit" dfdl:calendarPattern="hh:mm.zzz" dfdl:lengthKind="delimited"/>
    <xs:element name="time04b" type="xs:time" dfdl:calendarCheckPolicy="strict" dfdl:calendarPatternKind="explicit" dfdl:calendarPattern="hh:mm.zzzz" dfdl:lengthKind="delimited"/>
    <xs:element name="time05" type="xs:time" dfdl:calendarCheckPolicy="strict" dfdl:calendarPatternKind="explicit" dfdl:calendarPattern="hh:mm.v" dfdl:lengthKind="delimited"/>
    <xs:element name="time05b" type="xs:time" dfdl:calendarCheckPolicy="strict" dfdl:calendarPatternKind="explicit" dfdl:calendarPattern="hh:mm.vvvv" dfdl:lengthKind="delimited"/>
    <xs:element name="time06" type="xs:time" dfdl:calendarCheckPolicy="strict" dfdl:calendarPatternKind="explicit" dfdl:calendarPattern="hh:mm.VVVV" dfdl:lengthKind="delimited"/>
    <xs:element name="time07" type="xs:time" dfdl:calendarCheckPolicy="strict" dfdl:calendarPatternKind="explicit" dfdl:calendarPattern="hh:mm.V" dfdl:lengthKind="delimited"/>

    <xs:element name="time08" type="xs:time" dfdl:calendarCheckPolicy="strict" dfdl:calendarPatternKind="explicit" dfdl:calendarPattern="hh:mm:ss" dfdl:lengthKind="delimited" dfdl:calendarTimeZone="UTC+1"/>
    <xs:element name="time09" type="xs:time" dfdl:calendarCheckPolicy="strict" dfdl:calendarPatternKind="explicit" dfdl:calendarPattern="hh:mm:ss" dfdl:lengthKind="delimited" dfdl:calendarTimeZone="UTC+1:30"/>
    <xs:element name="time10" type="xs:time" dfdl:calendarCheckPolicy="strict" dfdl:calendarPatternKind="implicit" dfdl:textTrimKind="padChar"
                dfdl:textCalendarJustification="center" dfdl:textCalendarPadCharacter="." dfdl:lengthKind="delimited" />
    <xs:element name="time11" type="xs:time" dfdl:calendarCheckPolicy="strict" dfdl:calendarPatternKind="implicit" dfdl:textTrimKind="padChar"
                dfdl:textCalendarJustification="right" dfdl:textCalendarPadCharacter=":" dfdl:lengthKind="delimited" />
    <xs:element name="time12" type="xs:time" dfdl:calendarCheckPolicy="strict" dfdl:calendarPatternKind="explicit" dfdl:calendarPattern="hh:mm:ss.SSS" dfdl:lengthKind="delimited"/>
    <xs:element name="time13" type="xs:time" dfdl:calendarCheckPolicy="strict" dfdl:calendarPatternKind="explicit" dfdl:calendarPattern="hh:mm:ss.SSSSSS" dfdl:lengthKind="delimited"/>
    <xs:element name="time14" type="xs:time" dfdl:calendarCheckPolicy="strict" dfdl:calendarPatternKind="explicit" dfdl:calendarPattern="hh:mm:ss.SSSSSSSSSSSSSSSSSSSSS" dfdl:lengthKind="delimited"/>
    <xs:element name="time15" type="xs:time" dfdl:calendarCheckPolicy="strict" dfdl:calendarPatternKind="explicit" dfdl:calendarPattern="hh:mm:ss.SSSSSSSSSSSSSSSSSSSSSS" dfdl:lengthKind="delimited"/>
    <xs:element name="time16" type="xs:time" dfdl:calendarCheckPolicy="strict" dfdl:calendarPatternKind="explicit" dfdl:calendarPattern="HH:mm" dfdl:lengthKind="delimited"/>
    <xs:element name="time17" type="xs:time" dfdl:calendarCheckPolicy="strict" dfdl:calendarPatternKind="explicit" dfdl:calendarPattern="HH:mmaa" dfdl:lengthKind="delimited"/>
    <xs:element name="time17b" type="xs:time" dfdl:calendarCheckPolicy="strict" dfdl:calendarPatternKind="explicit" dfdl:calendarPattern="hh:mmaa" dfdl:lengthKind="delimited"/>
    <xs:element name="time18" type="xs:time" dfdl:calendarCheckPolicy="strict" dfdl:calendarPatternKind="explicit" dfdl:calendarPattern="KK:mmaa" dfdl:lengthKind="delimited"/>
    <xs:element name="time19" type="xs:time" dfdl:calendarCheckPolicy="strict" dfdl:calendarPatternKind="explicit" dfdl:calendarPattern="kk:mm" dfdl:lengthKind="delimited"/>
    <xs:element name="time20" type="xs:time" dfdl:calendarCheckPolicy="strict" dfdl:calendarPatternKind="explicit" dfdl:calendarPattern='hh@mm$%^&amp;*()s' dfdl:lengthKind="delimited"/>
    <xs:element name="time21" type="xs:time" dfdl:calendarCheckPolicy="strict" dfdl:calendarPatternKind="explicit" dfdl:calendarPattern="hh@mm$%^!@#.,/.''}{}{*()s" dfdl:lengthKind="delimited"/>
    <xs:element name="time22" type="xs:time" dfdl:calendarCheckPolicy="strict" dfdl:calendarPatternKind="explicit" dfdl:calendarPattern="mm" dfdl:lengthKind="delimited"/>
    <xs:element name="time23" type="xs:time" dfdl:calendarCheckPolicy="strict" dfdl:calendarPatternKind="explicit" dfdl:calendarPattern="" dfdl:lengthKind="delimited"/>
    <xs:element name="time24" type="xs:time" dfdl:calendarCheckPolicy="strict" dfdl:calendarPatternKind="explicit" dfdl:calendarPattern="." dfdl:lengthKind="delimited"/>
    <xs:element name="time25" type="xs:time" dfdl:calendarCheckPolicy="strict" dfdl:calendarPatternKind="explicit" dfdl:calendarPattern="yyyy-dd hh:mm" dfdl:lengthKind="delimited"/>
    <xs:element name="time26" type="xs:time" dfdl:calendarCheckPolicy="strict" dfdl:calendarPatternKind="explicit" dfdl:calendarPattern="bb hh:mm" dfdl:lengthKind="delimited"/>

    <xs:element name="dateTimeImp" type="xs:dateTime" dfdl:calendarPatternKind="implicit" dfdl:lengthKind="delimited" />
    <xs:element name="dateTime01" type="xs:dateTime" dfdl:calendarPatternKind="explicit" dfdl:calendarPattern="'It is 'hh:mmaa' on the 'dd'st of 'MMM', year 'yyyy"
                dfdl:lengthKind="explicit" dfdl:length="44" />
    <xs:element name="dateTime02" type="xs:dateTime" dfdl:calendarCheckPolicy="lax" dfdl:calendarPatternKind="implicit" dfdl:lengthKind="explicit" dfdl:length="19" />
    <xs:element name="dateTime03" type="xs:dateTime" dfdl:calendarCheckPolicy="lax" dfdl:calendarPatternKind="explicit" dfdl:lengthKind="delimited"
        dfdl:calendarPattern="'Twas a sunny 'EEEE' at 'hh' O''clock. The year was 'yyyy', and it was the hottest 'MMM' we had ever experienced.'" />
    <xs:element name="dateTime04" type="xs:dateTime" dfdl:calendarCheckPolicy="lax" dfdl:calendarPatternKind="explicit" dfdl:lengthKind="delimited"
        dfdl:calendarPattern="HH:mm:ss MMM-dd-yyyy" />
    <xs:element name="dateTime05" type="xs:dateTime" dfdl:calendarPatternKind="explicit" dfdl:lengthKind="delimited" dfdl:calendarPattern="W MM yyyy"
        dfdl:calendarFirstDayOfWeek="Tuesday" dfdl:calendarDaysInFirstWeek="5"/>
    <xs:element name="dateTime06" type="xs:dateTime" dfdl:calendarPatternKind="explicit" dfdl:lengthKind="delimited" dfdl:calendarPattern="W MM yyyy"
        dfdl:calendarFirstDayOfWeek="Thursday" dfdl:calendarDaysInFirstWeek="7"/>
    <xs:element name="dateTime07" type="xs:dateTime" dfdl:calendarPatternKind="explicit" dfdl:lengthKind="delimited" dfdl:calendarPattern="W MM yyyy"
        dfdl:calendarFirstDayOfWeek="Thursday" dfdl:calendarDaysInFirstWeek="2"/>
    <xs:element name="dateTime08" type="xs:dateTime" dfdl:calendarPatternKind="explicit" dfdl:lengthKind="delimited" dfdl:calendarPattern="W MM yyyy hh:mm:ssaa"
        dfdl:calendarFirstDayOfWeek="Sunday" dfdl:calendarDaysInFirstWeek="7"/>
    <xs:element name="dateTime09" type="xs:dateTime" dfdl:calendarCheckPolicy="strict" dfdl:calendarPatternKind="explicit" dfdl:textTrimKind="padChar"
                dfdl:textCalendarJustification="center" dfdl:textCalendarPadCharacter="." dfdl:lengthKind="delimited" dfdl:calendarPattern="MM.dd.yyyy hh:mm:ssaa"/>
    <xs:element name="dateTime10" type="xs:dateTime" dfdl:calendarCheckPolicy="strict" dfdl:calendarPatternKind="explicit" dfdl:textTrimKind="padChar"
                dfdl:textCalendarJustification="left" dfdl:textCalendarPadCharacter=":" dfdl:lengthKind="delimited" dfdl:calendarPattern="MM.dd.yyyy hh:mm:ssaa"/>
    <xs:element name="dateTime11" type="xs:dateTime" dfdl:calendarCheckPolicy="strict" dfdl:calendarPatternKind="explicit" dfdl:textTrimKind="padChar"
                dfdl:textCalendarJustification="center" dfdl:textCalendarPadCharacter="%HT;" dfdl:lengthKind="delimited" dfdl:calendarPattern="MM.dd.yyyy hh:mm:ssaa"/>
    <xs:element name="dateTime12" type="xs:dateTime" dfdl:calendarCheckPolicy="lax" dfdl:calendarPatternKind="explicit" dfdl:textTrimKind="padChar"
                dfdl:textCalendarJustification="right" dfdl:textCalendarPadCharacter="%HT;" dfdl:lengthKind="delimited" dfdl:calendarPattern="MM.dd.yyyy hh:mm:ssaa"/>

  </tdml:defineSchema>

<!--
     Test Name: dateImplicitPattern
        Schema: dateTimeSchema
          Root: dateImp
       Purpose: This test demonstrates the date data type with the implicit calendar Pattern.
                The data matches this pattern and should be parsed correctly.
-->
 
  <tdml:parserTestCase name="dateImplicitPattern" root="dateImp"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarPatternKind - DFDL-13-138R">

    <tdml:document><![CDATA[1995-03-24]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <dateImp>1995-03-24</dateImp>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: dateImplicitPatternFail
        Schema: dateTimeSchema
          Root: dateImp
       Purpose: This test demonstrates the date data type with the implicit calendar Pattern.
                The data does NOT match this pattern and should fail parsing.
-->
 
  <tdml:parserTestCase name="dateImplicitPatternFail" root="dateImp"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarPatternKind - DFDL-13-138R">

    <tdml:document><![CDATA[1998-3-Mar]]></tdml:document>
    <tdml:errors>
      <tdml:error>Parse Error:</tdml:error>
      <tdml:error>Convert to Date (for xs:date)</tdml:error>
      <tdml:error>Failed to parse '1998-3-Mar'</tdml:error>
    </tdml:errors>
  </tdml:parserTestCase>

<!--
     Test Name: timeImplicitPattern
        Schema: dateTimeSchema
          Root: timeImp
       Purpose: This test demonstrates the time data type with the implicit calendar Pattern.
                The data matches this pattern and should be parsed correctly.
-->
 
  <tdml:parserTestCase name="timeImplicitPattern" root="timeImp"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarPatternKind - DFDL-13-138R">

    <tdml:document><![CDATA[12:43:20GMT]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <timeImp>12:43:20Z</timeImp>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: timeImplicitPatternFail
        Schema: dateTimeSchema
          Root: timeImp
       Purpose: This test demonstrates the time data type with the implicit calendar Pattern.
                The data does NOT match this pattern and should fail parsing.
-->
 
  <tdml:parserTestCase name="timeImplicitPatternFail" root="timeImp"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarPatternKind - DFDL-13-138R">

    <tdml:document><![CDATA[12:43.45 PM]]></tdml:document>
    <tdml:errors>
      <tdml:error>Parse Error:</tdml:error>
      <tdml:error>Convert to Time (for xs:time)</tdml:error>
      <tdml:error>Failed to parse '12:43.45 PM'</tdml:error>
    </tdml:errors>
  </tdml:parserTestCase>

<!--
     Test Name: dateTimeImplicitPattern
        Schema: dateTimeSchema
          Root: dateTimeImp
       Purpose: This test demonstrates the dateTime data type with the implicit calendar Pattern.
                The data matches this pattern and should be parsed correctly.
-->
 
  <tdml:parserTestCase name="dateTimeImplicitPattern" root="dateTimeImp"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarPatternKind - DFDL-13-138R">

    <tdml:document><![CDATA[2013-03-24T03:45:30]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <dateTimeImp>2013-03-24T03:45:30Z</dateTimeImp>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>


<!--
     Test Name: dateTimeImplicitPatternFail
        Schema: dateTimeSchema
          Root: dateTimeImp
       Purpose: This test demonstrates the dateTime data type with the implicit calendar Pattern.
                The data does NOT match this pattern and should fail parsing.
-->
 
  <tdml:parserTestCase name="dateTimeImplicitPatternFail" root="dateTimeImp"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarPatternKind - DFDL-13-138R">

    <tdml:document><![CDATA[2013.03.24 03:45:30]]></tdml:document>
    <tdml:errors>
      <tdml:error>Parse Error:</tdml:error>
      <tdml:error>Convert to DateTime (for xs:dateTime)</tdml:error>
      <tdml:error>Failed to parse '2013.03.24 03:45:30'</tdml:error>
    </tdml:errors>
  </tdml:parserTestCase>

<!--
     Test Name: dateTimeImplicitPatternFail2
        Schema: dateTimeSchema
          Root: dateTimeImp
       Purpose: This test demonstrates the dateTime data type with the implicit calendar Pattern.
                The data does NOT match this pattern and should fail parsing.
-->
 
  <tdml:parserTestCase name="dateTimeImplicitPatternFail2" root="dateTimeImp"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarPatternKind - DFDL-13-138R">

    <tdml:document><![CDATA[2013-03-24T03:45:30-00:00]]></tdml:document>
    <tdml:errors>
      <tdml:error>Parse Error:</tdml:error>
      <tdml:error>Convert to DateTime (for xs:dateTime)</tdml:error>
    </tdml:errors>
  </tdml:parserTestCase>

<!--
     Test Name: dateTimeImplicitPatternFail3
        Schema: dateTimeSchema
          Root: dateTimeImp
       Purpose: This test demonstrates the dateTime data type with the implicit calendar Pattern.
                The data does NOT match this pattern and should fail parsing.
-->
 
  <tdml:parserTestCase name="dateTimeImplicitPatternFail3" root="dateTimeImp"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarPatternKind - DFDL-13-138R">

    <tdml:document><![CDATA[2013-03-24T03:45:30 Pacific Standard Time]]></tdml:document>
    <tdml:errors>
      <tdml:error>Parse Error:</tdml:error>
      <tdml:error>Convert to DateTime (for xs:dateTime)</tdml:error>
    </tdml:errors>
  </tdml:parserTestCase>

<!--
     Test Name: dateTimeImplicitPatternFail4
        Schema: dateTimeSchema
          Root: dateTimeImp
       Purpose: This test demonstrates the dateTime data type with the implicit calendar Pattern.
                The data does NOT match this pattern and should fail parsing.
-->
 
  <tdml:parserTestCase name="dateTimeImplicitPatternFail4" root="dateTimeImp"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarPatternKind - DFDL-13-138R">

    <tdml:document><![CDATA[2013-03-24T03:45:30GMT]]></tdml:document>
    <tdml:errors>
      <tdml:error>Parse Error:</tdml:error>
      <tdml:error>Convert to DateTime (for xs:dateTime)</tdml:error>
    </tdml:errors>
  </tdml:parserTestCase>

<!--
     Test Name: datePattern01
        Schema: dateTimeSchema
          Root: date01
       Purpose: This test demonstrates the date data type with an explicit calendar Pattern.
-->
 
  <tdml:parserTestCase name="datePattern01" root="date01"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarPattern - DFDL-13-146R">

    <tdml:document><![CDATA[Today is the 25th day of January, year 2013]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <date01>2013-01-25</date01>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: datePattern01b
        Schema: dateTimeSchema
          Root: date01b
       Purpose: This test demonstrates the date data type with an explicit calendar Pattern.
-->
 
  <tdml:parserTestCase name="datePattern01b" root="date01b"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarPattern - DFDL-13-146R">

    <tdml:document><![CDATA[Today is the 25th day of January, year 2013]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <date01>2013-01-25</date01>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: datePattern02
        Schema: dateTimeSchema
          Root: date12
       Purpose: This test demonstrates what happens when you use time formatting markers in a date object
-->
 
  <tdml:parserTestCase name="datePattern02" root="date12"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarPattern - DFDL-13-146R">

    <tdml:document><![CDATA[24 03 1988, 03:45:55]]></tdml:document>
    <tdml:errors>
      <tdml:error>Schema Definition Error</tdml:error>
      <tdml:error>Character 'H' not allowed in dfdl:calendarPattern for date</tdml:error>
    </tdml:errors>
  </tdml:parserTestCase>

<!--
     Test Name: datePattern02b
        Schema: dateTimeSchema
          Root: date1
       Purpose: This test demonstrates what happens when you use time formatting markers in a date object
-->
 
  <tdml:parserTestCase name="datePattern02b" root="date31"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarPattern - DFDL-13-146R">

    <tdml:document><![CDATA[24 03 1988, 45:55]]></tdml:document>
    <tdml:errors>
      <tdml:error>Schema Definition Error</tdml:error>
      <tdml:error>Character 'm' not allowed in dfdl:calendarPattern for date</tdml:error>
    </tdml:errors>
  </tdml:parserTestCase>

<!--
     Test Name: timePattern01
        Schema: dateTimeSchema
          Root: time25
       Purpose: This test demonstrates what happens when you use date formatting markers in a time object
-->
 
  <tdml:parserTestCase name="timePattern01" root="time25"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarPattern - DFDL-13-146R">

    <tdml:document><![CDATA[1999-03 12:34]]></tdml:document>
    <tdml:errors>
      <tdml:error>Schema Definition Error</tdml:error>
      <tdml:error>Character 'y' not allowed in dfdl:calendarPattern for time</tdml:error>
    </tdml:errors>
  </tdml:parserTestCase>

<!--
     Test Name: timePattern01b
        Schema: dateTimeSchema
          Root: time26
       Purpose: This test demonstrates what happens when you use invalid formatting markers in a time object
-->
 
  <tdml:parserTestCase name="timePattern01b" root="time26"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarPattern - DFDL-13-146R">

    <tdml:document><![CDATA[19 12:34]]></tdml:document>
    <tdml:errors>
      <tdml:error>Schema Definition Error</tdml:error>
      <tdml:error>Character 'b' not allowed in dfdl:calendarPattern for time</tdml:error>
    </tdml:errors>
  </tdml:parserTestCase>

<!--
     Test Name: datePattern03
        Schema: dateTimeSchema
          Root: date13
       Purpose: This test demonstrates date formatting markers, primarily with the 'G' (era) symbol
-->
 
  <tdml:parserTestCase name="datePattern03" root="date13"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarPattern - DFDL-13-146R">

    <tdml:document><![CDATA[02-13-2013 BC]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <date13>2013-02-13</date13>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: datePattern04
        Schema: dateTimeSchema
          Root: date14
       Purpose: This test demonstrates date formatting markers, primarily with the 'Q' (quarter) symbol
-->
 
  <tdml:parserTestCase name="datePattern04" root="date14"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarPattern - DFDL-13-146R">

    <tdml:document><![CDATA[Q2 2012]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <date13>2013-02-13</date13>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: datePattern05
        Schema: dateTimeSchema
          Root: date15
       Purpose: This test demonstrates date formatting markers, primarily with the 'D' (day in year) symbol (leap year)
-->
 
  <tdml:parserTestCase name="datePattern05" root="date15"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarPattern - DFDL-13-146R">

    <tdml:document><![CDATA[100 2012]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <date15>2012-04-09</date15>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: datePattern06
        Schema: dateTimeSchema
          Root: date15
       Purpose: This test demonstrates date formatting markers, primarily with the 'D' (day in year) symbol (non leap year)
-->
 
  <tdml:parserTestCase name="datePattern06" root="date15"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarPattern - DFDL-13-146R">

    <tdml:document><![CDATA[100 2011]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <date15>2011-04-10</date15>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: datePattern07
        Schema: dateTimeSchema
          Root: date16
       Purpose: This test demonstrates date formatting markers, primarily with the 'F' (week in month) symbol
-->
 
  <tdml:parserTestCase name="datePattern07" root="date16"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarPattern - DFDL-13-146R">

    <tdml:document><![CDATA[2 02 2013]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <date16>2013-02-10</date16>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: datePattern08
        Schema: dateTimeSchema
          Root: date30
       Purpose: This test demonstrates the use of symbols in date formatting with a byte representation
-->
 
  <tdml:parserTestCase name="datePattern08" root="date30"
    model="dateTimeSchema" description="Section 13 Simple Types - symbols in date formatting - DFDL-13-164R">

    <tdml:document>
      <tdml:documentPart type="byte">33302e2e2e303030342e2e2e2e2e313939382a28292a28292a2829</tdml:documentPart>
    </tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <date30>1998-04-30</date30>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: datePattern08b
        Schema: dateTimeSchema
          Root: date30
       Purpose: This test demonstrates the use of symbols in date formatting
-->
 
  <tdml:parserTestCase name="datePattern08b" root="date30"
    model="dateTimeSchema" description="Section 13 Simple Types - symbols in date formatting - DFDL-13-164R">

    <tdml:document>
      <tdml:documentPart type="text">30...0004.....1998*()*()*()</tdml:documentPart>
    </tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <date30>1998-04-30</date30>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: dateEpochFillIn
        Schema: dateTimeSchema
          Root: date27
       Purpose: This test demonstrates that if a formatting character is not provided, the time is filled in with the epoch time.
-->
 
  <tdml:parserTestCase name="dateEpochFillIn" root="date27"
    model="dateTimeSchema" description="Section 13 Simple Types - epoch fill in - DFDL-13-164R">

    <tdml:document><![CDATA[2013]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <date27>2013-01-01</date27>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: dateEpochFillIn2
        Schema: dateTimeSchema
          Root: date28
       Purpose: This test demonstrates that if a formatting character is not provided, the time is filled in with the epoch time.
-->
 
  <tdml:parserTestCase name="dateEpochFillIn2" root="date28"
    model="dateTimeSchema" description="Section 13 Simple Types - epoch fill in - DFDL-13-164R">

    <tdml:document><![CDATA[]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <date28>1970-01-01</date28>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: dateEpochFillIn3
        Schema: dateTimeSchema
          Root: date29
       Purpose: This test demonstrates that if a formatting character is not provided, the time is filled in with the epoch time.
-->
 
  <tdml:parserTestCase name="dateEpochFillIn3" root="date29"
    model="dateTimeSchema" description="Section 13 Simple Types - epoch fill in - DFDL-13-164R">

    <tdml:document><![CDATA[08]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <date29>1970-08-01</date29>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: datePatternChoice
        Schema: dateTimeSchema
          Root: date21
       Purpose: This test demonstrates the use of a choice whose elements are determined by formatting
-->
 
  <tdml:parserTestCase name="datePatternChoice" root="date21"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarPattern - DFDL-13-146R">

    <tdml:document><![CDATA[It is day 25 of March, 2013]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <date21>
          <superfull>2013-03-25</superfull>
        </date21>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: dateCalendarCenturyStart
        Schema: dateTimeSchema
          Root: date22
       Purpose: This test demonstrates the calendarCenturyStart property. The specified start is 20, so the year
                range is 1920 - 2019. In this case our year is 45. In order for it to fall in our range it
                translates to 1945.
-->
 
  <tdml:parserTestCase name="dateCalendarCenturyStart" root="date22"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarCentury - DFDL-13-144R">

    <tdml:document><![CDATA[03 22 45]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <date22>1945-03-22</date22>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: dateCalendarCenturyStart2
        Schema: dateTimeSchema
          Root: date23
       Purpose: This test demonstrates the calendarCenturyStart property. The specified start is 48, so the year
                range is 1948 - 2047. In this case our year is 45. In order for it to fall in our range it
                translates to 2045.
-->
 
  <tdml:parserTestCase name="dateCalendarCenturyStart2" root="date23"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarCenturyStart - DFDL-13-144R">

    <tdml:document><![CDATA[03 22 45]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <date22>2045-03-22</date22>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: dateCalendarLanguage
        Schema: dateTimeSchema
          Root: date24
       Purpose: This test demonstrates the calendarLanguage property with the language set to German.
-->
 
  <tdml:parserTestCase name="dateCalendarLanguage" root="date24"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarLanguage - DFDL-13-145R">

    <tdml:document><![CDATA[Freitag März 2013]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <date24>2013-03-01</date24>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: dateCalendarLanguage2
        Schema: dateTimeSchema
          Root: date25
       Purpose: This test demonstrates the calendarLanguage property with the language set to Spanish.
-->
 
  <tdml:parserTestCase name="dateCalendarLanguage2" root="date25"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarLanguage - DFDL-13-145R">

    <tdml:document><![CDATA[Lunes Noviembre 2013]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <date25>2013-11-04</date25>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: dateCalendarLanguage3
        Schema: dateTimeSchema
          Root: date26
       Purpose: This test demonstrates the calendarLanguage property with the language set to English.
-->
 
  <tdml:parserTestCase name="dateCalendarLanguage3" root="date26"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarLanguage - DFDL-13-145R">

    <tdml:document><![CDATA[Monday November 2013]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <date26>2013-11-04</date26>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: dateCalendarDaysInFirstWeek
        Schema: dateTimeSchema
          Root: date17
       Purpose: This test demonstrates the calendarDaysInFirstWeek property. Since the first week of 2013 is specified,
                and the calendarDaysInFirstWeek is set to 7, the first full week of 2013 will be selected. In this case
                it starts on January 6th.
-->
 
  <tdml:parserTestCase name="dateCalendarDaysInFirstWeek" root="date17"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarDaysInFirstWeek - DFDL-13-143R">

    <tdml:document><![CDATA[01 2013]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <date17>2013-01-06</date17>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: dateCalendarDaysInFirstWeek2
        Schema: dateTimeSchema
          Root: date18
       Purpose: This test demonstrates the calendarDaysInFirstWeek property. Since the first week of 2013 is specified,
                and the calendarDaysInFirstWeek is set to 5, the first day of the week that contains the first day of the
                year will be selected. In this case it is December 30th, 2012
-->
 
  <tdml:parserTestCase name="dateCalendarDaysInFirstWeek2" root="date18"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarDaysInFirstWeek - DFDL-13-143R">

    <tdml:document><![CDATA[01 2013]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <date18>2012-12-30</date18>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: dateCalendarDaysInFirstWeek3
        Schema: dateTimeSchema
          Root: date17
       Purpose: This test demonstrates the calendarDaysInFirstWeek property. calendarDaysInFirstWeek is set to 7,
                and in 2012 the first day of the year started the first full week, so we should get January 1st.
-->
 
  <tdml:parserTestCase name="dateCalendarDaysInFirstWeek3" root="date17"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarDaysInFirstWeek - DFDL-13-143R">

    <tdml:document><![CDATA[01 2012]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <date17>2012-01-01</date17>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: dateCalendarDaysInFirstWeek4
        Schema: dateTimeSchema
          Root: date19
       Purpose: This test demonstrates the calendarDaysInFirstWeek property. calendarDaysInFirstWeek is set to 5,
                which is more than the number of days in the first week of March, so the second week is selected,
                which starts on the 3rd.
-->
 
  <tdml:parserTestCase name="dateCalendarDaysInFirstWeek4" root="date19"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarDaysInFirstWeek - DFDL-13-143R">

    <tdml:document><![CDATA[01 03 2013]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <date19>2013-03-03</date19>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: dateCalendarDaysInFirstWeek5
        Schema: dateTimeSchema
          Root: date20
       Purpose: This test demonstrates the calendarDaysInFirstWeek property. calendarDaysInFirstWeek is set to 2,
                which is the number of days in the first week of March, so the first day of the first week is selected,
                which is Feb 24th.
-->
 
  <tdml:parserTestCase name="dateCalendarDaysInFirstWeek5" root="date20"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarDaysInFirstWeek - DFDL-13-143R">

    <tdml:document><![CDATA[01 03 2013]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <date20>2013-02-24</date20>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: dateTimePattern01
        Schema: dateTimeSchema
          Root: dateTime01
       Purpose: This test demonstrates the dateTime data type with an explicit calendar Pattern.
-->
 
  <tdml:parserTestCase name="dateTimePattern01" root="dateTime01"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarPattern - DFDL-13-146R">

    <tdml:document><![CDATA[It is 11:53AM on the 1st of April, year 2013]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <dateTime01>2013-04-01T11:53:00Z</dateTime01>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: timeLaxCheckPolicy01
        Schema: dateTimeSchema
          Root: time01
       Purpose: This test demonstrates a lax calendarCheckPolicy. Any invalid values should be converted to the appropriate value
-->
 
  <tdml:parserTestCase name="timeLaxCheckPolicy01" root="time01"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarCheckPolicy - DFDL-13-139R">

    <tdml:document><![CDATA[05:62:30GMT]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <time01>06:02:30Z</time01>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: timeLaxCheckPolicy02
        Schema: dateTimeSchema
          Root: time01
       Purpose: This test demonstrates a lax calendarCheckPolicy. Any invalid values should be converted to the appropriate value
-->
 
  <tdml:parserTestCase name="timeLaxCheckPolicy02" root="time01"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarCheckPolicy - DFDL-13-139R">

    <tdml:document><![CDATA[28:62:30GMT]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <time01>05:02:30Z</time01>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: timeLaxCheckPolicy03
        Schema: dateTimeSchema
          Root: time01
       Purpose: This test demonstrates a lax calendarCheckPolicy. Any invalid values should be converted to the appropriate value
-->
 
  <tdml:parserTestCase name="timeLaxCheckPolicy03" root="time01"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarCheckPolicy - DFDL-13-139R">

    <tdml:document><![CDATA[28:62:90GMT]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <time01>05:03:30Z</time01>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: dateTimeLaxCheckPolicy01
        Schema: dateTimeSchema
          Root: dateTime02
       Purpose: This test demonstrates a lax calendarCheckPolicy. Any invalid values should be converted to the appropriate value
-->
 
  <tdml:parserTestCase name="dateTimeLaxCheckPolicy01" root="dateTime02"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarCheckPolicy - DFDL-13-139R">

    <tdml:document><![CDATA[2013-01-31T23:62:30]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <dateTime02>2013-02-01T00:02:30Z</dateTime02>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: dateLaxCheckPolicy01
        Schema: dateTimeSchema
          Root: date02
       Purpose: This test demonstrates a lax calendarCheckPolicy. Any invalid values should be converted to the appropriate value
-->
 
  <tdml:parserTestCase name="dateLaxCheckPolicy01" root="date02"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarCheckPolicy - DFDL-13-139R">

    <tdml:document><![CDATA[2000-12-45]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <date02>2001-01-14</date02>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: dateLaxCheckPolicy02
        Schema: dateTimeSchema
          Root: date03
       Purpose: This test demonstrates a lax calendarCheckPolicy. Any invalid values should be converted to the appropriate value
                (fun with leap years)
-->
 
  <tdml:parserTestCase name="dateLaxCheckPolicy02" root="date03"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarCheckPolicy - DFDL-13-139R">

    <tdml:document><![CDATA[2000-01-366]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <date03>2000-12-31</date03>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: dateLaxCheckPolicy03
        Schema: dateTimeSchema
          Root: date03
       Purpose: This test demonstrates a lax calendarCheckPolicy. Any invalid values should be converted to the appropriate value
                (counter to fun with leap years)
-->
 
  <tdml:parserTestCase name="dateLaxCheckPolicy03" root="date03"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarCheckPolicy - DFDL-13-139R">

    <tdml:document><![CDATA[2001-01-366]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <date03>2002-01-01</date03>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: dateLaxCheckPolicy04
        Schema: dateTimeSchema
          Root: date02
       Purpose: This test demonstrates a lax calendarCheckPolicy. Any invalid values should be converted to the appropriate value
                (fun with leap years)
-->
 
  <tdml:parserTestCase name="dateLaxCheckPolicy04" root="date02"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarCheckPolicy - DFDL-13-139R">

    <tdml:document><![CDATA[2000-02-29]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <date02>2000-02-29</date02>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: dateLaxCheckPolicy05
        Schema: dateTimeSchema
          Root: date02
       Purpose: This test demonstrates a lax calendarCheckPolicy. Any invalid values should be converted to the appropriate value
                (counter to fun with leap years)
-->
 
  <tdml:parserTestCase name="dateLaxCheckPolicy05" root="date02"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarCheckPolicy - DFDL-13-139R">

    <tdml:document><![CDATA[2001-02-29]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <date02>2001-03-01</date02>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: dateStrictCheckPolicy01
        Schema: dateTimeSchema
          Root: date04
       Purpose: This test demonstrates a strict calendarCheckPolicy. Any invalid values should result in a parse error.
-->
 
  <tdml:parserTestCase name="dateStrictCheckPolicy01" root="date04"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarCheckPolicy - DFDL-13-139R">

    <tdml:document><![CDATA[2001-03-35]]></tdml:document>
    <tdml:errors>
      <tdml:error/>
    </tdml:errors>
  </tdml:parserTestCase>

<!--
     Test Name: timeStrictCheckPolicy01
        Schema: dateTimeSchema
          Root: time02
       Purpose: This test demonstrates a strict calendarCheckPolicy. Any invalid values should result in a parse error.
-->
 
  <tdml:parserTestCase name="timeStrictCheckPolicy01" root="time02"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarCheckPolicy - DFDL-13-139R">

    <tdml:document><![CDATA[13:99:50-0800]]></tdml:document>
    <tdml:errors>
      <tdml:error/>
    </tdml:errors>
  </tdml:parserTestCase>

<!--
     Test Name: timeStrictCheckPolicy02
        Schema: dateTimeSchema
          Root: time02
       Purpose: This test demonstrates a strict calendarCheckPolicy. Any invalid values should result in a parse error.
-->
 
  <tdml:parserTestCase name="timeStrictCheckPolicy02" root="time02"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarCheckPolicy - DFDL-13-139R">

    <tdml:document><![CDATA[13:30:70GMT]]></tdml:document>
    <tdml:errors>
      <tdml:error>Failed to parse '13:30:70GMT'</tdml:error>
    </tdml:errors>
  </tdml:parserTestCase>

<!--
     Test Name: dateCalendarFirstDayOfWeek01
        Schema: dateTimeSchema
          Root: date05
       Purpose: This test demonstrates the calendarFirstDayOfWeek property. The element specifies
                the month, year, and day of the week. The day of the week is specified with a number, so the
                calendarFirstDayOfWeek determines the actual value of this number. Because the day of the month is not specified,
                the first day of the month that falls on that day of the week is used.
-->
 
  <tdml:parserTestCase name="dateCalendarFirstDayOfWeek01" root="date05"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarFirstDayOfWeek - DFDL-13-142R">

    <tdml:document><![CDATA[day 1 of the week, month 02 year 2013]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <date05>2013-02-04</date05>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: dateCalendarFirstDayOfWeek02
        Schema: dateTimeSchema
          Root: date05
       Purpose: This test demonstrates the calendarFirstDayOfWeek property. The element specifies
                the month, year, and day of the week. The day of the week is specified with a number, so the
                calendarFirstDayOfWeek determines the actual value of this number. Because the day of the month is not specified,
                the first day of the month that falls on that day of the week is used.
-->
 
  <tdml:parserTestCase name="dateCalendarFirstDayOfWeek02" root="date05"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarFirstDayOfWeek - DFDL-13-142R">

    <tdml:document><![CDATA[day 2 of the week, month 02 year 2013]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <date05>2013-02-05</date05>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: dateCalendarFirstDayOfWeek03
        Schema: dateTimeSchema
          Root: date06
       Purpose: This test demonstrates the calendarFirstDayOfWeek property. The element specifies
                the month, year, and day of the week. The day of the week is specified with a number, so the
                calendarFirstDayOfWeek determines the actual value of this number. Because the day of the month is not specified,
                the first day of the month that falls on that day of the week is used.
-->
 
  <tdml:parserTestCase name="dateCalendarFirstDayOfWeek03" root="date06"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarFirstDayOfWeek - DFDL-13-142R">

    <tdml:document><![CDATA[day 1 of the week, month 02 year 2013]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <date06>2013-02-03</date06>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: dateCalendarFirstDayOfWeek04
        Schema: dateTimeSchema
          Root: date06
       Purpose: This test demonstrates the calendarFirstDayOfWeek property. The element specifies
                the month, year, and day of the week. The day of the week is specified with a number, so the
                calendarFirstDayOfWeek determines the actual value of this number. Because the day of the month is not specified,
                the first day of the month that falls on that day of the week is used.
-->
 
  <tdml:parserTestCase name="dateCalendarFirstDayOfWeek04" root="date06"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarFirstDayOfWeek - DFDL-13-142R">

    <tdml:document><![CDATA[day 2 of the week, month 02 year 2013]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <date06>2013-02-04</date06>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: timeZoneFormats
        Schema: dateTimeSchema
          Root: time04
       Purpose: This test demonstrates different formatting for timezone
-->
 
  <tdml:parserTestCase name="timeZoneFormats" root="time04"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarPattern - DFDL-13-146R">

    <tdml:document><![CDATA[08:43.EST]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <time04>13:43:00Z</time04>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: timeZoneFormats2
        Schema: dateTimeSchema
          Root: time04b
       Purpose: This test demonstrates different formatting for timezone
-->
 
  <tdml:parserTestCase name="timeZoneFormats2" root="time04b"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarPattern - DFDL-13-146R">

    <tdml:document><![CDATA[08:43.Eastern Standard Time]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <time04b>13:43:00Z</time04b>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: timeZoneFormats3
        Schema: dateTimeSchema
          Root: time05
       Purpose: This test demonstrates different formatting for timezone
-->
 
  <tdml:parserTestCase name="timeZoneFormats3" root="time05"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarPattern - DFDL-13-146R">

    <tdml:document><![CDATA[08:43.PT]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <time05>16:43:00Z</time05>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: timeFormatting
        Schema: dateTimeSchema
          Root: time16
       Purpose: This test demonstrates different formatting for time, particularly 'HH' to represent hour in day (0~23)
-->
 
  <tdml:parserTestCase name="timeFormatting" root="time16"
    model="dateTimeSchema" description="Section 13 Simple Types - pattern derived from ICU SimpleDatetimeFormat - DFDL-13-147R">

    <tdml:document><![CDATA[22:43]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <time16>22:43:00Z</time16>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: timeFormatting2
        Schema: dateTimeSchema
          Root: time17
       Purpose: This is a test to see what will happen if you specify a military-style hour (HH) AND an AM/PM marker
                If AM, the hour defaults to 00 (midnight), and if PM, the hour defaults to 12 (noon)
-->
 
  <tdml:parserTestCase name="timeFormatting2" root="time17"
    model="dateTimeSchema" description="Section 13 Simple Types - pattern derived from ICU SimpleDatetimeFormat - DFDL-13-147R">

    <tdml:document><![CDATA[03:43PM]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <time17>12:43:00Z</time17>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: timeFormatting2c
        Schema: dateTimeSchema
          Root: time17
       Purpose: This is a test to see what will happen if you specify a military-style hour (HH) AND an AM/PM marker
                If AM, the hour defaults to 00 (midnight), and if PM, the hour defaults to 12 (noon)
-->
 
  <tdml:parserTestCase name="timeFormatting2c" root="time17"
    model="dateTimeSchema" description="Section 13 Simple Types - pattern derived from ICU SimpleDatetimeFormat - DFDL-13-147R">

    <tdml:document><![CDATA[23:43AM]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <time17>00:43:00Z</time17>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: timeFormatting2b
        Schema: dateTimeSchema
          Root: time17b
       Purpose: This test demonstrates different formatting for time, primarily the use of 'aa' to denote an am/pm marker
-->
 
  <tdml:parserTestCase name="timeFormatting2b" root="time17b"
    model="dateTimeSchema" description="Section 13 Simple Types - pattern derived from ICU SimpleDatetimeFormat - DFDL-13-147R">

    <tdml:document><![CDATA[03:43AM]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <time17b>03:43:00Z</time17b>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: timeFormatting3
        Schema: dateTimeSchema
          Root: time17b
       Purpose: This test demonstrates different formatting for time, primarily the use of 'aa' to denote an am/pm marker
-->
 
  <tdml:parserTestCase name="timeFormatting3" root="time17b"
    model="dateTimeSchema" description="Section 13 Simple Types - pattern derived from ICU SimpleDatetimeFormat - DFDL-13-147R">

    <tdml:document><![CDATA[03:43PM]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <time17b>15:43:00Z</time17b>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: timeFormatting4
        Schema: dateTimeSchema
          Root: time18
       Purpose: This test demonstrates different formatting for time, primarily the use of 'KK' to denote the hour in am/pm (0~11)
-->
 
  <tdml:parserTestCase name="timeFormatting4" root="time18"
    model="dateTimeSchema" description="Section 13 Simple Types - pattern derived from ICU SimpleDatetimeFormat - DFDL-13-147R">

    <tdml:document><![CDATA[00:43PM]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <time18>12:43:00Z</time18>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: timeFormatting5
        Schema: dateTimeSchema
          Root: time18
       Purpose: This test demonstrates different formatting for time, primarily the use of 'KK' to denote the hour in am/pm (0~11)
                In this case, the hour specified is 12, which is invalid for 'KK'
-->
 
  <tdml:parserTestCase name="timeFormatting5" root="time18"
    model="dateTimeSchema" description="Section 13 Simple Types - pattern derived from ICU SimpleDatetimeFormat - DFDL-13-147R">

    <tdml:document><![CDATA[12:30AM]]></tdml:document>
    <tdml:errors>
      <tdml:error>Parse Error: Convert to Time</tdml:error>
    </tdml:errors>
  </tdml:parserTestCase>

<!--
     Test Name: timeFormatting6
        Schema: dateTimeSchema
          Root: time16
       Purpose: This test demonstrates different formatting for time, primarily the use of 'hh' to denote the hour in am/pm (1~12)
                In this case, the hour specified is 0, which is invalid for 'hh'
-->
 
  <tdml:parserTestCase name="timeFormatting6" root="time16"
    model="dateTimeSchema" description="Section 13 Simple Types - pattern derived from ICU SimpleDatetimeFormat - DFDL-13-147R">

    <tdml:document><![CDATA[00:30AM]]></tdml:document>
    <tdml:errors>
      <tdml:error>Parse Error: Convert to Time</tdml:error>
    </tdml:errors>
  </tdml:parserTestCase>

<!--
     Test Name: timeFormatting7
        Schema: dateTimeSchema
          Root: time19
       Purpose: This test demonstrates different formatting for time, primarily the use of 'kk' to denote the hour (0~24)
-->
 
  <tdml:parserTestCase name="timeFormatting7" root="time19"
    model="dateTimeSchema" description="Section 13 Simple Types - pattern derived from ICU SimpleDatetimeFormat - DFDL-13-147R">

    <tdml:document><![CDATA[00:43]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <time19>00:43:00Z</time19>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: timeZoneFormats5
        Schema: dateTimeSchema
          Root: time06
       Purpose: This test demonstrates different formatting for timezone
-->
 
  <tdml:parserTestCase name="timeZoneFormats5" root="time06"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarPattern - DFDL-13-146R">

    <tdml:document><![CDATA[08:43.Los Angeles Time]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <time06>16:43:00Z</time06>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: timeZoneFormats6
        Schema: dateTimeSchema
          Root: time07
       Purpose: This test demonstrates different formatting for timezone
-->
 
  <tdml:parserTestCase name="timeZoneFormats6" root="time07"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarPattern - DFDL-13-146R">

    <tdml:document><![CDATA[08:43.PST]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <time07>16:43:00Z</time07>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: timeCalendarTimeZone
        Schema: dateTimeSchema
          Root: time08
       Purpose: This test demonstrates the calendarTimeZone property
-->
 
  <tdml:parserTestCase name="timeCalendarTimeZone" root="time08"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarTimeZone - DFDL-13-140R">

    <tdml:document><![CDATA[08:43:40]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <time08>07:43:40Z</time08>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: timeCalendarTimeZone2
        Schema: dateTimeSchema
          Root: time09
       Purpose: This test demonstrates the calendarTimeZone property
-->
 
  <tdml:parserTestCase name="timeCalendarTimeZone2" root="time09"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarTimeZone - DFDL-13-140R">

    <tdml:document><![CDATA[08:43:40]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <time09>07:13:40Z</time09>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: timeFractionalSeconds01
        Schema: dateTimeSchema
          Root: time03
       Purpose: This test demonstrates the use of fractional seconds; the seconds should be rounded up.
-->
 
  <tdml:parserTestCase name="timeFractionalSeconds01" root="time03"
    model="dateTimeSchema" description="Section 13 Simple Types - fractional seconds - DFDL-13-150R">

    <tdml:document><![CDATA[08:43:30.9678]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <time03>08:43:31Z</time03>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: dateCountDeterminesFormat
        Schema: dateTimeSchema
          Root: date07
       Purpose: This test demonstrates that the count of formatting letters determines the format.
-->
 
  <tdml:parserTestCase name="dateCountDeterminesFormat" root="date07"
    model="dateTimeSchema" description="Section 13 Simple Types - count determines format - DFDL-13-153R">

    <tdml:document><![CDATA[Mon, 01 2013]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <time03>08:43:31Z</time03>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: dateNonAlphaChars01
        Schema: dateTimeSchema
          Root: date08
       Purpose: This test demonstrates that any non-alphabetic characters will be treated as quoted text.
-->
 
  <tdml:parserTestCase name="dateNonAlphaChars01" root="date08"
    model="dateTimeSchema" description="Section 13 Simple Types - Non alpha-chars - DFDL-13-159R">

    <tdml:document><![CDATA[...03...24...1988]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <date08>1988-03-24</date08>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: dateTrim01
        Schema: dateTimeSchema
          Root: date09
       Purpose: This test demonstrates the use of the textCalendarJustification and textCalendarPadCharacter properties
-->
 
  <tdml:parserTestCase name="dateTrim01" root="date09"
    model="dateTimeSchema" description="Section 13 Simple Types - textCalendarJustification - DFDL-13-165R">

    <tdml:document><![CDATA[....2013-03-24....]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <date09>2013-03-24</date09>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: dateTrim02
        Schema: dateTimeSchema
          Root: date10
       Purpose: This test demonstrates the use of the textCalendarJustification and textCalendarPadCharacter properties
-->
 
  <tdml:parserTestCase name="dateTrim02" root="date10"
    model="dateTimeSchema" description="Section 13 Simple Types - textCalendarJustification - DFDL-13-165R">

    <tdml:document><![CDATA[2013-03-24xxxx]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <date10>2013-03-24</date10>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: dateTrim03
        Schema: dateTimeSchema
          Root: date11
       Purpose: This test demonstrates the use of the textCalendarJustification and textCalendarPadCharacter properties
-->
 
  <tdml:parserTestCase name="dateTrim03" root="date11"
    model="dateTimeSchema" description="Section 13 Simple Types - textCalendarJustification - DFDL-13-165R">

    <tdml:document><![CDATA[dddddddddddddddddddddddddddddd2013-03-24]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <date11>2013-03-24</date11>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: timeTrim01
        Schema: dateTimeSchema
          Root: time10
       Purpose: This test demonstrates the use of the textCalendarJustification and textCalendarPadCharacter properties on a time object
-->
 
  <tdml:parserTestCase name="timeTrim01" root="time10"
    model="dateTimeSchema" description="Section 13 Simple Types - textCalendarJustification - DFDL-13-165R">

    <tdml:document><![CDATA[....12:30:30GMT....]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <time10>12:30:30Z</time10>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: timeTrim02
        Schema: dateTimeSchema
          Root: time11
       Purpose: This test demonstrates the use of the textCalendarJustification and textCalendarPadCharacter properties on a time object
-->
 
  <tdml:parserTestCase name="timeTrim02" root="time11"
    model="dateTimeSchema" description="Section 13 Simple Types - textCalendarJustification - DFDL-13-165R">

    <tdml:document><![CDATA[::::::12:30:30GMT]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <time11>12:30:30Z</time11>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: millisecondAccuracy
        Schema: dateTimeSchema
          Root: time12
       Purpose: This test demonstrates that DFDL implements at least millisecond accuracy.
-->
 
  <tdml:parserTestCase name="millisecondAccuracy" root="time12"
    model="dateTimeSchema" description="Section 13 Simple Types - at least millisecond accuracy - DFDL-13-152R">

    <tdml:document><![CDATA[3:30:38.001]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <time12>03:30:38Z</time12>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: millisecondAccuracy2
        Schema: dateTimeSchema
          Root: time13
       Purpose: This test demonstrates that DFDL implements at least millisecond accuracy.
-->
 
  <tdml:parserTestCase name="millisecondAccuracy2" root="time13"
    model="dateTimeSchema" description="Section 13 Simple Types - at least millisecond accuracy - DFDL-13-152R">

    <tdml:document><![CDATA[3:30:38.001435]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <time13>03:30:38Z</time13>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: millisecondAccuracy3
        Schema: dateTimeSchema
          Root: time14
       Purpose: This test demonstrates that DFDL implements at least millisecond accuracy.
-->
 
  <tdml:parserTestCase name="millisecondAccuracy3" root="time14"
    model="dateTimeSchema" description="Section 13 Simple Types - at least millisecond accuracy - DFDL-13-152R">

    <tdml:document><![CDATA[3:30:38.002345276891000084763]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <time14>03:30:38Z</time14>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: millisecondAccuracy4
        Schema: dateTimeSchema
          Root: time15
       Purpose: This test demonstrates that DFDL implements at least millisecond accuracy.
-->
 
  <tdml:parserTestCase name="millisecondAccuracy4" root="time15"
    model="dateTimeSchema" description="Section 13 Simple Types - at least millisecond accuracy - DFDL-13-152R">

    <tdml:document><![CDATA[3:30:38.0023452768910087634837]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <time15>03:30:38Z</time15>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: timeSymbols
        Schema: dateTimeSchema
          Root: time20
       Purpose: This test demonstrates that if dfdl:representation is text, any characters in the pattern
                that are not in the ranges of ['a'..'z'] and ['A'..'Z'] will be treated as quoted text.
-->
 
  <tdml:parserTestCase name="timeSymbols" root="time20"
    model="dateTimeSchema" description="Section 13 Simple Types - Symbols with text representation - DFDL-13-164R">

    <tdml:document><![CDATA[03@54$%^&*()5]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <time20>03:54:05Z</time20>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: timeSymbols2
        Schema: dateTimeSchema
          Root: time21
       Purpose: This test demonstrates that if dfdl:representation is text, any characters in the pattern
                that are not in the ranges of ['a'..'z'] and ['A'..'Z'] will be treated as quoted text.
-->
 
  <tdml:parserTestCase name="timeSymbols2" root="time21"
    model="dateTimeSchema" description="Section 13 Simple Types - Symbols with text representation - DFDL-13-164R">

    <tdml:document><![CDATA[03@54$%^!@#.,/.'}{}{*()5]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <time21>03:54:05Z</time21>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: epochFillIn
        Schema: dateTimeSchema
          Root: time22
       Purpose: This test demonstrates that for any pattern that omits components,
                the values for the omitted components are supplied from the Unix epoch 1970-01-01T00:00:00.000
-->
 
  <tdml:parserTestCase name="epochFillIn" root="time22"
    model="dateTimeSchema" description="Section 13 Simple Types - Patterns with ommitted components - DFDL-13-164R">

    <tdml:document><![CDATA[28]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <time22>00:28:00Z</time22>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: epochFillIn2
        Schema: dateTimeSchema
          Root: time23
       Purpose: This test demonstrates that for any pattern that omits components,
                the values for the omitted components are supplied from the Unix epoch 1970-01-01T00:00:00.000
-->
 
  <tdml:parserTestCase name="epochFillIn2" root="time23"
    model="dateTimeSchema" description="Section 13 Simple Types - Patterns with ommitted components - DFDL-13-164R">

    <tdml:document><![CDATA[]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <time23>00:00:00Z</time23>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: epochFillIn3
        Schema: dateTimeSchema
          Root: time24
       Purpose: This test demonstrates that for any pattern that omits components,
                the values for the omitted components are supplied from the Unix epoch 1970-01-01T00:00:00.000
-->
 
  <tdml:parserTestCase name="epochFillIn3" root="time24"
    model="dateTimeSchema" description="Section 13 Simple Types - Patterns with ommitted components - DFDL-13-164R">

    <tdml:document><![CDATA[.]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <time24>00:00:00Z</time24>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: dateTimePattern02
        Schema: dateTimeSchema
          Root: dateTime03
       Purpose: This test demonstrates the dateTime data type with an explicit calendar Pattern.
                The data matches this pattern and should be parsed correctly. Note that it deduces the day of the month based on
                the year, month, and day of the week.
-->
 
  <tdml:parserTestCase name="dateTimePattern02" root="dateTime03"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarPatternKind - DFDL-13-138R">

    <tdml:document><![CDATA[Twas a sunny Wednesday at 11 O'clock. The year was 2008, and it was the hottest December we had ever experienced.]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <dateTime03>2008-12-03T11:00:00Z</dateTime03>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: dateTimePattern03
        Schema: dateTimeSchema
          Root: dateTime03
       Purpose: This test demonstrates the dateTime data type with an explicit calendar Pattern.
                The data matches this pattern and should be parsed correctly. The test also demonstrates the use of
                a lax calendarCheckPolicy
-->
 
  <tdml:parserTestCase name="dateTimePattern03" root="dateTime04"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarPatternKind - DFDL-13-138R">

    <tdml:document><![CDATA[27:30:30 February-29-2012]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <dateTime04>2012-03-01T03:30:30Z</dateTime04>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: dateTimeCalendarDaysInFirstWeek
        Schema: dateTimeSchema
          Root: dateTime05
       Purpose: This test demonstrates the calendarDaysInFirstWeek property when combined with the calendarFirstDayOfWeek property.
                Since the first week of Feb, 2013 is specified, the calendarFirstDayOfWeek is set to Tuesday, and calendarDaysInFirstWeek
                is set to 5, the first full week of Feb will be selected (starting on Tuesday). In this case that will be Feb 5th.
-->
 
  <tdml:parserTestCase name="dateTimeCalendarDaysInFirstWeek" root="dateTime05"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarDaysInFirstWeek - DFDL-13-143R">

    <tdml:document><![CDATA[01 02 2013]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <dateTime05>2013-02-05T00:00:00Z</dateTime05>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: dateTimeCalendarDaysInFirstWeek2
        Schema: dateTimeSchema
          Root: dateTime06
       Purpose: This test demonstrates the calendarDaysInFirstWeek property when combined with the calendarFirstDayOfWeek property.
                Since the first week of Feb, 2013 is specified, the calendarFirstDayOfWeek is set to Thursday, and calendarDaysInFirstWeek
                is set to 7, the first full week of Feb will be selected (starting on Thursday). In this case that will be Feb 7th.
-->
 
  <tdml:parserTestCase name="dateTimeCalendarDaysInFirstWeek2" root="dateTime06"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarDaysInFirstWeek - DFDL-13-143R">

    <tdml:document><![CDATA[01 02 2013]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <dateTime06>2013-02-07T00:00:00Z</dateTime06>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: dateTimeCalendarDaysInFirstWeek3
        Schema: dateTimeSchema
          Root: dateTime07
       Purpose: This test demonstrates the calendarDaysInFirstWeek property when combined with the calendarFirstDayOfWeek property.
                Since the first week of Feb, 2013 is specified, the calendarFirstDayOfWeek is set to Thursday, and calendarDaysInFirstWeek
                is set to 2, the first week that contains 2 Feb days that starts on Thursday will be selected. In this case that will be Jan 31th.
-->
 
  <tdml:parserTestCase name="dateTimeCalendarDaysInFirstWeek3" root="dateTime07"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarDaysInFirstWeek - DFDL-13-143R">

    <tdml:document><![CDATA[01 02 2013]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <dateTime07>2013-01-31T00:00:00Z</dateTime07>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: dateTimeCalendarDaysInFirstWeek4
        Schema: dateTimeSchema
          Root: dateTime08
       Purpose: This test demonstrates the calendarDaysInFirstWeek property when combined with the calendarFirstDayOfWeek property.
                Since the first week of Feb, 2013 is specified, the calendarFirstDayOfWeek is set to Sunday, and calendarDaysInFirstWeek
                is set to 7, the first week that contains 7 Feb days that starts on Sunday will be selected. In this case that will be Feb 3rd.
-->
 
  <tdml:parserTestCase name="dateTimeCalendarDaysInFirstWeek4" root="dateTime08"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarDaysInFirstWeek - DFDL-13-143R">

    <tdml:document><![CDATA[01 02 2013 12:43:30PM]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <dateTime08>2013-02-03T12:43:30Z</dateTime08>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: dateTimeCalendarDaysInFirstWeek5
        Schema: dateTimeSchema
          Root: dateTime08
       Purpose: This test demonstrates the calendarDaysInFirstWeek property when combined with the calendarFirstDayOfWeek property.
                Since the first week of Jan, 2013 is specified, the calendarFirstDayOfWeek is set to Sunday, and calendarDaysInFirstWeek
                is set to 7, the first week that contains 7 Jan days that starts on Sunday will be selected. In this case that will be Jan 6th.
-->
 
  <tdml:parserTestCase name="dateTimeCalendarDaysInFirstWeek5" root="dateTime08"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarDaysInFirstWeek - DFDL-13-143R">

    <tdml:document><![CDATA[01 01 2013 12:43:30PM]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <dateTime08>2013-01-06T12:43:30Z</dateTime08>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: dateTimeCalendarDaysInFirstWeek6
        Schema: dateTimeSchema
          Root: dateTime08
       Purpose: This test demonstrates the calendarDaysInFirstWeek property when combined with the calendarFirstDayOfWeek property.
                Since the second week of Jan, 2013 is specified, the calendarFirstDayOfWeek is set to Sunday, and calendarDaysInFirstWeek
                is set to 7, the second week that contains 7 Jan days that starts on Sunday will be selected. In this case that will be Jan 13th.
-->
 
  <tdml:parserTestCase name="dateTimeCalendarDaysInFirstWeek6" root="dateTime08"
    model="dateTimeSchema" description="Section 13 Simple Types - calendarDaysInFirstWeek - DFDL-13-143R">

    <tdml:document><![CDATA[02 01 2013 12:43:30PM]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <dateTime08>2013-01-13T12:43:30Z</dateTime08>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: dateTimeTrim01
        Schema: dateTimeSchema
          Root: dateTime09
       Purpose: This test demonstrates the use of the textCalendarJustification and textCalendarPadCharacter properties on a dateTime object
-->
 
  <tdml:parserTestCase name="dateTimeTrim01" root="dateTime09"
    model="dateTimeSchema" description="Section 13 Simple Types - textCalendarJustification - DFDL-13-165R">

    <tdml:document><![CDATA[.....03.04.1999 04:31:44PM.....]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <dateTime09>1999-03-04T16:31:44Z</dateTime09>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: dateTimeTrim02
        Schema: dateTimeSchema
          Root: dateTime10
       Purpose: This test demonstrates the use of the textCalendarJustification and textCalendarPadCharacter properties on a dateTime object
-->
 
  <tdml:parserTestCase name="dateTimeTrim02" root="dateTime10"
    model="dateTimeSchema" description="Section 13 Simple Types - textCalendarJustification - DFDL-13-165R">

    <tdml:document><![CDATA[03.04.1999 04:31:44PM:::::::::::::::::::::::::::::::::::::::::]]></tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <dateTime10>1999-03-04T16:31:44Z</dateTime10>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: dateTimeTrim03
        Schema: dateTimeSchema
          Root: dateTime11
       Purpose: This test demonstrates the use of the textCalendarJustification and textCalendarPadCharacter properties on a dateTime object
                The pad character is a DFDL entity and the document uses a byte representation.

-->
 
  <tdml:parserTestCase name="dateTimeTrim03" root="dateTime11"
    model="dateTimeSchema" description="Section 13 Simple Types - textCalendarJustification - DFDL-13-165R">

    <tdml:document>
      <tdml:documentPart type="byte"><![CDATA[09 09 09 09 30 33 2e 30 34 2e 31 39 39 39 20 30 34 3a 33 31 3a 34 34 50 4d 09 09 09 09]]></tdml:documentPart>
    </tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <dateTime11>1999-03-04T16:31:44Z</dateTime11>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

<!--
     Test Name: dateTimeTrim04
        Schema: dateTimeSchema
          Root: dateTime12
       Purpose: This test demonstrates the use of the textCalendarJustification and textCalendarPadCharacter properties on a dateTime object
                The pad character is a DFDL entity and the document uses a byte representation.

-->
 
  <tdml:parserTestCase name="dateTimeTrim04" root="dateTime12"
    model="dateTimeSchema" description="Section 13 Simple Types - textCalendarJustification - DFDL-13-165R">

    <tdml:document>
      <tdml:documentPart type="byte"><![CDATA[09 09 09 09 30 33 2e 30 34 2e 31 39 39 39 20 30 34 3a 36 31 3a 34 34 50 4d]]></tdml:documentPart>
    </tdml:document>
    <tdml:infoset>
      <tdml:dfdlInfoset>
        <dateTime12>1999-03-04T17:01:44Z</dateTime12>
      </tdml:dfdlInfoset>
    </tdml:infoset>
  </tdml:parserTestCase>

</tdml:testSuite>

  • No labels