Fix line endings with dos2unix
diff --git a/daffodil-test/src/test/resources/edu/illinois/ncsa/daffodil/section08/property_scoping/PropertyScoping_01.tdml b/daffodil-test/src/test/resources/edu/illinois/ncsa/daffodil/section08/property_scoping/PropertyScoping_01.tdml
index 01b71b2..7d196c4 100644
--- a/daffodil-test/src/test/resources/edu/illinois/ncsa/daffodil/section08/property_scoping/PropertyScoping_01.tdml
+++ b/daffodil-test/src/test/resources/edu/illinois/ncsa/daffodil/section08/property_scoping/PropertyScoping_01.tdml
@@ -31,699 +31,699 @@
     OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE
     SOFTWARE.
 -->
-<tdml:testSuite suiteName="DelimitedTests"

-  description="Section 12 - lengthKind=delimited" 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:tns="http://example.com">

-

-

-  <tdml:defineSchema name="s1">

-    <dfdl:defineFormat name="def">

-      <dfdl:format ref="tns:def1" encoding="utf-8"

-        lengthKind="explicit" lengthUnits="characters" length="5"

-        textNumberRep="zoned" />

-    </dfdl:defineFormat>

-

-    <dfdl:defineFormat name="def2">

-      <dfdl:format ref="tns:def3" lengthKind="explicit"

-        lengthUnits="characters" length="4" representation="text"

-        textNumberRep="standard" />

-    </dfdl:defineFormat>

-

-    <dfdl:defineFormat name="def3">

-      <dfdl:format ref="tns:daffodilTest1" representation="binary" />

-    </dfdl:defineFormat>

-

-    <dfdl:defineFormat name="def1">

-      <dfdl:format ref="tns:def2" />

-    </dfdl:defineFormat>

-

-    <dfdl:format ref="tns:daffodilTest1" lengthKind="explicit"

-      lengthUnits="characters" length="3" />

-

-    <xs:element name="easy" type="xs:int" dfdl:textNumberRep="standard">

-      <xs:annotation>

-        <xs:appinfo source="http://www.ogf.org/dfdl/">

-          <dfdl:element ref="tns:def"/>

-        </xs:appinfo>

-      </xs:annotation>

-    </xs:element>

-  </tdml:defineSchema>

-

-  <tdml:defineSchema name="s1-u">

-    <dfdl:defineFormat name="def">

-      <dfdl:format ref="tns:def1" encoding="ascii"

-        lengthKind="explicit" lengthUnits="characters" length="5"

-        textNumberRep="zoned" />

-    </dfdl:defineFormat>

-

-    <dfdl:defineFormat name="def2">

-      <dfdl:format ref="tns:def3" lengthKind="explicit"

-        lengthUnits="characters" length="4" representation="text"

-        textNumberRep="standard" />

-    </dfdl:defineFormat>

-

-    <dfdl:defineFormat name="def3">

-      <dfdl:format ref="tns:daffodilTest1" representation="binary" />

-    </dfdl:defineFormat>

-

-    <dfdl:defineFormat name="def1">

-      <dfdl:format ref="tns:def2" />

-    </dfdl:defineFormat>

-

-    <dfdl:format ref="tns:daffodilTest1" lengthKind="explicit"

-      lengthUnits="characters" length="3" />

-

-    <xs:element name="easy" type="xs:int" dfdl:textNumberRep="standard">

-      <xs:annotation>

-        <xs:appinfo source="http://www.ogf.org/dfdl/">

-          <dfdl:element ref="tns:def"/>

-        </xs:appinfo>

-      </xs:annotation>

-    </xs:element>

-  </tdml:defineSchema>

+<tdml:testSuite suiteName="DelimitedTests"
+  description="Section 12 - lengthKind=delimited" 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:tns="http://example.com">
 
-  <tdml:defineSchema name="s1-u2">

-    <dfdl:defineFormat name="def">

-      <dfdl:format ref="tns:def1" encoding="ascii"

-        lengthKind="explicit" lengthUnits="characters" length="5"/>

-    </dfdl:defineFormat>

-

-    <dfdl:defineFormat name="def2">

-      <dfdl:format lengthKind="explicit"

-        lengthUnits="characters" length="4" representation="text"/>

-    </dfdl:defineFormat>

-

-    <dfdl:defineFormat name="def1">

-      <dfdl:format ref="tns:def2" />

-    </dfdl:defineFormat>

-

-    <dfdl:format ref="tns:daffodilTest1" lengthKind="explicit"

-      lengthUnits="characters" length="3" />

-

-    <xs:element name="easy" type="xs:string">

-      <xs:annotation>

-        <xs:appinfo source="http://www.ogf.org/dfdl/">

-          <dfdl:element ref="tns:def"/>

-        </xs:appinfo>

-      </xs:annotation>

-    </xs:element>

-  </tdml:defineSchema>

-

-

-

-  <tdml:defineSchema name="s2">

-

-    <dfdl:defineFormat name="def2">

-      <dfdl:format ref="tns:def3" lengthKind="explicit"

-        lengthUnits="characters" length="4" representation="text"

-        textNumberRep="standard" />

-    </dfdl:defineFormat>

-

-    <dfdl:defineFormat name="def3">

-      <dfdl:format ref="tns:daffodilTest1" representation="binary"

-        lengthUnits="bytes" />

-    </dfdl:defineFormat>

-

-    <dfdl:defineFormat name="def1">

-      <dfdl:format ref="tns:def2" />

-    </dfdl:defineFormat>

-

-    <dfdl:format ref="tns:def1" initiator="" terminator=""

-      encoding="utf-8" binaryNumberRep="binary" />

-

-    <!-- immediate simple type definition -->

-    <xs:element name="c3">

-      <xs:simpleType>

-        <xs:restriction base="tns:aType">

-          <xs:maxInclusive value="3" />

-        </xs:restriction>

-      </xs:simpleType>

-    </xs:element>

-

-    <!-- global simple type definition -->

-    <xs:simpleType name="aType">

-      <xs:annotation>

-        <xs:appinfo source="http://www.ogf.org/dfdl/">

-          <dfdl:simpleType representation="binary" />

-        </xs:appinfo>

-      </xs:annotation>

-      <!-- base type reference -->

-      <xs:restriction base="tns:aaType" />

-    </xs:simpleType>

-

-    <!-- global simple type definition (used as a base) -->

-    <xs:simpleType name="aaType">

-      <xs:annotation>

-        <xs:appinfo source="http://www.ogf.org/dfdl/">

-          <dfdl:simpleType byteOrder="bigEndian" />

-        </xs:appinfo>

-      </xs:annotation>

-      <xs:restriction base="xs:int" />

-    </xs:simpleType>

-  </tdml:defineSchema>

-

-

-

-  <tdml:defineSchema name="s3">

-    <dfdl:format ref="tns:daffodilTest1" initiator=""

-      terminator="" encoding="utf-8" binaryNumberRep="binary"

-      initiatedContent="no" />

-

-    <xs:element name="a">

-      <!-- should have representation from locally, and byteOrder from the 

-        simpleType -->

-      <xs:annotation>

-        <xs:appinfo source="http://www.ogf.org/dfdl/">

-          <dfdl:element representation="binary" />

-        </xs:appinfo>

-      </xs:annotation>

-      <xs:simpleType>

-        <xs:annotation>

-          <xs:appinfo source="http://www.ogf.org/dfdl/">

-            <dfdl:simpleType byteOrder="bigEndian" />

-          </xs:appinfo>

-        </xs:annotation>

-        <xs:restriction base="xs:int" />

-      </xs:simpleType>

-    </xs:element>

-

-    <xs:element name="aa" type="tns:c">

-      <xs:annotation>

-        <xs:appinfo source="http://www.ogf.org/dfdl/">

-          <dfdl:element representation="binary" />

-        </xs:appinfo>

-      </xs:annotation>

-    </xs:element>

-

-    <xs:simpleType name="c">

-      <xs:annotation>

-        <xs:appinfo source="http://www.ogf.org/dfdl/">

-          <dfdl:simpleType byteOrder="bigEndian" />

-        </xs:appinfo>

-      </xs:annotation>

-      <xs:restriction base="xs:int" />

-    </xs:simpleType>

-

-    <xs:element name="aaa" dfdl:lengthKind="implicit">

-      <xs:complexType>

-        <xs:sequence dfdl:separator="">

-          <xs:element ref="tns:aa" dfdl:occursCountKind="fixed"

-            minOccurs="3" maxOccurs="3" />

-        </xs:sequence>

-      </xs:complexType>

-    </xs:element>

-  </tdml:defineSchema>

-

-

-

-  <tdml:defineSchema name="PropScoping-Embedded.dfdl.xsd">

-    <dfdl:format ref="tns:daffodilTest1" representation="text"

-      occursCountKind="parsed" lengthUnits="bytes" encoding="US-ASCII"

-      initiator="" terminator="" separator="" ignoreCase="no" />

-    <xs:element name="e1" type="xs:string" dfdl:lengthKind="explicit"

-      dfdl:length="{ 1 }" />

-    <xs:element name="e2" dfdl:lengthKind="implicit">

-      <xs:complexType>

-        <xs:sequence dfdl:separator=","

-          dfdl:separatorPosition="infix">

-          <xs:element ref="tns:e1" />

-        </xs:sequence>

-      </xs:complexType>

-    </xs:element>

-  </tdml:defineSchema>

-

-

-

-  <tdml:parserTestCase name="NearestEnclosingSequenceElementRef"

-    description="Section 8 An xs:element reference and its referenced global xs:element - DFDL-8-022R"

-    model="PropScoping-Embedded.dfdl.xsd" root="e2">

-    <tdml:document>

-      <tdml:documentPart type="byte">41</tdml:documentPart>

-    </tdml:document>

-    <tdml:infoset>

-      <tdml:dfdlInfoset>

-        <e2>

-          <e1>A</e1>

-        </e2>

-      </tdml:dfdlInfoset>

-    </tdml:infoset>

-  </tdml:parserTestCase>

-

-

-  <tdml:defineSchema name="dfdlRefNotFound">

-    <dfdl:defineFormat name="def">

-      <dfdl:format ref="tns:noWayMan" encoding="utf-8"

-        lengthKind="explicit" lengthUnits="characters" length="5"

-        textNumberRep="zoned" />

-    </dfdl:defineFormat>

-

-    <dfdl:defineFormat name="def2">

-      <dfdl:format ref="tns:def3" lengthKind="explicit"

-        lengthUnits="characters" length="4" representation="text"

-        textNumberRep="standard" />

-    </dfdl:defineFormat>

-

-    <dfdl:defineFormat name="def3">

-      <dfdl:format ref="tns:daffodilTest1" representation="binary" />

-    </dfdl:defineFormat>

-

-    <dfdl:defineFormat name="def1">

-      <dfdl:format ref="tns:def2" />

-    </dfdl:defineFormat>

-

-    <dfdl:format ref="tns:daffodilTest1" lengthKind="explicit"

-      lengthUnits="characters" length="3" />

-

-    <xs:element name="easy" type="xs:int" dfdl:ref="tns:DNE"

-      dfdl:textNumberRep="standard" />

-    <xs:element name="easy2" type="xs:int" dfdl:ref="tns:def"

-      dfdl:textNumberRep="standard" />

-  </tdml:defineSchema>

-

-  <tdml:defineSchema name="formatRefLongVsShortForm">

-

-    <dfdl:defineFormat name="aFormat">

-      <dfdl:format ref="tns:daffodilTest1" representation="text"

-        lengthKind="delimited" initiator="" terminator="" encoding="utf-8"

-        initiatedContent="no" occursCountKind="parsed" />

-    </dfdl:defineFormat>

-    <dfdl:format ref="tns:daffodilTest1" initiator=""

-      terminator="" encoding="utf-8" binaryNumberRep="binary"

-      initiatedContent="no" />

-

-    <xs:element name="aa" type="tns:c">

-      <xs:annotation>

-        <xs:appinfo source="http://www.ogf.org/dfdl/">

-          <dfdl:element representation="binary" />

-        </xs:appinfo>

-      </xs:annotation>

-    </xs:element>

-

-    <xs:simpleType name="c">

-      <xs:annotation>

-        <xs:appinfo source="http://www.ogf.org/dfdl/">

-          <dfdl:simpleType byteOrder="bigEndian" />

-        </xs:appinfo>

-      </xs:annotation>

-      <xs:restriction base="xs:int" />

-    </xs:simpleType>

-

-    <xs:element name="long" dfdl:lengthKind="implicit">

-      <xs:complexType>

-        <xs:sequence dfdl:separator="">

-          <xs:element ref="tns:aa" dfdl:occursCountKind="fixed"

-            minOccurs="3" maxOccurs="3">

-            <xs:annotation>

-              <xs:appinfo source="http://www.ogf.org/dfdl/">

-                <dfdl:element ref="tns:dummy" />

-              </xs:appinfo>

-            </xs:annotation>

-          </xs:element>

-        </xs:sequence>

-      </xs:complexType>

-    </xs:element>

-    

-

-    <xs:element name="short" dfdl:lengthKind="implicit">

-      <xs:complexType>

-        <xs:sequence dfdl:separator="">

-          <xs:element ref="tns:aa" dfdl:occursCountKind="fixed"

-            dfdl:ref="tns:dummy" minOccurs="3" maxOccurs="3" />

-        </xs:sequence>

-      </xs:complexType>

-    </xs:element>

-

-    <xs:element name="longAndShort">

-      <xs:complexType>

-        <xs:sequence dfdl:separator=","

-          dfdl:separatorPosition="infix">

-          <xs:element name="overlap" type="xs:string"

-            dfdl:occursCountKind="parsed" dfdl:ref="tns:aFormat">

-            <xs:annotation>

-              <xs:appinfo source="http://www.ogf.org/dfdl/">

-                <dfdl:element ref="tns:aFormat" />

-              </xs:appinfo>

-            </xs:annotation>

-          </xs:element>

-        </xs:sequence>

-      </xs:complexType>

-    </xs:element>

-  </tdml:defineSchema>

-

-

-  <tdml:parserTestCase name="property_scoping_02"

-    root="easy" model="s1"

-    description="Section 8 Combining DFDL Representation Properties from a dfdl:defineFormat - DFDL-8-018R">

-    <tdml:document>-1009</tdml:document>

-    <tdml:infoset>

-      <tdml:dfdlInfoset>

-        <easy>-1009</easy>

-      </tdml:dfdlInfoset>

-    </tdml:infoset>

-  </tdml:parserTestCase>

-

-  <tdml:unparserTestCase name="unparse_property_scoping_02"

-    root="easy" model="s1-u"

-    description="Section 8 Combining DFDL Representation Properties from a dfdl:defineFormat - DFDL-8-018R">

-    <tdml:infoset>

-      <tdml:dfdlInfoset>

-        <tns:easy>-1009</tns:easy>

-      </tdml:dfdlInfoset>

-    </tdml:infoset>

-    <tdml:document>-1009</tdml:document>

-  </tdml:unparserTestCase>

-

-  <tdml:parserTestCase name="property_scoping_03"

-    root="c3" model="s2"

-    description="Section 8 An xs:simpleType restriction and its base xs:simpleType restriction - DFDL-8-024R">

-

-    <tdml:document>

-      <tdml:documentPart type="byte">00000003</tdml:documentPart>

-    </tdml:document>

-    <tdml:errors>

-    <tdml:error>Schema Definition Error</tdml:error>

-    <tdml:error>lengthUnits</tdml:error>

-    <tdml:error>characters</tdml:error>

-    </tdml:errors>

-  </tdml:parserTestCase>

-

-  <tdml:unparserTestCase name="unparse_property_scoping_03"

-    root="c3" model="s2"

-    description="Section 8 An xs:simpleType restriction and its base xs:simpleType restriction - DFDL-8-024R">

-

-    <tdml:infoset>

-      <tdml:dfdlInfoset>

-        <tns:c3>test</tns:c3>

-      </tdml:dfdlInfoset>

-    </tdml:infoset>

-    <tdml:errors>

-      <tdml:error>Schema Definition Error</tdml:error>

-      <tdml:error>lengthUnits</tdml:error>

-      <tdml:error>characters</tdml:error>

-    </tdml:errors>

-  </tdml:unparserTestCase>

-

-  <tdml:parserTestCase name="property_scoping_04"

-    root="a" model="s3"

-    description="Section 8 An xs:element and its referenced xs:simpleType restriction - DFDL-8-021R">

-

-    <tdml:document>

-      <tdml:documentPart type="byte">00000003</tdml:documentPart>

-    </tdml:document>

-    <tdml:infoset>

-      <tdml:dfdlInfoset>

-        <a>3</a>

-      </tdml:dfdlInfoset>

-    </tdml:infoset>

-  </tdml:parserTestCase>

-

-  <tdml:unparserTestCase name="unparse_property_scoping_04"

-    root="a" model="s3"

-    description="Section 8 An xs:element and its referenced xs:simpleType restriction - DFDL-8-021R">

-

-    <tdml:infoset>

-      <tdml:dfdlInfoset>

-        <tns:a>3</tns:a>

-      </tdml:dfdlInfoset>

-    </tdml:infoset>

-    <tdml:document>

-      <tdml:documentPart type="byte">00000003</tdml:documentPart>

-    </tdml:document>

-  </tdml:unparserTestCase>

-

-  <tdml:parserTestCase name="property_scoping_05"

-    root="aaa" model="s3"

-    description="Section 8 An xs:element reference and its referenced global xs:element - DFDL-8-022R">

-

-    <tdml:document>

-      <tdml:documentPart type="byte">000000030000000600000001</tdml:documentPart>

-    </tdml:document>

-    <tdml:infoset>

-      <tdml:dfdlInfoset>

-        <aaa>

-          <aa>3</aa>

-          <aa>6</aa>

-          <aa>1</aa>

-        </aaa>

-      </tdml:dfdlInfoset>

-    </tdml:infoset>

-  </tdml:parserTestCase>

-  

-  <tdml:unparserTestCase name="unparse_property_scoping_05"

-    root="aaa" model="s3"

-    description="Section 8 An xs:element reference and its referenced global xs:element - DFDL-8-022R">

-

-    <tdml:infoset>

-      <tdml:dfdlInfoset>

-        <tns:aaa>

-          <tns:aa>3</tns:aa>

-          <tns:aa>6</tns:aa>

-          <tns:aa>1</tns:aa>

-        </tns:aaa>

-      </tdml:dfdlInfoset>

-    </tdml:infoset>

-    <tdml:document>

-      <tdml:documentPart type="byte">000000030000000600000001</tdml:documentPart>

-    </tdml:document>

-  </tdml:unparserTestCase>

-  

-  <!--

-    Test name: property_scoping_07

-       Schema: dfdlRefNotFound

-         Root: easy

-      Purpose: This test demonstrates that when a format ref is not found, an error occurs.

-  -->

-

-  <tdml:parserTestCase name="property_scoping_07"

-    root="easy" model="dfdlRefNotFound"

-    description="A test to verify that when a format ref is not found (from element) an error occurs">

-    <tdml:document>-1009</tdml:document>

-    <tdml:errors>

-      <tdml:error>DNE</tdml:error>

-      <tdml:error>not</tdml:error>

-      <tdml:error>found</tdml:error>

-    </tdml:errors>

-  </tdml:parserTestCase>

-  

-  <!--

-    Test name: unparse_property_scoping_07

-       Schema: dfdlRefNotFound

-         Root: easy

-      Purpose: This test demonstrates that when a format ref is not found, an error occurs.

-  -->

-

-  <tdml:unparserTestCase name="unparse_property_scoping_07"

-    root="easy" model="dfdlRefNotFound"

-    description="A test to verify that when a format ref is not found (from element) an error occurs">

+
+  <tdml:defineSchema name="s1">
+    <dfdl:defineFormat name="def">
+      <dfdl:format ref="tns:def1" encoding="utf-8"
+        lengthKind="explicit" lengthUnits="characters" length="5"
+        textNumberRep="zoned" />
+    </dfdl:defineFormat>
+
+    <dfdl:defineFormat name="def2">
+      <dfdl:format ref="tns:def3" lengthKind="explicit"
+        lengthUnits="characters" length="4" representation="text"
+        textNumberRep="standard" />
+    </dfdl:defineFormat>
+
+    <dfdl:defineFormat name="def3">
+      <dfdl:format ref="tns:daffodilTest1" representation="binary" />
+    </dfdl:defineFormat>
+
+    <dfdl:defineFormat name="def1">
+      <dfdl:format ref="tns:def2" />
+    </dfdl:defineFormat>
+
+    <dfdl:format ref="tns:daffodilTest1" lengthKind="explicit"
+      lengthUnits="characters" length="3" />
+
+    <xs:element name="easy" type="xs:int" dfdl:textNumberRep="standard">
+      <xs:annotation>
+        <xs:appinfo source="http://www.ogf.org/dfdl/">
+          <dfdl:element ref="tns:def"/>
+        </xs:appinfo>
+      </xs:annotation>
+    </xs:element>
+  </tdml:defineSchema>
+
+  <tdml:defineSchema name="s1-u">
+    <dfdl:defineFormat name="def">
+      <dfdl:format ref="tns:def1" encoding="ascii"
+        lengthKind="explicit" lengthUnits="characters" length="5"
+        textNumberRep="zoned" />
+    </dfdl:defineFormat>
+
+    <dfdl:defineFormat name="def2">
+      <dfdl:format ref="tns:def3" lengthKind="explicit"
+        lengthUnits="characters" length="4" representation="text"
+        textNumberRep="standard" />
+    </dfdl:defineFormat>
+
+    <dfdl:defineFormat name="def3">
+      <dfdl:format ref="tns:daffodilTest1" representation="binary" />
+    </dfdl:defineFormat>
+
+    <dfdl:defineFormat name="def1">
+      <dfdl:format ref="tns:def2" />
+    </dfdl:defineFormat>
+
+    <dfdl:format ref="tns:daffodilTest1" lengthKind="explicit"
+      lengthUnits="characters" length="3" />
+
+    <xs:element name="easy" type="xs:int" dfdl:textNumberRep="standard">
+      <xs:annotation>
+        <xs:appinfo source="http://www.ogf.org/dfdl/">
+          <dfdl:element ref="tns:def"/>
+        </xs:appinfo>
+      </xs:annotation>
+    </xs:element>
+  </tdml:defineSchema>
+
+  <tdml:defineSchema name="s1-u2">
+    <dfdl:defineFormat name="def">
+      <dfdl:format ref="tns:def1" encoding="ascii"
+        lengthKind="explicit" lengthUnits="characters" length="5"/>
+    </dfdl:defineFormat>
+
+    <dfdl:defineFormat name="def2">
+      <dfdl:format lengthKind="explicit"
+        lengthUnits="characters" length="4" representation="text"/>
+    </dfdl:defineFormat>
+
+    <dfdl:defineFormat name="def1">
+      <dfdl:format ref="tns:def2" />
+    </dfdl:defineFormat>
+
+    <dfdl:format ref="tns:daffodilTest1" lengthKind="explicit"
+      lengthUnits="characters" length="3" />
+
+    <xs:element name="easy" type="xs:string">
+      <xs:annotation>
+        <xs:appinfo source="http://www.ogf.org/dfdl/">
+          <dfdl:element ref="tns:def"/>
+        </xs:appinfo>
+      </xs:annotation>
+    </xs:element>
+  </tdml:defineSchema>
+
+
+
+  <tdml:defineSchema name="s2">
+
+    <dfdl:defineFormat name="def2">
+      <dfdl:format ref="tns:def3" lengthKind="explicit"
+        lengthUnits="characters" length="4" representation="text"
+        textNumberRep="standard" />
+    </dfdl:defineFormat>
+
+    <dfdl:defineFormat name="def3">
+      <dfdl:format ref="tns:daffodilTest1" representation="binary"
+        lengthUnits="bytes" />
+    </dfdl:defineFormat>
+
+    <dfdl:defineFormat name="def1">
+      <dfdl:format ref="tns:def2" />
+    </dfdl:defineFormat>
+
+    <dfdl:format ref="tns:def1" initiator="" terminator=""
+      encoding="utf-8" binaryNumberRep="binary" />
+
+    <!-- immediate simple type definition -->
+    <xs:element name="c3">
+      <xs:simpleType>
+        <xs:restriction base="tns:aType">
+          <xs:maxInclusive value="3" />
+        </xs:restriction>
+      </xs:simpleType>
+    </xs:element>
+
+    <!-- global simple type definition -->
+    <xs:simpleType name="aType">
+      <xs:annotation>
+        <xs:appinfo source="http://www.ogf.org/dfdl/">
+          <dfdl:simpleType representation="binary" />
+        </xs:appinfo>
+      </xs:annotation>
+      <!-- base type reference -->
+      <xs:restriction base="tns:aaType" />
+    </xs:simpleType>
+
+    <!-- global simple type definition (used as a base) -->
+    <xs:simpleType name="aaType">
+      <xs:annotation>
+        <xs:appinfo source="http://www.ogf.org/dfdl/">
+          <dfdl:simpleType byteOrder="bigEndian" />
+        </xs:appinfo>
+      </xs:annotation>
+      <xs:restriction base="xs:int" />
+    </xs:simpleType>
+  </tdml:defineSchema>
+
+
+
+  <tdml:defineSchema name="s3">
+    <dfdl:format ref="tns:daffodilTest1" initiator=""
+      terminator="" encoding="utf-8" binaryNumberRep="binary"
+      initiatedContent="no" />
+
+    <xs:element name="a">
+      <!-- should have representation from locally, and byteOrder from the 
+        simpleType -->
+      <xs:annotation>
+        <xs:appinfo source="http://www.ogf.org/dfdl/">
+          <dfdl:element representation="binary" />
+        </xs:appinfo>
+      </xs:annotation>
+      <xs:simpleType>
+        <xs:annotation>
+          <xs:appinfo source="http://www.ogf.org/dfdl/">
+            <dfdl:simpleType byteOrder="bigEndian" />
+          </xs:appinfo>
+        </xs:annotation>
+        <xs:restriction base="xs:int" />
+      </xs:simpleType>
+    </xs:element>
+
+    <xs:element name="aa" type="tns:c">
+      <xs:annotation>
+        <xs:appinfo source="http://www.ogf.org/dfdl/">
+          <dfdl:element representation="binary" />
+        </xs:appinfo>
+      </xs:annotation>
+    </xs:element>
+
+    <xs:simpleType name="c">
+      <xs:annotation>
+        <xs:appinfo source="http://www.ogf.org/dfdl/">
+          <dfdl:simpleType byteOrder="bigEndian" />
+        </xs:appinfo>
+      </xs:annotation>
+      <xs:restriction base="xs:int" />
+    </xs:simpleType>
+
+    <xs:element name="aaa" dfdl:lengthKind="implicit">
+      <xs:complexType>
+        <xs:sequence dfdl:separator="">
+          <xs:element ref="tns:aa" dfdl:occursCountKind="fixed"
+            minOccurs="3" maxOccurs="3" />
+        </xs:sequence>
+      </xs:complexType>
+    </xs:element>
+  </tdml:defineSchema>
+
+
+
+  <tdml:defineSchema name="PropScoping-Embedded.dfdl.xsd">
+    <dfdl:format ref="tns:daffodilTest1" representation="text"
+      occursCountKind="parsed" lengthUnits="bytes" encoding="US-ASCII"
+      initiator="" terminator="" separator="" ignoreCase="no" />
+    <xs:element name="e1" type="xs:string" dfdl:lengthKind="explicit"
+      dfdl:length="{ 1 }" />
+    <xs:element name="e2" dfdl:lengthKind="implicit">
+      <xs:complexType>
+        <xs:sequence dfdl:separator=","
+          dfdl:separatorPosition="infix">
+          <xs:element ref="tns:e1" />
+        </xs:sequence>
+      </xs:complexType>
+    </xs:element>
+  </tdml:defineSchema>
+
+
+
+  <tdml:parserTestCase name="NearestEnclosingSequenceElementRef"
+    description="Section 8 An xs:element reference and its referenced global xs:element - DFDL-8-022R"
+    model="PropScoping-Embedded.dfdl.xsd" root="e2">
+    <tdml:document>
+      <tdml:documentPart type="byte">41</tdml:documentPart>
+    </tdml:document>
+    <tdml:infoset>
+      <tdml:dfdlInfoset>
+        <e2>
+          <e1>A</e1>
+        </e2>
+      </tdml:dfdlInfoset>
+    </tdml:infoset>
+  </tdml:parserTestCase>
+
+
+  <tdml:defineSchema name="dfdlRefNotFound">
+    <dfdl:defineFormat name="def">
+      <dfdl:format ref="tns:noWayMan" encoding="utf-8"
+        lengthKind="explicit" lengthUnits="characters" length="5"
+        textNumberRep="zoned" />
+    </dfdl:defineFormat>
+
+    <dfdl:defineFormat name="def2">
+      <dfdl:format ref="tns:def3" lengthKind="explicit"
+        lengthUnits="characters" length="4" representation="text"
+        textNumberRep="standard" />
+    </dfdl:defineFormat>
+
+    <dfdl:defineFormat name="def3">
+      <dfdl:format ref="tns:daffodilTest1" representation="binary" />
+    </dfdl:defineFormat>
+
+    <dfdl:defineFormat name="def1">
+      <dfdl:format ref="tns:def2" />
+    </dfdl:defineFormat>
+
+    <dfdl:format ref="tns:daffodilTest1" lengthKind="explicit"
+      lengthUnits="characters" length="3" />
+
+    <xs:element name="easy" type="xs:int" dfdl:ref="tns:DNE"
+      dfdl:textNumberRep="standard" />
+    <xs:element name="easy2" type="xs:int" dfdl:ref="tns:def"
+      dfdl:textNumberRep="standard" />
+  </tdml:defineSchema>
+
+  <tdml:defineSchema name="formatRefLongVsShortForm">
+
+    <dfdl:defineFormat name="aFormat">
+      <dfdl:format ref="tns:daffodilTest1" representation="text"
+        lengthKind="delimited" initiator="" terminator="" encoding="utf-8"
+        initiatedContent="no" occursCountKind="parsed" />
+    </dfdl:defineFormat>
+    <dfdl:format ref="tns:daffodilTest1" initiator=""
+      terminator="" encoding="utf-8" binaryNumberRep="binary"
+      initiatedContent="no" />
+
+    <xs:element name="aa" type="tns:c">
+      <xs:annotation>
+        <xs:appinfo source="http://www.ogf.org/dfdl/">
+          <dfdl:element representation="binary" />
+        </xs:appinfo>
+      </xs:annotation>
+    </xs:element>
+
+    <xs:simpleType name="c">
+      <xs:annotation>
+        <xs:appinfo source="http://www.ogf.org/dfdl/">
+          <dfdl:simpleType byteOrder="bigEndian" />
+        </xs:appinfo>
+      </xs:annotation>
+      <xs:restriction base="xs:int" />
+    </xs:simpleType>
+
+    <xs:element name="long" dfdl:lengthKind="implicit">
+      <xs:complexType>
+        <xs:sequence dfdl:separator="">
+          <xs:element ref="tns:aa" dfdl:occursCountKind="fixed"
+            minOccurs="3" maxOccurs="3">
+            <xs:annotation>
+              <xs:appinfo source="http://www.ogf.org/dfdl/">
+                <dfdl:element ref="tns:dummy" />
+              </xs:appinfo>
+            </xs:annotation>
+          </xs:element>
+        </xs:sequence>
+      </xs:complexType>
+    </xs:element>
     
-    <tdml:infoset>

-      <tdml:dfdlInfoset>

-        <tns:easy>3</tns:easy>

-      </tdml:dfdlInfoset>

-    </tdml:infoset>

-    <tdml:errors>

-      <tdml:error>Schema Definition Error</tdml:error>

-      <tdml:error>DNE</tdml:error>

-      <tdml:error>not found</tdml:error>

-    </tdml:errors>

-  </tdml:unparserTestCase>

-  

-  <!--

-    Test name: property_scoping_08

-       Schema: dfdlRefNotFound

-         Root: easy2

-      Purpose: This test demonstrates that when a format ref is not found, an error occurs.

-               In this case the ref is nested.

-  -->

-

-  <tdml:parserTestCase name="property_scoping_08"

-    root="easy2" model="dfdlRefNotFound"

-    description="A test to verify that when a format ref is not found (from format) an error occurs">

-    <tdml:document>-1009</tdml:document>

-    <tdml:errors>

-      <tdml:error>noWayMan</tdml:error>

-      <tdml:error>not</tdml:error>

-      <tdml:error>found</tdml:error>

-    </tdml:errors>

-  </tdml:parserTestCase>

-  

-  <!--

-    Test name: unparse_property_scoping_08

-       Schema: dfdlRefNotFound

-         Root: easy2

-      Purpose: This test demonstrates that when a format ref is not found, an error occurs.

-               In this case the ref is nested.

-  -->

-

-  <tdml:unparserTestCase name="unparse_property_scoping_08"

-    root="easy2" model="dfdlRefNotFound"

-    description="A test to verify that when a format ref is not found (from format) an error occurs">

-    <tdml:infoset>

-      <tdml:dfdlInfoset>

-        <tns:easy2>3</tns:easy2>

-      </tdml:dfdlInfoset>

-    </tdml:infoset>

-    <tdml:errors>

-      <tdml:error>Schema Definition Error</tdml:error>

-      <tdml:error>noWayMan</tdml:error>

-      <tdml:error>not found</tdml:error>

-    </tdml:errors>

-  </tdml:unparserTestCase>

-  

-  <!--

-    Test name: property_scoping_09

-       Schema: formatRefLongVsShortForm

-         Root: long

-      Purpose: This test demonstrates that when a format ref is not found, an error occurs.

-               In this case the ref is represented in a long-form annotation

-  -->

-

-  <tdml:parserTestCase name="property_scoping_09"

-    root="long" model="formatRefLongVsShortForm"

-    description="A test to verify that when a format ref is not found in longForm an error occurs">

-    <tdml:document>

-      <tdml:documentPart type="byte">000000030000000600000001</tdml:documentPart>

-    </tdml:document>

-    <tdml:errors>

-      <tdml:error>dummy</tdml:error>

-      <tdml:error>not</tdml:error>

-      <tdml:error>found</tdml:error>

-      <tdml:error>aa</tdml:error>

-    </tdml:errors>

-  </tdml:parserTestCase>

-  

-  <!--

-    Test name: unparse_property_scoping_09

-       Schema: formatRefLongVsShortForm

-         Root: long

-      Purpose: This test demonstrates that when a format ref is not found, an error occurs.

-               In this case the ref is represented in a long-form annotation

-  -->

-

-  <tdml:unparserTestCase name="unparse_property_scoping_09"

-    root="long" model="formatRefLongVsShortForm"

-    description="A test to verify that when a format ref is not found in longForm an error occurs">

-    <tdml:infoset>

-      <tdml:dfdlInfoset>

-        <tns:long>3</tns:long>

-      </tdml:dfdlInfoset>

-    </tdml:infoset>

-    <tdml:errors>

-      <tdml:error>Schema Definition Error</tdml:error>

-      <tdml:error>dummy</tdml:error>

-      <tdml:error>not found</tdml:error>

-      <tdml:error>element.aa::DFDLElement</tdml:error>

-    </tdml:errors>

-  </tdml:unparserTestCase>

-  

-  <!--

-    Test name: property_scoping_10

-       Schema: formatRefLongVsShortForm

-         Root: short

-      Purpose: This test demonstrates that when a format ref is not found, an error occurs.

-               In this case the ref is short-form

-   -->

-

-  <tdml:parserTestCase name="property_scoping_10"

-    root="short" model="formatRefLongVsShortForm"

-    description="A test to verify that when a format ref is not found in shortForm an error occurs">

-    <tdml:document>

-      <tdml:documentPart type="byte">000000030000000600000001</tdml:documentPart>

-    </tdml:document>

-    <tdml:errors>

-      <tdml:error>dummy</tdml:error>

-      <tdml:error>not</tdml:error>

-      <tdml:error>found</tdml:error>

-      <tdml:error>aa</tdml:error>

-    </tdml:errors>

-  </tdml:parserTestCase>

-  

-  <!--

-    Test name: unparse_property_scoping_10

-       Schema: formatRefLongVsShortForm

-         Root: short

-      Purpose: This test demonstrates that when a format ref is not found, an error occurs.

-               In this case the ref is short-form

-   -->

-

-  <tdml:unparserTestCase name="unparse_property_scoping_10"

-    root="short" model="formatRefLongVsShortForm"

-    description="A test to verify that when a format ref is not found in shortForm an error occurs">

-    <tdml:infoset>

-      <tdml:dfdlInfoset>

-        <tns:short>3</tns:short>

-      </tdml:dfdlInfoset>

-    </tdml:infoset>

-    <tdml:errors>

-      <tdml:error>Schema Definition Error</tdml:error>

-      <tdml:error>dummy</tdml:error>

-      <tdml:error>not found</tdml:error>

-      <tdml:error>sequence::element.aa::DFDLElement</tdml:error>

-    </tdml:errors>

-  </tdml:unparserTestCase>

-  

-  <!--

-    Test name: property_scoping_11

-       Schema: formatRefLongVsShortForm

-         Root: longAndShort

-      Purpose: This test demonstrates that when a format ref is in both long and short form, an error occurs

-   -->

-

-  <tdml:parserTestCase name="property_scoping_11"

-    root="longAndShort" model="formatRefLongVsShortForm"

-    description="A test to verify that when a format ref is found in both long and short form an error occurs">

-    <tdml:document>

-      <tdml:documentPart type="text">000000030000000600000001</tdml:documentPart>

-    </tdml:document>

-    <tdml:errors>

-      <tdml:error>Short</tdml:error>

-      <tdml:error>and</tdml:error>

-      <tdml:error>long</tdml:error>

-      <tdml:error>ref</tdml:error>

-    </tdml:errors>

-  </tdml:parserTestCase>

-  

-  <!--

-    Test name: unparse_property_scoping_11

-       Schema: formatRefLongVsShortForm

-         Root: longAndShort

-      Purpose: This test demonstrates that when a format ref is in both long and short form, an error occurs

-   -->

-

-  <tdml:unparserTestCase name="unparse_property_scoping_11"

-    root="longAndShort" model="formatRefLongVsShortForm"

-    description="A test to verify that when a format ref is found in both long and short form an error occurs">

-    <tdml:infoset>

-      <tdml:dfdlInfoset>

-        <tns:longAndShort>3</tns:longAndShort>

-      </tdml:dfdlInfoset>

-    </tdml:infoset>

-    <tdml:errors>

-      <tdml:error>Schema Definition Error</tdml:error>

-      <tdml:error>Both long form and short form ref attribute found</tdml:error>

-    </tdml:errors>

-  </tdml:unparserTestCase>

-  

-  <tdml:unparserTestCase name="unparse_property_scoping_12"

-    root="easy" model="s1-u2"

-    description="Section 8 Combining DFDL Representation Properties from a dfdl:defineFormat - DFDL-8-018R">

-    <tdml:infoset>

-      <tdml:dfdlInfoset>

-        <tns:easy>abcde</tns:easy>

-      </tdml:dfdlInfoset>

-    </tdml:infoset>

-    <tdml:document>abcde</tdml:document>

-  </tdml:unparserTestCase>

-

-  <tdml:parserTestCase name="refElementFormFail"

-    root="easy" model="PropertyScoping_05.dfdl.xsd"

-    description="ref property may be specified in attribute or short form - DFDL-7-016R">

-    <tdml:document>-1009</tdml:document>

-    <tdml:errors>

-      <tdml:error>Schema Definition Error</tdml:error>

-      <tdml:error>Value 'ref' is not facet-valid with respect to</tdml:error>

-    </tdml:errors>

-  </tdml:parserTestCase>

-

-</tdml:testSuite>

+
+    <xs:element name="short" dfdl:lengthKind="implicit">
+      <xs:complexType>
+        <xs:sequence dfdl:separator="">
+          <xs:element ref="tns:aa" dfdl:occursCountKind="fixed"
+            dfdl:ref="tns:dummy" minOccurs="3" maxOccurs="3" />
+        </xs:sequence>
+      </xs:complexType>
+    </xs:element>
+
+    <xs:element name="longAndShort">
+      <xs:complexType>
+        <xs:sequence dfdl:separator=","
+          dfdl:separatorPosition="infix">
+          <xs:element name="overlap" type="xs:string"
+            dfdl:occursCountKind="parsed" dfdl:ref="tns:aFormat">
+            <xs:annotation>
+              <xs:appinfo source="http://www.ogf.org/dfdl/">
+                <dfdl:element ref="tns:aFormat" />
+              </xs:appinfo>
+            </xs:annotation>
+          </xs:element>
+        </xs:sequence>
+      </xs:complexType>
+    </xs:element>
+  </tdml:defineSchema>
+
+
+  <tdml:parserTestCase name="property_scoping_02"
+    root="easy" model="s1"
+    description="Section 8 Combining DFDL Representation Properties from a dfdl:defineFormat - DFDL-8-018R">
+    <tdml:document>-1009</tdml:document>
+    <tdml:infoset>
+      <tdml:dfdlInfoset>
+        <easy>-1009</easy>
+      </tdml:dfdlInfoset>
+    </tdml:infoset>
+  </tdml:parserTestCase>
+
+  <tdml:unparserTestCase name="unparse_property_scoping_02"
+    root="easy" model="s1-u"
+    description="Section 8 Combining DFDL Representation Properties from a dfdl:defineFormat - DFDL-8-018R">
+    <tdml:infoset>
+      <tdml:dfdlInfoset>
+        <tns:easy>-1009</tns:easy>
+      </tdml:dfdlInfoset>
+    </tdml:infoset>
+    <tdml:document>-1009</tdml:document>
+  </tdml:unparserTestCase>
+
+  <tdml:parserTestCase name="property_scoping_03"
+    root="c3" model="s2"
+    description="Section 8 An xs:simpleType restriction and its base xs:simpleType restriction - DFDL-8-024R">
+
+    <tdml:document>
+      <tdml:documentPart type="byte">00000003</tdml:documentPart>
+    </tdml:document>
+    <tdml:errors>
+    <tdml:error>Schema Definition Error</tdml:error>
+    <tdml:error>lengthUnits</tdml:error>
+    <tdml:error>characters</tdml:error>
+    </tdml:errors>
+  </tdml:parserTestCase>
+
+  <tdml:unparserTestCase name="unparse_property_scoping_03"
+    root="c3" model="s2"
+    description="Section 8 An xs:simpleType restriction and its base xs:simpleType restriction - DFDL-8-024R">
+
+    <tdml:infoset>
+      <tdml:dfdlInfoset>
+        <tns:c3>test</tns:c3>
+      </tdml:dfdlInfoset>
+    </tdml:infoset>
+    <tdml:errors>
+      <tdml:error>Schema Definition Error</tdml:error>
+      <tdml:error>lengthUnits</tdml:error>
+      <tdml:error>characters</tdml:error>
+    </tdml:errors>
+  </tdml:unparserTestCase>
+
+  <tdml:parserTestCase name="property_scoping_04"
+    root="a" model="s3"
+    description="Section 8 An xs:element and its referenced xs:simpleType restriction - DFDL-8-021R">
+
+    <tdml:document>
+      <tdml:documentPart type="byte">00000003</tdml:documentPart>
+    </tdml:document>
+    <tdml:infoset>
+      <tdml:dfdlInfoset>
+        <a>3</a>
+      </tdml:dfdlInfoset>
+    </tdml:infoset>
+  </tdml:parserTestCase>
+
+  <tdml:unparserTestCase name="unparse_property_scoping_04"
+    root="a" model="s3"
+    description="Section 8 An xs:element and its referenced xs:simpleType restriction - DFDL-8-021R">
+
+    <tdml:infoset>
+      <tdml:dfdlInfoset>
+        <tns:a>3</tns:a>
+      </tdml:dfdlInfoset>
+    </tdml:infoset>
+    <tdml:document>
+      <tdml:documentPart type="byte">00000003</tdml:documentPart>
+    </tdml:document>
+  </tdml:unparserTestCase>
+
+  <tdml:parserTestCase name="property_scoping_05"
+    root="aaa" model="s3"
+    description="Section 8 An xs:element reference and its referenced global xs:element - DFDL-8-022R">
+
+    <tdml:document>
+      <tdml:documentPart type="byte">000000030000000600000001</tdml:documentPart>
+    </tdml:document>
+    <tdml:infoset>
+      <tdml:dfdlInfoset>
+        <aaa>
+          <aa>3</aa>
+          <aa>6</aa>
+          <aa>1</aa>
+        </aaa>
+      </tdml:dfdlInfoset>
+    </tdml:infoset>
+  </tdml:parserTestCase>
+  
+  <tdml:unparserTestCase name="unparse_property_scoping_05"
+    root="aaa" model="s3"
+    description="Section 8 An xs:element reference and its referenced global xs:element - DFDL-8-022R">
+
+    <tdml:infoset>
+      <tdml:dfdlInfoset>
+        <tns:aaa>
+          <tns:aa>3</tns:aa>
+          <tns:aa>6</tns:aa>
+          <tns:aa>1</tns:aa>
+        </tns:aaa>
+      </tdml:dfdlInfoset>
+    </tdml:infoset>
+    <tdml:document>
+      <tdml:documentPart type="byte">000000030000000600000001</tdml:documentPart>
+    </tdml:document>
+  </tdml:unparserTestCase>
+  
+  <!--
+    Test name: property_scoping_07
+       Schema: dfdlRefNotFound
+         Root: easy
+      Purpose: This test demonstrates that when a format ref is not found, an error occurs.
+  -->
+
+  <tdml:parserTestCase name="property_scoping_07"
+    root="easy" model="dfdlRefNotFound"
+    description="A test to verify that when a format ref is not found (from element) an error occurs">
+    <tdml:document>-1009</tdml:document>
+    <tdml:errors>
+      <tdml:error>DNE</tdml:error>
+      <tdml:error>not</tdml:error>
+      <tdml:error>found</tdml:error>
+    </tdml:errors>
+  </tdml:parserTestCase>
+  
+  <!--
+    Test name: unparse_property_scoping_07
+       Schema: dfdlRefNotFound
+         Root: easy
+      Purpose: This test demonstrates that when a format ref is not found, an error occurs.
+  -->
+
+  <tdml:unparserTestCase name="unparse_property_scoping_07"
+    root="easy" model="dfdlRefNotFound"
+    description="A test to verify that when a format ref is not found (from element) an error occurs">
+    
+    <tdml:infoset>
+      <tdml:dfdlInfoset>
+        <tns:easy>3</tns:easy>
+      </tdml:dfdlInfoset>
+    </tdml:infoset>
+    <tdml:errors>
+      <tdml:error>Schema Definition Error</tdml:error>
+      <tdml:error>DNE</tdml:error>
+      <tdml:error>not found</tdml:error>
+    </tdml:errors>
+  </tdml:unparserTestCase>
+  
+  <!--
+    Test name: property_scoping_08
+       Schema: dfdlRefNotFound
+         Root: easy2
+      Purpose: This test demonstrates that when a format ref is not found, an error occurs.
+               In this case the ref is nested.
+  -->
+
+  <tdml:parserTestCase name="property_scoping_08"
+    root="easy2" model="dfdlRefNotFound"
+    description="A test to verify that when a format ref is not found (from format) an error occurs">
+    <tdml:document>-1009</tdml:document>
+    <tdml:errors>
+      <tdml:error>noWayMan</tdml:error>
+      <tdml:error>not</tdml:error>
+      <tdml:error>found</tdml:error>
+    </tdml:errors>
+  </tdml:parserTestCase>
+  
+  <!--
+    Test name: unparse_property_scoping_08
+       Schema: dfdlRefNotFound
+         Root: easy2
+      Purpose: This test demonstrates that when a format ref is not found, an error occurs.
+               In this case the ref is nested.
+  -->
+
+  <tdml:unparserTestCase name="unparse_property_scoping_08"
+    root="easy2" model="dfdlRefNotFound"
+    description="A test to verify that when a format ref is not found (from format) an error occurs">
+    <tdml:infoset>
+      <tdml:dfdlInfoset>
+        <tns:easy2>3</tns:easy2>
+      </tdml:dfdlInfoset>
+    </tdml:infoset>
+    <tdml:errors>
+      <tdml:error>Schema Definition Error</tdml:error>
+      <tdml:error>noWayMan</tdml:error>
+      <tdml:error>not found</tdml:error>
+    </tdml:errors>
+  </tdml:unparserTestCase>
+  
+  <!--
+    Test name: property_scoping_09
+       Schema: formatRefLongVsShortForm
+         Root: long
+      Purpose: This test demonstrates that when a format ref is not found, an error occurs.
+               In this case the ref is represented in a long-form annotation
+  -->
+
+  <tdml:parserTestCase name="property_scoping_09"
+    root="long" model="formatRefLongVsShortForm"
+    description="A test to verify that when a format ref is not found in longForm an error occurs">
+    <tdml:document>
+      <tdml:documentPart type="byte">000000030000000600000001</tdml:documentPart>
+    </tdml:document>
+    <tdml:errors>
+      <tdml:error>dummy</tdml:error>
+      <tdml:error>not</tdml:error>
+      <tdml:error>found</tdml:error>
+      <tdml:error>aa</tdml:error>
+    </tdml:errors>
+  </tdml:parserTestCase>
+  
+  <!--
+    Test name: unparse_property_scoping_09
+       Schema: formatRefLongVsShortForm
+         Root: long
+      Purpose: This test demonstrates that when a format ref is not found, an error occurs.
+               In this case the ref is represented in a long-form annotation
+  -->
+
+  <tdml:unparserTestCase name="unparse_property_scoping_09"
+    root="long" model="formatRefLongVsShortForm"
+    description="A test to verify that when a format ref is not found in longForm an error occurs">
+    <tdml:infoset>
+      <tdml:dfdlInfoset>
+        <tns:long>3</tns:long>
+      </tdml:dfdlInfoset>
+    </tdml:infoset>
+    <tdml:errors>
+      <tdml:error>Schema Definition Error</tdml:error>
+      <tdml:error>dummy</tdml:error>
+      <tdml:error>not found</tdml:error>
+      <tdml:error>element.aa::DFDLElement</tdml:error>
+    </tdml:errors>
+  </tdml:unparserTestCase>
+  
+  <!--
+    Test name: property_scoping_10
+       Schema: formatRefLongVsShortForm
+         Root: short
+      Purpose: This test demonstrates that when a format ref is not found, an error occurs.
+               In this case the ref is short-form
+   -->
+
+  <tdml:parserTestCase name="property_scoping_10"
+    root="short" model="formatRefLongVsShortForm"
+    description="A test to verify that when a format ref is not found in shortForm an error occurs">
+    <tdml:document>
+      <tdml:documentPart type="byte">000000030000000600000001</tdml:documentPart>
+    </tdml:document>
+    <tdml:errors>
+      <tdml:error>dummy</tdml:error>
+      <tdml:error>not</tdml:error>
+      <tdml:error>found</tdml:error>
+      <tdml:error>aa</tdml:error>
+    </tdml:errors>
+  </tdml:parserTestCase>
+  
+  <!--
+    Test name: unparse_property_scoping_10
+       Schema: formatRefLongVsShortForm
+         Root: short
+      Purpose: This test demonstrates that when a format ref is not found, an error occurs.
+               In this case the ref is short-form
+   -->
+
+  <tdml:unparserTestCase name="unparse_property_scoping_10"
+    root="short" model="formatRefLongVsShortForm"
+    description="A test to verify that when a format ref is not found in shortForm an error occurs">
+    <tdml:infoset>
+      <tdml:dfdlInfoset>
+        <tns:short>3</tns:short>
+      </tdml:dfdlInfoset>
+    </tdml:infoset>
+    <tdml:errors>
+      <tdml:error>Schema Definition Error</tdml:error>
+      <tdml:error>dummy</tdml:error>
+      <tdml:error>not found</tdml:error>
+      <tdml:error>sequence::element.aa::DFDLElement</tdml:error>
+    </tdml:errors>
+  </tdml:unparserTestCase>
+  
+  <!--
+    Test name: property_scoping_11
+       Schema: formatRefLongVsShortForm
+         Root: longAndShort
+      Purpose: This test demonstrates that when a format ref is in both long and short form, an error occurs
+   -->
+
+  <tdml:parserTestCase name="property_scoping_11"
+    root="longAndShort" model="formatRefLongVsShortForm"
+    description="A test to verify that when a format ref is found in both long and short form an error occurs">
+    <tdml:document>
+      <tdml:documentPart type="text">000000030000000600000001</tdml:documentPart>
+    </tdml:document>
+    <tdml:errors>
+      <tdml:error>Short</tdml:error>
+      <tdml:error>and</tdml:error>
+      <tdml:error>long</tdml:error>
+      <tdml:error>ref</tdml:error>
+    </tdml:errors>
+  </tdml:parserTestCase>
+  
+  <!--
+    Test name: unparse_property_scoping_11
+       Schema: formatRefLongVsShortForm
+         Root: longAndShort
+      Purpose: This test demonstrates that when a format ref is in both long and short form, an error occurs
+   -->
+
+  <tdml:unparserTestCase name="unparse_property_scoping_11"
+    root="longAndShort" model="formatRefLongVsShortForm"
+    description="A test to verify that when a format ref is found in both long and short form an error occurs">
+    <tdml:infoset>
+      <tdml:dfdlInfoset>
+        <tns:longAndShort>3</tns:longAndShort>
+      </tdml:dfdlInfoset>
+    </tdml:infoset>
+    <tdml:errors>
+      <tdml:error>Schema Definition Error</tdml:error>
+      <tdml:error>Both long form and short form ref attribute found</tdml:error>
+    </tdml:errors>
+  </tdml:unparserTestCase>
+  
+  <tdml:unparserTestCase name="unparse_property_scoping_12"
+    root="easy" model="s1-u2"
+    description="Section 8 Combining DFDL Representation Properties from a dfdl:defineFormat - DFDL-8-018R">
+    <tdml:infoset>
+      <tdml:dfdlInfoset>
+        <tns:easy>abcde</tns:easy>
+      </tdml:dfdlInfoset>
+    </tdml:infoset>
+    <tdml:document>abcde</tdml:document>
+  </tdml:unparserTestCase>
+
+  <tdml:parserTestCase name="refElementFormFail"
+    root="easy" model="PropertyScoping_05.dfdl.xsd"
+    description="ref property may be specified in attribute or short form - DFDL-7-016R">
+    <tdml:document>-1009</tdml:document>
+    <tdml:errors>
+      <tdml:error>Schema Definition Error</tdml:error>
+      <tdml:error>Value 'ref' is not facet-valid with respect to</tdml:error>
+    </tdml:errors>
+  </tdml:parserTestCase>
+
+</tdml:testSuite>