You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@daffodil.apache.org by ar...@apache.org on 2022/08/05 17:38:14 UTC

[daffodil-vscode] 10/28: - Add schema files for TDML

This is an automated email from the ASF dual-hosted git repository.

arosien pushed a commit to branch daffodil-vscode-tdml
in repository https://gitbox.apache.org/repos/asf/daffodil-vscode.git

commit 7fccfa013a7a2dc1de28e64dc2df5b398f12bca6
Author: Michael Hoke <mi...@nteligen.com>
AuthorDate: Thu Jun 23 11:31:41 2022 -0400

    - Add schema files for TDML
---
 resources/xsd/DFDL_part1_simpletypes.xsd |  699 ++++++++++++
 resources/xsd/DFDL_part2_attributes.xsd  | 1038 +++++++++++++++++
 resources/xsd/DFDL_part3_model.xsd       |  368 ++++++
 resources/xsd/XMLSchema_for_DFDL.xsd     | 1801 ++++++++++++++++++++++++++++++
 resources/xsd/dafext.xsd                 |  664 +++++++++++
 resources/xsd/dafint.xsd                 |   48 +
 resources/xsd/dfdlx.xsd                  |  272 +++++
 resources/xsd/tdml.xsd                   |  370 ++++++
 resources/xsd/xml.xsd                    |  155 +++
 9 files changed, 5415 insertions(+)

diff --git a/resources/xsd/DFDL_part1_simpletypes.xsd b/resources/xsd/DFDL_part1_simpletypes.xsd
new file mode 100644
index 0000000..9d6f351
--- /dev/null
+++ b/resources/xsd/DFDL_part1_simpletypes.xsd
@@ -0,0 +1,699 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+
+<xsd:schema targetNamespace="http://www.ogf.org/dfdl/dfdl-1.0/"
+            xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+            xmlns:dfdl="http://www.ogf.org/dfdl/dfdl-1.0/"
+            attributeFormDefault="unqualified" elementFormDefault="qualified">
+
+  <!-- ============================================================= -->
+  <!-- Base DFDL Data types -->
+  <!-- ============================================================= -->
+
+  <xsd:simpleType name="DFDLExpression">
+    <xsd:annotation>
+      <xsd:documentation>A subset of XPath 2.0 expressions for use in
+        properties</xsd:documentation>
+    </xsd:annotation>
+    <xsd:restriction base="xsd:token">
+      <xsd:pattern value="(\{[^\{].*\})|(\{\})" />
+    </xsd:restriction>
+  </xsd:simpleType>
+
+  <xsd:simpleType name="EmptyString">
+    <xsd:annotation>
+      <xsd:documentation>Matches the empty string only. No toleration of
+        whitespace.</xsd:documentation>
+    </xsd:annotation>
+    <xsd:restriction base="xsd:string">
+      <xsd:whiteSpace value="preserve" />
+      <xsd:length value="0" />
+    </xsd:restriction>
+  </xsd:simpleType>
+
+  <xsd:simpleType name="DFDLExpressionOrNothing">
+    <xsd:annotation>
+      <xsd:documentation>An expression, or nothing at all.</xsd:documentation>
+    </xsd:annotation>
+    <xsd:union memberTypes="dfdl:EmptyString dfdl:DFDLExpression" />
+    <!--
+      2012-01-04 mbeckerle - If you change the order of this union,
+      it stops enforcing the empty string aspect.
+      Reverse the order and then just empty whitespace will validate.
+    -->
+  </xsd:simpleType>
+
+  <xsd:simpleType name="DFDLExpressionOrPatternOrNothing">
+    <xsd:annotation>
+      <xsd:documentation>An expression, a regex, or nothing at all.
+      </xsd:documentation>
+    </xsd:annotation>
+    <xsd:union
+      memberTypes="dfdl:EmptyString dfdl:DFDLExpression dfdl:DFDLRegularExpression" />
+    <!--
+      2012-01-04 mbeckerle - If you change the order of this union,
+      it stops enforcing the empty string aspect.
+      Reverse the order and then just empty whitespace will validate.
+    -->
+  </xsd:simpleType>
+
+  <xsd:simpleType name="DFDLStringLiteral">
+    <xsd:restriction base="xsd:string">
+    </xsd:restriction>
+  </xsd:simpleType>
+
+  <!-- used alone, this type will allow empty string -->
+  <xsd:simpleType name="ListOfDFDLStringLiteral">
+    <xsd:list itemType="xsd:token"/>
+  </xsd:simpleType>
+
+  <xsd:simpleType name="NonEmptyStringLiteral">
+    <xsd:annotation>
+      <xsd:documentation>Matches a non-empty string only. No toleration of
+        whitespace in the string.</xsd:documentation>
+    </xsd:annotation>
+    <xsd:restriction base="xsd:string">
+      <xsd:pattern value="\S+"/>
+    </xsd:restriction>
+  </xsd:simpleType>
+
+  <xsd:simpleType name="NonEmptyListOfDFDLStringLiteral">
+    <xsd:restriction base="dfdl:ListOfDFDLStringLiteral">
+    <!-- used for dfdl:nilValue. We can give a much clearer diagnostic with a suggestion
+         on what the user should do instead. So we don't check this here. -->
+      <!-- <xsd:minLength value="1"/> --> 
+    </xsd:restriction>
+  </xsd:simpleType>
+
+  <!-- used alone, this type will allow empty string -->
+  <xsd:simpleType name="ListOfInteger">
+    <xsd:list itemType="xsd:integer"/>
+  </xsd:simpleType>
+
+  <xsd:simpleType name="NonEmptyListOfInteger">
+    <xsd:restriction base="dfdl:ListOfInteger">
+       <xsd:minLength value="1"/> 
+    </xsd:restriction>
+  </xsd:simpleType>
+
+  <xsd:simpleType name="NonEmptyListofDFDLStringLiteralOrNonEmptyListOfInteger">
+    <xsd:union memberTypes="dfdl:NonEmptyListOfDFDLStringLiteral dfdl:NonEmptyListOfInteger" />
+  </xsd:simpleType>
+
+  <xsd:simpleType name="DFDLNonNegativeInteger">
+    <xsd:restriction base="xsd:int">
+      <xsd:minInclusive value="0" />
+    </xsd:restriction>
+  </xsd:simpleType>
+
+  <xsd:simpleType name="DFDLRegularExpression">
+    <xsd:restriction base="xsd:string">
+    </xsd:restriction>
+  </xsd:simpleType>
+
+  <xsd:simpleType name="DFDLQName">
+    <xsd:union>
+      <xsd:simpleType>
+        <xsd:restriction base="xsd:QName" />
+      </xsd:simpleType>
+      <xsd:simpleType>
+        <xsd:restriction base="xsd:string">
+          <xsd:length value="0" />
+        </xsd:restriction>
+      </xsd:simpleType>
+    </xsd:union>
+  </xsd:simpleType>
+
+  <!-- ============================================================= -->
+  <!-- Restrictions of base DFDL Data types -->
+  <!-- ============================================================= -->
+
+  <!-- A positive integer or 'implicit' for schema specification -->
+  <xsd:simpleType name="AlignmentType">
+    <xsd:union>
+      <xsd:simpleType>
+        <xsd:restriction base="xsd:string">
+          <xsd:enumeration value="implicit" />
+        </xsd:restriction>
+      </xsd:simpleType>
+      <xsd:simpleType>
+        <xsd:restriction base="dfdl:DFDLNonNegativeInteger">
+          <xsd:minInclusive value="1" />
+        </xsd:restriction>
+      </xsd:simpleType>
+    </xsd:union>
+  </xsd:simpleType>
+
+  <!-- A positive integer or empty string -->
+  <xsd:simpleType name="BinaryBooleanTrueRepType">
+    <xsd:union>
+      <xsd:simpleType>
+        <xsd:restriction base="xsd:string">
+          <xsd:length value="0"/>
+        </xsd:restriction>
+      </xsd:simpleType>
+      <xsd:simpleType>
+        <xsd:restriction base="dfdl:DFDLNonNegativeInteger">
+          <xsd:minInclusive value="0" />
+        </xsd:restriction>
+      </xsd:simpleType>
+    </xsd:union>
+  </xsd:simpleType>
+
+  <xsd:simpleType name="BinaryBooleanFalseRepType">
+    <xsd:restriction base="dfdl:DFDLNonNegativeInteger">
+      <xsd:minInclusive value="0" />
+    </xsd:restriction>
+  </xsd:simpleType>
+
+  <!-- ========================================================== -->
+  <!-- DFDL Enumerations -->
+  <!-- ========================================================= -->
+
+  <xsd:simpleType name="EncodingEnum">
+    <xsd:restriction base="xsd:token">
+      <!-- IANA charsets or CCIDSs -->
+      <xsd:pattern value=".{1,60}" /> <!-- at least one character -->
+    </xsd:restriction>
+  </xsd:simpleType>
+
+  <xsd:simpleType name="TextStringJustificationEnum">
+    <xsd:restriction base="xsd:string">
+      <xsd:enumeration value="left" />
+      <xsd:enumeration value="right" />
+      <xsd:enumeration value="center" />
+    </xsd:restriction>
+  </xsd:simpleType>
+
+  <xsd:simpleType name="TextNumberJustificationEnum">
+    <xsd:restriction base="xsd:string">
+      <xsd:enumeration value="left" />
+      <xsd:enumeration value="right" />
+      <xsd:enumeration value="center" />
+    </xsd:restriction>
+  </xsd:simpleType>
+
+  <xsd:simpleType name="TextNumberRoundingEnum">
+    <xsd:restriction base="xsd:string">
+      <xsd:enumeration value="pattern" />
+      <xsd:enumeration value="explicit" />
+    </xsd:restriction>
+  </xsd:simpleType>
+
+
+  <xsd:simpleType name="SignCodingValue">
+    <xsd:restriction base="xsd:string">
+      <xsd:enumeration value="twosComplement" />
+      <xsd:enumeration value="onesComplement" />
+      <xsd:enumeration value="signMagnitude" />
+      <xsd:enumeration value="unsignedBinary" />
+      <xsd:enumeration value="unsignedDecimal" />
+    </xsd:restriction>
+  </xsd:simpleType>
+
+  <xsd:simpleType name="RepresentationEnum">
+    <xsd:restriction base="xsd:string">
+      <xsd:enumeration value="binary" />
+      <xsd:enumeration value="text" />
+    </xsd:restriction>
+  </xsd:simpleType>
+
+  <xsd:simpleType name="TextPadKindEnum">
+    <xsd:restriction base="xsd:string">
+      <xsd:enumeration value="none" />
+      <xsd:enumeration value="padChar" />
+    </xsd:restriction>
+  </xsd:simpleType>
+
+  <xsd:simpleType name="TextTrimKindEnum">
+    <xsd:restriction base="xsd:string">
+      <xsd:enumeration value="none" />
+      <xsd:enumeration value="padChar" />
+    </xsd:restriction>
+  </xsd:simpleType>
+
+  <xsd:simpleType name="EscapeKindEnum">
+    <xsd:restriction base="xsd:string">
+      <xsd:enumeration value="escapeCharacter" />
+      <xsd:enumeration value="escapeBlock" />
+    </xsd:restriction>
+  </xsd:simpleType>
+
+  <xsd:simpleType name="GenerateEscapeEnum">
+    <xsd:restriction base="xsd:string">
+      <xsd:enumeration value="always" />
+      <xsd:enumeration value="whenNeeded" />
+    </xsd:restriction>
+  </xsd:simpleType>
+
+  <xsd:simpleType name="TextBidiTextOrderingEnum">
+    <xsd:restriction base="xsd:string">
+      <xsd:enumeration value="implicit" />
+      <xsd:enumeration value="visual" />
+    </xsd:restriction>
+  </xsd:simpleType>
+
+  <xsd:simpleType name="TextBidiOrientationEnum">
+    <xsd:restriction base="xsd:string">
+      <xsd:enumeration value="LTR" />
+      <xsd:enumeration value="RTL" />
+      <xsd:enumeration value="contextual_LTR" />
+      <xsd:enumeration value="contextual_RTL" />
+    </xsd:restriction>
+  </xsd:simpleType>
+
+  <xsd:simpleType name="TextBidiNumeralShapesEnum">
+    <xsd:restriction base="xsd:string">
+      <xsd:enumeration value="nominal" />
+      <xsd:enumeration value="national" />
+    </xsd:restriction>
+  </xsd:simpleType>
+
+  <xsd:simpleType name="TextNumberRepEnum">
+    <xsd:restriction base="xsd:string">
+      <xsd:enumeration value="standard" />
+      <xsd:enumeration value="zoned" />
+    </xsd:restriction>
+  </xsd:simpleType>
+
+  <xsd:simpleType name="TextNumberCheckPolicyEnum">
+    <xsd:restriction base="xsd:string">
+      <xsd:enumeration value="strict" />
+      <xsd:enumeration value="lax" />
+    </xsd:restriction>
+  </xsd:simpleType>
+
+  <xsd:simpleType name="CalendarCheckPolicyEnum">
+    <xsd:restriction base="xsd:string">
+      <xsd:enumeration value="strict" />
+      <xsd:enumeration value="lax" />
+    </xsd:restriction>
+  </xsd:simpleType>
+
+  <xsd:simpleType name="TextNumberBaseEnum">
+    <xsd:restriction base="xsd:string">
+      <xsd:enumeration value="2" />
+      <xsd:enumeration value="8" />
+      <xsd:enumeration value="10" />
+      <xsd:enumeration value="16" />
+    </xsd:restriction>
+  </xsd:simpleType>
+
+  <xsd:simpleType name="TextNumberRoundingModeEnum">
+    <xsd:restriction base="xsd:string">
+      <xsd:enumeration value="roundCeiling" />
+      <xsd:enumeration value="roundFloor" />
+      <xsd:enumeration value="roundDown" />
+      <xsd:enumeration value="roundUp" />
+      <xsd:enumeration value="roundHalfEven" />
+      <xsd:enumeration value="roundHalfDown" />
+      <xsd:enumeration value="roundHalfUp" />
+      <xsd:enumeration value="roundUnnecessary" />
+    </xsd:restriction>
+  </xsd:simpleType>
+
+  <xsd:simpleType name="TextZonedSignStyleEnum">
+    <xsd:restriction base="xsd:string">
+      <xsd:enumeration value="asciiStandard" />
+      <xsd:enumeration value="asciiTranslatedEBCDIC" />
+      <xsd:enumeration value="asciiCARealiaModified" />
+      <xsd:enumeration value="asciiTandemModified" />
+    </xsd:restriction>
+  </xsd:simpleType>
+
+  <xsd:simpleType name="BinaryNumberRepEnum">
+    <xsd:restriction base="xsd:string">
+      <xsd:enumeration value="packed" />
+      <xsd:enumeration value="bcd" />
+      <xsd:enumeration value="binary" />
+      <xsd:enumeration value="ibm4690Packed"/>
+    </xsd:restriction>
+  </xsd:simpleType>
+
+  <xsd:simpleType name="BinaryNumberCheckPolicyEnum">
+    <xsd:restriction base="xsd:string">
+      <xsd:enumeration value="strict" />
+      <xsd:enumeration value="lax" />
+    </xsd:restriction>
+  </xsd:simpleType>
+
+  <xsd:simpleType name="BinaryFloatRepEnum">
+    <xsd:restriction base="xsd:string">
+      <xsd:enumeration value="ieee" />
+      <xsd:enumeration value="ibm390Hex" />
+    </xsd:restriction>
+  </xsd:simpleType>
+
+  <xsd:simpleType name="TextBooleanJustificationEnum">
+    <xsd:restriction base="xsd:string">
+      <xsd:enumeration value="left" />
+      <xsd:enumeration value="right" />
+      <xsd:enumeration value="center" />
+    </xsd:restriction>
+  </xsd:simpleType>
+
+  <xsd:simpleType name="TextCalendarJustificationEnum">
+    <xsd:restriction base="xsd:string">
+      <xsd:enumeration value="left" />
+      <xsd:enumeration value="right" />
+      <xsd:enumeration value="center" />
+    </xsd:restriction>
+  </xsd:simpleType>
+
+  <xsd:simpleType name="CalendarPatternKindEnum">
+    <xsd:restriction base="xsd:string">
+      <xsd:enumeration value="explicit" />
+      <xsd:enumeration value="implicit" />
+    </xsd:restriction>
+  </xsd:simpleType>
+
+  <!-- A pattern is used instead of an enumeration for compactness -->
+  <xsd:simpleType name="CalendarTimeZoneType">
+    <xsd:union>
+      <xsd:simpleType>
+        <xsd:restriction base="xsd:string">
+          <xsd:pattern value="(UTC)([+\-]([01]\d|\d)((([:][0-5]\d){1,2})?))?" />
+        </xsd:restriction>
+      </xsd:simpleType>
+      <xsd:simpleType>
+        <xsd:restriction base="xsd:string">
+          <xsd:length value="0"/>
+        </xsd:restriction>
+      </xsd:simpleType>
+    </xsd:union>
+    
+  </xsd:simpleType>
+
+  <xsd:simpleType name="CalendarLanguageType">
+    <xsd:union>
+      <xsd:simpleType>
+        <xsd:restriction base="dfdl:DFDLStringLiteral">
+        <!-- A pattern is used instead of an enumeration for compactness -->
+          <xsd:pattern value="([A-Za-z]{1,8}([-_][A-Za-z0-9]{1,8})*)"/>
+        </xsd:restriction>
+      </xsd:simpleType>
+      <xsd:simpleType>
+        <xsd:restriction base="dfdl:DFDLExpression"/>
+      </xsd:simpleType>
+    </xsd:union>
+  </xsd:simpleType>
+
+  <xsd:simpleType name="CalendarFirstDayOfWeekEnum">
+    <xsd:restriction base="xsd:string">
+      <xsd:enumeration value="Monday" />
+      <xsd:enumeration value="Tuesday" />
+      <xsd:enumeration value="Wednesday" />
+      <xsd:enumeration value="Thursday" />
+      <xsd:enumeration value="Friday" />
+      <xsd:enumeration value="Saturday" />
+      <xsd:enumeration value="Sunday" />
+    </xsd:restriction>
+  </xsd:simpleType>
+
+  <xsd:simpleType name="BinaryCalendarRepEnum">
+    <xsd:restriction base="xsd:string">
+      <xsd:enumeration value="packed" />
+      <xsd:enumeration value="bcd" />
+      <xsd:enumeration value="binarySeconds" />
+      <xsd:enumeration value="binaryMilliseconds" />
+      <xsd:enumeration value="ibm4690Packed"/>
+    </xsd:restriction>
+  </xsd:simpleType>
+
+  <xsd:simpleType name="LengthKindEnum">
+    <xsd:restriction base="xsd:string">
+      <xsd:enumeration value="explicit" />
+      <xsd:enumeration value="delimited" />
+      <xsd:enumeration value="implicit" />
+      <xsd:enumeration value="prefixed" />
+      <xsd:enumeration value="endOfParent" />
+      <xsd:enumeration value="pattern" />
+    </xsd:restriction>
+  </xsd:simpleType>
+
+  <xsd:simpleType name="NilKindEnum">
+    <xsd:restriction base="xsd:string">
+      <xsd:enumeration value="literalValue" />
+      <xsd:enumeration value="logicalValue" />
+      <xsd:enumeration value="literalCharacter" />
+    </xsd:restriction>
+  </xsd:simpleType>
+
+  <xsd:simpleType name="NilValueDelimiterPolicyEnum">
+    <xsd:restriction base="xsd:string">
+      <xsd:enumeration value="none" />
+      <xsd:enumeration value="initiator" />
+      <xsd:enumeration value="terminator" />
+      <xsd:enumeration value="both" />
+    </xsd:restriction>
+  </xsd:simpleType>
+
+  <xsd:simpleType name="EmptyValueDelimiterPolicyEnum">
+    <xsd:restriction base="xsd:string">
+      <xsd:enumeration value="none" />
+      <xsd:enumeration value="initiator" />
+      <xsd:enumeration value="terminator" />
+      <xsd:enumeration value="both" />
+    </xsd:restriction>
+  </xsd:simpleType>
+
+  <xsd:simpleType name="SequenceKindEnum">
+    <xsd:restriction base="xsd:string">
+      <xsd:enumeration value="ordered" />
+      <xsd:enumeration value="unordered" />
+    </xsd:restriction>
+  </xsd:simpleType>
+
+  <xsd:simpleType name="LengthUnitsEnum">
+    <xsd:restriction base="xsd:string">
+      <xsd:enumeration value="bits" />
+      <xsd:enumeration value="bytes" />
+      <xsd:enumeration value="characters" />
+    </xsd:restriction>
+  </xsd:simpleType>
+
+  <xsd:simpleType name="AlignmentUnitsEnum">
+    <xsd:restriction base="xsd:string">
+      <xsd:enumeration value="bits" />
+      <xsd:enumeration value="bytes" />
+    </xsd:restriction>
+  </xsd:simpleType>
+
+  <xsd:simpleType name="GenerateQuotesEnum">
+    <xsd:restriction base="xsd:string">
+      <xsd:enumeration value="always" />
+      <xsd:enumeration value="whenNeeded" />
+    </xsd:restriction>
+  </xsd:simpleType>
+
+  <xsd:simpleType name="SeparatorPositionEnum">
+    <xsd:restriction base="xsd:string">
+      <xsd:enumeration value="infix" />
+      <xsd:enumeration value="prefix" />
+      <xsd:enumeration value="postfix" />
+    </xsd:restriction>
+  </xsd:simpleType>
+
+  <xsd:simpleType name="SeparatorPolicyEnum">
+    <xsd:restriction base="xsd:string">
+      <xsd:enumeration value="required" />
+      <xsd:enumeration value="suppressed" />
+      <xsd:enumeration value="suppressedAtEndStrict" />
+      <xsd:enumeration value="suppressedAtEndLax" />
+    </xsd:restriction>
+  </xsd:simpleType>
+  
+  <xsd:simpleType name="SeparatorSuppressionPolicyEnum">
+    <xsd:restriction base="xsd:string">
+      <xsd:enumeration value="never" />
+      <xsd:enumeration value="trailingEmpty" />
+      <xsd:enumeration value="trailingEmptyStrict" />
+      <xsd:enumeration value="anyEmpty" />
+    </xsd:restriction>
+  </xsd:simpleType>
+
+  <xsd:simpleType name="ChoiceLengthKindEnum">
+    <xsd:restriction base="xsd:string">
+      <xsd:enumeration value="implicit" />
+      <xsd:enumeration value="explicit" />
+    </xsd:restriction>
+
+  </xsd:simpleType>
+
+  <xsd:simpleType name="OccursCountKindEnum">
+    <xsd:restriction base="xsd:string">
+      <xsd:enumeration value="fixed" />
+      <xsd:enumeration value="expression" />
+      <xsd:enumeration value="parsed" />
+      <xsd:enumeration value="stopValue" />
+      <xsd:enumeration value="implicit" />
+    </xsd:restriction>
+  </xsd:simpleType>
+
+  <xsd:simpleType name="ByteOrderEnum">
+    <xsd:restriction base="xsd:string">
+      <xsd:enumeration value="littleEndian" />
+      <xsd:enumeration value="bigEndian" />
+    </xsd:restriction>
+  </xsd:simpleType>
+  
+  <xsd:simpleType name="BitOrderEnum">
+    <xsd:restriction base="xsd:string">
+      <xsd:enumeration value="mostSignificantBitFirst" />
+      <xsd:enumeration value="leastSignificantBitFirst" />
+    </xsd:restriction>
+  </xsd:simpleType>
+
+  <xsd:simpleType name="YesNoEnum">
+    <xsd:restriction base="xsd:string">
+      <xsd:enumeration value="yes" />
+      <xsd:enumeration value="no" />
+    </xsd:restriction>
+  </xsd:simpleType>
+
+  <xsd:simpleType name="UTF16WidthEnum">
+    <xsd:restriction base="xsd:string">
+      <xsd:enumeration value="fixed" />
+      <xsd:enumeration value="variable" />
+    </xsd:restriction>
+  </xsd:simpleType>
+  
+  <xsd:simpleType name="EncodingErrorPolicyEnum">
+    <xsd:restriction base="xsd:string">
+      <xsd:enumeration value="error" />
+      <xsd:enumeration value="replace" />
+    </xsd:restriction>
+  </xsd:simpleType>
+
+  <xsd:simpleType name="TestKindEnum">
+    <xsd:restriction base="xsd:string">
+      <xsd:enumeration value="expression" />
+      <xsd:enumeration value="pattern" />
+    </xsd:restriction>
+  </xsd:simpleType>
+  
+  <xsd:simpleType name="FailureTypeEnum">
+    <xsd:restriction base="xsd:string">
+      <xsd:enumeration value="processingError" />
+      <xsd:enumeration value="recoverableError" />
+    </xsd:restriction>
+  </xsd:simpleType>
+
+  <!-- A pattern is used instead of an enumeration for compactness -->
+  <xsd:simpleType name="BinaryPackedSignCodes">
+    <xsd:restriction base="dfdl:DFDLStringLiteral">
+      <!--
+        A space separated string giving the hex sign nibbles to use for a 
+        positive
+        value, a negative value, an unsigned value, and zero.
+        Valid values for positive nibble: A, C, E, F
+        Valid values for negative nibble: B, D
+        Valid values for unsigned nibble: F
+        Valid values for zero sign: A C E F 0
+        Example: C D F C (typical S/390 usage)
+        Example: C D F 0 (handle special case for zero)
+      -->
+      <xsd:pattern value="(A|C|E|F) (B|D) (F) (A|C|E|F|0)" />
+    </xsd:restriction>
+  </xsd:simpleType>
+
+  <xsd:simpleType name="CalendarDaysInFirstWeek">
+    <xsd:restriction base="dfdl:DFDLNonNegativeInteger">
+      <xsd:minInclusive value="1" />
+      <xsd:maxInclusive value="7" />
+    </xsd:restriction>
+  </xsd:simpleType>
+
+  <xsd:simpleType name="CalendarCenturyStart">
+    <xsd:restriction base="dfdl:DFDLNonNegativeInteger">
+      <xsd:minInclusive value="0" />
+      <xsd:maxInclusive value="99" />
+    </xsd:restriction>
+  </xsd:simpleType>
+
+  <!-- ============================================================= -->
+  <!-- Simple types with DFDL Expression -->
+  <!-- ============================================================= -->
+
+  <xsd:simpleType name="ByteOrderEnum_Or_DFDLExpression">
+    <xsd:union>
+      <xsd:simpleType>
+        <xsd:restriction base="dfdl:DFDLExpression" />
+      </xsd:simpleType>
+      <xsd:simpleType>
+        <xsd:restriction base="dfdl:ByteOrderEnum" />
+      </xsd:simpleType>
+    </xsd:union>
+  </xsd:simpleType>
+
+  <xsd:simpleType name="EncodingEnum_Or_DFDLExpression">
+    <xsd:union>
+      <xsd:simpleType>
+        <xsd:restriction base="dfdl:DFDLExpression" />
+      </xsd:simpleType>
+      <xsd:simpleType>
+        <xsd:restriction base="dfdl:EncodingEnum" />
+      </xsd:simpleType>
+    </xsd:union>
+  </xsd:simpleType>
+
+  <xsd:simpleType name="BinaryFloatRepEnum_Or_DFDLExpression">
+    <xsd:union>
+      <xsd:simpleType>
+        <xsd:restriction base="dfdl:DFDLExpression" />
+      </xsd:simpleType>
+      <xsd:simpleType>
+        <xsd:restriction base="dfdl:BinaryFloatRepEnum" />
+      </xsd:simpleType>
+    </xsd:union>
+  </xsd:simpleType>
+
+  <xsd:simpleType name="DFDLStringLiteral_Or_DFDLExpression">
+    <xsd:union>
+      <xsd:simpleType>
+        <xsd:restriction base="dfdl:DFDLExpression" />
+      </xsd:simpleType>
+      <xsd:simpleType>
+        <xsd:restriction base="dfdl:DFDLStringLiteral" />
+      </xsd:simpleType>
+    </xsd:union>
+  </xsd:simpleType>
+
+  <xsd:simpleType name="ListOfDFDLStringLiteral_Or_DFDLExpression">
+    <xsd:union>
+      <xsd:simpleType>
+        <xsd:restriction base="dfdl:DFDLExpression" />
+      </xsd:simpleType>
+      <xsd:simpleType>
+        <xsd:restriction base="dfdl:ListOfDFDLStringLiteral" />
+      </xsd:simpleType>
+    </xsd:union>
+  </xsd:simpleType>
+
+  <xsd:simpleType name="DFDLNonNegativeInteger_Or_DFDLExpression">
+    <xsd:union>
+      <xsd:simpleType>
+        <xsd:restriction base="dfdl:DFDLExpression" />
+      </xsd:simpleType>
+      <xsd:simpleType>
+        <xsd:restriction base="dfdl:DFDLNonNegativeInteger" />
+      </xsd:simpleType>
+    </xsd:union>
+  </xsd:simpleType>
+
+</xsd:schema>
diff --git a/resources/xsd/DFDL_part2_attributes.xsd b/resources/xsd/DFDL_part2_attributes.xsd
new file mode 100644
index 0000000..9f0b2a2
--- /dev/null
+++ b/resources/xsd/DFDL_part2_attributes.xsd
@@ -0,0 +1,1038 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+
+<xsd:schema targetNamespace="http://www.ogf.org/dfdl/dfdl-1.0/"
+  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+  xmlns:dfdl="http://www.ogf.org/dfdl/dfdl-1.0/"
+  xmlns:dfdlx="http://www.ogf.org/dfdl/dfdl-1.0/extensions"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xmlns:daf="urn:ogf:dfdl:2013:imp:daffodil.apache.org:2018:ext"
+  attributeFormDefault="unqualified" elementFormDefault="qualified">
+
+  <xsd:include schemaLocation="DFDL_part1_simpletypes.xsd" />
+  <xsd:import namespace="urn:ogf:dfdl:2013:imp:daffodil.apache.org:2018:ext"/>
+  <xsd:import namespace="http://www.ogf.org/dfdl/dfdl-1.0/extensions"/>
+
+  <!-- ==================================================================== -->
+  <!-- Basic Attributes and Attribute Groups representing DFDL properties -->
+  <!-- ==================================================================== -->
+
+  <xsd:attribute name="ref" type="xsd:QName" />
+
+  <!--
+    This attribute group is a way to allow any attribute that is NOT in the
+    dfdl namespace to be used in elements. This anyAttribute matches non-dfdl
+    namespace attributes because the targetNamespace in this file is the dfdl
+    namespace, and the "namespace" attribute is "##other". The
+    processContexts="lax" says that these non-dfdl namespace attributes will be
+    validated if a schema for them can be found, but otherwise validation for
+    them will be skipped. This can be used to allow for DFDL schema authors to
+    use custom namespace attributes/annotations in their DFDL schemas without
+    us needing to know about them.
+
+    This means that by default, dfdl namespace attributes will not be allowed
+    at all. However, if we add dfdl namespace definitions alongside this
+    attribute group, those dfdl namespace attributes WILL be allowed and
+    strictly validated using standard XML schema validation rules. This has the
+    effect of strictly validating dfdl namespace attributes, but being lax
+    about all other attributes.
+  -->
+  <xsd:attributeGroup name="anyOther">
+    <xsd:anyAttribute namespace="##other" processContents="lax" />
+  </xsd:attributeGroup>
+
+  <!--
+    This works the same way as the anyOther attributeGroup defined above,
+    except it applies to elements instead of attributes (xs:any vs
+    xs:anyAttribute). See the description above for how this group works to
+    enable strict validation of dfdl namespace elements and lax validation of
+    other elements.
+  -->
+  <xsd:group name="anyOther">
+    <xsd:sequence>
+      <xsd:any namespace="##other" processContents="lax" />
+    </xsd:sequence>
+  </xsd:group>
+
+  <xsd:attributeGroup name="BaseAG">
+    <xsd:attribute name="ref" type="xsd:QName" />
+    <xsd:anyAttribute namespace="http://www.ibm.com/xmlns/dfdl/testData" processContents="lax"/> 
+  </xsd:attributeGroup>
+
+  <!-- 11 Properties Common to Both Content and Framing -->
+  <xsd:attribute name="byteOrder"
+    type="dfdl:ByteOrderEnum_Or_DFDLExpression" />
+  
+  <!-- ADDED PER PUBLIC COMMENT ON Sept 2013 DRAFT -->
+  <xsd:attribute name="bitOrder" type="dfdl:BitOrderEnum"/>
+  
+  <xsd:attribute name="encoding"
+    type="dfdl:EncodingEnum_Or_DFDLExpression" />
+  <xsd:attribute name="utf16Width" type="dfdl:UTF16WidthEnum" />
+  <xsd:attribute name="ignoreCase" type="dfdl:YesNoEnum" />
+  <xsd:attribute name="choiceBranchKey" type="dfdl:ListOfDFDLStringLiteral" />
+  <xsd:attribute name="textBidi" type="dfdl:YesNoEnum"/>
+  
+  <!-- Added to DFDL -->
+  <xsd:attribute name="encodingErrorPolicy" type="dfdl:EncodingErrorPolicyEnum"/>
+
+  <xsd:attributeGroup name="CommonAG">
+    <xsd:attribute name="byteOrder"
+      type="dfdl:ByteOrderEnum_Or_DFDLExpression" />
+      
+    <xsd:attribute name="bitOrder" type="dfdl:BitOrderEnum"/>
+    <xsd:attribute ref="daf:parseUnparsePolicy"/> <!-- backwards compatibility -->
+    <xsd:attribute ref="dfdlx:parseUnparsePolicy"/>
+    <xsd:attribute ref="dfdlx:emptyElementParsePolicy"/>
+      
+    <xsd:attribute name="encoding"
+      type="dfdl:EncodingEnum_Or_DFDLExpression" />
+    <xsd:attribute name="utf16Width" type="dfdl:UTF16WidthEnum" />
+    <xsd:attribute name="encodingErrorPolicy" type="dfdl:EncodingErrorPolicyEnum"/>
+    <xsd:attribute name="ignoreCase" type="dfdl:YesNoEnum" />
+    <xsd:attribute name="choiceBranchKey" type="dfdl:ListOfDFDLStringLiteral" />
+    <xsd:attribute ref="dfdlx:choiceBranchKeyRanges" />
+    <xsd:attribute name="textBidi" type="dfdl:YesNoEnum"/>
+  </xsd:attributeGroup>
+
+  <!-- 12.1 Aligned Data -->
+  <xsd:attribute name="alignment" type="dfdl:AlignmentType" />
+  <xsd:attribute name="alignmentUnits" type="dfdl:AlignmentUnitsEnum" />
+  <xsd:attribute name="fillByte" type="dfdl:DFDLStringLiteral" />
+  <xsd:attribute name="leadingSkip" type="dfdl:DFDLNonNegativeInteger" />
+  <xsd:attribute name="trailingSkip" type="dfdl:DFDLNonNegativeInteger" />
+
+  <xsd:attributeGroup name="AlignmentAG">
+    <xsd:attribute name="alignment" type="dfdl:AlignmentType" />
+    <xsd:attribute name="alignmentUnits" type="dfdl:AlignmentUnitsEnum" />
+    <xsd:attribute name="fillByte" type="dfdl:DFDLStringLiteral" />
+    <xsd:attribute name="leadingSkip" type="dfdl:DFDLNonNegativeInteger" />
+    <xsd:attribute name="trailingSkip" type="dfdl:DFDLNonNegativeInteger" />
+    <xsd:attribute ref="dfdlx:alignmentKind" />
+  </xsd:attributeGroup>
+
+  <!-- 12.2 Delimiters and Text Mark up -->
+  <xsd:attribute name="initiator"
+    type="dfdl:ListOfDFDLStringLiteral_Or_DFDLExpression" />
+  <xsd:attribute name="terminator"
+    type="dfdl:ListOfDFDLStringLiteral_Or_DFDLExpression" />
+  <xsd:attribute name="outputNewLine" type="dfdl:DFDLStringLiteral" />
+  <xsd:attribute name="emptyValueDelimiterPolicy" type="dfdl:EmptyValueDelimiterPolicyEnum" />
+
+  <xsd:attributeGroup name="MarkupAG">
+    <xsd:attribute name="initiator"
+      type="dfdl:ListOfDFDLStringLiteral_Or_DFDLExpression" />
+    <xsd:attribute name="terminator"
+      type="dfdl:ListOfDFDLStringLiteral_Or_DFDLExpression" />
+    <xsd:attribute name="outputNewLine" type="dfdl:DFDLStringLiteral" />
+  </xsd:attributeGroup>
+
+  <xsd:attributeGroup name="NonGroupMarkupAG">
+    <xsd:attribute name="emptyValueDelimiterPolicy"
+      type="dfdl:EmptyValueDelimiterPolicyEnum" />
+  </xsd:attributeGroup>
+
+  <!-- 12.3 Length Properties -->
+  <xsd:attribute name="lengthKind" type="dfdl:LengthKindEnum" />
+  <xsd:attribute name="length"
+    type="dfdl:DFDLNonNegativeInteger_Or_DFDLExpression" />
+  <xsd:attribute name="lengthPattern" type="dfdl:DFDLRegularExpression" />
+  <xsd:attribute name="lengthUnits" type="dfdl:LengthUnitsEnum" />
+  <xsd:attribute name="prefixIncludesPrefixLength" type="dfdl:YesNoEnum" />
+  <xsd:attribute name="prefixLengthType" type="xsd:QName" />
+
+  <xsd:attributeGroup name="LengthAG">
+    <xsd:attribute name="lengthKind" type="dfdl:LengthKindEnum" />
+    <xsd:attribute name="length"
+      type="dfdl:DFDLNonNegativeInteger_Or_DFDLExpression" />
+    <xsd:attribute name="lengthPattern" type="dfdl:DFDLRegularExpression" />
+    <xsd:attribute name="lengthUnits" type="dfdl:LengthUnitsEnum" />
+    <xsd:attribute name="prefixIncludesPrefixLength" type="dfdl:YesNoEnum" />
+    <xsd:attribute name="prefixLengthType" type="xsd:QName" />
+  </xsd:attributeGroup>
+
+  <!-- 13 Simple Types -->
+  <xsd:attribute name="representation" type="dfdl:RepresentationEnum" />
+
+  <xsd:attributeGroup name="RepresentationAG">
+    <xsd:attribute name="representation" type="dfdl:RepresentationEnum" />
+  </xsd:attributeGroup>
+
+  <!-- 14.4 Simple or complex local element or element reference -->
+  <xsd:attribute name="floating" type="dfdl:YesNoEnum" />
+
+  <xsd:attributeGroup name="FloatingAG">
+    <xsd:attribute name="floating" type="dfdl:YesNoEnum" />
+  </xsd:attributeGroup>
+
+  <!--13.2 Properties Common to All Simple Types with Text representation -->
+  <xsd:attribute name="textPadKind" type="dfdl:TextPadKindEnum" />
+  <xsd:attribute name="textTrimKind" type="dfdl:TextTrimKindEnum" />
+  <xsd:attribute name="textOutputMinLength" type="dfdl:DFDLNonNegativeInteger" />
+  <xsd:attribute name="escapeSchemeRef" type="xsd:QName" />
+
+  <xsd:attributeGroup name="SimpleTypesTextAG">
+    <xsd:attribute name="textPadKind" type="dfdl:TextPadKindEnum" />
+    <xsd:attribute name="textTrimKind" type="dfdl:TextTrimKindEnum" />
+    <xsd:attribute name="textOutputMinLength" type="dfdl:DFDLNonNegativeInteger" />
+    <xsd:attribute name="escapeSchemeRef" type="dfdl:DFDLQName" />
+  </xsd:attributeGroup>
+
+  <!-- 13.2.1 Escape Scheme -->
+  <!-- Note that these can never appear in short form -->
+  <xsd:attributeGroup name="EscapeSchemeAG">
+    <xsd:attribute name="escapeKind" type="dfdl:EscapeKindEnum" />
+    <xsd:attribute name="escapeCharacter"
+      type="dfdl:DFDLStringLiteral_Or_DFDLExpression" />
+    <xsd:attribute name="escapeBlockStart" type="dfdl:DFDLStringLiteral" />
+    <xsd:attribute name="escapeBlockEnd" type="dfdl:DFDLStringLiteral" />
+    <xsd:attribute name="escapeEscapeCharacter"
+      type="dfdl:DFDLStringLiteral_Or_DFDLExpression" />
+    <xsd:attribute name="extraEscapedCharacters" type="dfdl:ListOfDFDLStringLiteral" />
+    <xsd:attribute name="generateEscapeBlock" type="dfdl:GenerateEscapeEnum" />
+  </xsd:attributeGroup>
+
+  <!-- 13.3 Properties for Bidirectional support for all Simple Types with 
+    Text representation -->
+  <xsd:attribute name="textBidiTextOrdering" type="dfdl:TextBidiTextOrderingEnum" />
+  <xsd:attribute name="textBidiOrientation" type="dfdl:TextBidiOrientationEnum" />
+  <xsd:attribute name="textBidiSymmetric" type="dfdl:YesNoEnum" />
+  <xsd:attribute name="textBidiTextShaped" type="dfdl:YesNoEnum" />
+  <xsd:attribute name="textBidiNumeralShapes" type="dfdl:TextBidiNumeralShapesEnum" />
+
+  <xsd:attributeGroup name="TextBidiSchemeAG">
+    <xsd:attribute name="textBidiTextOrdering" type="dfdl:TextBidiTextOrderingEnum" />
+    <xsd:attribute name="textBidiOrientation" type="dfdl:TextBidiOrientationEnum" />
+    <xsd:attribute name="textBidiSymmetric" type="dfdl:YesNoEnum" />
+    <xsd:attribute name="textBidiTextShaped" type="dfdl:YesNoEnum" />
+    <xsd:attribute name="textBidiNumeralShapes" type="dfdl:TextBidiNumeralShapesEnum" />
+  </xsd:attributeGroup>
+
+  <!-- 13.4 Properties Specific to Strings with Text representation -->
+  <xsd:attribute name="textStringJustification" type="dfdl:TextStringJustificationEnum" />
+  <xsd:attribute name="textStringPadCharacter" type="dfdl:NonEmptyStringLiteral" />
+  <xsd:attribute name="truncateSpecifiedLengthString"
+    type="dfdl:YesNoEnum" />
+
+  <xsd:attributeGroup name="StringTextAG">
+    <xsd:attribute name="textStringJustification" type="dfdl:TextStringJustificationEnum" />
+    <xsd:attribute name="textStringPadCharacter" type="dfdl:NonEmptyStringLiteral" />
+    <xsd:attribute name="truncateSpecifiedLengthString"
+      type="dfdl:YesNoEnum" />
+  </xsd:attributeGroup>
+
+  <!-- Properties Specific to Number with Text or Binary representation -->
+  <xsd:attribute name="decimalSigned" type="dfdl:YesNoEnum" />
+
+  <xsd:attributeGroup name="NumberAG">
+    <xsd:attribute name="decimalSigned" type="dfdl:YesNoEnum" />
+  </xsd:attributeGroup>
+
+  <!-- Properties Specific to Number with Text representation -->
+  <xsd:attribute name="textNumberRep" type="dfdl:TextNumberRepEnum" />
+  <xsd:attribute name="textNumberJustification" type="dfdl:TextNumberJustificationEnum" />
+  <xsd:attribute name="textNumberPadCharacter" type="dfdl:DFDLStringLiteral" />
+  <xsd:attribute name="textStandardBase" type="dfdl:TextNumberBaseEnum" />
+
+  <xsd:attributeGroup name="NumberTextAG">
+    <xsd:attribute name="textNumberRep" type="dfdl:TextNumberRepEnum" />
+    <xsd:attribute name="textNumberJustification" type="dfdl:TextNumberJustificationEnum" />
+    <xsd:attribute name="textNumberPadCharacter" type="dfdl:DFDLStringLiteral" />
+    <xsd:attribute name="textStandardBase" type="dfdl:TextNumberBaseEnum" />
+  </xsd:attributeGroup>
+
+  <!-- Text number format attributes -->
+  <xsd:attribute name="textNumberPattern" type="dfdl:DFDLStringLiteral" />
+  <xsd:attribute name="textStandardGroupingSeparator"
+    type="dfdl:DFDLStringLiteral_Or_DFDLExpression" />
+  <xsd:attribute name="textStandardDecimalSeparator"
+    type="dfdl:DFDLStringLiteral_Or_DFDLExpression" />
+  <xsd:attribute name="textStandardExponentRep"
+    type="dfdl:DFDLStringLiteral_Or_DFDLExpression" />  
+  <!-- deprecated form accepted by IBM DFDL as of 2018-10-30 -->
+  <xsd:attribute name="textStandardExponentCharacter"
+    type="dfdl:DFDLStringLiteral_Or_DFDLExpression" />
+  <xsd:attribute name="textNumberCheckPolicy" type="dfdl:TextNumberCheckPolicyEnum" />
+  <xsd:attribute name="textStandardInfinityRep" type="dfdl:DFDLStringLiteral" />
+  <xsd:attribute name="textStandardNaNRep" type="dfdl:DFDLStringLiteral" />
+  <xsd:attribute name="textNumberRoundingMode" type="dfdl:TextNumberRoundingModeEnum" />
+  <xsd:attribute name="textNumberRounding" type="dfdl:TextNumberRoundingEnum" />
+  <xsd:attribute name="textNumberRoundingIncrement" type="xsd:double" />
+  <xsd:attribute name="textZonedSignStyle" type="dfdl:TextZonedSignStyleEnum" />
+  <xsd:attribute name="textStandardZeroRep" type="dfdl:ListOfDFDLStringLiteral" />
+
+  <xsd:attributeGroup name="TextNumberFormatAG">
+    <xsd:attribute name="textNumberPattern" type="dfdl:DFDLStringLiteral" />
+    <xsd:attribute name="textStandardGroupingSeparator"
+      type="dfdl:DFDLStringLiteral_Or_DFDLExpression" />
+    <xsd:attribute name="textStandardDecimalSeparator"
+      type="dfdl:DFDLStringLiteral_Or_DFDLExpression" />
+    <xsd:attribute name="textStandardExponentRep"
+      type="dfdl:DFDLStringLiteral_Or_DFDLExpression" />
+    <!-- deprecated form accepted by IBM DFDL as of 2018-10-30 -->
+    <xsd:attribute name="textStandardExponentCharacter"
+      type="dfdl:DFDLStringLiteral_Or_DFDLExpression" />
+    <xsd:attribute name="textNumberCheckPolicy" type="dfdl:TextNumberCheckPolicyEnum" />
+    <xsd:attribute name="textStandardInfinityRep" type="dfdl:DFDLStringLiteral" />
+    <xsd:attribute name="textStandardNaNRep" type="dfdl:DFDLStringLiteral" />
+    <xsd:attribute name="textNumberRoundingMode" type="dfdl:TextNumberRoundingModeEnum" />
+    <xsd:attribute name="textNumberRounding" type="dfdl:TextNumberRoundingEnum" />
+    <xsd:attribute name="textNumberRoundingIncrement"
+      type="xsd:double" />
+    <xsd:attribute name="textZonedSignStyle" type="dfdl:TextZonedSignStyleEnum" />
+    <xsd:attribute name="textStandardZeroRep" type="dfdl:ListOfDFDLStringLiteral" />
+  </xsd:attributeGroup>
+
+  <!-- 13.6 Properties Specific to Number with Binary representation -->
+  <xsd:attribute name="binaryNumberRep" type="dfdl:BinaryNumberRepEnum" />
+  <xsd:attribute name="binaryDecimalVirtualPoint" type="xsd:int" />
+  <xsd:attribute name="binaryPackedSignCodes" type="dfdl:BinaryPackedSignCodes" />
+  <xsd:attribute name="binaryNumberCheckPolicy" type="dfdl:BinaryNumberCheckPolicyEnum" />
+
+  <xsd:attributeGroup name="NumberBinaryAG">
+    <xsd:attribute name="binaryNumberRep" type="dfdl:BinaryNumberRepEnum" />
+    <xsd:attribute name="binaryDecimalVirtualPoint" type="xsd:int" />
+    <xsd:attribute name="binaryPackedSignCodes" type="dfdl:BinaryPackedSignCodes" />
+    <xsd:attribute name="binaryNumberCheckPolicy" type="dfdl:BinaryNumberCheckPolicyEnum" />
+  </xsd:attributeGroup>
+
+  <!-- 13.7 Float/Double with Binary representation -->
+  <xsd:attribute name="binaryFloatRep"
+    type="dfdl:BinaryFloatRepEnum_Or_DFDLExpression" />
+
+  <xsd:attributeGroup name="FloatBinaryAG">
+    <xsd:attribute name="binaryFloatRep"
+      type="dfdl:BinaryFloatRepEnum_Or_DFDLExpression" />
+  </xsd:attributeGroup>
+
+  <!-- 13.8 Properties Specific to Boolean with Text representation -->
+  <xsd:attribute name="textBooleanTrueRep"
+    type="dfdl:ListOfDFDLStringLiteral_Or_DFDLExpression" />
+  <xsd:attribute name="textBooleanFalseRep"
+    type="dfdl:ListOfDFDLStringLiteral_Or_DFDLExpression" />
+  <xsd:attribute name="textBooleanJustification" type="dfdl:TextBooleanJustificationEnum" />
+  <xsd:attribute name="textBooleanPadCharacter" type="dfdl:DFDLStringLiteral" />
+
+  <xsd:attributeGroup name="BooleanTextAG">
+    <xsd:attribute name="textBooleanTrueRep"
+      type="dfdl:ListOfDFDLStringLiteral_Or_DFDLExpression" />
+    <xsd:attribute name="textBooleanFalseRep"
+      type="dfdl:ListOfDFDLStringLiteral_Or_DFDLExpression" />
+    <xsd:attribute name="textBooleanJustification"
+      type="dfdl:TextBooleanJustificationEnum" />
+    <xsd:attribute name="textBooleanPadCharacter" type="dfdl:DFDLStringLiteral" />
+  </xsd:attributeGroup>
+
+  <!-- 13.9 Properties Specific to Boolean with Binary representation -->
+  <xsd:attribute name="binaryBooleanTrueRep" type="dfdl:BinaryBooleanTrueRepType" />
+  <xsd:attribute name="binaryBooleanFalseRep" type="dfdl:BinaryBooleanFalseRepType" />
+
+  <xsd:attributeGroup name="BooleanBinaryAG">
+    <xsd:attribute name="binaryBooleanTrueRep" type="dfdl:BinaryBooleanTrueRepType" />
+    <xsd:attribute name="binaryBooleanFalseRep" type="dfdl:BinaryBooleanFalseRepType" />
+  </xsd:attributeGroup>
+
+  <!-- 13.10 Properties Specific to Calendar Format -->
+  <xsd:attribute name="calendarPattern" type="dfdl:DFDLStringLiteral" />
+  <xsd:attribute name="calendarPatternKind" type="dfdl:CalendarPatternKindEnum" />
+  <xsd:attribute name="calendarCheckPolicy" type="dfdl:CalendarCheckPolicyEnum" />
+  <xsd:attribute name="calendarTimeZone" type="dfdl:CalendarTimeZoneType" />
+  <xsd:attribute name="calendarObserveDST" type="dfdl:YesNoEnum" />
+  <xsd:attribute name="calendarFirstDayOfWeek" type="dfdl:CalendarFirstDayOfWeekEnum" />
+  <xsd:attribute name="calendarDaysInFirstWeek" type="dfdl:CalendarDaysInFirstWeek" />
+  <xsd:attribute name="calendarCenturyStart" type="dfdl:CalendarCenturyStart" />
+  <xsd:attribute name="calendarLanguage" type="dfdl:CalendarLanguageType" />
+
+  <xsd:attributeGroup name="CalendarFormatAG">
+    <xsd:attribute name="calendarPattern" type="dfdl:DFDLStringLiteral" />
+    <xsd:attribute name="calendarPatternKind" type="dfdl:CalendarPatternKindEnum" />
+    <xsd:attribute name="calendarCheckPolicy" type="dfdl:CalendarCheckPolicyEnum" />
+    <xsd:attribute name="calendarTimeZone" type="dfdl:CalendarTimeZoneType" />
+    <xsd:attribute name="calendarObserveDST" type="dfdl:YesNoEnum" />
+    <xsd:attribute name="calendarFirstDayOfWeek" type="dfdl:CalendarFirstDayOfWeekEnum" />
+    <xsd:attribute name="calendarDaysInFirstWeek" type="dfdl:CalendarDaysInFirstWeek" />
+    <xsd:attribute name="calendarCenturyStart" type="dfdl:CalendarCenturyStart" />
+    <xsd:attribute name="calendarLanguage" type="dfdl:CalendarLanguageType" />
+  </xsd:attributeGroup>
+
+  <!-- 13.11 Properties Specific to Calendar with Text Representation -->
+  <xsd:attribute name="textCalendarJustification" type="dfdl:TextCalendarJustificationEnum" />
+  <xsd:attribute name="textCalendarPadCharacter" type="dfdl:DFDLStringLiteral" />
+
+  <xsd:attributeGroup name="CalendarTextAG">
+    <xsd:attribute name="textCalendarJustification"
+      type="dfdl:TextCalendarJustificationEnum" />
+    <xsd:attribute name="textCalendarPadCharacter" type="dfdl:DFDLStringLiteral" />
+  </xsd:attributeGroup>
+
+  <!-- 13.12 Properties Specific to Calendar with Binary Representation -->
+  <xsd:attribute name="binaryCalendarRep" type="dfdl:BinaryCalendarRepEnum" />
+  <xsd:attribute name="binaryCalendarEpoch" type="xsd:string" />
+
+  <xsd:attributeGroup name="CalendarBinaryAG">
+    <xsd:attribute name="binaryCalendarRep" type="dfdl:BinaryCalendarRepEnum" />
+    <xsd:attribute name="binaryCalendarEpoch" type="xsd:string" />
+  </xsd:attributeGroup>
+
+  <!-- 13.13 Properties Specific to Opaque Types (hexBinary) -->
+  <xsd:attributeGroup name="OpaqueAG">
+  </xsd:attributeGroup>
+
+  <!-- 13.14 Properties for Nillable Elements -->
+  <xsd:attribute name="nilKind" type="dfdl:NilKindEnum" />
+  <xsd:attribute name="nilValue" type="dfdl:NonEmptyListOfDFDLStringLiteral" />
+  <xsd:attribute name="nilValueDelimiterPolicy" type="dfdl:NilValueDelimiterPolicyEnum" />
+
+  <xsd:attributeGroup name="NillableAG">
+    <xsd:attribute name="nilKind" type="dfdl:NilKindEnum" />
+    <xsd:attribute name="nilValue" type="dfdl:NonEmptyListOfDFDLStringLiteral" />
+    <xsd:attribute name="nilValueDelimiterPolicy" type="dfdl:NilValueDelimiterPolicyEnum" />
+  </xsd:attributeGroup>
+
+  <!-- 13.15 Properties for Default Value Control -->
+  <xsd:attribute name="useNilForDefault" type="dfdl:YesNoEnum" />
+
+  <xsd:attributeGroup name="DefaultValueControlAG">
+    <xsd:attribute name="useNilForDefault" type="dfdl:YesNoEnum" />
+  </xsd:attributeGroup>
+
+  <!-- 14 Sequence Groups -->
+  <xsd:attribute name="sequenceKind" type="dfdl:SequenceKindEnum" />
+  <xsd:attribute name="hiddenGroupRef" type="xsd:QName" />
+
+  <xsd:attributeGroup name="SequenceAG">
+    <xsd:attribute name="sequenceKind" type="dfdl:SequenceKindEnum" />
+    <xsd:attribute name="hiddenGroupRef" type="xsd:QName" />
+  </xsd:attributeGroup>
+
+  <!-- 14.2 Sequence Groups with Delimiters -->
+  <xsd:attribute name="separator"
+    type="dfdl:ListOfDFDLStringLiteral_Or_DFDLExpression" />
+  <xsd:attribute name="separatorPosition" type="dfdl:SeparatorPositionEnum" />
+  <xsd:attribute name="separatorPolicy" type="dfdl:SeparatorPolicyEnum" />
+  <xsd:attribute name="separatorSuppressionPolicy" type="dfdl:SeparatorSuppressionPolicyEnum" />  
+
+  <xsd:attributeGroup name="SeparatorAG">
+    <xsd:attribute name="separator"
+      type="dfdl:ListOfDFDLStringLiteral_Or_DFDLExpression" />
+    <xsd:attribute name="separatorPosition" type="dfdl:SeparatorPositionEnum" />
+    <xsd:attribute name="separatorPolicy" type="dfdl:SeparatorPolicyEnum" />
+    <xsd:attribute name="separatorSuppressionPolicy" type="dfdl:SeparatorSuppressionPolicyEnum" />  
+  </xsd:attributeGroup>
+
+  <xsd:attribute name="initiatedContent" type="dfdl:YesNoEnum" />
+  <xsd:attributeGroup name="GroupCommonAG">
+    <xsd:attribute name="initiatedContent" type="dfdl:YesNoEnum" />
+  </xsd:attributeGroup>
+
+  <!-- 15 Choices -->
+  <xsd:attribute name="choiceLengthKind" type="dfdl:ChoiceLengthKindEnum" />
+  <xsd:attribute name="choiceLength" type="dfdl:DFDLNonNegativeInteger" />
+  <xsd:attribute name="choiceDispatchKey" type="dfdl:DFDLExpression" />
+
+  <xsd:attributeGroup name="ChoiceAG">
+    <xsd:attribute name="choiceLengthKind" type="dfdl:ChoiceLengthKindEnum" />
+    <xsd:attribute name="choiceLength" type="dfdl:DFDLNonNegativeInteger" />
+    <xsd:attribute name="choiceDispatchKey" type="dfdl:DFDLExpression" />
+  </xsd:attributeGroup>
+
+  <!--16 Arrays and Optional Elements: Properties for Repeating and Variable-Occurrence 
+    Data Items -->
+  <xsd:attribute name="occursCountKind" type="dfdl:OccursCountKindEnum" />
+  <xsd:attribute name="occursCount" type="dfdl:DFDLExpression" />
+  <xsd:attribute name="occursStopValue" type="dfdl:ListOfDFDLStringLiteral" />
+
+  <xsd:attributeGroup name="OccursAG">
+    <xsd:attribute name="occursCountKind" type="dfdl:OccursCountKindEnum" />
+    <xsd:attribute name="occursCount" type="dfdl:DFDLExpression" />
+    <xsd:attribute name="occursStopValue" type="dfdl:ListOfDFDLStringLiteral" />
+  </xsd:attributeGroup>
+
+  <!-- 19 Calculated Value Properties. -->
+  <xsd:attribute name="inputValueCalc" type="dfdl:DFDLExpression" />
+  <xsd:attribute name="outputValueCalc" type="dfdl:DFDLExpression" />
+
+  <xsd:attributeGroup name="CalculatedValueAG">
+    <xsd:attribute name="inputValueCalc" type="dfdl:DFDLExpression" />
+    <xsd:attribute name="outputValueCalc" type="dfdl:DFDLExpression" />
+  </xsd:attributeGroup>
+
+  <!-- document only markup properties -->
+  <xsd:attribute name="documentFinalTerminatorCanBeMissing"
+    type="dfdl:YesNoEnum" />
+
+  <xsd:attributeGroup name="DocumentPropertiesAG">
+    <xsd:attribute name="documentFinalTerminatorCanBeMissing"
+      type="dfdl:YesNoEnum" />
+  </xsd:attributeGroup>
+
+
+  <!-- ========================================================== -->
+  <!-- Enumeration of simple name of all DFDL properties that can -->
+  <!-- appear in element form. -->
+  <!-- ========================================================== -->
+
+  <xsd:simpleType name="PropertyNameType">
+    <xsd:restriction base="xsd:string">
+
+      <!-- List of properties that are string types -->
+      <xsd:enumeration value="initiator" />
+      <xsd:enumeration value="terminator" />
+      <xsd:enumeration value="documentFinalTerminatorCanBeMissing" />
+      <xsd:enumeration value="outputNewLine" />
+      <xsd:enumeration value="length" />
+      <xsd:enumeration value="lengthPattern" />
+      <xsd:enumeration value="textStringPadCharacter" />
+      <xsd:enumeration value="textNumberPadCharacter" />
+      <xsd:enumeration value="textCalendarPadCharacter" />
+      <xsd:enumeration value="textBooleanPadCharacter" />
+      <xsd:enumeration value="escapeCharacter" />
+      <xsd:enumeration value="escapeBlockStart" />
+      <xsd:enumeration value="escapeBlockEnd" />
+      <xsd:enumeration value="escapeEscapeCharacter" />
+      <xsd:enumeration value="extraEscapedCharacters" />
+      <xsd:enumeration value="textNumberPattern" />
+      <xsd:enumeration value="textStandardGroupingSeparator" />
+      <xsd:enumeration value="textStandardDecimalSeparator" />
+      <xsd:enumeration value="textStandardExponentRep" />
+      <!-- deprecated form accepted by IBM DFDL as of 2018-10-30 -->
+      <xsd:enumeration value="textStandardExponentCharacter" />
+      <xsd:enumeration value="textStandardInfinityRep" />
+      <xsd:enumeration value="textStandardNaNRep" />
+      <xsd:enumeration value="textStandardZeroRep" />
+      <xsd:enumeration value="textBooleanTrueRep" />
+      <xsd:enumeration value="textBooleanFalseRep" />
+      <xsd:enumeration value="calendarPattern" />
+      <xsd:enumeration value="calendarLanguage" />
+      <xsd:enumeration value="binaryCalendarEpoch" />
+      <xsd:enumeration value="nilValue" />
+      <xsd:enumeration value="separator" />
+      <xsd:enumeration value="occursStopValue" />
+      <xsd:enumeration value="inputValueCalc" />
+      <xsd:enumeration value="outputValueCalc" />
+
+      <!-- Bidirectional Properties for all Simple Types with Text representation -->
+      <xsd:enumeration value="textBidi" />
+      <xsd:enumeration value="textBidiTextOrdering" />
+      <xsd:enumeration value="textBidiOrientation" />
+      <xsd:enumeration value="textBidiSymmetric" />
+      <xsd:enumeration value="textBidiTextShaped" />
+      <xsd:enumeration value="textBidiNumeralShapes" />
+
+      <!-- List of properties with non-string types -->
+      <xsd:enumeration value="byteOrder" />
+      <xsd:enumeration value="bitOrder"/>
+      <xsd:enumeration value="encoding" />
+      <xsd:enumeration value="encodingErrorPolicy"/>
+      <xsd:enumeration value="utf16Width" />
+      <xsd:enumeration value="ignoreCase" />
+
+      <xsd:enumeration value="alignment" />
+      <xsd:enumeration value="alignmentUnits" />
+      <xsd:enumeration value="fillByte" />
+      <xsd:enumeration value="leadingSkip" />
+      <xsd:enumeration value="trailingSkip" />
+
+      <xsd:enumeration value="lengthKind" />
+      <xsd:enumeration value="lengthUnits" />
+
+      <xsd:enumeration value="prefixIncludesPrefixLength" />
+      <xsd:enumeration value="prefixLengthType" />
+
+      <xsd:enumeration value="representation" />
+
+      <xsd:enumeration value="textPadKind" />
+      <xsd:enumeration value="textTrimKind" />
+      <xsd:enumeration value="textOutputMinLength" />
+
+      <xsd:enumeration value="escapeKind" />
+      <xsd:enumeration value="generateEscapeBlock" />
+
+      <xsd:enumeration value="textStringJustification" />
+      <xsd:enumeration value="textNumberRep" />
+      <xsd:enumeration value="textNumberJustification" />
+
+      <xsd:enumeration value="textNumberCheckPolicy" />
+      <xsd:enumeration value="textStandardBase" />
+      <xsd:enumeration value="textNumberRoundingMode" />
+      <xsd:enumeration value="textNumberRounding" />
+      <xsd:enumeration value="textNumberRoundingIncrement" />
+      <xsd:enumeration value="textZonedSignStyle" />
+
+      <xsd:enumeration value="binaryNumberRep" />
+      <xsd:enumeration value="binaryDecimalVirtualPoint" />
+      <xsd:enumeration value="binaryNumberCheckPolicy" />
+      <xsd:enumeration value="binaryPackedSignCodes" />
+      <xsd:enumeration value="binaryFloatRep" />
+
+      <xsd:enumeration value="textBooleanJustification" />
+
+      <xsd:enumeration value="binaryBooleanTrueRep" />
+      <xsd:enumeration value="binaryBooleanFalseRep" />
+
+      <xsd:enumeration value="textCalendarJustification" />
+
+      <xsd:enumeration value="calendarPatternKind" />
+      <xsd:enumeration value="calendarCheckPolicy" />
+      <xsd:enumeration value="calendarTimeZone" />
+      <xsd:enumeration value="calendarObserveDST" />
+      <xsd:enumeration value="calendarFirstDayOfWeek" />
+      <xsd:enumeration value="calendarDaysInFirstWeek" />
+      <xsd:enumeration value="calendarCenturyStart" />
+      <xsd:enumeration value="binaryCalendarRep" />
+
+      <xsd:enumeration value="nilKind" />
+      <xsd:enumeration value="nilValueDelimiterPolicy" />
+
+      <xsd:enumeration value="useNilForDefault" />
+      <xsd:enumeration value="emptyValueDelimiterPolicy" />
+
+      <xsd:enumeration value="sequenceKind" />
+      <xsd:enumeration value="hiddenGroupRef" />
+      
+      <xsd:enumeration value="initiatedContent" />
+
+      <xsd:enumeration value="separatorPosition" />
+      <xsd:enumeration value="separatorPolicy" />
+      <xsd:enumeration value="separatorSuppressionPolicy" />      
+
+      <xsd:enumeration value="choiceLengthKind" />
+      <xsd:enumeration value="choiceLength" />
+      <xsd:enumeration value="choiceDispatchKey" />
+      <xsd:enumeration value="choiceBranchKey" />
+
+      <xsd:enumeration value="occursCountKind" />
+      <xsd:enumeration value="occursCount" />
+
+      <xsd:enumeration value="floating" />
+      <xsd:enumeration value="truncateSpecifiedLengthString" />
+
+      <xsd:enumeration value="decimalSigned" />
+    </xsd:restriction>
+  </xsd:simpleType>
+
+  <!-- Qualified Form Attributes (for validating Short-form annotations) -->
+
+  <xsd:attributeGroup name="BaseAGQualified">
+    <xsd:attribute form="qualified" name="ref" type="xsd:QName" />
+  </xsd:attributeGroup>
+
+  <xsd:attributeGroup name="CommonAGQualified">
+    <xsd:attribute form="qualified" name="bitOrder"
+      type="dfdl:BitOrderEnum"/>
+    <xsd:attribute form="qualified" name="byteOrder"
+      type="dfdl:ByteOrderEnum_Or_DFDLExpression" />
+    <xsd:attribute form="qualified" name="encoding"
+      type="dfdl:EncodingEnum_Or_DFDLExpression" />
+    <xsd:attribute form="qualified" name="encodingErrorPolicy"
+      type="dfdl:EncodingErrorPolicyEnum" />
+    <xsd:attribute form="qualified" name="utf16Width"
+      type="dfdl:UTF16WidthEnum" />
+    <xsd:attribute form="qualified" name="ignoreCase"
+      type="dfdl:YesNoEnum" />
+    <xsd:attribute form="qualified" name="choiceBranchKey"
+      type="dfdl:ListOfDFDLStringLiteral" />
+    <xsd:attribute ref="dfdlx:choiceBranchKeyRanges" />
+  </xsd:attributeGroup>
+
+  <!-- 12.1 Aligned Data -->
+
+  <xsd:attributeGroup name="AlignmentAGQualified">
+    <xsd:attribute form="qualified" name="alignment"
+      type="dfdl:AlignmentType" />
+    <xsd:attribute form="qualified" name="alignmentUnits"
+      type="dfdl:AlignmentUnitsEnum" />
+    <xsd:attribute form="qualified" name="fillByte"
+      type="dfdl:DFDLStringLiteral" />
+    <xsd:attribute form="qualified" name="leadingSkip"
+      type="dfdl:DFDLNonNegativeInteger" />
+    <xsd:attribute form="qualified" name="trailingSkip"
+      type="dfdl:DFDLNonNegativeInteger" />
+  </xsd:attributeGroup>
+
+  <!-- 12.2 Delimiters and Text Mark up -->
+
+  <xsd:attributeGroup name="MarkupAGQualified">
+    <xsd:attribute form="qualified" name="initiator"
+      type="dfdl:ListOfDFDLStringLiteral_Or_DFDLExpression" />
+    <xsd:attribute form="qualified" name="terminator"
+      type="dfdl:ListOfDFDLStringLiteral_Or_DFDLExpression" />
+    <xsd:attribute form="qualified" name="outputNewLine"
+      type="dfdl:DFDLStringLiteral" />
+  </xsd:attributeGroup>
+
+  <xsd:attributeGroup name="NonGroupMarkupAGQualified">
+    <xsd:attribute form="qualified" name="emptyValueDelimiterPolicy"
+      type="dfdl:EmptyValueDelimiterPolicyEnum" />
+  </xsd:attributeGroup>
+
+  <!-- 12.3 Length Properties -->
+
+  <xsd:attributeGroup name="LengthAGQualified">
+    <xsd:attribute form="qualified" name="lengthKind"
+      type="dfdl:LengthKindEnum" />
+    <xsd:attribute form="qualified" name="length"
+      type="dfdl:DFDLNonNegativeInteger_Or_DFDLExpression" />
+    <xsd:attribute form="qualified" name="lengthPattern"
+      type="dfdl:DFDLRegularExpression" />
+    <xsd:attribute form="qualified" name="lengthUnits"
+      type="dfdl:LengthUnitsEnum" />
+    <xsd:attribute form="qualified" name="prefixIncludesPrefixLength"
+      type="dfdl:YesNoEnum" />
+    <xsd:attribute form="qualified" name="prefixLengthType"
+      type="xsd:QName" />
+  </xsd:attributeGroup>
+
+  <!-- 13 Simple Types -->
+
+  <xsd:attributeGroup name="RepresentationAGQualified">
+    <xsd:attribute form="qualified" name="representation"
+      type="dfdl:RepresentationEnum" />
+  </xsd:attributeGroup>
+
+  <!-- 14.4 Simple or complex local element or element reference -->
+
+  <xsd:attributeGroup name="FloatingAGQualified">
+    <xsd:attribute form="qualified" name="floating" type="dfdl:YesNoEnum" />
+  </xsd:attributeGroup>
+
+  <!--13.2 Properties Common to All Simple Types with Text representation -->
+
+  <xsd:attributeGroup name="SimpleTypesTextAGQualified">
+    <xsd:attribute form="qualified" name="textPadKind"
+      type="dfdl:TextPadKindEnum" />
+    <xsd:attribute form="qualified" name="textTrimKind"
+      type="dfdl:TextTrimKindEnum" />
+    <xsd:attribute form="qualified" name="textOutputMinLength"
+      type="dfdl:DFDLNonNegativeInteger" />
+    <xsd:attribute form="qualified" name="escapeSchemeRef"
+      type="dfdl:DFDLQName" />
+  </xsd:attributeGroup>
+
+  <!-- 13.2.1 Escape Scheme -->
+  <!-- Note that these can never appear in short form -->
+  <xsd:attributeGroup name="EscapeSchemeAGQualified">
+    <xsd:attribute form="qualified" name="escapeKind"
+      type="dfdl:EscapeKindEnum" />
+    <xsd:attribute form="qualified" name="escapeCharacter"
+      type="dfdl:DFDLStringLiteral_Or_DFDLExpression" />
+    <xsd:attribute form="qualified" name="escapeBlockStart"
+      type="dfdl:DFDLStringLiteral" />
+    <xsd:attribute form="qualified" name="escapeBlockEnd"
+      type="dfdl:DFDLStringLiteral" />
+    <xsd:attribute form="qualified" name="escapeEscapeCharacter"
+      type="dfdl:DFDLStringLiteral_Or_DFDLExpression" />
+    <xsd:attribute form="qualified" name="extraEscapedCharacters"
+      type="dfdl:ListOfDFDLStringLiteral" />
+    <xsd:attribute form="qualified" name="generateEscapeBlock"
+      type="dfdl:GenerateEscapeEnum" />
+  </xsd:attributeGroup>
+
+  <!-- 13.3 Properties for Bidirectional support for all Simple Types with 
+    Text representation -->
+
+  <xsd:attributeGroup name="TextBidiSchemeAGQualified">
+    <xsd:attribute form="qualified" name="textBidiTextOrdering"
+      type="dfdl:TextBidiTextOrderingEnum" />
+    <xsd:attribute form="qualified" name="textBidiOrientation"
+      type="dfdl:TextBidiOrientationEnum" />
+    <xsd:attribute form="qualified" name="textBidiSymmetric"
+      type="dfdl:YesNoEnum" />
+    <xsd:attribute form="qualified" name="textBidiTextShaped"
+      type="dfdl:YesNoEnum" />
+    <xsd:attribute form="qualified" name="textBidiNumeralShapes"
+      type="dfdl:TextBidiNumeralShapesEnum" />
+    <xsd:attribute form="qualified" name="textBidi"
+                   type="dfdl:YesNoEnum" />
+  </xsd:attributeGroup>
+
+  <!-- 13.4 Properties Specific to Strings with Text representation -->
+
+  <xsd:attributeGroup name="StringTextAGQualified">
+    <xsd:attribute form="qualified" name="textStringJustification"
+      type="dfdl:TextStringJustificationEnum" />
+    <xsd:attribute form="qualified" name="textStringPadCharacter"
+      type="dfdl:NonEmptyStringLiteral" />
+    <xsd:attribute form="qualified" name="truncateSpecifiedLengthString"
+      type="dfdl:YesNoEnum" />
+  </xsd:attributeGroup>
+
+  <!-- Properties Specific to Number with Text or Binary representation -->
+
+  <xsd:attributeGroup name="NumberAGQualified">
+    <xsd:attribute form="qualified" name="decimalSigned"
+      type="dfdl:YesNoEnum" />
+  </xsd:attributeGroup>
+
+  <!-- Properties Specific to Number with Text representation -->
+
+  <xsd:attributeGroup name="NumberTextAGQualified">
+    <xsd:attribute form="qualified" name="textNumberRep"
+      type="dfdl:TextNumberRepEnum" />
+    <xsd:attribute form="qualified" name="textNumberJustification"
+      type="dfdl:TextNumberJustificationEnum" />
+    <xsd:attribute form="qualified" name="textNumberPadCharacter"
+      type="dfdl:DFDLStringLiteral" />
+    <xsd:attribute form="qualified" name="textStandardBase"
+      type="dfdl:TextNumberBaseEnum" />
+  </xsd:attributeGroup>
+
+  <!-- Text number format attributes -->
+
+  <xsd:attributeGroup name="TextNumberFormatAGQualified">
+    <xsd:attribute form="qualified" name="textNumberPattern"
+      type="dfdl:DFDLStringLiteral" />
+    <xsd:attribute form="qualified" name="textStandardGroupingSeparator"
+      type="dfdl:DFDLStringLiteral_Or_DFDLExpression" />
+    <xsd:attribute form="qualified" name="textStandardDecimalSeparator"
+      type="dfdl:DFDLStringLiteral_Or_DFDLExpression" />
+    <xsd:attribute form="qualified" name="textStandardExponentRep"
+      type="dfdl:DFDLStringLiteral_Or_DFDLExpression" />
+    <!-- deprecated form still accepted by IBM DFDL as of 2018-10-30 -->
+    <xsd:attribute form="qualified" name="textStandardExponentCharacter"
+      type="dfdl:DFDLStringLiteral_Or_DFDLExpression" />
+    <xsd:attribute form="qualified" name="textNumberCheckPolicy"
+      type="dfdl:TextNumberCheckPolicyEnum" />
+    <xsd:attribute form="qualified" name="textStandardInfinityRep"
+      type="dfdl:DFDLStringLiteral" />
+    <xsd:attribute form="qualified" name="textStandardNaNRep"
+      type="dfdl:DFDLStringLiteral" />
+    <xsd:attribute form="qualified" name="textNumberRoundingMode"
+      type="dfdl:TextNumberRoundingModeEnum" />
+    <xsd:attribute form="qualified" name="textNumberRounding"
+      type="dfdl:TextNumberRoundingEnum" />
+    <xsd:attribute form="qualified" name="textNumberRoundingIncrement"
+      type="xsd:double" />
+    <xsd:attribute form="qualified" name="textZonedSignStyle"
+      type="dfdl:TextZonedSignStyleEnum" />
+    <xsd:attribute form="qualified" name="textStandardZeroRep"
+      type="dfdl:ListOfDFDLStringLiteral" />
+  </xsd:attributeGroup>
+
+  <!-- 13.6 Properties Specific to Number with Binary representation -->
+
+  <xsd:attributeGroup name="NumberBinaryAGQualified">
+    <xsd:attribute form="qualified" name="binaryNumberRep"
+      type="dfdl:BinaryNumberRepEnum" />
+    <xsd:attribute form="qualified" name="binaryDecimalVirtualPoint"
+      type="xsd:int" />
+    <xsd:attribute form="qualified" name="binaryPackedSignCodes"
+      type="dfdl:BinaryPackedSignCodes" />
+    <xsd:attribute form="qualified" name="binaryNumberCheckPolicy"
+      type="dfdl:BinaryNumberCheckPolicyEnum" />
+  </xsd:attributeGroup>
+
+  <!-- 13.7 Float/Double with Binary representation -->
+
+  <xsd:attributeGroup name="FloatBinaryAGQualified">
+    <xsd:attribute form="qualified" name="binaryFloatRep"
+      type="dfdl:BinaryFloatRepEnum_Or_DFDLExpression" />
+  </xsd:attributeGroup>
+
+  <!-- 13.8 Properties Specific to Boolean with Text representation -->
+
+  <xsd:attributeGroup name="BooleanTextAGQualified">
+    <xsd:attribute form="qualified" name="textBooleanTrueRep"
+      type="dfdl:ListOfDFDLStringLiteral_Or_DFDLExpression" />
+    <xsd:attribute form="qualified" name="textBooleanFalseRep"
+      type="dfdl:ListOfDFDLStringLiteral_Or_DFDLExpression" />
+    <xsd:attribute form="qualified" name="textBooleanJustification"
+      type="dfdl:TextBooleanJustificationEnum" />
+    <xsd:attribute form="qualified" name="textBooleanPadCharacter"
+      type="dfdl:DFDLStringLiteral" />
+  </xsd:attributeGroup>
+
+  <!-- 13.9 Properties Specific to Boolean with Binary representation -->
+
+  <xsd:attributeGroup name="BooleanBinaryAGQualified">
+    <xsd:attribute form="qualified" name="binaryBooleanTrueRep"
+      type="dfdl:BinaryBooleanTrueRepType" />
+    <xsd:attribute form="qualified" name="binaryBooleanFalseRep"
+      type="dfdl:BinaryBooleanFalseRepType" />
+  </xsd:attributeGroup>
+
+  <!-- 13.10 Properties Specific to Calendar Format -->
+
+  <xsd:attributeGroup name="CalendarFormatAGQualified">
+    <xsd:attribute form="qualified" name="calendarPattern"
+      type="dfdl:DFDLStringLiteral" />
+    <xsd:attribute form="qualified" name="calendarPatternKind"
+      type="dfdl:CalendarPatternKindEnum" />
+    <xsd:attribute form="qualified" name="calendarCheckPolicy"
+      type="dfdl:CalendarCheckPolicyEnum" />
+    <xsd:attribute form="qualified" name="calendarTimeZone"
+      type="dfdl:CalendarTimeZoneType" />
+    <xsd:attribute form="qualified" name="calendarObserveDST"
+      type="dfdl:YesNoEnum" />
+    <xsd:attribute form="qualified" name="calendarFirstDayOfWeek"
+      type="dfdl:CalendarFirstDayOfWeekEnum" />
+    <xsd:attribute form="qualified" name="calendarDaysInFirstWeek"
+      type="dfdl:CalendarDaysInFirstWeek" />
+    <xsd:attribute form="qualified" name="calendarCenturyStart"
+      type="dfdl:CalendarCenturyStart" />
+    <xsd:attribute form="qualified" name="calendarLanguage"
+      type="dfdl:CalendarLanguageType" />
+  </xsd:attributeGroup>
+
+  <!-- 13.11 Properties Specific to Calendar with Text Representation -->
+
+  <xsd:attributeGroup name="CalendarTextAGQualified">
+    <xsd:attribute form="qualified" name="textCalendarJustification"
+      type="dfdl:TextCalendarJustificationEnum" />
+    <xsd:attribute form="qualified" name="textCalendarPadCharacter"
+      type="dfdl:DFDLStringLiteral" />
+  </xsd:attributeGroup>
+
+  <!-- 13.12 Properties Specific to Calendar with Binary Representation -->
+
+  <xsd:attributeGroup name="CalendarBinaryAGQualified">
+    <xsd:attribute form="qualified" name="binaryCalendarRep"
+      type="dfdl:BinaryCalendarRepEnum" />
+    <xsd:attribute form="qualified" name="binaryCalendarEpoch"
+      type="xsd:string" />
+  </xsd:attributeGroup>
+
+  <!-- 13.13 Properties Specific to Opaque Types (hexBinary) -->
+  <xsd:attributeGroup name="OpaqueAGQualified">
+  </xsd:attributeGroup>
+
+  <!-- 13.14 Properties for Nillable Elements -->
+
+  <xsd:attributeGroup name="NillableAGQualified">
+    <xsd:attribute form="qualified" name="nilKind"
+      type="dfdl:NilKindEnum" />
+    <xsd:attribute form="qualified" name="nilValue"
+      type="dfdl:NonEmptyListOfDFDLStringLiteral" />
+    <xsd:attribute form="qualified" name="nilValueDelimiterPolicy"
+      type="dfdl:NilValueDelimiterPolicyEnum" />
+  </xsd:attributeGroup>
+
+  <!-- 13.15 Properties for Default Value Control -->
+
+  <xsd:attributeGroup name="DefaultValueControlAGQualified">
+    <xsd:attribute form="qualified" name="useNilForDefault"
+      type="dfdl:YesNoEnum" />
+  </xsd:attributeGroup>
+
+  <!-- 14 Sequence Groups -->
+
+  <xsd:attributeGroup name="SequenceAGQualified">
+    <xsd:attribute form="qualified" name="sequenceKind"
+      type="dfdl:SequenceKindEnum" />
+    <xsd:attribute form="qualified" name="hiddenGroupRef"
+      type="xsd:QName" />
+  </xsd:attributeGroup>
+
+  <!-- 14.2 Sequence Groups with Delimiters -->
+
+  <xsd:attributeGroup name="SeparatorAGQualified">
+    <xsd:attribute form="qualified" name="separator"
+      type="dfdl:ListOfDFDLStringLiteral_Or_DFDLExpression" />
+    <xsd:attribute form="qualified" name="separatorPosition"
+      type="dfdl:SeparatorPositionEnum" />
+    <xsd:attribute form="qualified" name="separatorPolicy"
+      type="dfdl:SeparatorPolicyEnum" />
+    <xsd:attribute form="qualified" name="separatorSuppressionPolicy"
+      type="dfdl:SeparatorSuppressionPolicyEnum" />      
+  </xsd:attributeGroup>
+
+  <xsd:attributeGroup name="GroupCommonAGQualified">
+    <xsd:attribute form="qualified" name="initiatedContent"
+      type="dfdl:YesNoEnum" />
+  </xsd:attributeGroup>
+
+  <!-- 15 Choices -->
+
+  <xsd:attributeGroup name="ChoiceAGQualified">
+    <xsd:attribute form="qualified" name="choiceLengthKind"
+      type="dfdl:ChoiceLengthKindEnum" />
+    <xsd:attribute form="qualified" name="choiceLength"
+      type="dfdl:DFDLNonNegativeInteger" />
+    <xsd:attribute form="qualified" name="choiceDispatchKey"
+      type="dfdl:DFDLExpression" />
+  </xsd:attributeGroup>
+
+  <!--16 Arrays and Optional Elements: Properties for Repeating and Variable-Occurrence 
+    Data Items -->
+
+  <xsd:attributeGroup name="OccursAGQualified">
+    <xsd:attribute form="qualified" name="occursCountKind"
+      type="dfdl:OccursCountKindEnum" />
+    <xsd:attribute form="qualified" name="occursCount"
+      type="dfdl:DFDLExpression" />
+    <xsd:attribute form="qualified" name="occursStopValue"
+      type="dfdl:ListOfDFDLStringLiteral" />
+  </xsd:attributeGroup>
+
+  <!-- 19 Calculated Value Properties. -->
+
+  <xsd:attributeGroup name="CalculatedValueAGQualified">
+    <xsd:attribute form="qualified" name="inputValueCalc"
+      type="dfdl:DFDLExpression" />
+    <xsd:attribute form="qualified" name="outputValueCalc"
+      type="dfdl:DFDLExpression" />
+  </xsd:attributeGroup>
+
+  <!-- document only markup properties -->
+
+  <xsd:attributeGroup name="DocumentPropertiesAGQualified">
+    <xsd:attribute form="qualified"
+      name="documentFinalTerminatorCanBeMissing" type="dfdl:YesNoEnum" />
+  </xsd:attributeGroup>
+
+  <xsd:attributeGroup name="ElementAGQualified">
+    <xsd:attributeGroup ref="dfdl:SimpleTypeAGQualified" />
+    <xsd:attributeGroup ref="dfdl:FloatingAGQualified" />
+    <xsd:attributeGroup ref="dfdl:NillableAGQualified" />
+    <xsd:attributeGroup ref="dfdl:DefaultValueControlAGQualified" />
+    <xsd:attributeGroup ref="dfdl:OccursAGQualified" />
+    <xsd:attributeGroup ref="dfdl:CalculatedValueAGQualified" />
+    <xsd:attributeGroup ref="dfdlx:RuntimePropertiesAGQualified" />
+  </xsd:attributeGroup>
+
+  <!-- dfdl:group takes the union of dfdl:sequence and dfdl:choice properties -->
+  <xsd:attributeGroup name="GroupAGQualified">
+    <xsd:attributeGroup ref="dfdl:GroupCommonAGQualified" />
+    <xsd:attributeGroup ref="dfdl:SequenceAGQualified" />
+    <xsd:attributeGroup ref="dfdlx:ExtLayeringAGQualified" />
+    <xsd:attributeGroup ref="dfdl:ChoiceAGQualified" />
+    <xsd:attributeGroup ref="dfdl:SeparatorAGQualified" />
+  </xsd:attributeGroup>
+
+  <xsd:attributeGroup name="SimpleTypeAGQualified">
+    <xsd:attributeGroup ref="dfdl:RepresentationAGQualified" />
+    <xsd:attributeGroup ref="dfdl:NonGroupMarkupAGQualified" />
+    <xsd:attributeGroup ref="dfdl:LengthAGQualified" />
+    <xsd:attributeGroup ref="dfdl:SimpleTypesTextAGQualified" />
+    <xsd:attributeGroup ref="dfdl:StringTextAGQualified" />
+    <xsd:attributeGroup ref="dfdl:NumberAGQualified" />
+    <xsd:attributeGroup ref="dfdl:NumberTextAGQualified" />
+    <xsd:attributeGroup ref="dfdl:TextNumberFormatAGQualified" />
+    <xsd:attributeGroup ref="dfdl:NumberBinaryAGQualified" />
+    <xsd:attributeGroup ref="dfdl:FloatBinaryAGQualified" />
+    <xsd:attributeGroup ref="dfdl:TextBidiSchemeAGQualified" />
+    <xsd:attributeGroup ref="dfdl:CalendarTextAGQualified" />
+    <xsd:attributeGroup ref="dfdl:CalendarBinaryAGQualified" />
+    <xsd:attributeGroup ref="dfdl:CalendarFormatAGQualified" />
+    <xsd:attributeGroup ref="dfdl:BooleanTextAGQualified" />
+    <xsd:attributeGroup ref="dfdl:BooleanBinaryAGQualified" />
+    <xsd:attributeGroup ref="dfdlx:SimpleTypeValueCalcAGQualified" />
+    <xsd:attributeGroup ref="dfdlx:ObjectKindAGQualified" />
+  </xsd:attributeGroup>
+  
+</xsd:schema>
diff --git a/resources/xsd/DFDL_part3_model.xsd b/resources/xsd/DFDL_part3_model.xsd
new file mode 100644
index 0000000..063752d
--- /dev/null
+++ b/resources/xsd/DFDL_part3_model.xsd
@@ -0,0 +1,368 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+
+<xsd:schema targetNamespace="http://www.ogf.org/dfdl/dfdl-1.0/"
+  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+  xmlns:dfdl="http://www.ogf.org/dfdl/dfdl-1.0/"
+  xmlns:dfdlx="http://www.ogf.org/dfdl/dfdl-1.0/extensions"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xmlns:daf="urn:ogf:dfdl:2013:imp:daffodil.apache.org:2018:ext"
+  xmlns:dafint="urn:ogf:dfdl:2013:imp:daffodil.apache.org:2018:int"
+  attributeFormDefault="unqualified" elementFormDefault="qualified">
+
+  <xsd:include schemaLocation="DFDL_part2_attributes.xsd" />
+  <xsd:import namespace="urn:ogf:dfdl:2013:imp:daffodil.apache.org:2018:int"/>
+  <xsd:import namespace="urn:ogf:dfdl:2013:imp:daffodil.apache.org:2018:ext"/>
+  <xsd:import namespace="http://www.ogf.org/dfdl/dfdl-1.0/extensions"/>
+
+
+  <!-- all the dfdl: elements that can appear inside an xs:appinfo element -->
+  <xsd:group name="DFDLAppInfoGroup">
+    <xsd:choice>
+      <xsd:element ref="dfdl:assert" />
+      <xsd:element ref="dfdl:choice" />
+      <xsd:element ref="dfdl:defineEscapeScheme" />
+      <xsd:element ref="dfdl:defineFormat" />
+      <xsd:element ref="dfdl:defineVariable" />
+      <xsd:element ref="dfdl:discriminator" />
+      <xsd:element ref="dfdl:element" />
+      <xsd:element ref="dfdl:enumeration" />
+      <xsd:element ref="dfdl:format" />
+      <xsd:element ref="dfdl:group" />
+      <xsd:element ref="dfdl:newVariableInstance" />
+      <xsd:element ref="dfdl:sequence" />
+      <xsd:element ref="dfdl:setVariable" />
+      <xsd:element ref="dfdl:simpleType" />
+    </xsd:choice>
+  </xsd:group>
+
+  <!-- ======================================================== -->
+  <!-- DFDL Format definition types -->
+  <!-- ======================================================== -->
+
+  <!-- 7.2 dfdl:defineFormat -->
+  <xsd:element name="defineFormat" type="dfdl:DFDLDefineFormat" />
+  <xsd:complexType name="DFDLDefineFormat">
+    <xsd:sequence>
+      <xsd:element maxOccurs="unbounded" minOccurs="0"
+        ref="dfdl:format" />
+    </xsd:sequence>
+    <xsd:attribute name="name" type="xsd:NCName" use='required'/>
+    <xsd:attributeGroup ref="dafint:daffodilAG"/>
+  </xsd:complexType>
+
+  <xsd:element name="format" type="dfdl:DFDLFormat" />
+  <xsd:complexType name="DFDLFormat">
+    <xsd:complexContent>
+      <xsd:extension base="dfdl:DFDLBaseType">
+        <xsd:sequence />
+        <xsd:attributeGroup ref="dfdl:FormatAG" />
+      </xsd:extension>
+    </xsd:complexContent>
+  </xsd:complexType>
+
+  <!-- 7.5 dfdl:defineEscapeScheme -->
+  <xsd:element name="defineEscapeScheme" type="dfdl:DFDLDefineEscapeScheme" />
+
+  <xsd:complexType name="DFDLDefineEscapeScheme">
+    <xsd:sequence>
+      <xsd:element ref="dfdl:escapeScheme" />
+    </xsd:sequence>
+    <xsd:attribute name="name" type="xsd:NCName" use='required'/>
+    <xsd:attributeGroup ref="dafint:daffodilAG"/>
+  </xsd:complexType>
+
+  <xsd:element name="escapeScheme" type="dfdl:DFDLEscapeScheme" />
+
+  <xsd:complexType name="DFDLEscapeScheme">
+    <xsd:complexContent>
+      <xsd:extension base="dfdl:DFDLType">
+        <xsd:sequence />
+        <xsd:attributeGroup ref="dfdl:EscapeSchemeAG" />
+      </xsd:extension>
+    </xsd:complexContent>
+  </xsd:complexType>
+
+  <!-- ================================================================= -->
+  <!-- Element form for properties -->
+  <!-- ================================================================= -->
+
+  <xsd:element name="property" type="dfdl:PropertyType" />
+
+  <xsd:complexType name="PropertyType">
+    <xsd:simpleContent>
+      <xsd:extension base="xsd:string">
+        <xsd:attribute name="name" use='required'>
+          <xsd:simpleType>
+            <xsd:union memberTypes="dfdl:PropertyNameType dfdlx:PropertyNameType" />
+          </xsd:simpleType>
+        </xsd:attribute>
+        <xsd:attributeGroup ref="dafint:daffodilAG"/>
+      </xsd:extension>
+    </xsd:simpleContent>
+  </xsd:complexType>
+
+  <!-- ================================================================= -->
+  <!-- Elements, types and attribute groups to specify DFDL Variables -->
+  <!-- ================================================================= -->
+
+  <xsd:complexType name="DFDLVariableType">
+    <xsd:simpleContent>
+      <xsd:extension base="dfdl:DFDLStringLiteral_Or_DFDLExpression">
+        <xsd:attributeGroup ref="dafint:daffodilAG"/>
+      </xsd:extension>
+    </xsd:simpleContent>
+  </xsd:complexType>
+
+  <xsd:attributeGroup name="DefineVariableAG">
+    <xsd:attribute name="name" type="xsd:NCName" use='required'/>
+    <xsd:attribute name="predefined" type="xsd:boolean" />
+    <xsd:attribute name="type" type="xsd:QName" />
+    <xsd:attribute name="external" type="xsd:boolean" />
+    <xsd:attribute name="defaultValue"
+      type="dfdl:DFDLStringLiteral_Or_DFDLExpression" />
+    <xsd:attribute ref="dfdlx:direction" />
+  </xsd:attributeGroup>
+
+  <xsd:attributeGroup name="SetVariableAG">
+    <xsd:attribute name="ref" type="xsd:QName" use='required'/>
+    <xsd:attribute name="value"
+      type="dfdl:DFDLStringLiteral_Or_DFDLExpression" />
+  </xsd:attributeGroup>
+
+  <xsd:attributeGroup name="NewVariableInstanceAG">
+    <xsd:attribute name="ref" type="xsd:QName" use='required'/>
+    <xsd:attribute name="defaultValue"
+      type="dfdl:DFDLStringLiteral_Or_DFDLExpression" />
+  </xsd:attributeGroup>
+
+  <xsd:element name="defineVariable">
+    <xsd:complexType>
+      <xsd:simpleContent>
+        <xsd:extension base="dfdl:DFDLVariableType">
+          <xsd:attributeGroup ref="dfdl:DefineVariableAG" />
+        </xsd:extension>
+      </xsd:simpleContent>
+    </xsd:complexType>
+  </xsd:element>
+
+  <xsd:element name="newVariableInstance">
+    <xsd:complexType>
+      <xsd:simpleContent>
+        <xsd:extension base="dfdl:DFDLVariableType">
+          <xsd:attributeGroup ref="dfdl:NewVariableInstanceAG" />
+        </xsd:extension>
+      </xsd:simpleContent>
+    </xsd:complexType>
+  </xsd:element>
+
+  <xsd:element name="setVariable">
+    <xsd:complexType>
+      <xsd:simpleContent>
+        <xsd:extension base="dfdl:DFDLVariableType">
+          <xsd:attributeGroup ref="dfdl:SetVariableAG" />
+        </xsd:extension>
+      </xsd:simpleContent>
+    </xsd:complexType>
+  </xsd:element>
+
+  <!-- ================================================================================ -->
+  <!-- Elements, types and attribute groups to specify DFDL Assert and Discriminator -->
+  <!-- ================================================================================ -->
+
+  <!-- The type that models element value as DFDL expression -->
+  <xsd:attributeGroup name="TestConditionAG">
+    <xsd:attribute name="test" type="dfdl:DFDLExpression" />
+    <xsd:attribute name="testKind" type="dfdl:TestKindEnum" />
+    <xsd:attribute name="testPattern" type="dfdl:DFDLRegularExpression" />
+    <xsd:attribute name="message" type="xsd:string" />
+    <xsd:attribute name="failureType" type="dfdl:FailureTypeEnum" />
+  </xsd:attributeGroup>
+
+  <xsd:complexType name="TestCondition">
+    <xsd:simpleContent>
+      <xsd:extension base="dfdl:DFDLExpressionOrPatternOrNothing"> <!-- changed to accept regex -->
+        <xsd:attributeGroup ref="dfdl:TestConditionAG" />
+        <xsd:attributeGroup ref="dafint:daffodilAG" />
+      </xsd:extension>
+    </xsd:simpleContent>
+  </xsd:complexType>
+
+  <xsd:element name="assert">
+    <xsd:complexType>
+      <xsd:simpleContent>
+        <xsd:extension base="dfdl:TestCondition">
+        </xsd:extension>
+      </xsd:simpleContent>
+    </xsd:complexType>
+  </xsd:element>
+
+  <xsd:element name="discriminator">
+    <xsd:complexType>
+      <xsd:simpleContent>
+        <xsd:extension base="dfdl:TestCondition">
+        </xsd:extension>
+      </xsd:simpleContent>
+    </xsd:complexType>
+  </xsd:element>
+
+  <!-- ============================================================ -->
+  <!-- Specialized annotations element definitions -->
+  <!-- ============================================================ -->
+
+  <xsd:element name="element" type="dfdl:DFDLElementType" />
+  <xsd:element name="sequence" type="dfdl:DFDLSequenceType" />
+  <xsd:element name="choice" type="dfdl:DFDLChoiceType" />
+  <xsd:element name="group" type="dfdl:DFDLGroupType" />
+  <xsd:element name="simpleType" type="dfdl:DFDLSimpleType" />
+  <xsd:element name="enumeration" type="dfdl:DFDLEnumerationType" />
+
+  <!-- ============================================================= -->
+  <!-- Specialized annotations types -->
+  <!-- ============================================================= -->
+
+  <xsd:complexType abstract="true" name="DFDLType">
+    <xsd:sequence>
+      <xsd:element maxOccurs="unbounded" minOccurs="0"
+        ref="dfdl:property" />
+      <xsd:element maxOccurs="unbounded" minOccurs="0"
+        ref="daf:extProperty" />
+    </xsd:sequence>
+    <xsd:attributeGroup ref="dafint:daffodilAG"/> 
+  </xsd:complexType>
+
+  <xsd:complexType abstract="true" name="DFDLBaseType">
+    <xsd:complexContent>
+      <xsd:extension base="dfdl:DFDLType">
+        <xsd:sequence />
+        <xsd:attributeGroup ref="dfdl:BaseAG" />
+        <xsd:attributeGroup ref="dfdl:CommonAG" />
+        <xsd:attributeGroup ref="dfdl:AlignmentAG" />
+        <xsd:attributeGroup ref="dfdl:MarkupAG" />
+      </xsd:extension>
+    </xsd:complexContent>
+  </xsd:complexType>
+
+  <xsd:complexType name="DFDLElementType">
+    <xsd:complexContent>
+      <xsd:extension base="dfdl:DFDLBaseType">
+        <xsd:sequence />
+        <xsd:attributeGroup ref="dfdl:ElementAG" />
+      </xsd:extension>
+    </xsd:complexContent>
+  </xsd:complexType>
+
+  <xsd:complexType name="DFDLSequenceType">
+    <xsd:complexContent>
+      <xsd:extension base="dfdl:DFDLBaseType">
+        <xsd:sequence />
+        <xsd:attributeGroup ref="dfdl:GroupCommonAG" />
+        <xsd:attributeGroup ref="dfdl:SequenceAG" />
+        <xsd:attributeGroup ref="dfdlx:ExtLayeringAGQualified" />
+        <xsd:attributeGroup ref="dfdl:SeparatorAG" />
+      </xsd:extension>
+    </xsd:complexContent>
+  </xsd:complexType>
+
+  <xsd:complexType name="DFDLChoiceType">
+    <xsd:complexContent>
+      <xsd:extension base="dfdl:DFDLBaseType">
+        <xsd:sequence />
+        <xsd:attributeGroup ref="dfdl:GroupCommonAG" />
+        <xsd:attributeGroup ref="dfdl:ChoiceAG" />
+      </xsd:extension>
+    </xsd:complexContent>
+  </xsd:complexType>
+
+  <xsd:complexType name="DFDLSimpleType">
+    <xsd:complexContent>
+      <xsd:extension base="dfdl:DFDLBaseType">
+        <xsd:sequence />
+        <xsd:attributeGroup ref="dfdl:SimpleTypeAG" />
+      </xsd:extension>
+    </xsd:complexContent>
+  </xsd:complexType>
+
+  <xsd:complexType name="DFDLEnumerationType">
+    <xsd:attributeGroup ref="dfdlx:RepValuesAG" />
+  </xsd:complexType>
+
+  <xsd:complexType name="DFDLGroupType">
+    <xsd:complexContent>
+      <xsd:extension base="dfdl:DFDLBaseType">
+        <xsd:sequence />
+        <xsd:attributeGroup ref="dfdl:GroupAG" />
+      </xsd:extension>
+    </xsd:complexContent>
+  </xsd:complexType>
+
+  <!-- ======================================================== -->
+  <!-- Specialized annotations attribute groups -->
+  <!-- ======================================================== -->
+
+  <xsd:attributeGroup name="FormatAG">
+    <xsd:attributeGroup ref="dfdl:ElementFormatSubsetAG" />
+    <xsd:attributeGroup ref="dfdl:GroupAG" />
+    <xsd:attributeGroup ref="dfdl:DocumentPropertiesAG" />
+  </xsd:attributeGroup>
+
+  <xsd:attributeGroup name="ElementFormatSubsetAG">
+    <xsd:attributeGroup ref="dfdl:SimpleTypeAG" />
+    <xsd:attributeGroup ref="dfdl:FloatingAG" />
+    <xsd:attributeGroup ref="dfdl:NillableAG" />
+    <xsd:attributeGroup ref="dfdl:DefaultValueControlAG" />
+    <xsd:attributeGroup ref="dfdl:OccursAG" />
+    <xsd:attributeGroup ref="dfdlx:RuntimePropertiesAG" />
+  </xsd:attributeGroup>
+  
+   <xsd:attributeGroup name="ElementAG">
+    <xsd:attributeGroup ref="dfdl:ElementFormatSubsetAG" />
+    <xsd:attributeGroup ref="dfdl:CalculatedValueAG" />
+  </xsd:attributeGroup>
+
+  <!-- dfdl:group takes the union of dfdl:sequence and dfdl:choice properties -->
+  <xsd:attributeGroup name="GroupAG">
+    <xsd:attributeGroup ref="dfdl:GroupCommonAG" />
+    <xsd:attributeGroup ref="dfdl:SequenceAG" />
+    <xsd:attributeGroup ref="dfdlx:ExtLayeringAGQualified" />
+    <xsd:attributeGroup ref="dfdl:ChoiceAG" />
+    <xsd:attributeGroup ref="dfdl:SeparatorAG" />
+  </xsd:attributeGroup>
+
+  <xsd:attributeGroup name="SimpleTypeAG">
+    <xsd:attributeGroup ref="dfdl:RepresentationAG" />
+    <xsd:attributeGroup ref="dfdl:NonGroupMarkupAG" />
+    <xsd:attributeGroup ref="dfdl:LengthAG" />
+    <xsd:attributeGroup ref="dfdl:SimpleTypesTextAG" />
+    <xsd:attributeGroup ref="dfdl:StringTextAG" />
+    <xsd:attributeGroup ref="dfdl:NumberAG" />
+    <xsd:attributeGroup ref="dfdl:NumberTextAG" />
+    <xsd:attributeGroup ref="dfdl:TextNumberFormatAG" />
+    <xsd:attributeGroup ref="dfdl:NumberBinaryAG" />
+    <xsd:attributeGroup ref="dfdl:FloatBinaryAG" />
+    <xsd:attributeGroup ref="dfdl:TextBidiSchemeAG" />
+    <xsd:attributeGroup ref="dfdl:CalendarTextAG" />
+    <xsd:attributeGroup ref="dfdl:CalendarBinaryAG" />
+    <xsd:attributeGroup ref="dfdl:CalendarFormatAG" />
+    <xsd:attributeGroup ref="dfdl:BooleanTextAG" />
+    <xsd:attributeGroup ref="dfdl:BooleanBinaryAG" />
+    <xsd:attributeGroup ref="dfdlx:SimpleTypeValueCalcAG" />
+    <xsd:attributeGroup ref="dfdlx:ObjectKindAG" />
+  </xsd:attributeGroup>
+
+</xsd:schema>
diff --git a/resources/xsd/XMLSchema_for_DFDL.xsd b/resources/xsd/XMLSchema_for_DFDL.xsd
new file mode 100644
index 0000000..0d070b1
--- /dev/null
+++ b/resources/xsd/XMLSchema_for_DFDL.xsd
@@ -0,0 +1,1801 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!--
+  Copyright © 2018 World Wide Web Consortium, (Massachusetts
+  Institute of Technology, European Research Consortium for Informatics and
+  Mathematics, Keio University, Beihang). All Rights Reserved. This work is
+  distributed under the W3C® Software License [1] in the hope that it will be
+  useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+  [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+-->
+
+<!-- 
+
+To get enforcement of the XML Schema Subset for DFDL, but at the 
+same time let users use the original XML Schema namespace URI, we
+give this schema the XML Schema URI as its namespace, and we use 
+this to validate when we load a DFDL Schema.
+
+ -->
+<!-- XML Schema schema for XML Schemas: Part 1: Structures -->
+<!-- Note this schema is NOT the normative structures schema. -->
+<!-- The prose copy in the structures REC is the normative -->
+<!-- version (which shouldn't differ from this one except for -->
+<!-- this comment and entity expansions, but just in case -->
+
+<xsd:schema  
+  targetNamespace="http://www.w3.org/2001/XMLSchema"
+  xmlns:xs="http://www.w3.org/2001/XMLSchema"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  blockDefault="#all" elementFormDefault="qualified" version="1.0"
+  xml:lang="EN" xmlns:xml="http://www.w3.org/XML/1998/namespace"
+  xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
+  xmlns:dfdl="http://www.ogf.org/dfdl/dfdl-1.0/"
+  xmlns:dfdlx="http://www.ogf.org/dfdl/dfdl-1.0/extensions">
+  <!-- Use the real URI for this, not the subset URI
+   "http://www.w3.org/2001/XMLSchema"
+  -->
+
+  <xsd:import namespace="http://www.ogf.org/dfdl/dfdl-1.0/"/>
+
+  <xsd:import namespace="http://www.ogf.org/dfdl/dfdl-1.0/extensions"/>
+
+  <xsd:import namespace="urn:ogf:dfdl:2013:imp:daffodil.apache.org:2018:int"/>
+
+  <xsd:annotation>
+    <xsd:documentation>
+      Part 1 version: Id: structures.xsd,v 1.2 2004/01/15 11:34:25 ht Exp
+      Part 2 version: Id: datatypes.xsd,v 1.3 2004/01/23 18:11:13 ht Exp
+    </xsd:documentation>
+  </xsd:annotation>
+
+  <xsd:annotation>
+    <xsd:documentation
+      source="http://www.w3.org/TR/2004/PER-xmlschema-1-20040318/structures.html">
+      The schema corresponding to this document is normative,
+      with respect to the syntactic constraints it expresses in the
+      XML Schema language. The documentation (within &lt;documentation>
+      elements)
+      below, is not normative, but rather highlights important aspects of
+      the W3C Recommendation of which this is a part
+    </xsd:documentation>
+  </xsd:annotation>
+
+  <xsd:annotation>
+    <xsd:documentation>
+      The simpleType element and all of its members are defined
+      towards the end
+      of this schema document
+    </xsd:documentation>
+  </xsd:annotation>
+
+  <xsd:import namespace="http://www.w3.org/XML/1998/namespace"
+    schemaLocation="./xml.xsd">
+    <xsd:annotation>
+      <xsd:documentation>
+        Get access to the xml: attribute groups for xml:lang
+        as declared on 'schema' and 'documentation' below
+      </xsd:documentation>
+    </xsd:annotation>
+  </xsd:import>
+
+  <xsd:complexType name="openAttrs">
+    <xsd:annotation>
+      <xsd:documentation>
+        This type is extended by almost all schema types
+        to allow attributes from other namespaces to be
+        added to user schemas.
+      </xsd:documentation>
+    </xsd:annotation>
+    <xsd:complexContent>
+      <xsd:restriction base="xsd:anyType">
+        <xsd:attributeGroup ref="xsd:anyOther" />
+      </xsd:restriction>
+    </xsd:complexContent>
+  </xsd:complexType>
+
+  <xsd:complexType name="annotated">
+    <xsd:annotation>
+      <xsd:documentation>
+        This type is extended by all types which allow annotation
+        other than &lt;schema&gt; itself
+      </xsd:documentation>
+    </xsd:annotation>
+    <xsd:complexContent>
+      <xsd:extension base="xsd:openAttrs">
+        <xsd:sequence>
+          <xsd:element ref="xsd:annotation" minOccurs="0" />
+        </xsd:sequence>
+        <xsd:attribute name="id" type="xsd:ID" />
+      </xsd:extension>
+    </xsd:complexContent>
+  </xsd:complexType>
+
+  <xsd:group name="schemaTop">
+    <xsd:annotation>
+      <xsd:documentation>
+        This group is for the
+        elements which occur freely at the top level of schemas.
+        All of their types are based on the "annotated" type by extension.
+      </xsd:documentation>
+    </xsd:annotation>
+    <xsd:choice>
+      <xsd:group ref="xsd:redefinable" />
+      <xsd:element ref="xsd:element" />
+      <!-- <xsd:element ref="xsd:attribute"/> -->
+      <!-- <xsd:element ref="xsd:notation"/> -->
+    </xsd:choice>
+  </xsd:group>
+
+  <xsd:group name="redefinable">
+    <xsd:annotation>
+      <xsd:documentation>
+        This group is for the
+        elements which can self-redefine (see &lt;redefine> below).
+      </xsd:documentation>
+    </xsd:annotation>
+    <xsd:choice>
+      <xsd:element ref="xsd:simpleType" />
+      <xsd:element ref="xsd:complexType" />
+      <xsd:element ref="xsd:group" />
+      <!-- <xsd:element ref="xsd:attributeGroup"/> -->
+    </xsd:choice>
+  </xsd:group>
+
+  <xsd:simpleType name="formChoice">
+    <xsd:annotation>
+      <xsd:documentation>
+        A utility type, not for public use
+      </xsd:documentation>
+    </xsd:annotation>
+    <xsd:restriction base="xsd:NMTOKEN">
+      <xsd:enumeration value="qualified" />
+      <xsd:enumeration value="unqualified" />
+    </xsd:restriction>
+  </xsd:simpleType>
+
+  <xsd:simpleType name="reducedDerivationControl">
+    <xsd:annotation>
+      <xsd:documentation>
+        A utility type, not for public use
+      </xsd:documentation>
+    </xsd:annotation>
+    <xsd:restriction base="xsd:derivationControl">
+      <!-- <xsd:enumeration value="extension"/> -->
+      <xsd:enumeration value="restriction" />
+    </xsd:restriction>
+  </xsd:simpleType>
+
+  <xsd:simpleType name="derivationSet">
+    <xsd:annotation>
+      <xsd:documentation>
+        A utility type, not for public use
+      </xsd:documentation>
+      <xsd:documentation>
+        #all or (possibly empty) subset of {extension, restriction}
+      </xsd:documentation>
+    </xsd:annotation>
+    <xsd:union>
+      <xsd:simpleType>
+        <xsd:restriction base="xsd:token">
+          <xsd:enumeration value="#all" />
+        </xsd:restriction>
+      </xsd:simpleType>
+      <xsd:simpleType>
+        <xsd:list itemType="xsd:reducedDerivationControl" />
+      </xsd:simpleType>
+    </xsd:union>
+  </xsd:simpleType>
+
+  <xsd:simpleType name="typeDerivationControl">
+    <xsd:annotation>
+      <xsd:documentation>
+        A utility type, not for public use
+      </xsd:documentation>
+    </xsd:annotation>
+    <xsd:restriction base="xsd:derivationControl">
+      <!-- <xsd:enumeration value="extension"/> -->
+      <xsd:enumeration value="restriction" />
+      <!-- <xsd:enumeration value="list"/> -->
+      <xsd:enumeration value="union" />
+    </xsd:restriction>
+  </xsd:simpleType>
+
+  <xsd:simpleType name="fullDerivationSet">
+    <xsd:annotation>
+      <xsd:documentation>
+        A utility type, not for public use
+      </xsd:documentation>
+      <xsd:documentation>
+        #all or (possibly empty) subset of {extension, restriction, list, union}
+      </xsd:documentation>
+    </xsd:annotation>
+    <xsd:union>
+      <xsd:simpleType>
+        <xsd:restriction base="xsd:token">
+          <xsd:enumeration value="#all" />
+        </xsd:restriction>
+      </xsd:simpleType>
+      <xsd:simpleType>
+        <xsd:list itemType="xsd:typeDerivationControl" />
+      </xsd:simpleType>
+    </xsd:union>
+  </xsd:simpleType>
+
+  <xsd:element name="schema" id="schema">
+    <xsd:annotation>
+      <xsd:documentation
+        source="http://www.w3.org/TR/xmlschema-1/#element-schema" />
+    </xsd:annotation>
+    <xsd:complexType>
+      <xsd:complexContent>
+        <xsd:extension base="xsd:openAttrs">
+          <xsd:sequence>
+            <xsd:choice minOccurs="0" maxOccurs="unbounded">
+              <xsd:element ref="xsd:include" />
+              <xsd:element ref="xsd:import" />
+              <!-- <xsd:element ref="xsd:redefine"/> -->
+              <xsd:element ref="xsd:annotation" />
+            </xsd:choice>
+            <xsd:sequence minOccurs="0" maxOccurs="unbounded">
+              <xsd:group ref="xsd:schemaTop" />
+              <xsd:element ref="xsd:annotation" minOccurs="0"
+                maxOccurs="unbounded" />
+            </xsd:sequence>
+          </xsd:sequence>
+          <xsd:attribute name="targetNamespace" type="xsd:anyURI" />
+          <xsd:attribute name="version" type="xsd:token" />
+          <!-- <xsd:attribute name="finalDefault" type="xsd:fullDerivationSet" 
+            use="optional" default=""/>
+            <xsd:attribute name="blockDefault" type="xsd:blockSet" use="optional" 
+            default=""/>
+          -->
+          <xsd:attribute name="attributeFormDefault" type="xsd:formChoice"
+            use="optional" default="unqualified" />
+          <xsd:attribute name="elementFormDefault" type="xsd:formChoice"
+            use="optional" default="unqualified" />
+          <xsd:attribute name="id" type="xsd:ID" />
+          <xsd:attribute ref="xml:lang" />
+        </xsd:extension>
+      </xsd:complexContent>
+    </xsd:complexType>
+
+    <xsd:key name="element">
+      <xsd:selector xpath="xsd:element" />
+      <xsd:field xpath="@name" />
+    </xsd:key>
+
+    <xsd:key name="attribute">
+      <xsd:selector xpath="xsd:attribute" />
+      <xsd:field xpath="@name" />
+    </xsd:key>
+
+    <xsd:key name="type">
+      <xsd:selector xpath="xsd:complexType|xsd:simpleType" />
+      <xsd:field xpath="@name" />
+    </xsd:key>
+
+    <xsd:key name="group">
+      <xsd:selector xpath="xsd:group" />
+      <xsd:field xpath="@name" />
+    </xsd:key>
+
+    <xsd:key name="attributeGroup">
+      <xsd:selector xpath="xsd:attributeGroup" />
+      <xsd:field xpath="@name" />
+    </xsd:key>
+
+    <!-- not in DFDL v1.0
+      <xsd:key name="notation">
+      <xsd:selector xpath="xsd:notation"/>
+      <xsd:field xpath="@name"/>
+      </xsd:key>
+
+
+      <xsd:key name="identityConstraint">
+      <xsd:selector xpath=".//xsd:key|.//xsd:unique|.//xsd:keyref"/>
+      <xsd:field xpath="@name"/>
+      </xsd:key>
+    -->
+  </xsd:element>
+
+  <xsd:simpleType name="allNNI">
+    <xsd:annotation>
+      <xsd:documentation>
+        for maxOccurs
+      </xsd:documentation>
+    </xsd:annotation>
+    <xsd:union memberTypes="xsd:nonNegativeInteger">
+      <xsd:simpleType>
+        <xsd:restriction base="xsd:NMTOKEN">
+          <xsd:enumeration value="unbounded" />
+        </xsd:restriction>
+      </xsd:simpleType>
+    </xsd:union>
+  </xsd:simpleType>
+
+  <xsd:attributeGroup name="occurs">
+    <xsd:annotation>
+      <xsd:documentation>
+        for all particles
+      </xsd:documentation>
+    </xsd:annotation>
+    <xsd:attribute name="minOccurs" type="xsd:nonNegativeInteger"
+      use="optional" default="1" />
+    <xsd:attribute name="maxOccurs" type="xsd:allNNI" use="optional"
+      default="1" />
+  </xsd:attributeGroup>
+
+  <xsd:attributeGroup name="defRef">
+    <xsd:annotation>
+      <xsd:documentation>
+        for element, group and attributeGroup,
+        which both define and reference
+      </xsd:documentation>
+    </xsd:annotation>
+    <xsd:attribute name="name" type="xsd:NCName" />
+    <xsd:attribute name="ref" type="xsd:QName" />
+  </xsd:attributeGroup>
+
+  <xsd:group name="typeDefParticle">
+    <xsd:annotation>
+      <xsd:documentation>
+        'complexType' uses this
+      </xsd:documentation>
+    </xsd:annotation>
+    <xsd:choice>
+      <xsd:element name="group" type="xsd:groupRef" />
+      <!-- <xsd:element ref="xsd:all"/> -->
+      <xsd:element ref="xsd:choice" />
+      <xsd:element ref="xsd:sequence" />
+    </xsd:choice>
+  </xsd:group>
+
+
+
+  <xsd:group name="nestedParticle">
+    <xsd:choice>
+      <xsd:element name="element" type="xsd:localElement" />
+      <xsd:element name="group" type="xsd:groupRef" />
+      <xsd:element ref="xsd:choice" />
+      <xsd:element ref="xsd:sequence" />
+      <!-- <xsd:element ref="xsd:any"/> -->
+    </xsd:choice>
+  </xsd:group>
+
+  <xsd:group name="particle">
+    <xsd:choice>
+      <xsd:element name="element" type="xsd:localElement" />
+      <xsd:element name="group" type="xsd:groupRef" />
+      <!-- <xsd:element ref="xsd:all"/> -->
+      <xsd:element ref="xsd:choice" />
+      <xsd:element ref="xsd:sequence" />
+      <!-- <xsd:element ref="xsd:any"/> -->
+    </xsd:choice>
+  </xsd:group>
+
+  <!-- No attributes in DFDL v1.0
+    <xsd:complexType name="attribute">
+    <xsd:complexContent>
+    <xsd:extension base="xsd:annotated">
+    <xsd:sequence>
+    <xsd:element name="simpleType" minOccurs="0" type="xsd:localSimpleType"/>
+    </xsd:sequence>
+    <xsd:attributeGroup ref="xsd:defRef"/>
+    <xsd:attribute name="type" type="xsd:QName"/>
+    <xsd:attribute name="use" use="optional" default="optional">
+    <xsd:simpleType>
+    <xsd:restriction base="xsd:NMTOKEN">
+    <xsd:enumeration value="prohibited"/>
+    <xsd:enumeration value="optional"/>
+    <xsd:enumeration value="required"/>
+    </xsd:restriction>
+    </xsd:simpleType>
+    </xsd:attribute>
+    <xsd:attribute name="default" type="xsd:string"/>
+    <xsd:attribute name="fixed" type="xsd:string"/>
+    <xsd:attribute name="form" type="xsd:formChoice"/>
+    </xsd:extension>
+    </xsd:complexContent>
+    </xsd:complexType>
+
+    <xsd:complexType name="topLevelAttribute">
+    <xsd:complexContent>
+    <xsd:restriction base="xsd:attribute">
+    <xsd:sequence>
+    <xsd:element ref="xsd:annotation" minOccurs="0"/>
+    <xsd:element name="simpleType" minOccurs="0" type="xsd:localSimpleType"/>
+    </xsd:sequence>
+    <xsd:attribute name="ref" use="prohibited"/>
+    <xsd:attribute name="form" use="prohibited"/>
+    <xsd:attribute name="use" use="prohibited"/>
+    <xsd:attribute name="name" use="required" type="xsd:NCName"/>
+    <xsd:attributeGroup ref="xsd:anyOther"/>
+    </xsd:restriction>
+    </xsd:complexContent>
+    </xsd:complexType>
+  -->
+
+  <!-- No attribute decls of any sort in DFDL v1.0
+    <xsd:group name="attrDecls">
+    <xsd:sequence>
+    <xsd:choice minOccurs="0" maxOccurs="unbounded">
+    <xsd:element name="attribute" type="xsd:attribute"/>
+    <xsd:element name="attributeGroup" type="xsd:attributeGroupRef"/>
+    </xsd:choice>
+    <xsd:element ref="xsd:anyAttribute" minOccurs="0"/>
+    </xsd:sequence>
+    </xsd:group>
+  -->
+  <!--
+    <xsd:element name="anyAttribute" type="xsd:wildcard" id="anyAttribute">
+    <xsd:annotation>
+    <xsd:documentation source="http://www.w3.org/TR/xmlschema-1/#element-anyAttribute"/>
+    </xsd:annotation>
+    </xsd:element>
+  -->
+  <xsd:group name="complexTypeModel">
+    <xsd:choice>
+      <!-- <xsd:element ref="xsd:simpleContent"/> Not DFDL v1.0 -->
+      <!-- <xsd:element ref="xsd:complexContent"/> Not DFDL v1.0 -->
+      <xsd:sequence>
+        <xsd:annotation>
+          <xsd:documentation>
+            This branch is short for
+            &lt;complexContent>
+            &lt;restriction base="xsd:anyType">
+            ...
+            &lt;/restriction>
+            &lt;/complexContent></xsd:documentation>
+        </xsd:annotation>
+        <xsd:group ref="xsd:typeDefParticle" minOccurs="0" />
+        <!-- <xsd:group ref="xsd:attrDecls"/> --> <!-- no attributes in DFDL -->
+      </xsd:sequence>
+    </xsd:choice>
+  </xsd:group>
+
+  <xsd:complexType name="complexType" abstract="true">
+    <xsd:complexContent>
+      <xsd:extension base="xsd:annotated">
+        <xsd:group ref="xsd:complexTypeModel" />
+        <xsd:attribute name="name" type="xsd:NCName">
+          <xsd:annotation>
+            <xsd:documentation>
+              Will be restricted to required or forbidden
+            </xsd:documentation>
+          </xsd:annotation>
+        </xsd:attribute>
+        <!-- No type derivation (for complex types in DFDL v1.0
+          <xsd:attribute name="mixed" type="xsd:boolean" use="optional" default="false">
+          <xsd:annotation>
+          <xsd:documentation>
+          Not allowed if simpleContent child is chosen.
+          May be overriden by setting on complexContent child.</xsd:documentation>
+          </xsd:annotation>
+          </xsd:attribute>
+        -->
+        <!-- none of these make sense in DFDL v1.0. Changed to "prohibited" -->
+        <xsd:attribute name="abstract" type="xsd:boolean"
+          use="prohibited" /> <!-- default="false" -->
+        <xsd:attribute name="final" type="xsd:derivationSet"
+          use="prohibited" />
+        <xsd:attribute name="block" type="xsd:derivationSet"
+          use="prohibited" />
+      </xsd:extension>
+    </xsd:complexContent>
+  </xsd:complexType>
+
+
+  <!--
+    <xsd:complexType name="restrictionType">
+    <xsd:complexContent>
+    <xsd:extension base="xsd:annotated">
+    <xsd:sequence>
+    <xsd:choice minOccurs="0">
+    <xsd:group ref="xsd:typeDefParticle"/>
+    <xsd:group ref="xsd:simpleRestrictionModel"/>
+    </xsd:choice>
+    <xsd:group ref="xsd:attrDecls"/>
+    </xsd:sequence>
+    <xsd:attribute name="base" type="xsd:QName" use="required"/>
+    </xsd:extension>
+    </xsd:complexContent>
+    </xsd:complexType>
+
+
+
+    <xsd:complexType name="extensionType">
+    <xsd:complexContent>
+    <xsd:extension base="xsd:annotated">
+    <xsd:sequence>
+    <xsd:group ref="xsd:typeDefParticle" minOccurs="0"/>
+    <xsd:group ref="xsd:attrDecls"/>
+    </xsd:sequence>
+    <xsd:attribute name="base" type="xsd:QName" use="required"/>
+    </xsd:extension>
+    </xsd:complexContent>
+    </xsd:complexType>
+  -->
+
+
+  <!--
+    <xsd:complexType name="simpleExtensionType">
+    <xsd:complexContent>
+    <xsd:restriction base="xsd:extensionType">
+    <xsd:sequence>
+    <xsd:annotation>
+    <xsd:documentation>
+    No typeDefParticle group reference</xsd:documentation>
+    </xsd:annotation>
+    <xsd:element ref="xsd:annotation" minOccurs="0"/>
+    <xsd:group ref="xsd:attrDecls"/>
+    </xsd:sequence>
+    <xsd:attributeGroup ref="xsd:anyOther"/>
+    </xsd:restriction>
+    </xsd:complexContent>
+    </xsd:complexType>
+
+
+    <xsd:element name="simpleContent" id="simpleContent">
+    <xsd:annotation>
+    <xsd:documentation source="http://www.w3.org/TR/xmlschema-1/#element-simpleContent"/>
+    </xsd:annotation>
+    <xsd:complexType>
+    <xsd:complexContent>
+    <xsd:extension base="xsd:annotated">
+    <xsd:choice>
+    <xsd:element name="restriction" type="xsd:simpleRestrictionType"/>
+    <xsd:element name="extension" type="xsd:simpleExtensionType"/>
+    </xsd:choice>
+    </xsd:extension>
+    </xsd:complexContent>
+    </xsd:complexType>
+    </xsd:element>
+  -->
+
+  <xsd:attributeGroup name="anyOther">
+    <!--
+    IBM's DFDL Schemas have ibm-specific attributes on them that we 
+    need to tolerate. Users may want to decorate their DFDL schemas with
+    other non-native and non-DFDL attributes and annotation sub-elements.
+    
+    The default XSD behavior (commented out below) is to allow any additional
+    attributes on a schema by performing lax validation on anything not in the
+    XSD namespace.
+    
+    The problem: since DFDL short form properties are not in the XSD namespace,
+    they are not validated. This means common typographical errors or forgetting
+    the dfdl: prefix are often not caught.
+
+    So instead, we reference an attributeGroup that has the same anyAttribute line,
+    but is in a schema with a dfdl target namespace. This means we will perform lax
+    validation for attributes not in the dfdl namespace, but all dfdl properties
+    will be strictly validated.
+    -->
+    <!-- <xsd:anyAttribute namespace="##other" processContents="lax"/> -->
+    <xsd:attributeGroup ref="dfdl:anyOther" />
+  </xsd:attributeGroup>
+
+  <xsd:complexType name="topLevelComplexType">
+    <xsd:complexContent>
+      <xsd:restriction base="xsd:complexType">
+        <xsd:sequence>
+          <xsd:element ref="xsd:annotation" minOccurs="0" />
+          <xsd:group ref="xsd:complexTypeModel" />
+        </xsd:sequence>
+        <xsd:attribute name="name" type="xsd:NCName" use="required" />
+        <xsd:attributeGroup ref="xsd:anyOther" />
+      </xsd:restriction>
+    </xsd:complexContent>
+  </xsd:complexType>
+
+  <xsd:complexType name="localComplexType">
+    <xsd:complexContent>
+      <xsd:restriction base="xsd:complexType">
+        <xsd:sequence>
+          <xsd:element ref="xsd:annotation" minOccurs="0" />
+          <xsd:group ref="xsd:complexTypeModel" />
+        </xsd:sequence>
+        <xsd:attribute name="name" use="prohibited" />
+        <xsd:attribute name="abstract" use="prohibited" />
+        <xsd:attribute name="final" use="prohibited" />
+        <xsd:attribute name="block" use="prohibited" />
+        <xsd:attributeGroup ref="xsd:anyOther" />
+      </xsd:restriction>
+    </xsd:complexContent>
+  </xsd:complexType>
+
+
+  <!--
+    <xsd:complexType name="complexRestrictionType">
+    <xsd:complexContent>
+    <xsd:restriction base="xsd:restrictionType">
+    <xsd:sequence>
+    <xsd:element ref="xsd:annotation" minOccurs="0"/>
+    <xsd:choice minOccurs="0">
+    <xsd:annotation>
+    <xsd:documentation>This choice is added simply to
+    make this a valid restriction per the REC</xsd:documentation>
+    </xsd:annotation>
+    <xsd:group ref="xsd:typeDefParticle"/>
+    </xsd:choice>
+    <xsd:group ref="xsd:attrDecls"/>
+    </xsd:sequence>
+    <xsd:attributeGroup ref="xsd:anyOther"/>
+    </xsd:restriction>
+    </xsd:complexContent>
+    </xsd:complexType>
+  -->
+
+  <!--
+    <xsd:element name="complexContent" id="complexContent">
+    <xsd:annotation>
+    <xsd:documentation source="http://www.w3.org/TR/xmlschema-1/#element-complexContent"/>
+    </xsd:annotation>
+    <xsd:complexType>
+    <xsd:complexContent>
+    <xsd:extension base="xsd:annotated">
+
+    <xsd:choice>
+    <xsd:element name="restriction" type="xsd:complexRestrictionType"/>
+    <xsd:element name="extension" type="xsd:extensionType"/>
+    </xsd:choice>
+
+    No mixed content in DFDL v1.0
+    <xsd:attribute name="mixed" type="xsd:boolean">
+    <xsd:annotation>
+    <xsd:documentation>
+    Overrides any setting on complexType parent.</xsd:documentation>
+    </xsd:annotation>
+    </xsd:attribute>
+
+    </xsd:extension>
+    </xsd:complexContent>
+    </xsd:complexType>
+    </xsd:element>
+  -->
+  <!--
+    <xsd:complexType name="simpleRestrictionType">
+    <xsd:complexContent>
+    <xsd:restriction base="xsd:restrictionType">
+    <xsd:sequence>
+    <xsd:element ref="xsd:annotation" minOccurs="0"/>
+    <xsd:choice minOccurs="0">
+    <xsd:annotation>
+    <xsd:documentation>This choice is added simply to
+    make this a valid restriction per the REC</xsd:documentation>
+    </xsd:annotation>
+    <xsd:group ref="xsd:simpleRestrictionModel"/>
+    </xsd:choice>
+    <xsd:group ref="xsd:attrDecls"/>
+    </xsd:sequence>
+    <xsd:attributeGroup ref="xsd:anyOther"/>
+    </xsd:restriction>
+    </xsd:complexContent>
+    </xsd:complexType>
+  -->
+
+  <xsd:element name="complexType" type="xsd:topLevelComplexType"
+    id="complexType">
+    <xsd:annotation>
+      <xsd:documentation
+        source="http://www.w3.org/TR/xmlschema-1/#element-complexType" />
+    </xsd:annotation>
+  </xsd:element>
+
+  <xsd:simpleType name="__blockSet">
+    <xsd:annotation>
+      <xsd:documentation>
+        A utility type, not for public use
+      </xsd:documentation>
+      <xsd:documentation>
+        #all or (possibly empty) subset of {substitution, extension,
+        restriction}
+      </xsd:documentation>
+    </xsd:annotation>
+    <xsd:union>
+      <xsd:simpleType>
+        <xsd:restriction base="xsd:token">
+          <xsd:enumeration value="#all" />
+        </xsd:restriction>
+      </xsd:simpleType>
+      <xsd:simpleType>
+        <xsd:list>
+          <xsd:simpleType>
+            <xsd:restriction base="xsd:derivationControl">
+              <!-- <xsd:enumeration value="extension"/> -->
+              <xsd:enumeration value="restriction" />
+              <!-- <xsd:enumeration value="substitution"/> -->
+            </xsd:restriction>
+          </xsd:simpleType>
+        </xsd:list>
+      </xsd:simpleType>
+    </xsd:union>
+  </xsd:simpleType>
+
+  <xsd:complexType name="element" abstract="true">
+    <xsd:annotation>
+      <xsd:documentation>
+        The element element can be used either
+        at the top level to define an element-type binding globally,
+        or within a content model to either reference a globally-defined
+        element or type or declare an element-type binding locally.
+        The ref form is not allowed at the top level.
+      </xsd:documentation>
+    </xsd:annotation>
+
+    <xsd:complexContent>
+      <xsd:extension base="xsd:annotated">
+        <xsd:sequence>
+          <xsd:choice minOccurs="0" maxOccurs="1">
+            <xsd:element name="simpleType" type="xsd:localSimpleType" />
+            <xsd:element name="complexType" type="xsd:localComplexType" />
+          </xsd:choice>
+          <!-- <xsd:group ref="xsd:identityConstraint" minOccurs="0" maxOccurs="unbounded"/> 
+            Not in DFDL v1.0 -->
+        </xsd:sequence>
+        <xsd:attributeGroup ref="xsd:defRef" />
+        <xsd:attribute name="type" type="xsd:QName" />
+        <!-- <xsd:attribute name="substitutionGroup" type="xsd:QName"/> Not 
+          in DFDL v1.0 -->
+        <xsd:attributeGroup ref="xsd:occurs" />
+        <xsd:attribute name="default" type="xsd:string" />
+        <xsd:attribute name="fixed" type="xsd:string" />
+        <!-- remove default="false" because Xerces is inserting that
+        as part of its parsing, and that ends up being incorrect since
+        element references cannot have nillable -->
+        <xsd:attribute name="nillable" type="xsd:boolean" />
+        <!-- Not in DFDL v1.0
+          <xsd:attribute name="abstract" type="xsd:boolean" use="optional" 
+          default="false"/>
+          <xsd:attribute name="final" type="xsd:derivationSet"/>
+          <xsd:attribute name="block" type="xsd:blockSet"/>
+          <xsd:attribute name="form" type="xsd:formChoice"/>
+        -->
+        <!--
+          Include short-form DFDL Attributes.
+        -->
+        <xsd:attributeGroup ref="dfdl:BaseAGQualified" />
+        <xsd:attributeGroup ref="dfdl:CommonAGQualified" />
+        <xsd:attributeGroup ref="dfdl:AlignmentAGQualified" />
+        <xsd:attributeGroup ref="dfdl:MarkupAGQualified" />
+        <xsd:attributeGroup ref="dfdl:ElementAGQualified" />
+
+      </xsd:extension>
+    </xsd:complexContent>
+  </xsd:complexType>
+
+  <xsd:complexType name="topLevelElement">
+    <xsd:complexContent>
+      <xsd:restriction base="xsd:element">
+        <xsd:sequence>
+          <xsd:element ref="xsd:annotation" minOccurs="0" />
+          <xsd:choice minOccurs="0">
+            <xsd:element name="simpleType" type="xsd:localSimpleType" />
+            <xsd:element name="complexType" type="xsd:localComplexType" />
+          </xsd:choice>
+          <!-- <xsd:group ref="xsd:identityConstraint" minOccurs="0" maxOccurs="unbounded"/> 
+            Not in DFDL v1.0 -->
+        </xsd:sequence>
+        <xsd:attribute name="ref" use="prohibited" />
+        <xsd:attribute name="form" use="prohibited" />
+        <xsd:attribute name="minOccurs" use="prohibited" />
+        <xsd:attribute name="maxOccurs" use="prohibited" />
+        <xsd:attribute name="name" use="required" type="xsd:NCName" />
+        <xsd:attributeGroup ref="xsd:anyOther" />
+
+      </xsd:restriction>
+    </xsd:complexContent>
+  </xsd:complexType>
+
+  <xsd:complexType name="localElement">
+    <xsd:complexContent>
+      <xsd:restriction base="xsd:element">
+        <xsd:sequence>
+          <xsd:element ref="xsd:annotation" minOccurs="0" />
+          <xsd:choice minOccurs="0">
+            <xsd:element name="simpleType" type="xsd:localSimpleType" />
+            <xsd:element name="complexType" type="xsd:localComplexType" />
+          </xsd:choice>
+          <!-- <xsd:group ref="xsd:identityConstraint" minOccurs="0" maxOccurs="unbounded"/> 
+            Not in DFDL v1.0 -->
+        </xsd:sequence>
+        <xsd:attribute name="substitutionGroup" use="prohibited" />
+        <xsd:attribute name="final" use="prohibited" />
+        <xsd:attribute name="abstract" use="prohibited" />
+        <xsd:attributeGroup ref="xsd:anyOther" />
+      </xsd:restriction>
+    </xsd:complexContent>
+  </xsd:complexType>
+
+  <xsd:element name="element" type="xsd:topLevelElement" id="element">
+    <xsd:annotation>
+      <xsd:documentation
+        source="http://www.w3.org/TR/xmlschema-1/#element-element" />
+    </xsd:annotation>
+  </xsd:element>
+
+  <xsd:complexType name="group" abstract="true">
+    <xsd:annotation>
+      <xsd:documentation>
+        group type for explicit groups, named top-level groups and
+        group references
+      </xsd:documentation>
+    </xsd:annotation>
+    <xsd:complexContent>
+      <xsd:extension base="xsd:annotated">
+        <xsd:group ref="xsd:particle" minOccurs="0" maxOccurs="unbounded" />
+        <xsd:attributeGroup ref="xsd:defRef" />
+        <!-- No Occurs except on elements in DFDL v1.0
+          <xsd:attributeGroup ref="xsd:occurs"/>
+        -->
+      </xsd:extension>
+    </xsd:complexContent>
+  </xsd:complexType>
+
+  <xsd:complexType name="realGroup">
+    <xsd:complexContent>
+      <xsd:restriction base="xsd:group">
+        <xsd:sequence>
+          <xsd:element ref="xsd:annotation" minOccurs="0" />
+          <xsd:choice minOccurs="0" maxOccurs="1">
+            <xsd:element ref="xsd:choice" />
+            <xsd:element ref="xsd:sequence" />
+          </xsd:choice>
+        </xsd:sequence>
+        <xsd:attributeGroup ref="xsd:anyOther" />
+      </xsd:restriction>
+    </xsd:complexContent>
+  </xsd:complexType>
+
+  <xsd:complexType name="namedGroup">
+    <xsd:complexContent>
+      <xsd:extension base="xsd:realGroup">
+        <!-- <xsd:attribute name="name" use="required" type="xsd:NCName"/> -->
+        <xsd:attribute name="ref" use="prohibited" />
+        <xsd:attribute name="minOccurs" use="prohibited" />
+        <xsd:attribute name="maxOccurs" use="prohibited" />
+        <xsd:attributeGroup ref="xsd:anyOther" />
+      </xsd:extension>
+    </xsd:complexContent>
+  </xsd:complexType>
+
+  <xsd:complexType name="groupRef">
+    <xsd:complexContent>
+      <xsd:extension base="xsd:annotated">
+        <xsd:attribute name="ref" use="required" type="xsd:QName" />
+        <xsd:attribute name="name" use="prohibited" />
+        <xsd:attributeGroup ref="xsd:anyOther" />
+
+        <!-- DFDL -->
+
+        <xsd:attributeGroup ref="dfdl:BaseAGQualified" />
+        <xsd:attributeGroup ref="dfdl:CommonAGQualified" />
+        <xsd:attributeGroup ref="dfdl:AlignmentAGQualified" />
+        <xsd:attributeGroup ref="dfdl:MarkupAGQualified" />
+        <xsd:attributeGroup ref="dfdl:GroupAGQualified" />
+
+      </xsd:extension>
+    </xsd:complexContent>
+  </xsd:complexType>
+
+  <xsd:complexType name="explicitGroup">
+    <xsd:annotation>
+      <xsd:documentation>
+        group type for the three kinds of group
+      </xsd:documentation>
+    </xsd:annotation>
+    <xsd:sequence>
+      <xsd:element ref="xsd:annotation" minOccurs="0" />
+      <xsd:group ref="xsd:nestedParticle" minOccurs="0"
+        maxOccurs="unbounded" />
+    </xsd:sequence>
+    <xsd:attributeGroup ref="xsd:anyOther" />
+
+    <!-- DFDL attributes for short form -->
+    <xsd:attributeGroup ref="dfdl:BaseAGQualified" />
+    <xsd:attributeGroup ref="dfdl:CommonAGQualified" />
+    <xsd:attributeGroup ref="dfdl:AlignmentAGQualified" />
+    <xsd:attributeGroup ref="dfdl:MarkupAGQualified" />
+    <xsd:attributeGroup ref="dfdl:GroupCommonAGQualified" />
+  </xsd:complexType>
+
+  <xsd:complexType name="simpleExplicitGroup">
+    <xsd:complexContent>
+      <xsd:restriction base="xsd:explicitGroup">
+        <xsd:sequence>
+          <xsd:element ref="xsd:annotation" minOccurs="0" />
+          <xsd:group ref="xsd:nestedParticle" minOccurs="0"
+            maxOccurs="unbounded" />
+        </xsd:sequence>
+        <xsd:attribute name="minOccurs" use="prohibited" />
+        <xsd:attribute name="maxOccurs" use="prohibited" />
+        <xsd:attributeGroup ref="xsd:anyOther" />
+      </xsd:restriction>
+    </xsd:complexContent>
+  </xsd:complexType>
+
+  <!-- No ALL groups in DFDL v1.0
+    <xsd:group name="allModel">
+    <xsd:sequence>
+    <xsd:element ref="xsd:annotation" minOccurs="0"/>
+    <xsd:choice minOccurs="0" maxOccurs="unbounded">
+    <xsd:annotation>
+    <xsd:documentation>This choice with min/max is here to
+    avoid a pblm with the Elt:All/Choice/Seq
+    Particle derivation constraint</xsd:documentation>
+    </xsd:annotation>
+    <xsd:element name="element" type="xsd:narrowMaxMin"/>
+    </xsd:choice>
+    </xsd:sequence>
+    </xsd:group>
+  -->
+
+  <xsd:complexType name="narrowMaxMin">
+    <xsd:annotation>
+      <xsd:documentation>restricted max/min</xsd:documentation>
+    </xsd:annotation>
+    <xsd:complexContent>
+      <xsd:restriction base="xsd:localElement">
+        <xsd:sequence>
+          <xsd:element ref="xsd:annotation" minOccurs="0" />
+          <xsd:choice minOccurs="0">
+            <xsd:element name="simpleType" type="xsd:localSimpleType" />
+            <xsd:element name="complexType" type="xsd:localComplexType" />
+          </xsd:choice>
+          <!-- <xsd:group ref="xsd:identityConstraint" minOccurs="0" maxOccurs="unbounded"/> 
+            Not in DFDL v1.0 -->
+        </xsd:sequence>
+        <xsd:attribute name="minOccurs" use="optional"
+          default="1">
+          <xsd:simpleType>
+            <xsd:restriction base="xsd:nonNegativeInteger">
+              <xsd:enumeration value="0" />
+              <xsd:enumeration value="1" />
+            </xsd:restriction>
+          </xsd:simpleType>
+        </xsd:attribute>
+        <xsd:attribute name="maxOccurs" use="optional"
+          default="1">
+          <xsd:simpleType>
+            <xsd:restriction base="xsd:allNNI">
+              <xsd:enumeration value="0" />
+              <xsd:enumeration value="1" />
+            </xsd:restriction>
+          </xsd:simpleType>
+        </xsd:attribute>
+        <xsd:attributeGroup ref="xsd:anyOther" />
+      </xsd:restriction>
+    </xsd:complexContent>
+  </xsd:complexType>
+
+  <xsd:complexType name="explicitChoiceGroup">
+    <xsd:complexContent>
+      <xsd:extension base="xsd:explicitGroup">
+        <!-- DFDL -->
+        <xsd:attributeGroup ref="dfdl:ChoiceAGQualified" />
+      </xsd:extension>
+    </xsd:complexContent>
+  </xsd:complexType>
+
+  <xsd:element name="choice" type="xsd:explicitChoiceGroup"
+    id="choice">
+    <xsd:annotation>
+      <xsd:documentation
+        source="http://www.w3.org/TR/xmlschema-1/#element-choice" />
+    </xsd:annotation>
+  </xsd:element>
+
+  <xsd:complexType name="explicitSequenceGroup">
+    <xsd:complexContent>
+      <xsd:extension base="xsd:explicitGroup">
+        <!-- DFDL -->
+        <xsd:attributeGroup ref="dfdl:SequenceAGQualified" />
+        <xsd:attributeGroup ref="dfdl:SeparatorAGQualified" />
+      </xsd:extension>
+    </xsd:complexContent>
+  </xsd:complexType>
+
+  <xsd:element name="sequence" type="xsd:explicitSequenceGroup"
+    id="sequence">
+    <xsd:annotation>
+      <xsd:documentation
+        source="http://www.w3.org/TR/xmlschema-1/#element-sequence" />
+    </xsd:annotation>
+  </xsd:element>
+
+  <xsd:element name="group" type="xsd:namedGroup" id="group">
+    <xsd:annotation>
+      <xsd:documentation
+        source="http://www.w3.org/TR/xmlschema-1/#element-group" />
+    </xsd:annotation>
+  </xsd:element>
+
+  <!-- <xsd:complexType name="wildcard">
+    <xsd:complexContent>
+    <xsd:extension base="xsd:annotated">
+    <xsd:attribute name="namespace" type="xsd:namespaceList" use="optional" 
+    default="##any"/>
+  -->
+  <!-- Chapter 21: processContents not allowed in v1
+    <xsd:attribute name="processContents" use="optional" default="strict">
+    <xsd:simpleType>
+    <xsd:restriction base="xsd:NMTOKEN">
+    <xsd:enumeration value="skip"/>
+    <xsd:enumeration value="lax"/>
+    <xsd:enumeration value="strict"/>
+    </xsd:restriction>
+    </xsd:simpleType>
+    </xsd:attribute>
+  --> <!--
+    </xsd:extension>
+    </xsd:complexContent>
+    </xsd:complexType>
+  -->
+  <!-- No ANY wildcards in DFDL v1.0
+    <xsd:element name="any" id="any">
+    <xsd:annotation>
+    <xsd:documentation source="http://www.w3.org/TR/xmlschema-1/#element-any"/>
+    </xsd:annotation>
+    <xsd:complexType>
+    <xsd:complexContent>
+    <xsd:extension base="xsd:wildcard">
+    <xsd:attributeGroup ref="xsd:occurs"/>
+    <xsd:attributeGroup ref="xsd:anyOther"/>
+    </xsd:extension>
+    </xsd:complexContent>
+    </xsd:complexType>
+    </xsd:element>
+  -->
+  <!--
+    <xsd:annotation>
+    <xsd:documentation>
+    simple type for the value of the 'namespace' attr of
+    'any' and 'anyAttribute'</xsd:documentation>
+    </xsd:annotation>
+    <xsd:annotation>
+    <xsd:documentation>
+    Value is
+    ##any - - any non-conflicting WFXML/attribute at all
+
+    ##other - - any non-conflicting WFXML/attribute from
+    namespace other than targetNS
+
+    ##local - - any unqualified non-conflicting WFXML/attribute
+
+    one or - - any non-conflicting WFXML/attribute from
+    more URI the listed namespaces
+    references
+    (space separated)
+
+    ##targetNamespace or ##local may appear in the above list, to
+    refer to the targetNamespace of the enclosing
+    schema or an absent targetNamespace respectively</xsd:documentation>
+    </xsd:annotation>
+
+    <xsd:simpleType name="namespaceList">
+    <xsd:annotation>
+    <xsd:documentation>
+    A utility type, not for public use</xsd:documentation>
+    </xsd:annotation>
+    <xsd:union>
+    <xsd:simpleType>
+    <xsd:restriction base="xsd:token">
+    <xsd:enumeration value="##any"/>
+    <xsd:enumeration value="##other"/>
+    </xsd:restriction>
+    </xsd:simpleType>
+    <xsd:simpleType>
+    <xsd:list>
+    <xsd:simpleType>
+    <xsd:union memberTypes="xsd:anyURI">
+    <xsd:simpleType>
+    <xsd:restriction base="xsd:token">
+    <xsd:enumeration value="##targetNamespace"/>
+    <xsd:enumeration value="##local"/>
+    </xsd:restriction>
+    </xsd:simpleType>
+    </xsd:union>
+    </xsd:simpleType>
+    </xsd:list>
+    </xsd:simpleType>
+    </xsd:union>
+    </xsd:simpleType>
+  -->
+  <!--
+    <xsd:element name="attribute" type="xsd:topLevelAttribute" id="attribute">
+    <xsd:annotation>
+    <xsd:documentation source="http://www.w3.org/TR/xmlschema-1/#element-attribute"/>
+    </xsd:annotation>
+    </xsd:element>
+
+    <xsd:complexType name="attributeGroup" abstract="true">
+    <xsd:complexContent>
+    <xsd:extension base="xsd:annotated">
+    <xsd:group ref="xsd:attrDecls"/>
+    <xsd:attributeGroup ref="xsd:defRef"/>
+    </xsd:extension>
+    </xsd:complexContent>
+    </xsd:complexType>
+
+    <xsd:complexType name="namedAttributeGroup">
+    <xsd:complexContent>
+    <xsd:restriction base="xsd:attributeGroup">
+    <xsd:sequence>
+    <xsd:element ref="xsd:annotation" minOccurs="0"/>
+    <xsd:group ref="xsd:attrDecls"/>
+    </xsd:sequence>
+    <xsd:attribute name="name" use="required" type="xsd:NCName"/>
+    <xsd:attribute name="ref" use="prohibited"/>
+    <xsd:attributeGroup ref="xsd:anyOther"/>
+    </xsd:restriction>
+    </xsd:complexContent>
+    </xsd:complexType>
+
+    <xsd:complexType name="attributeGroupRef">
+    <xsd:complexContent>
+    <xsd:restriction base="xsd:attributeGroup">
+    <xsd:sequence>
+    <xsd:element ref="xsd:annotation" minOccurs="0"/>
+    </xsd:sequence>
+    <xsd:attribute name="ref" use="required" type="xsd:QName"/>
+    <xsd:attribute name="name" use="prohibited"/>
+    <xsd:attributeGroup ref="xsd:anyOther"/>
+    </xsd:restriction>
+    </xsd:complexContent>
+    </xsd:complexType>
+
+    <xsd:element name="attributeGroup" type="xsd:namedAttributeGroup" id="attributeGroup">
+    <xsd:annotation>
+    <xsd:documentation source="http://www.w3.org/TR/xmlschema-1/#element-attributeGroup"/>
+    </xsd:annotation>
+    </xsd:element>
+  -->
+
+  <xsd:element name="include" id="include">
+    <xsd:annotation>
+      <xsd:documentation
+        source="http://www.w3.org/TR/xmlschema-1/#element-include" />
+    </xsd:annotation>
+    <xsd:complexType>
+      <xsd:complexContent>
+        <xsd:extension base="xsd:annotated">
+          <xsd:attribute name="schemaLocation" type="xsd:anyURI"
+            use="required" />
+        </xsd:extension>
+      </xsd:complexContent>
+    </xsd:complexType>
+  </xsd:element>
+
+  <!--
+    <xsd:element name="redefine" id="redefine">
+    <xsd:annotation>
+    <xsd:documentation source="http://www.w3.org/TR/xmlschema-1/#element-redefine"/>
+    </xsd:annotation>
+    <xsd:complexType>
+    <xsd:complexContent>
+    <xsd:extension base="xsd:openAttrs">
+    <xsd:choice minOccurs="0" maxOccurs="unbounded">
+    <xsd:element ref="xsd:annotation"/>
+    <xsd:group ref="xsd:redefinable"/>
+    </xsd:choice>
+    <xsd:attribute name="schemaLocation" type="xsd:anyURI" use="required"/>
+    <xsd:attribute name="id" type="xsd:ID"/>
+    </xsd:extension>
+    </xsd:complexContent>
+    </xsd:complexType>
+    </xsd:element>
+  -->
+
+  <xsd:element name="import" id="import">
+    <xsd:annotation>
+      <xsd:documentation
+        source="http://www.w3.org/TR/xmlschema-1/#element-import" />
+    </xsd:annotation>
+    <xsd:complexType>
+      <xsd:complexContent>
+        <xsd:extension base="xsd:annotated">
+          <xsd:attribute name="namespace" type="xsd:anyURI" />
+          <xsd:attribute name="schemaLocation" type="xsd:anyURI" />
+        </xsd:extension>
+      </xsd:complexContent>
+    </xsd:complexType>
+  </xsd:element>
+
+  <!--
+    <xsd:element name="__selector" id="selector">
+    <xsd:annotation>
+    <xsd:documentation source="http://www.w3.org/TR/xmlschema-1/#element-selector"/>
+    </xsd:annotation>
+    <xsd:complexType>
+    <xsd:complexContent>
+    <xsd:extension base="xsd:annotated">
+    <xsd:attribute name="xpath" use="required">
+    <xsd:simpleType>
+    <xsd:annotation>
+    <xsd:documentation>A subset of XPath expressions for use
+    in selectors</xsd:documentation>
+    <xsd:documentation>A utility type, not for public
+    use</xsd:documentation>
+    </xsd:annotation>
+    <xsd:restriction base="xsd:token">
+    <xsd:annotation>
+    <xsd:documentation>The following pattern is intended to allow XPath
+    expressions per the following EBNF:
+    Selector ::= Path ( '|' Path )*
+    Path ::= ('.//')? Step ( '/' Step )*
+    Step ::= '.' | NameTest
+    NameTest ::= QName | '*' | NCName ':' '*'
+    child:: is also allowed
+    </xsd:documentation>
+    </xsd:annotation>
+    <xsd:pattern value="(\.//)?(((child::)?((\i\c*:)?(\i\c*|\*)))|\.)(/(((child::)?((\i\c*:)?(\i\c*|\*)))|\.))*(\|(\.//)?(((child::)?((\i\c*:)?(\i\c*|\*)))|\.)(/(((child::)?((\i\c*:)?(\i\c*|\*)))|\.))*)*">
+    </xsd:pattern>
+    </xsd:restriction>
+    </xsd:simpleType>
+    </xsd:attribute>
+    </xsd:extension>
+    </xsd:complexContent>
+    </xsd:complexType>
+    </xsd:element>
+
+    <xsd:element name="__field" id="field">
+    <xsd:annotation>
+    <xsd:documentation source="http://www.w3.org/TR/xmlschema-1/#element-field"/>
+    </xsd:annotation>
+    <xsd:complexType>
+    <xsd:complexContent>
+    <xsd:extension base="xsd:annotated">
+    <xsd:attribute name="xpath" use="required">
+    <xsd:simpleType>
+    <xsd:annotation>
+    <xsd:documentation>A subset of XPath expressions for use
+    in fields</xsd:documentation>
+    <xsd:documentation>A utility type, not for public
+    use</xsd:documentation>
+    </xsd:annotation>
+    <xsd:restriction base="xsd:token">
+    <xsd:annotation>
+    <xsd:documentation>The following pattern is intended to allow XPath
+    expressions per the same EBNF as for selector,
+    with the following change:
+    Path ::= ('.//')? ( Step '/' )* ( Step | '@' NameTest )
+    </xsd:documentation>
+    </xsd:annotation>
+    <xsd:pattern value="(\.//)?((((child::)?((\i\c*:)?(\i\c*|\*)))|\.)/)*((((child::)?((\i\c*:)?(\i\c*|\*)))|\.)|((attribute::|@)((\i\c*:)?(\i\c*|\*))))(\|(\.//)?((((child::)?((\i\c*:)?(\i\c*|\*)))|\.)/)*((((child::)?((\i\c*:)?(\i\c*|\*)))|\.)|((attribute::|@)((\i\c*:)?(\i\c*|\*)))))*">
+    </xsd:pattern>
+    </xsd:restriction>
+    </xsd:simpleType>
+    </xsd:attribute>
+    </xsd:extension>
+    </xsd:complexContent>
+    </xsd:complexType>
+    </xsd:element>
+
+    <xsd:complexType name="__keybase">
+    <xsd:complexContent>
+    <xsd:extension base="xsd:annotated">
+    <xsd:sequence>
+    <xsd:element ref="xsd:selector"/>
+    <xsd:element ref="xsd:field" minOccurs="1" maxOccurs="unbounded"/>
+    </xsd:sequence>
+    <xsd:attribute name="name" type="xsd:NCName" use="required"/>
+    </xsd:extension>
+    </xsd:complexContent>
+    </xsd:complexType>
+
+    <xsd:group name="__identityConstraint">
+    <xsd:annotation>
+    <xsd:documentation>The three kinds of identity constraints, all with
+    type of or derived from 'keybase'.
+    </xsd:documentation>
+    </xsd:annotation>
+    <xsd:choice>
+    <xsd:element ref="xsd:unique"/>
+    <xsd:element ref="xsd:key"/>
+    <xsd:element ref="xsd:keyref"/>
+    </xsd:choice>
+    </xsd:group>
+
+    <xsd:element name="__unique" type="xsd:keybase" id="unique">
+    <xsd:annotation>
+    <xsd:documentation source="http://www.w3.org/TR/xmlschema-1/#element-unique"/>
+    </xsd:annotation>
+    </xsd:element>
+    <xsd:element name="__key" type="xsd:keybase" id="key">
+    <xsd:annotation>
+    <xsd:documentation source="http://www.w3.org/TR/xmlschema-1/#element-key"/>
+    </xsd:annotation>
+    </xsd:element>
+    <xsd:element name="__keyref" id="keyref">
+    <xsd:annotation>
+    <xsd:documentation source="http://www.w3.org/TR/xmlschema-1/#element-keyref"/>
+    </xsd:annotation>
+    <xsd:complexType>
+    <xsd:complexContent>
+    <xsd:extension base="xsd:keybase">
+    <xsd:attribute name="refer" type="xsd:QName" use="required"/>
+    </xsd:extension>
+    </xsd:complexContent>
+    </xsd:complexType>
+    </xsd:element>
+
+    <xsd:element name="__notation" id="notation">
+    <xsd:annotation>
+    <xsd:documentation source="http://www.w3.org/TR/xmlschema-1/#element-notation"/>
+    </xsd:annotation>
+    <xsd:complexType>
+    <xsd:complexContent>
+    <xsd:extension base="xsd:annotated">
+    <xsd:attribute name="name" type="xsd:NCName" use="required"/>
+    <xsd:attribute name="public" type="xsd:public"/>
+    <xsd:attribute name="system" type="xsd:anyURI"/>
+    </xsd:extension>
+    </xsd:complexContent>
+    </xsd:complexType>
+    </xsd:element>
+
+    <xsd:simpleType name="public">
+    <xsd:annotation>
+    <xsd:documentation>
+    A utility type, not for public use</xsd:documentation>
+    <xsd:documentation>
+    A public identifier, per ISO 8879</xsd:documentation>
+    </xsd:annotation>
+    <xsd:restriction base="xsd:token"/>
+    </xsd:simpleType>
+  -->
+  <xsd:element name="appinfo" id="appinfo">
+    <xsd:annotation>
+      <xsd:documentation
+        source="http://www.w3.org/TR/xmlschema-1/#element-appinfo" />
+    </xsd:annotation>
+    <xsd:complexType mixed="true">
+      <xsd:choice minOccurs="0" maxOccurs="unbounded">
+        <!--
+          Some users may want to provide appinfo annotations specific to their
+          use-case in addition to the DFDL annotations. Normal XML schema allows
+          any elements with lax validation using the commented out line below.
+          However, we want to perform extra validation on the dfdl elements. So
+          the DFDLAppInfoGroup defines all the DFDL specific attribute-form
+          elements that are allowed in an xs:appinfo and what attributes they may
+          have. The dfdl:anyOther group reference is used to allow elements from any
+          other namespace with lax validation.
+        -->
+        <!--<xsd:any processContents="lax" />-->
+        <xsd:group ref="dfdl:DFDLAppInfoGroup" />
+        <xsd:group ref="dfdl:anyOther" />
+      </xsd:choice>
+      <xsd:attribute name="source" type="xsd:anyURI" />
+      <xsd:attributeGroup ref="xsd:anyOther" />
+    </xsd:complexType>
+  </xsd:element>
+
+  <xsd:element name="documentation" id="documentation">
+    <xsd:annotation>
+      <xsd:documentation
+        source="http://www.w3.org/TR/xmlschema-1/#element-documentation" />
+    </xsd:annotation>
+    <xsd:complexType mixed="true">
+      <xsd:sequence minOccurs="0" maxOccurs="unbounded">
+        <xsd:any processContents="lax" />
+      </xsd:sequence>
+      <xsd:attribute name="source" type="xsd:anyURI" />
+      <xsd:attribute ref="xml:lang" />
+      <xsd:attributeGroup ref="xsd:anyOther" />
+    </xsd:complexType>
+  </xsd:element>
+
+  <xsd:element name="annotation" id="annotation">
+    <xsd:annotation>
+      <xsd:documentation
+        source="http://www.w3.org/TR/xmlschema-1/#element-annotation" />
+    </xsd:annotation>
+    <xsd:complexType>
+      <xsd:complexContent>
+        <xsd:extension base="xsd:openAttrs">
+          <xsd:choice minOccurs="0" maxOccurs="unbounded">
+            <xsd:element ref="xsd:appinfo" />
+            <xsd:element ref="xsd:documentation" />
+          </xsd:choice>
+          <xsd:attribute name="id" type="xsd:ID" />
+        </xsd:extension>
+      </xsd:complexContent>
+    </xsd:complexType>
+  </xsd:element>
+
+
+
+  <xsd:simpleType name="derivationControl">
+    <xsd:annotation>
+      <xsd:documentation>
+        A utility type, not for public use
+      </xsd:documentation>
+    </xsd:annotation>
+    <xsd:restriction base="xsd:NMTOKEN">
+      <!-- <xsd:enumeration value="substitution"/> -->
+      <!-- <xsd:enumeration value="extension"/> -->
+      <xsd:enumeration value="restriction" />
+      <!-- <xsd:enumeration value="list"/> -->
+      <xsd:enumeration value="union" />
+    </xsd:restriction>
+  </xsd:simpleType>
+
+  <xsd:group name="simpleDerivation">
+    <xsd:choice>
+      <xsd:element ref="xsd:restriction" />
+      <!-- <xsd:element ref="xsd:list"/> Not in DFDL v1.0 -->
+      <xsd:element ref="xsd:union" />
+    </xsd:choice>
+  </xsd:group>
+
+
+
+  <xsd:simpleType name="simpleDerivationSet">
+    <xsd:annotation>
+      <xsd:documentation>
+        #all or (possibly empty) subset of {restriction, union, list}
+      </xsd:documentation>
+      <xsd:documentation>
+        A utility type, not for public use
+      </xsd:documentation>
+    </xsd:annotation>
+    <xsd:union>
+      <xsd:simpleType>
+        <xsd:restriction base="xsd:token">
+          <xsd:enumeration value="#all" />
+        </xsd:restriction>
+      </xsd:simpleType>
+      <xsd:simpleType>
+        <xsd:list>
+          <xsd:simpleType>
+            <xsd:restriction base="xsd:derivationControl">
+              <!-- <xsd:enumeration value="list"/> -->
+              <xsd:enumeration value="union" />
+              <xsd:enumeration value="restriction" />
+            </xsd:restriction>
+          </xsd:simpleType>
+        </xsd:list>
+      </xsd:simpleType>
+    </xsd:union>
+  </xsd:simpleType>
+
+  <xsd:complexType name="simpleType" abstract="true">
+    <xsd:complexContent>
+      <xsd:extension base="xsd:annotated">
+        <xsd:group ref="xsd:simpleDerivation" />
+        <xsd:attribute name="final" type="xsd:simpleDerivationSet" />
+        <xsd:attribute name="name" type="xsd:NCName">
+          <xsd:annotation>
+            <xsd:documentation>
+              Can be restricted to required or
+              forbidden
+            </xsd:documentation>
+          </xsd:annotation>
+        </xsd:attribute>
+
+        <!-- DFDL -->
+        <xsd:attributeGroup ref="dfdl:BaseAGQualified" />
+        <xsd:attributeGroup ref="dfdl:CommonAGQualified" />
+        <xsd:attributeGroup ref="dfdl:AlignmentAGQualified" />
+        <xsd:attributeGroup ref="dfdl:MarkupAGQualified" />
+        <xsd:attributeGroup ref="dfdl:SimpleTypeAGQualified" />
+      </xsd:extension>
+    </xsd:complexContent>
+  </xsd:complexType>
+
+
+  <xsd:complexType name="topLevelSimpleType">
+    <xsd:complexContent>
+      <xsd:restriction base="xsd:simpleType">
+        <xsd:sequence>
+          <xsd:element ref="xsd:annotation" minOccurs="0" />
+          <xsd:group ref="xsd:simpleDerivation" />
+        </xsd:sequence>
+        <xsd:attribute name="name" use="required" type="xsd:NCName">
+          <xsd:annotation>
+            <xsd:documentation>
+              Required at the top level
+            </xsd:documentation>
+          </xsd:annotation>
+        </xsd:attribute>
+        <xsd:attributeGroup ref="xsd:anyOther" />
+      </xsd:restriction>
+    </xsd:complexContent>
+  </xsd:complexType>
+
+  <xsd:complexType name="localSimpleType">
+    <xsd:complexContent>
+      <xsd:restriction base="xsd:simpleType">
+        <xsd:sequence>
+          <xsd:element ref="xsd:annotation" minOccurs="0" />
+          <xsd:group ref="xsd:simpleDerivation" />
+        </xsd:sequence>
+        <xsd:attribute name="name" use="prohibited">
+          <xsd:annotation>
+            <xsd:documentation>
+              Forbidden when nested
+            </xsd:documentation>
+          </xsd:annotation>
+        </xsd:attribute>
+        <xsd:attribute name="final" use="prohibited" />
+        <xsd:attributeGroup ref="xsd:anyOther" />
+      </xsd:restriction>
+    </xsd:complexContent>
+  </xsd:complexType>
+
+  <xsd:element name="simpleType" type="xsd:topLevelSimpleType"
+    id="simpleType">
+    <xsd:annotation>
+      <xsd:documentation
+        source="http://www.w3.org/TR/xmlschema-2/#element-simpleType" />
+    </xsd:annotation>
+  </xsd:element>
+
+  <xsd:group name="facets">
+    <xsd:annotation>
+      <xsd:documentation>
+        We should use a substitution group for facets, but
+        that's ruled out because it would allow users to
+        add their own, which we're not ready for yet.
+      </xsd:documentation>
+    </xsd:annotation>
+    <xsd:choice>
+      <xsd:element ref="xsd:minExclusive" />
+      <xsd:element ref="xsd:minInclusive" />
+      <xsd:element ref="xsd:maxExclusive" />
+      <xsd:element ref="xsd:maxInclusive" />
+      <xsd:element ref="xsd:totalDigits" />
+      <xsd:element ref="xsd:fractionDigits" />
+      <xsd:element ref="xsd:length" />
+      <xsd:element ref="xsd:minLength" />
+      <xsd:element ref="xsd:maxLength" />
+      <xsd:element ref="xsd:enumeration" />
+      <!-- <xsd:element ref="xsd:whiteSpace"/> -->
+      <xsd:element ref="xsd:pattern" />
+    </xsd:choice>
+  </xsd:group>
+
+  <xsd:group name="simpleRestrictionModel">
+    <xsd:sequence>
+      <xsd:element name="simpleType" type="xsd:localSimpleType"
+        minOccurs="0" />
+      <xsd:group ref="xsd:facets" minOccurs="0" maxOccurs="unbounded" />
+    </xsd:sequence>
+  </xsd:group>
+
+  <xsd:element name="restriction" id="restriction">
+    <xsd:complexType>
+      <xsd:annotation>
+        <xsd:documentation
+          source="http://www.w3.org/TR/xmlschema-2/#element-restriction">
+          base attribute and simpleType child are mutually
+          exclusive, but one or other is required
+        </xsd:documentation>
+      </xsd:annotation>
+      <xsd:complexContent>
+        <xsd:extension base="xsd:annotated">
+          <xsd:group ref="xsd:simpleRestrictionModel" />
+          <xsd:attribute name="base" type="xsd:QName" use="optional" />
+        </xsd:extension>
+      </xsd:complexContent>
+    </xsd:complexType>
+  </xsd:element>
+
+  <!--
+    <xsd:element name="list" id="list">
+    <xsd:complexType>
+    <xsd:annotation>
+    <xsd:documentation
+    source="http://www.w3.org/TR/xmlschema-2/#element-list">
+    itemType attribute and simpleType child are mutually
+    exclusive, but one or other is required
+    </xsd:documentation>
+    </xsd:annotation>
+    <xsd:complexContent>
+    <xsd:extension base="xsd:annotated">
+    <xsd:sequence>
+    <xsd:element name="simpleType" type="xsd:localSimpleType"
+    minOccurs="0"/>
+    </xsd:sequence>
+    <xsd:attribute name="itemType" type="xsd:QName" use="optional"/>
+    </xsd:extension>
+    </xsd:complexContent>
+    </xsd:complexType>
+    </xsd:element>
+  -->
+  <xsd:element name="union" id="union">
+    <xsd:complexType>
+      <xsd:annotation>
+        <xsd:documentation
+          source="http://www.w3.org/TR/xmlschema-2/#element-union">
+          memberTypes attribute must be non-empty or there must
+          be
+          at least one simpleType child
+        </xsd:documentation>
+      </xsd:annotation>
+      <xsd:complexContent>
+        <xsd:extension base="xsd:annotated">
+          <xsd:sequence>
+            <xsd:element name="simpleType" type="xsd:localSimpleType"
+              minOccurs="0" maxOccurs="unbounded" />
+          </xsd:sequence>
+          <xsd:attribute name="memberTypes" use="optional">
+            <xsd:simpleType>
+              <xsd:list itemType="xsd:QName" />
+            </xsd:simpleType>
+          </xsd:attribute>
+        </xsd:extension>
+      </xsd:complexContent>
+    </xsd:complexType>
+  </xsd:element>
+
+  <xsd:complexType name="facet">
+    <xsd:complexContent>
+      <xsd:extension base="xsd:annotated">
+        <xsd:attribute name="value" use="required" />
+        <xsd:attribute name="fixed" type="xsd:boolean"
+          use="optional" default="false" />
+      </xsd:extension>
+    </xsd:complexContent>
+  </xsd:complexType>
+
+  <xsd:complexType name="noFixedFacet">
+    <xsd:complexContent>
+      <xsd:restriction base="xsd:facet">
+        <xsd:sequence>
+          <xsd:element ref="xsd:annotation" minOccurs="0" />
+        </xsd:sequence>
+        <xsd:attribute name="fixed" use="prohibited" />
+        <xsd:attributeGroup ref="xsd:anyOther" />
+      </xsd:restriction>
+    </xsd:complexContent>
+  </xsd:complexType>
+
+  <xsd:element name="minExclusive" id="minExclusive" type="xsd:facet">
+    <xsd:annotation>
+      <xsd:documentation
+        source="http://www.w3.org/TR/xmlschema-2/#element-minExclusive" />
+    </xsd:annotation>
+  </xsd:element>
+  <xsd:element name="minInclusive" id="minInclusive" type="xsd:facet">
+    <xsd:annotation>
+      <xsd:documentation
+        source="http://www.w3.org/TR/xmlschema-2/#element-minInclusive" />
+    </xsd:annotation>
+  </xsd:element>
+
+  <xsd:element name="maxExclusive" id="maxExclusive" type="xsd:facet">
+    <xsd:annotation>
+      <xsd:documentation
+        source="http://www.w3.org/TR/xmlschema-2/#element-maxExclusive" />
+    </xsd:annotation>
+  </xsd:element>
+  <xsd:element name="maxInclusive" id="maxInclusive" type="xsd:facet">
+    <xsd:annotation>
+      <xsd:documentation
+        source="http://www.w3.org/TR/xmlschema-2/#element-maxInclusive" />
+    </xsd:annotation>
+  </xsd:element>
+
+  <xsd:complexType name="numFacet">
+    <xsd:complexContent>
+      <xsd:restriction base="xsd:facet">
+        <xsd:sequence>
+          <xsd:element ref="xsd:annotation" minOccurs="0" />
+        </xsd:sequence>
+        <xsd:attribute name="value" type="xsd:nonNegativeInteger"
+          use="required" />
+        <xsd:attributeGroup ref="xsd:anyOther" />
+      </xsd:restriction>
+    </xsd:complexContent>
+  </xsd:complexType>
+
+  <xsd:element name="totalDigits" id="totalDigits">
+    <xsd:annotation>
+      <xsd:documentation
+        source="http://www.w3.org/TR/xmlschema-2/#element-totalDigits" />
+    </xsd:annotation>
+    <xsd:complexType>
+      <xsd:complexContent>
+        <xsd:restriction base="xsd:numFacet">
+          <xsd:sequence>
+            <xsd:element ref="xsd:annotation" minOccurs="0" />
+          </xsd:sequence>
+          <xsd:attribute name="value" type="xsd:positiveInteger"
+            use="required" />
+          <xsd:attributeGroup ref="xsd:anyOther" />
+        </xsd:restriction>
+      </xsd:complexContent>
+    </xsd:complexType>
+  </xsd:element>
+  <xsd:element name="fractionDigits" id="fractionDigits"
+    type="xsd:numFacet">
+    <xsd:annotation>
+      <xsd:documentation
+        source="http://www.w3.org/TR/xmlschema-2/#element-fractionDigits" />
+    </xsd:annotation>
+  </xsd:element>
+
+  <xsd:element name="length" id="length" type="xsd:numFacet">
+    <xsd:annotation>
+      <xsd:documentation
+        source="http://www.w3.org/TR/xmlschema-2/#element-length" />
+    </xsd:annotation>
+  </xsd:element>
+  <xsd:element name="minLength" id="minLength" type="xsd:numFacet">
+    <xsd:annotation>
+      <xsd:documentation
+        source="http://www.w3.org/TR/xmlschema-2/#element-minLength" />
+    </xsd:annotation>
+  </xsd:element>
+  <xsd:element name="maxLength" id="maxLength" type="xsd:numFacet">
+    <xsd:annotation>
+      <xsd:documentation
+        source="http://www.w3.org/TR/xmlschema-2/#element-maxLength" />
+    </xsd:annotation>
+  </xsd:element>
+
+  <xsd:element name="enumeration" id="enumeration">
+    <xsd:annotation>
+      <xsd:documentation
+        source="http://www.w3.org/TR/xmlschema-2/#element-enumeration" />
+    </xsd:annotation>
+    <xsd:complexType>
+      <xsd:complexContent>
+        <xsd:extension base="xsd:facet">
+          <xsd:attributeGroup ref="dfdlx:RepValuesAGQualified" />
+          <xsd:attributeGroup ref="xsd:anyOther" />
+        </xsd:extension>
+      </xsd:complexContent>
+    </xsd:complexType>
+  </xsd:element>
+
+  <!--
+    <xsd:element name="whiteSpace" id="whiteSpace">
+    <xsd:annotation>
+    <xsd:documentation
+    source="http://www.w3.org/TR/xmlschema-2/#element-whiteSpace"/>
+    </xsd:annotation>
+    <xsd:complexType>
+    <xsd:complexContent>
+    <xsd:restriction base="xsd:facet">
+    <xsd:sequence>
+    <xsd:element ref="xsd:annotation" minOccurs="0"/>
+    </xsd:sequence>
+    <xsd:attribute name="value" use="required">
+    <xsd:simpleType>
+    <xsd:restriction base="xsd:NMTOKEN">
+    <xsd:enumeration value="preserve"/>
+    <xsd:enumeration value="replace"/>
+    <xsd:enumeration value="collapse"/>
+    </xsd:restriction>
+    </xsd:simpleType>
+    </xsd:attribute>
+    <xsd:attributeGroup ref="xsd:anyOther"/>
+    </xsd:restriction>
+    </xsd:complexContent>
+    </xsd:complexType>
+    </xsd:element>
+  -->
+  <xsd:element name="pattern" id="pattern">
+    <xsd:annotation>
+      <xsd:documentation
+        source="http://www.w3.org/TR/xmlschema-2/#element-pattern" />
+    </xsd:annotation>
+    <xsd:complexType>
+      <xsd:complexContent>
+        <xsd:restriction base="xsd:noFixedFacet">
+          <xsd:sequence>
+            <xsd:element ref="xsd:annotation" minOccurs="0" />
+          </xsd:sequence>
+          <xsd:attribute name="value" type="xsd:string"
+            use="required" />
+          <xsd:attributeGroup ref="xsd:anyOther" />
+        </xsd:restriction>
+      </xsd:complexContent>
+    </xsd:complexType>
+  </xsd:element>
+
+</xsd:schema>
diff --git a/resources/xsd/dafext.xsd b/resources/xsd/dafext.xsd
new file mode 100644
index 0000000..a9cd6d1
--- /dev/null
+++ b/resources/xsd/dafext.xsd
@@ -0,0 +1,664 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+
+<xs:schema
+  targetNamespace="urn:ogf:dfdl:2013:imp:daffodil.apache.org:2018:ext"
+  xmlns:tns="urn:ogf:dfdl:2013:imp:daffodil.apache.org:2018:ext"
+  xmlns:xs="http://www.w3.org/2001/XMLSchema"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xmlns:daf="urn:ogf:dfdl:2013:imp:daffodil.apache.org:2018:ext"
+  xmlns:dafint="urn:ogf:dfdl:2013:imp:daffodil.apache.org:2018:int"
+  xmlns:dfdlx="http://www.ogf.org/dfdl/dfdl-1.0/extensions"
+  attributeFormDefault="unqualified"
+  elementFormDefault="qualified">
+  
+  <xs:import namespace="http://www.ogf.org/dfdl/dfdl-1.0/extensions"/>
+  <xs:import namespace="urn:ogf:dfdl:2013:imp:daffodil.apache.org:2018:int"/>
+
+  <!-- needed for backwards compatability with daf:parseUnparsePolicy -->
+  <xs:attribute name="parseUnparsePolicy" type="dfdlx:ParseUnparsePolicyEnum"/>
+
+  <xs:element name="extProperty" type="daf:PropertyType" />
+
+  <xs:complexType name="PropertyType">
+    <xs:simpleContent>
+      <xs:extension base="xs:string">
+        <xs:attribute name="name" type="daf:PropertyNameType" use='required'/>
+        <xs:attributeGroup ref="dafint:daffodilAG"/>
+      </xs:extension>
+    </xs:simpleContent>
+  </xs:complexType>
+
+  <xs:simpleType name="PropertyNameType">
+    <xs:restriction base="xs:string">
+      <xs:enumeration value="parseUnparsePolicy"/>
+    </xs:restriction>
+  </xs:simpleType>
+
+
+  <!-- properties related to daffodil configuration -->
+
+  <xs:element name="externalVariableBindings" type="daf:externalVarType" />
+
+  <xs:complexType name="externalVarType">
+    <xs:sequence>
+      <xs:element ref="daf:bind" minOccurs="0" maxOccurs="unbounded" />
+    </xs:sequence>
+  </xs:complexType>
+
+  <xs:element name="bind" type="daf:bindType" />
+
+  <xs:simpleType name="bindNameType">
+    <xs:restriction base="xs:string" />
+  </xs:simpleType>
+
+  <xs:complexType name="bindType">
+    <xs:simpleContent>
+      <xs:extension base="daf:bindNameType">
+        <xs:attribute name="name" use="required">
+          <xs:simpleType>
+            <xs:restriction base="xs:string" />
+          </xs:simpleType>
+        </xs:attribute>
+      </xs:extension>
+    </xs:simpleContent>
+  </xs:complexType>
+
+  <!--
+    This file is used by TunableGenerator.scala to generate code that parses and
+    validates tunable values. The following schema elements define these tunables
+    to be generated. Although this schema is verbose and repetitive, it makes it
+    relatively straightforward to parse and ensure we generate correct code. As
+    such, one must follow a strict pattern to ensure correct code is generated.
+
+    Each element representing a tunable must have an schema primitive as its type,
+    as determined by the tunables allowed value space. Each tunable must also have
+    a default value that is valid for the type. If an element needs additional
+    limitations beyond the value space of the type, then an xs:simpleType with
+    xs:restriction must be used. The base attribute of the restriction must be a
+    schema primitive type. Only the following restrictions are currently supported:
+
+      - minInclusive
+      - maxInclusive
+      - minExclusive
+      - maxExclusive
+  -->
+  <xs:element name="tunables">
+    <xs:complexType>
+      <xs:all>
+        <xs:element name="allowExpressionResultCoercion" type="xs:boolean" default="true" minOccurs="0">
+          <xs:annotation>
+            <xs:documentation>
+              Defines how Daffodil coerces expressions where the result type differs
+              from the expected type. As an example, assume the expected type of an
+              expression is an xs:string, but the expression is { 3 }. In this case, the
+              expression result is an xs:int, which should not be automatically coerced
+              to an xs:string. Instead, the expression should be { xs:string(3) } or { "3" }
+              If the value of this tunable is false, these types of expressions will
+              result in a schema definition error. If the value is true, Daffodil will
+              provide a warning and attempt to coerce the result type to the expected
+              type.
+            </xs:documentation>
+          </xs:annotation>
+        </xs:element>
+        <xs:element name="allowExternalPathExpressions" type="xs:boolean" default="false" minOccurs="0">
+          <xs:annotation>
+            <xs:documentation>
+              By default, path expressions in Daffodil will only work correctly if path
+              steps are used in an expression defined in the schema when compiled. To
+              enable the use of other expressions (e.g. during debugging, where not all
+              expressions are known at schema compile time), set this tunable to true.
+              This may cause a degredation of performance in path expression evaluation,
+              so this should be avoided when in production. This flag is automatically
+              enabled when debugging is enabled.
+            </xs:documentation>
+          </xs:annotation>
+        </xs:element>
+        <xs:element name="blobChunkSizeInBytes" default="4096" minOccurs="0">
+          <xs:annotation>
+            <xs:documentation>
+              When reading/writing blob data, the maximum number of bytes to read/write
+              at a time. This is also used when parsing xs:hexBinary data.
+            </xs:documentation>
+          </xs:annotation>
+          <xs:simpleType>
+            <xs:restriction base="xs:int">
+              <xs:minInclusive value="1" />
+              <xs:maxInclusive value="268435455" /> <!-- Limit to (MaxInt / 8) because some places convert this tunable to bits -->
+            </xs:restriction>
+          </xs:simpleType>
+        </xs:element>
+        <xs:element name="defaultEmptyElementParsePolicy" type="daf:TunableEmptyElementParsePolicy" default="treatAsEmpty" minOccurs="0">
+          <xs:annotation>
+            <xs:documentation>
+              Defines the default empty element parse policy to use if it is not defined
+              in a schema. This is only used if requireEmptyElementParsePolicyProperty is
+              false.
+            </xs:documentation>
+          </xs:annotation>
+        </xs:element>
+        <xs:element name="defaultInitialRegexMatchLimitInChars" default="32" minOccurs="0">
+          <xs:annotation>
+            <xs:documentation>
+              Deprecated. This tunable no longer has any affect and is only kept for
+              backwards compatability.
+            </xs:documentation>
+          </xs:annotation>
+          <xs:simpleType>
+            <xs:restriction base="xs:int">
+              <xs:minInclusive value="1" />
+            </xs:restriction>
+          </xs:simpleType>
+        </xs:element>
+        <xs:element name="errorOnUnsupportedJavaVersion" type="xs:boolean" default="true" minOccurs="0">
+          <xs:annotation>
+            <xs:documentation>
+              Deprecated. This tunable no longer has any affect and is only kept for
+              backwards compatability.
+            </xs:documentation>
+          </xs:annotation>
+        </xs:element>
+        <xs:element name="generatedNamespacePrefixStem" type="xs:string" default="tns" minOccurs="0">
+          <xs:annotation>
+            <xs:documentation>
+              Stem to use when generating a namespace prefix when one is not defined for
+              the target naespace.
+            </xs:documentation>
+          </xs:annotation>
+        </xs:element>
+        <xs:element name="initialElementOccurrencesHint" default="10" minOccurs="0">
+          <xs:annotation>
+            <xs:documentation>
+              Initial array buffer size allocated for recurring elements/arrays.
+            </xs:documentation>
+          </xs:annotation>
+          <xs:simpleType>
+            <xs:restriction base="xs:int">
+              <xs:minInclusive value="1" />
+            </xs:restriction>
+          </xs:simpleType>
+        </xs:element>
+        <xs:element name="initialRegexMatchLimitInCharacters" default="64" minOccurs="0">
+          <xs:annotation>
+            <xs:documentation>
+              Initial number of characters to match when performing regular expression
+              matches on input data. When a regex fails to match, more data may be
+              consumed up to the maximumRegexMatchLengthInCharacters tunable.
+            </xs:documentation>
+          </xs:annotation>
+          <xs:simpleType>
+            <xs:restriction base="xs:int">
+              <xs:minInclusive value="1" />
+            </xs:restriction>
+          </xs:simpleType>
+        </xs:element>
+        <xs:element name="inputFileMemoryMapLowThreshold" type="xs:int" default="33554432" minOccurs="0">
+          <xs:annotation>
+            <xs:documentation>
+              Deprecated. This tunable no longer has any affect and is only kept for
+              backwards compatability.
+            </xs:documentation>
+          </xs:annotation>
+        </xs:element>
+        <xs:element name="maxBinaryDecimalVirtualPoint" default="200" minOccurs="0">
+          <xs:annotation>
+            <xs:documentation>
+              The largest allowed value of the dfdl:binaryDecimalVirtualPoint property.
+            </xs:documentation>
+          </xs:annotation>
+          <xs:simpleType>
+            <xs:restriction base="xs:int">
+              <xs:minInclusive value="1" />
+            </xs:restriction>
+          </xs:simpleType>
+        </xs:element>
+        <xs:element name="maxByteArrayOutputStreamBufferSizeInBytes" default="2097152000" minOccurs="0">
+          <xs:annotation>
+            <xs:documentation>
+              When unparsing, this is the maximum size of the buffer that the
+              ByteArrayOutputStream can grow to before switching to a file based
+              output stream.
+            </xs:documentation>
+          </xs:annotation>
+          <xs:simpleType>
+            <xs:restriction base="xs:int">
+              <xs:minInclusive value="0" />
+            </xs:restriction>
+          </xs:simpleType>
+        </xs:element>
+        <xs:element name="maxDataDumpSizeInBytes" default="256" minOccurs="0">
+          <xs:annotation>
+            <xs:documentation>
+              The maximum size of data to retrive when when getting data to display
+              for debugging.
+            </xs:documentation>
+          </xs:annotation>
+          <xs:simpleType>
+            <xs:restriction base="xs:int">
+              <xs:minInclusive value="1" />
+            </xs:restriction>
+          </xs:simpleType>
+        </xs:element>
+        <xs:element name="maxFieldContentLengthInBytes" type="xs:int" default="1048576" minOccurs="0">
+          <xs:annotation>
+            <xs:documentation>
+              Deprecated. This tunable no longer has any affect and is only kept for
+              backwards compatability.
+            </xs:documentation>
+          </xs:annotation>
+        </xs:element>
+        <xs:element name="maxHexBinaryLengthInBytes" default="2147483647" minOccurs="0">
+          <xs:annotation>
+            <xs:documentation>
+              The maximum size allowed for an xs:hexBinary element.
+            </xs:documentation>
+          </xs:annotation>
+          <xs:simpleType>
+            <xs:restriction base="xs:int">
+              <xs:minInclusive value="1" />
+            </xs:restriction>
+          </xs:simpleType>
+        </xs:element>
+        <xs:element name="maxLengthForVariableLengthDelimiterDisplay" default="10" minOccurs="0">
+          <xs:annotation>
+            <xs:documentation>
+              When unexpected text is found where a delimiter is expected, this is the maximum
+              number of bytes (characters) to display when the expected delimiter is a variable
+              length delimiter.
+            </xs:documentation>
+          </xs:annotation>
+          <xs:simpleType>
+            <xs:restriction base="xs:int">
+              <xs:minInclusive value="1" />
+            </xs:restriction>
+          </xs:simpleType>
+        </xs:element>
+        <xs:element name="maxLookaheadFunctionBits" default="512" minOccurs="0">
+          <xs:annotation>
+            <xs:documentation>
+              Max distance that the DPath lookahead function is permitted to look.
+              Distance is defined by the distance to the last bit accessed, and
+              so it is offset+bitsize.
+            </xs:documentation>
+          </xs:annotation>
+          <xs:simpleType>
+            <xs:restriction base="xs:long">
+              <xs:minInclusive value="1" />
+            </xs:restriction>
+          </xs:simpleType>
+        </xs:element>
+        <xs:element name="maxOccursBounds" default="2147483647" minOccurs="0">
+          <xs:annotation>
+            <xs:documentation>
+              Maximum number of occurances of an array element.
+            </xs:documentation>
+          </xs:annotation>
+          <xs:simpleType>
+            <xs:restriction base="xs:long">
+              <xs:minInclusive value="1" />
+            </xs:restriction>
+          </xs:simpleType>
+        </xs:element>
+        <xs:element name="maxSkipLengthInBytes" default="1024" minOccurs="0">
+          <xs:annotation>
+            <xs:documentation>
+              Maximum number of bytes allowed to skip in a skip region.
+            </xs:documentation>
+          </xs:annotation>
+          <xs:simpleType>
+            <xs:restriction base="xs:int">
+              <xs:minInclusive value="1" />
+            </xs:restriction>
+          </xs:simpleType>
+        </xs:element>
+        <xs:element name="maxValidYear" default="9999" minOccurs="0">
+          <xs:annotation>
+            <xs:documentation>
+              Due to differences in the DFDL spec and ICU4J SimpleDateFormat, we must
+              have SimpleDateFormat parse in lenient mode, which allows the year value
+              to overflow with very large years into possibly negative years. This
+              tunable tunable sets an upper limit for values to prevent overflow.
+            </xs:documentation>
+          </xs:annotation>
+          <xs:simpleType>
+            <xs:restriction base="xs:int">
+              <xs:minInclusive value="1" />
+            </xs:restriction>
+          </xs:simpleType>
+        </xs:element>
+        <xs:element name="maximumRegexMatchLengthInCharacters" default="1048576" minOccurs="0">
+          <xs:annotation>
+            <xs:documentation>
+              Maximum number of characters to match when performing regular expression
+              matches on input data.
+            </xs:documentation>
+          </xs:annotation>
+          <xs:simpleType>
+            <xs:restriction base="xs:int">
+              <xs:minInclusive value="1" />
+            </xs:restriction>
+          </xs:simpleType>
+        </xs:element>
+        <xs:element name="maximumSimpleElementSizeInCharacters" default="1048576" minOccurs="0">
+          <xs:annotation>
+            <xs:documentation>
+              Maximum number of characters to parse when parsing string data.
+            </xs:documentation>
+          </xs:annotation>
+          <xs:simpleType>
+            <xs:restriction base="xs:int">
+              <xs:minInclusive value="1" />
+            </xs:restriction>
+          </xs:simpleType>
+        </xs:element>
+        <xs:element name="minBinaryDecimalVirtualPoint" default="-200" minOccurs="0">
+          <xs:annotation>
+            <xs:documentation>
+              The smallest allowed value of the dfdl:binaryDecimalVirtualPoint property.
+            </xs:documentation>
+          </xs:annotation>
+          <xs:simpleType>
+            <xs:restriction base="xs:int">
+              <xs:maxInclusive value="-1" />
+            </xs:restriction>
+          </xs:simpleType>
+        </xs:element>
+        <xs:element name="minValidYear" type="xs:int" default="0" minOccurs="0">
+          <xs:annotation>
+            <xs:documentation>
+              Due to differences in the DFDL spec and ICU4J SimpleDateFormat, we must
+              have SimpleDateFormat parse in lenient mode, which allows the year value
+              to overflow with very large years into possibly negative years. This
+              tunable tunable sets an upper limit for values to prevent underflow.
+            </xs:documentation>
+          </xs:annotation>
+        </xs:element>
+        <xs:element name="outputStreamChunkSizeInBytes" default="65536" minOccurs="0">
+          <xs:annotation>
+            <xs:documentation>
+              When writing file data to the output stream during unparse, this
+              is the maximum number of bytes to write at a time.
+            </xs:documentation>
+          </xs:annotation>
+          <xs:simpleType>
+            <xs:restriction base="xs:int">
+              <xs:minInclusive value="1" />
+            </xs:restriction>
+          </xs:simpleType>
+        </xs:element>
+        <xs:element name="parseUnparsePolicy" type="daf:TunableParseUnparsePolicyTunable" default="fromRoot" minOccurs="0">
+          <xs:annotation>
+            <xs:documentation>
+              Whether to compile a schema to support only parsing, only unparsing, both, or to
+              use the daf:parseUnparsePolicy from the root node. All child elements of the root
+              must have a compatable daf:parseUnaprsePolicy property.
+            </xs:documentation>
+          </xs:annotation>
+        </xs:element>
+        <xs:element name="readerByteBufferSize" type="xs:int" default="8192" minOccurs="0">
+          <xs:annotation>
+            <xs:documentation>
+              Deprecated. This tunable no longer has any affect and is only kept for
+              backwards compatability.
+            </xs:documentation>
+          </xs:annotation>
+        </xs:element>
+        <xs:element name="releaseUnneededInfoset" type="xs:boolean" default="true" minOccurs="0">
+          <xs:annotation>
+            <xs:documentation>
+              Daffodil will periodically release internal infoset elements that it determines
+              are no longer needed, thus freeing memory. Setting this value to false will
+              prevent this from taking place. This should usually only be used while debugging
+              or with very specific tests.
+            </xs:documentation>
+          </xs:annotation>
+        </xs:element>
+        <xs:element name="requireBitOrderProperty" type="xs:boolean" default="false" minOccurs="0">
+          <xs:annotation>
+            <xs:documentation>
+              If true, require that the dfdl:bitOrder property is specified. If false, use a
+              default value if the property is not defined in the schema.
+            </xs:documentation>
+          </xs:annotation>
+        </xs:element>
+        <xs:element name="requireEmptyElementParsePolicyProperty" type="xs:boolean" default="false" minOccurs="0">
+          <xs:annotation>
+            <xs:documentation>
+              If true, require that the dfdl:emptyElementParsePolicy property is specified in
+              the schema. If false, and not defined in the schema, uses the
+              defaultEmptyElementParsePolicy as the value of emptyElementParsePolicy.
+            </xs:documentation>
+          </xs:annotation>
+        </xs:element>
+        <xs:element name="requireEncodingErrorPolicyProperty" type="xs:boolean" default="false" minOccurs="0">
+          <xs:annotation>
+            <xs:documentation>
+              If true, require that the dfdl:encodingErrorPolicy property is specified. If
+              false, use a default value if the property is not defined in the schema.
+            </xs:documentation>
+          </xs:annotation>
+        </xs:element>
+        <xs:element name="requireFloatingProperty" type="xs:boolean" default="false" minOccurs="0">
+          <xs:annotation>
+            <xs:documentation>
+              If true, require that the dfdl:floating property is specified. If
+              false, use a default value if the property is not defined in the schema.
+            </xs:documentation>
+          </xs:annotation>
+        </xs:element>
+        <xs:element name="requireTextBidiProperty" type="xs:boolean" default="false" minOccurs="0">
+          <xs:annotation>
+            <xs:documentation>
+              If true, require that the dfdl:testBidi property is specified. If
+              false, use a default value if the property is not defined in the schema.
+            </xs:documentation>
+          </xs:annotation>
+        </xs:element>
+        <xs:element name="requireTextStandardBaseProperty" type="xs:boolean" default="false" minOccurs="0">
+          <xs:annotation>
+            <xs:documentation>
+              If true, require that the dfdl:textStandardBase property is specified. If false
+              and the property is missing, behave as if the property is set to 10.
+            </xs:documentation>
+          </xs:annotation>
+        </xs:element>
+        <xs:element name="saxUnparseEventBatchSize" default="100" minOccurs="0">
+          <xs:annotation>
+            <xs:documentation>
+              Daffodil's SAX Unparse API allows events to be batched in memory to minimize the
+              frequency of context switching between the SAXInfosetInputter thread that processes
+              the events, and the DaffodilUnparseContentHandler thread that generates the events.
+              Setting this value to a low number will increase the frequency of context switching,
+              but will reduce the memory footprint. Swtting it to a high number will decrease the
+              frequency of context switching, but increase the memory footprint.
+            </xs:documentation>
+          </xs:annotation>
+          <xs:simpleType>
+            <xs:restriction base="xs:int">
+              <xs:minInclusive value="1" />
+            </xs:restriction>
+          </xs:simpleType>
+        </xs:element>
+        <xs:element name="suppressSchemaDefinitionWarnings" type="daf:TunableSuppressSchemaDefinitionWarnings" default="emptyElementParsePolicyError" minOccurs="0">
+          <xs:annotation>
+            <xs:documentation>
+              Space-separated list of schema definition warnings that should be ignored,
+              or "all" to ignore all warnings.
+            </xs:documentation>
+          </xs:annotation>
+        </xs:element>
+        <xs:element name="tdmlImplementation" type="xs:string" default="daffodil" minOccurs="0">
+          <xs:annotation>
+            <xs:documentation>
+              TDMLDFDLProcessorFactory implementation to use when running TDML tests.
+              Allowed values are "daffodil" (default), "daffodil-runtime2", and "ibm".
+            </xs:documentation>
+          </xs:annotation>
+        </xs:element>
+        <xs:element name="tempFilePath" type="xs:string" default="This string is ignored. Default value is taken from java.io.tmpdir property"  minOccurs="0">
+          <xs:annotation>
+            <xs:documentation>
+              When unparsing, use this path to store temporary files that may be genrated.
+              The default value (empty string) will result in the use of the java.io.tmpdir
+              property being used as the path.
+            </xs:documentation>
+          </xs:annotation>
+        </xs:element>
+        <xs:element name="unqualifiedPathStepPolicy" type="daf:TunableUnqualifiedPathStepPolicy" default="noNamespace" minOccurs="0">
+          <xs:annotation>
+            <xs:documentation>
+              Defines how to lookup DFDL expression path steps that to not include a
+              namespace prefix. Values are:
+              - noNamespace: only match elements that do not have a namespace
+              - defaultNamespace: only match elements defined in the default namespace
+              - preferDefaultNamespace: match elements defined in the default namespace;
+                  if non are found, match elemnts that do not have a namespace
+            </xs:documentation>
+          </xs:annotation>
+        </xs:element>
+        <xs:element name="unparseSuspensionWaitOld" default="100" minOccurs="0">
+          <xs:annotation>
+            <xs:documentation>
+              While unparsing, some unparse actions require "suspending" which
+              requires buffering unparse output until the suspension can be
+              evaluated. Daffodil periodically attempts to reevaluate these
+              suspensions so that these buffers can be released. We attempt to
+              evaluate young suspensions shortly after creation with the hope
+              that it will succeed and we can release associated buffers. But if
+              a young suspension fails it is moved to the old suspension list.
+              Old suspensions are evaluated less frequently since they are less
+              likely to succeeded. This minimizes the overhead related to
+              evaluating suspensions that are likely to fail. The
+              unparseSuspensionWaitYoung and unparseSuspensionWaitOld
+              values determine how many elements are unparsed before evaluating
+              young and old suspensions, respectively.
+            </xs:documentation>
+          </xs:annotation>
+          <xs:simpleType>
+            <xs:restriction base="xs:int">
+              <xs:minInclusive value="1" />
+            </xs:restriction>
+          </xs:simpleType>
+        </xs:element>
+        <xs:element name="unparseSuspensionWaitYoung" default="5" minOccurs="0">
+          <xs:annotation>
+            <xs:documentation>
+              See unparseSuspensionWaitOld
+            </xs:documentation>
+          </xs:annotation>
+          <xs:simpleType>
+            <xs:restriction base="xs:int">
+              <xs:minInclusive value="1" />
+            </xs:restriction>
+          </xs:simpleType>
+        </xs:element>
+      </xs:all>
+    </xs:complexType>
+  </xs:element>
+
+  <xs:simpleType name="TunableEmptyElementParsePolicy">
+    <xs:restriction base="dfdlx:EmptyElementParsePolicyEnum" />
+  </xs:simpleType>
+
+  <!--
+    The two 'Tunables' in the name are intentional. The first is the standard for
+    Tunable enums used by the generator. The second is to differentiate between
+    the dfdl property enum and the tunable enum, since they have different allowed
+    values.
+  -->
+  <xs:simpleType name="TunableParseUnparsePolicyTunable">
+    <xs:union>
+      <xs:simpleType>
+        <xs:restriction base="dfdlx:ParseUnparsePolicyEnum" />
+      </xs:simpleType>
+      <xs:simpleType>
+        <xs:restriction base="xs:string">
+          <xs:enumeration value="fromRoot" />
+        </xs:restriction>
+      </xs:simpleType>
+    </xs:union>
+  </xs:simpleType>
+
+  <xs:simpleType name="TunableUnqualifiedPathStepPolicy">
+    <xs:restriction base="xs:string">
+      <xs:enumeration value="defaultNamespace" />
+      <xs:enumeration value="noNamespace" />
+      <xs:enumeration value="preferDefaultNamespace" />
+    </xs:restriction>
+  </xs:simpleType>
+
+  <xs:simpleType name="TunableSuppressSchemaDefinitionWarnings">
+    <xs:list>
+      <xs:simpleType>
+        <xs:restriction base="xs:token">
+          <xs:enumeration value="all" />
+          <xs:enumeration value="alignmentNotSame" />
+          <xs:enumeration value="alignmentAndInitiatorTextAlignmentNotCompatible" />
+          <xs:enumeration value="appinfoDFDLSourceWrong" />
+          <xs:enumeration value="appinfoNoSource" />
+          <xs:enumeration value="choiceInsideHiddenGroup" />
+          <xs:enumeration value="deprecatedBuiltInFormats" />
+          <xs:enumeration value="deprecatedEncodingNameUSASCII7BitPacked" />
+          <xs:enumeration value="deprecatedExpressionResultCoercion" />
+          <xs:enumeration value="deprecatedFunctionDAFError" />
+          <xs:enumeration value="deprecatedPropertyDAFError" />
+          <xs:enumeration value="deprecatedPropertyDFDLXError" />
+          <xs:enumeration value="deprecatedPropertyDFDLError" />
+          <xs:enumeration value="deprecatedPropertySeparatorPolicy" />
+          <xs:enumeration value="discouragedDiscriminatorPlacement" />
+          <xs:enumeration value="discouragedAssertPlacement" />
+          <xs:enumeration value="emptyElementParsePolicyError" />
+          <xs:enumeration value="encodingErrorPolicyError" />
+          <xs:enumeration value="escapeSchemeRefUndefined" />
+          <xs:enumeration value="facetExplicitLengthOutOfRange" />
+          <xs:enumeration value="floatingError" />
+          <xs:enumeration value="ignoreImport" />
+          <xs:enumeration value="ignoreDFDLProperty" />
+          <xs:enumeration value="inconsistentLengthKind" />
+          <xs:enumeration value="invalidAnnotationPoint" />
+          <xs:enumeration value="layerCompileWarning" />
+          <xs:enumeration value="multipleChoiceBranches" />
+          <xs:enumeration value="namespaceDifferencesOnly" />
+          <xs:enumeration value="noEmptyDefault" />
+          <xs:enumeration value="nonExpressionPropertyValueLooksLikeExpression" />
+          <xs:enumeration value="pathNotToArray" />
+          <xs:enumeration value="patternEncodingSlashW" />
+          <xs:enumeration value="queryStylePathExpression" />
+          <xs:enumeration value="regexPatternZeroLength" />
+          <xs:enumeration value="textBidiError" />
+          <xs:enumeration value="textOutputMinLengthOutOfRange" />
+          <xs:enumeration value="textStandardBaseUndefined" />
+          <xs:enumeration value="unsupportedAttributeBlockDefault" />
+          <xs:enumeration value="unsupportedAttributeFinalDefault" />
+          <xs:enumeration value="unsupportedAttributeFormDefault" />
+          <xs:enumeration value="unsupportedAttributeSchemaLocation" />
+        </xs:restriction>
+      </xs:simpleType>
+    </xs:list>
+  </xs:simpleType>
+
+  <xs:element name="dfdlConfig">
+    <xs:complexType>
+      <xs:sequence>
+        <xs:element ref="tns:externalVariableBindings" minOccurs="0" />
+        <xs:element ref="tns:tunables" minOccurs="0" />
+      </xs:sequence>
+    </xs:complexType>
+  </xs:element>
+
+</xs:schema>
diff --git a/resources/xsd/dafint.xsd b/resources/xsd/dafint.xsd
new file mode 100644
index 0000000..7f8361c
--- /dev/null
+++ b/resources/xsd/dafint.xsd
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+  attributeFormDefault="unqualified" elementFormDefault="qualified"
+  targetNamespace="urn:ogf:dfdl:2013:imp:daffodil.apache.org:2018:int"
+  xmlns:dafint="urn:ogf:dfdl:2013:imp:daffodil.apache.org:2018:int"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+  <!--
+    This schema is for daffodil-specific internal use attribute definitions.
+  -->
+
+  <!-- Attributes to carry file and line number information -->
+  <xsd:attribute name="line" type="xsd:int"  />
+  <xsd:attribute name="col" type="xsd:int"  />
+  <xsd:attribute name="file" type="xsd:token" />
+
+  <xsd:attributeGroup name="daffodilAG">
+    <!-- allows xsi prefixed attributes, and also dafint and daf prefixed
+      attributes -->
+    <xsd:anyAttribute
+      namespace="http://www.w3.org/XML/1998/namespace 
+    urn:ogf:dfdl:2013:imp:daffodil.apache.org:2018:int 
+    urn:ogf:dfdl:2013:imp:daffodil.apache.org:2018:ext" />
+  </xsd:attributeGroup>
+
+  <xsd:element name="testElement">
+    <xsd:complexType>
+      <xsd:attributeGroup ref="dafint:daffodilAG" />
+    </xsd:complexType>
+  </xsd:element>
+
+</xsd:schema>
diff --git a/resources/xsd/dfdlx.xsd b/resources/xsd/dfdlx.xsd
new file mode 100644
index 0000000..f6037e7
--- /dev/null
+++ b/resources/xsd/dfdlx.xsd
@@ -0,0 +1,272 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+
+<xs:schema
+  targetNamespace="http://www.ogf.org/dfdl/dfdl-1.0/extensions"
+  xmlns:xs="http://www.w3.org/2001/XMLSchema"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xmlns:dfdl="http://www.ogf.org/dfdl/dfdl-1.0/"
+  xmlns:dfdlx="http://www.ogf.org/dfdl/dfdl-1.0/extensions"
+  xmlns:daf="urn:ogf:dfdl:2013:imp:daffodil.apache.org:2018:ext"
+  xmlns:dafint="urn:ogf:dfdl:2013:imp:daffodil.apache.org:2018:int"
+  attributeFormDefault="unqualified"
+  elementFormDefault="qualified">
+
+  <xs:import namespace="urn:ogf:dfdl:2013:imp:daffodil.apache.org:2018:int"/>
+  <xs:import namespace="http://www.ogf.org/dfdl/dfdl-1.0/"/>
+
+  <!-- dfdl:property="..." extension values. Extension properties must start with dfdlx: -->
+
+  <xs:simpleType name="PropertyNameType">
+    <xs:restriction base="xs:string">
+      <xs:enumeration value="dfdlx:alignmentKind" />
+      <xs:enumeration value="dfdlx:choiceBranchKeyRanges" />
+      <xs:enumeration value="dfdlx:emptyElementParsePolicy"/>
+      <xs:enumeration value="dfdlx:inputTypeCalc"/>
+      <xs:enumeration value="dfdlx:objectKind"/>
+      <xs:enumeration value="dfdlx:outputTypeCalc"/>
+      <xs:enumeration value="dfdlx:parseUnparsePolicy"/>
+      <xs:enumeration value="dfdlx:repType"/>
+      <xs:enumeration value="dfdlx:repValueRanges"/>
+      <xs:enumeration value="dfdlx:repValues"/>
+      <xs:enumeration value="dfdlx:runtimeProperties"/>
+    </xs:restriction>
+  </xs:simpleType>
+
+
+  <xs:attribute name="alignmentKind" type="dfdlx:AlignmentKindEnum" default="automatic">
+    <xs:annotation>
+      <xs:documentation><![CDATA[
+        If manual, then the dfdl:alignment property is ignored, and all alignment must be done
+        manually by way of dfdl:leadingSkip, dfdl:trailingSkip, or just arranging for elements
+        that have the right size such that alignment is correct.
+
+        The dfdl:alignmentUnits property still applies and is used with dfdl:leadingSkip and dfdl:trailingSkip.
+
+        This property helps overcome limitations of the Daffodil schema compiler where it attempts to optimize
+        out normal alignment regions, but is unable to, resulting in the inability to unparse some formats.
+
+        For all constructs in the scope of this property, there will be no alignment regions created,
+        and charset encodings will not have mandatory text alignment of their characters.
+
+        Since this is a new extension property that is experimental, it will have a default value of "automatic".
+        ]]></xs:documentation>
+    </xs:annotation>
+  </xs:attribute>
+
+  <xs:simpleType name="AlignmentKindEnum">
+    <xs:restriction base="xs:string">
+      <xs:enumeration value="automatic" />
+      <xs:enumeration value="manual" />
+    </xs:restriction>
+  </xs:simpleType>
+
+  <xs:attribute name="parseUnparsePolicy" type="dfdlx:ParseUnparsePolicyEnum"/>
+  <xs:simpleType name="ParseUnparsePolicyEnum">
+    <xs:restriction base="xs:string">
+      <xs:enumeration value="both" />
+      <xs:enumeration value="parseOnly" />
+      <xs:enumeration value="unparseOnly" />
+    </xs:restriction>
+  </xs:simpleType>
+
+  <xs:attribute name="direction" type="dfdlx:VariableDirectionEnum"/>
+  <xs:simpleType name="VariableDirectionEnum">
+    <xs:restriction base="xs:string">
+      <xs:enumeration value="both" />
+      <xs:enumeration value="parseOnly" />
+      <xs:enumeration value="unparseOnly" />
+    </xs:restriction>
+  </xs:simpleType>
+
+  <xs:attribute name="emptyElementParsePolicy" type="dfdlx:EmptyElementParsePolicyEnum"/>
+  <xs:simpleType name="EmptyElementParsePolicyEnum">
+    <xs:restriction base="xs:string">
+      <xs:enumeration value="treatAsEmpty" />
+      <xs:enumeration value="treatAsMissing" />
+    </xs:restriction>
+  </xs:simpleType>
+  
+  <xs:attribute name="choiceBranchKeyRanges" type="dfdl:NonEmptyListOfInteger" />
+
+  <xs:attributeGroup name="SimpleTypeValueCalcAG">
+    <xs:attribute form="qualified" name="repType" type="dfdl:DFDLQName" />
+    <xs:attribute form="qualified" name="inputTypeCalc" type="dfdl:DFDLExpression" />
+    <xs:attribute form="qualified" name="outputTypeCalc" type="dfdl:DFDLExpression" />
+    <xs:attributeGroup ref="dfdlx:RepValuesAG" />
+  </xs:attributeGroup>
+
+  <xs:attributeGroup name="RepValuesAG">
+    <xs:attribute form="qualified" name="repValues" type="dfdl:NonEmptyListofDFDLStringLiteralOrNonEmptyListOfInteger" />
+    <xs:attribute form="qualified" name="repValueRanges" type="dfdl:NonEmptyListOfInteger" />
+  </xs:attributeGroup>
+
+  <xs:attributeGroup name="SimpleTypeValueCalcAGQualified">
+    <xs:attribute form="qualified" name="repType" type="dfdl:DFDLQName" />
+    <xs:attribute form="qualified" name="inputTypeCalc" type="dfdl:DFDLExpression" />
+    <xs:attribute form="qualified" name="outputTypeCalc" type="dfdl:DFDLExpression" />
+    <xs:attributeGroup ref="dfdlx:RepValuesAGQualified" />
+  </xs:attributeGroup>
+
+  <xs:attributeGroup name="RepValuesAGQualified">
+    <xs:attribute form="qualified" name="repValues" type="dfdl:NonEmptyListofDFDLStringLiteralOrNonEmptyListOfInteger" />
+    <xs:attribute form="qualified" name="repValueRanges" type="dfdl:NonEmptyListOfInteger" />
+  </xs:attributeGroup>
+
+  <xs:attributeGroup name="ExtLayeringAGQualified">
+    <xs:attribute form="qualified" name="layerTransform" type="dfdlx:LayerTransformType" />
+    <xs:attribute form="qualified" name="layerEncoding" type="dfdl:EncodingEnum_Or_DFDLExpression" />
+    <xs:attribute form="qualified" name="layerLengthKind" type="dfdlx:LayerLengthKindEnum" />
+    <xs:attribute form="qualified" name="layerLength" type="dfdl:DFDLNonNegativeInteger_Or_DFDLExpression" />
+    <xs:attribute form="qualified" name="layerLengthUnits" type="dfdlx:LayerLengthUnitsEnum" />
+    <xs:attribute form="qualified" name="layerBoundaryMark" type="dfdl:ListOfDFDLStringLiteral_Or_DFDLExpression" />
+  </xs:attributeGroup>
+
+
+  <xs:simpleType name="LayerTransformType">
+    <xs:union>
+      <xs:simpleType>
+        <xs:restriction base="dfdlx:LayerTransformEnum" />
+      </xs:simpleType>
+      <xs:simpleType>
+        <xs:restriction base="xs:NCName" /><!-- for dynamically loaded layers -->
+      </xs:simpleType>
+    </xs:union>
+  </xs:simpleType>
+
+  <xs:simpleType name="LayerTransformEnum">
+    <xs:restriction base="xs:token">
+      <xs:enumeration value="fourbyteswap">
+        <xs:annotation>
+          <xs:documentation>
+            Swap bytes in 32 bit words.
+          </xs:documentation>
+        </xs:annotation>
+      </xs:enumeration>
+      <xs:enumeration value="base64_MIME">
+        <xs:annotation>
+          <xs:documentation>
+            IETF RFC 2045
+
+            Max line length 76 characters.
+          </xs:documentation>
+        </xs:annotation>
+      </xs:enumeration>
+      <xs:enumeration value="lineFolded_IMF">
+        <xs:annotation>
+          <xs:documentation><![CDATA[
+             IETF RFC 2822 Internet Message Format (IMF)
+
+             Each line of characters MUST be no more than
+             998 characters, and SHOULD be no more than 78 characters, excluding
+             the CRLF.
+
+             Though structured field bodies are defined in such a way that
+             folding can take place between many of the lexical tokens (and even
+             within some of the lexical tokens), folding SHOULD be limited to
+             placing the CRLF at higher-level syntactic breaks.  For instance, if
+             a field body is defined as comma-separated values, it is recommended
+             that folding occur after the comma separating the structured items in
+             preference to other places where the field could be folded, even if
+             it is allowed elsewhere.
+
+             Unfolding is accomplished by simply removing any CRLF
+             that is immediately followed by WSP.
+             ]]>
+          </xs:documentation>
+        </xs:annotation>
+      </xs:enumeration>
+      <xs:enumeration value="lineFolded_iCalendar">
+        <xs:annotation>
+          <xs:documentation><![CDATA[
+             IETF RFC 5545 Internet Calendaring and Scheduling (iCalendar)
+
+             Lines of text SHOULD NOT be longer than 75 octets, excluding the line
+             break.  Long content lines SHOULD be split into a multiple line
+             representations using a line "folding" technique.  That is, a long
+             line can be split between any two characters by inserting a CRLF
+             immediately followed by a single linear white-space character (i.e.,
+             SPACE or HTAB).  Any sequence of CRLF followed immediately by a
+             single linear white-space character is ignored (i.e., removed) when
+             processing the content type.
+             ]]>
+          </xs:documentation>
+        </xs:annotation>
+      </xs:enumeration>
+      <xs:enumeration value="gzip">
+        <xs:annotation>
+          <xs:documentation>
+            GZIP per https://www.ietf.org/rfc/rfc1952.txt
+          </xs:documentation>
+        </xs:annotation>
+      </xs:enumeration>
+    </xs:restriction>
+  </xs:simpleType>
+
+  <xs:simpleType name="LayerLengthUnitsEnum">
+    <xs:restriction base="xs:string">
+      <xs:enumeration value="bytes" />
+    </xs:restriction>
+  </xs:simpleType>
+
+  <xs:simpleType name="LayerLengthKindEnum">
+    <xs:restriction base="xs:string">
+      <xs:enumeration value="explicit" />
+      <xs:enumeration value="boundaryMark" />
+      <xs:enumeration value="implicit" />
+    </xs:restriction>
+  </xs:simpleType>
+
+  <xs:attributeGroup name="ObjectKindAG">
+    <xs:attribute form="qualified" name="objectKind" type="dfdlx:ObjectKindType" />
+  </xs:attributeGroup>
+
+  <xs:attributeGroup name="ObjectKindAGQualified">
+    <xs:attribute form="qualified" name="objectKind" type="dfdlx:ObjectKindType" />
+  </xs:attributeGroup>
+
+  <xs:simpleType name="ObjectKindType">
+    <xs:restriction base="xs:string">
+      <xs:enumeration value="bytes"/>
+      <xs:enumeration value="chars"/>
+    </xs:restriction>
+  </xs:simpleType>
+
+  <xs:attributeGroup name="RuntimePropertiesAG">
+    <xs:attribute form="qualified" name="runtimeProperties" type="dfdlx:RuntimePropertiesType" />
+  </xs:attributeGroup>
+
+  <xs:attributeGroup name="RuntimePropertiesAGQualified">
+    <xs:attribute form="qualified" name="runtimeProperties" type="dfdlx:RuntimePropertiesType" />
+  </xs:attributeGroup>
+
+  <xs:simpleType name="RuntimePropertiesType">
+    <xs:restriction base="dfdlx:KVList" />
+  </xs:simpleType>
+
+  <xs:simpleType name="KVList">
+    <xs:list>
+      <xs:simpleType>
+        <xs:restriction base="xs:token">
+          <xs:pattern value="[a-zA-Z_][a-zA-Z0-9_]*=\S*"/>
+        </xs:restriction>
+      </xs:simpleType>
+    </xs:list>
+  </xs:simpleType>
+
+</xs:schema>
diff --git a/resources/xsd/tdml.xsd b/resources/xsd/tdml.xsd
new file mode 100644
index 0000000..81a0d60
--- /dev/null
+++ b/resources/xsd/tdml.xsd
@@ -0,0 +1,370 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
+  xmlns:xs="http://www.w3.org/2001/XMLSchema" 
+  xmlns="http://www.w3.org/2001/XMLSchema" 
+  targetNamespace="http://www.ibm.com/xmlns/dfdl/testData" 
+  xmlns:tns="http://www.ibm.com/xmlns/dfdl/testData" 
+  elementFormDefault="unqualified"
+  xmlns:dfdl="http://www.ogf.org/dfdl/dfdl-1.0/" 
+  xmlns:daf="urn:ogf:dfdl:2013:imp:daffodil.apache.org:2018:ext" 
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+
+  <xsd:import namespace="http://www.w3.org/2001/XMLSchema" />
+  <xsd:import namespace="urn:ogf:dfdl:2013:imp:daffodil.apache.org:2018:ext" />
+  <xsd:import namespace="http://www.ogf.org/dfdl/dfdl-1.0/"/>
+  <xsd:import namespace="http://www.ogf.org/dfdl/dfdl-1.0/extensions"/>
+
+  <xs:attribute name="tutorialInclude" type="xs:string" fixed="no"/>
+  
+<!-- 
+  This element's type is a stub that satisfies the need for xhtml5 validation as part of TDML files.
+
+  It is just a wildcard with skip validation in it. So it's not really validating anything.
+
+  Users of TDML creating tutorials should paste in known-correct xhtml5 as the contents of the 
+  tutorial elements.
+-->
+  <xs:element name="tutorial">
+      <xs:complexType mixed="true">
+      <xs:sequence>
+        <xs:any namespace="##any" processContents="skip" minOccurs="0" maxOccurs="unbounded"/>
+      </xs:sequence>
+      <xs:anyAttribute namespace="##any" processContents="skip"/>
+    </xs:complexType>
+  </xs:element>
+  
+  <!-- IBM uses this namespace http://www.ibm.com/xmlns/dfdl/testData -->
+
+  <element name="testSuite">
+    <complexType>
+      <sequence>
+        <choice maxOccurs="unbounded" minOccurs="0">
+          <element ref="tns:tutorial"/>
+          <element ref="tns:parserTestCase"/>
+          <!-- This is an extension to the IBM TDML language. We allow schemas 
+            to be directly embedded inside the TDML file. A TDML file that contains all 
+            the schemas it needs is a "self contained" TDML file. -->
+          <element ref="tns:defineSchema" minOccurs="0"/>
+
+          <element ref="tns:defineConfig" minOccurs="0"/>
+
+          <element ref="tns:unparserTestCase"/>
+        </choice>
+      </sequence>
+      <attribute name="suiteName" type="xs:token" use="optional"/>
+      <attribute name="ID" type="xs:token" use="optional"/>
+      <attribute name="description" type="xs:string" use="optional"/>
+      <attribute name="defaultRoundTrip" type="tns:roundTripType" use="optional"/>
+      <attribute name="defaultValidation" type="tns:validationType" use="optional"/>
+      <attribute name="defaultConfig" type="xs:string" use="optional"/>
+      <attribute name="defaultImplementations" type="tns:implementationsType" use="optional"/>
+    </complexType>
+    <unique name="unique-parserTestCase-name">
+      <selector xpath="parserTestCase"/>
+      <field xpath="@name"/>
+    </unique>
+    <unique name="unique-unparserTestCase-name">
+      <selector xpath="unparserTestCase"/>
+      <field xpath="@name"/>
+    </unique>
+    <unique name="unique-embeddedSchema-name">
+      <selector xpath="defineSchema"/>
+      <field xpath="@name"/>
+    </unique>
+    <unique name="unique-embeddedConfig-name">
+      <selector xpath="defineConfig"/>
+      <field xpath="@name"/>
+    </unique>
+  </element>
+  
+  <simpleType name="implementationsType">
+    <list itemType="tns:implementationItem"/>
+  </simpleType>
+  
+  <simpleType name="implementationItem">
+    <restriction base="xs:token">
+      <enumeration value="daffodil"/>
+      <enumeration value="daffodil-runtime2"/>
+      <enumeration value="ibm"/>
+    </restriction>
+  </simpleType>
+  
+<!-- We want to allow an xsd:schema to be named and directly embedded in 
+  the TDML thereby allowing a fully-self-contained single file test case as 
+  an exchange medium for tests. -->
+
+  <element name="defineSchema" type="tns:defineSchemaType"/>
+  <complexType name="defineSchemaType">
+    <choice maxOccurs='unbounded'>
+      <element ref='dfdl:format'/>
+      <element ref='dfdl:defineVariable'/>
+      <element ref='dfdl:defineEscapeScheme'/>
+      <element ref='dfdl:defineFormat'/>
+      <element ref='xs:element'/>
+      <element ref='xs:complexType'/>
+      <element ref='xs:group'/>
+      <element ref='xs:simpleType'/>
+      <element ref='xs:include'/>
+      <element ref='xs:import'/>
+                        <!-- <any namespace="##other" processContents="lax"/> -->
+    </choice>
+    <attribute name="name" type="xs:NCName" use="required"/>
+                <!-- We want the default to be 'unqualified' in the longer term but 
+                     we leave it 'qualified here to prevent lots of tests from breaking. -->
+    <attribute name="elementFormDefault" type="tns:elementFormDefaultType" default="qualified"/>
+        <!-- we want the default for useDefaultNamespace to be false longer term but
+             we leave it as true here to prevent lots of tests from breaking.
+             81 tests to be exact. -->
+    <attribute name="useDefaultNamespace" type="xs:boolean" default="true">
+      <annotation><documentation>
+        Controls whether a xmlns="http://example.com" default namespace prefix
+        definition will be provided for the embedded schema.
+
+        This matters when the defined schema is used to validate the infoset xml
+        before unparsing, or after parsing, as it affects the interpretation of
+        path expressions in the DFDL schema based on the unqualifiedPathStepPolicy
+        tunable.
+
+        False is recommended since default namespaces can be confusing.
+      </documentation></annotation>
+    </attribute>
+    <attribute ref="tns:tutorialInclude"/>
+  </complexType>
+
+  <element name="defineConfig" type="tns:defineConfigType"/>
+  <complexType name="defineConfigType">
+    <sequence>
+      <element ref="daf:externalVariableBindings" minOccurs="0" maxOccurs="1"/>
+      <element ref="daf:tunables" minOccurs="0" maxOccurs="1"/>
+    </sequence>
+    <attribute name="name" type="xs:NCName" use="required"/>
+  </complexType>
+
+
+  <element name="parserTestCase" type="tns:parserTestCaseType"/>
+  <complexType name="parserTestCaseType">
+    <choice minOccurs="2" maxOccurs="11">
+      <!-- we can't enforce the cardinality in XSD 1.0 -->
+      <element ref="tns:tutorial"/>
+      <element ref="tns:document"/>
+      <element ref="tns:infoset"/>
+      <element ref="tns:errors"/>
+      <element ref="tns:warnings" minOccurs='0'/>
+      <element ref="tns:validationErrors" minOccurs="0"/>
+    </choice>
+    <attributeGroup ref="tns:testCaseAttribs"/>
+  </complexType>
+
+  <attributeGroup name="testCaseAttribs">
+    <attribute name="name" type="xs:NCName" use="required"/>
+    <attribute name="ID" type="xs:token" use="optional"/>
+    <attribute name="root" type="xs:NCName" use="optional"/> <!-- only needed when there is no infoset. -->
+    <attribute name="rootNS" type="xs:string" use="optional"/> <!-- only needed when there is no infoset. -->
+    <attribute name="model" type="xs:string" use="optional"/> <!-- is there a type for a path/uri? -->
+    <attribute name="config" type="xs:string" use="optional"/> <!-- is there a type for a path/uri? -->
+    <attribute name="roundTrip" type="tns:roundTripType" use="optional"/>
+    <attribute name="description" type="xs:string" use="optional"/>
+    <attribute name="unsupported" type="xs:boolean" use="optional" default="false"/>
+    <attribute name="validation" type="tns:validationType" use="optional"/>
+    <attribute name="implementations" type="tns:implementationsType" use="optional"/>
+
+  </attributeGroup>
+
+  <simpleType name="roundTripType">
+    <restriction base="xs:token">
+      <enumeration value="false"/> <!-- means same as none -->
+      <enumeration value="true"/> <!-- means same as onePass -->
+      <!-- 
+        parse only - compare infoset. 
+        -->
+      <enumeration value="none"/>
+      <!--  
+        parse, compare infoset, unparse - compare data 
+        -->
+      <enumeration value="onePass"/> 
+      <!-- 
+        parse, unparse, reparse - compare infoset.
+        Note that this can mask certain errors. So must be used with caution.
+        -->
+      <enumeration value="twoPass"/> 
+      <!-- 
+        parse, unparse, reparse, reunparse, compare data.
+        Note that this can mask many kinds of errors very easily, so must be used
+        rarely and with caution. 
+        -->
+      <enumeration value="threePass"/>
+    </restriction>
+  </simpleType>
+  
+  <simpleType name="elementFormDefaultType">
+    <restriction base="xs:token">
+      <enumeration value="qualified"/>
+      <enumeration value="unqualified"/>
+    </restriction>
+  </simpleType>
+
+  <simpleType name="validationType">
+    <restriction base="xs:token">
+      <enumeration value="on"/>
+      <enumeration value="limited"/>
+      <enumeration value="off"/>
+    </restriction>
+  </simpleType>
+
+  <element name="document" type="tns:documentType"/>
+  <element name="infoset" type="tns:infosetType"/>
+  <element name="errors" type="tns:errorsType"/>
+  <element name="warnings" type="tns:warningsType"/>
+  <element name="validationErrors" type="tns:validationErrorsType"/>
+
+  <complexType name="documentType" mixed="true">
+    <sequence>
+      <element ref="tns:documentPart" minOccurs="0" maxOccurs="unbounded"/>
+    </sequence>
+    <attribute name="bitOrder" type="tns:bitOrderEnum" use="optional"/>
+    <attribute ref="tns:tutorialInclude"/>
+  </complexType>
+
+  <element name="documentPart" type="tns:documentPartType"/>
+  <complexType name="documentPartType">
+    <simpleContent>
+      <extension base="xs:string">
+        <attribute name="type" type="tns:documentPartTypeEnum" use="required"/>
+        <attribute name="replaceDFDLEntities" type="xs:boolean"/>
+        <attributeGroup ref="tns:bitOrderAG"/>
+        <attribute name="encoding" type="xs:token" use="optional"/>
+      </extension>
+    </simpleContent>
+  </complexType>
+
+  <simpleType name="documentPartTypeEnum">
+    <restriction base="xs:string">
+      <enumeration value="byte"/>
+      <enumeration value="text"/>
+      <enumeration value="bits"/>
+      <enumeration value="file"/>
+    </restriction>
+  </simpleType>
+
+  <attributeGroup name="bitOrderAG">
+    <attribute name="bitOrder" type="tns:bitOrderEnum" use="optional"/>
+    <attribute name="byteOrder" type="tns:byteOrderEnum" use="optional"/>
+  </attributeGroup>
+
+  <simpleType name="byteOrderEnum">
+    <annotation>
+      <documentation>
+        Not to be confused with dfdl:byteOrder, this attribute describes the
+        order of bits or bytes in the TDML document part, that is, whether
+        they
+        should be given their positions starting from the beginning (LTR) or the
+        end (RTL). LTR is the normal default where data location number
+        increase
+        from left to right. RTL is used for bit-order LSBFirst, and the bytes
+        are ordered starting on the right increasing to the left.
+      </documentation>
+    </annotation>
+    <restriction base="xs:string">
+      <enumeration value="RTL"/>
+      <enumeration value="LTR"/>
+    </restriction>
+  </simpleType>
+
+  <simpleType name="bitOrderEnum">
+    <restriction base="xs:string">
+      <enumeration value="LSBFirst"/>
+      <enumeration value="MSBFirst"/>
+    </restriction>
+  </simpleType>
+
+  <complexType name="infosetType">
+    <sequence>
+      <element ref="tns:dfdlInfoset"/>
+    </sequence>
+    <attribute ref="tns:tutorialInclude"/>
+  </complexType>
+
+  <element name="dfdlInfoset" type="tns:dfdlInfosetType"/>
+
+  <complexType name="dfdlInfosetType" mixed="true">
+    <sequence>
+      <any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+    </sequence>
+    <attribute name="type" use="optional" default="infoset">
+      <simpleType>
+        <restriction base="xs:string">
+          <enumeration value="infoset"/>
+          <enumeration value="file"/>
+        </restriction>
+      </simpleType>
+    </attribute>
+  </complexType>
+
+  <complexType name="errorsType">
+    <sequence>
+      <element ref="tns:error" maxOccurs="unbounded" minOccurs="1"/>
+    </sequence>
+    <attributeGroup ref="tns:errorWarnAttribs"/>
+  </complexType>
+
+  <complexType name="warningsType">
+    <sequence>
+      <element ref="tns:warning" maxOccurs="unbounded" minOccurs="0"/>
+                        <!-- use <warnings/> to indicate no warnings should occur. -->
+    </sequence>
+    <attributeGroup ref="tns:errorWarnAttribs"/>
+  </complexType>
+
+  <complexType name="validationErrorsType">
+    <sequence>
+      <element ref="tns:error" maxOccurs="unbounded" minOccurs="0"/>
+                        <!-- use <validationErrors/> to indicate no validation should occur. -->
+    </sequence>
+    <attributeGroup ref="tns:errorWarnAttribs"/>
+  </complexType>
+
+  <element name="error" type="xs:string"/>
+  <element name="warning" type="xs:string"/>
+
+  <xs:attributeGroup name="errorWarnAttribs">
+    <xs:attribute name="match" use="optional" default="all">
+      <xs:simpleType>
+        <xs:restriction base="xs:string">
+          <xs:enumeration value="all"/>
+          <xs:enumeration value="any"/>
+        </xs:restriction>
+      </xs:simpleType>
+    </xs:attribute>
+  </xs:attributeGroup>
+
+  <element name="unparserTestCase" type="tns:unparserTestCaseType"/>
+  <complexType name="unparserTestCaseType">
+    <choice minOccurs="2" maxOccurs="9">
+      <!-- we just can't enforce cardinality of any of these things using XSD 1.0 -->
+      <element ref="tns:tutorial"/> <!-- these before, between, or after any of the others -->
+      <element ref="tns:infoset"/> <!-- required -->
+      <element ref="tns:document"/> <!-- must have either document, or errors, or both -->
+      <element ref="tns:errors"/>
+      <element ref="tns:warnings"/>
+    </choice>
+    <attributeGroup ref="tns:testCaseAttribs"/>
+  </complexType>
+
+</xsd:schema>
diff --git a/resources/xsd/xml.xsd b/resources/xsd/xml.xsd
new file mode 100644
index 0000000..fd6d5aa
--- /dev/null
+++ b/resources/xsd/xml.xsd
@@ -0,0 +1,155 @@
+<?xml version='1.0'?>
+<!--
+  Copyright © 2018 World Wide Web Consortium, (Massachusetts
+  Institute of Technology, European Research Consortium for Informatics and
+  Mathematics, Keio University, Beihang). All Rights Reserved. This work is
+  distributed under the W3C® Software License [1] in the hope that it will be
+  useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+  [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+-->
+
+<xs:schema targetNamespace="http://www.w3.org/XML/1998/namespace"
+  xmlns:xs="http://www.w3.org/2001/XMLSchema" xml:lang="en"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+
+  <xs:annotation>
+    <xs:documentation>
+      See http://www.w3.org/XML/1998/namespace.html and
+      http://www.w3.org/TR/REC-xml for information about this namespace.
+
+      This schema document describes the XML namespace, in a form
+      suitable for import by other schema documents.
+
+      Note that local names in this namespace are intended to be defined
+      only by the World Wide Web Consortium or its subgroups. The
+      following names are currently defined in this namespace and should
+      not be used with conflicting semantics by any Working Group,
+      specification, or document instance:
+
+      base (as an attribute name): denotes an attribute whose value
+      provides a URI to be used as the base for interpreting any
+      relative URIs in the scope of the element on which it
+      appears; its value is inherited. This name is reserved
+      by virtue of its definition in the XML Base specification.
+
+      id (as an attribute name): denotes an attribute whose value
+      should be interpreted as if declared to be of type ID.
+      The xml:id specification is not yet a W3C Recommendation,
+      but this attribute is included here to facilitate experimentation
+      with the mechanisms it proposes. Note that it is _not_ included
+      in the specialAttrs attribute group.
+
+      lang (as an attribute name): denotes an attribute whose value
+      is a language code for the natural language of the content of
+      any element; its value is inherited. This name is reserved
+      by virtue of its definition in the XML specification.
+
+      space (as an attribute name): denotes an attribute whose
+      value is a keyword indicating what whitespace processing
+      discipline is intended for the content of the element; its
+      value is inherited. This name is reserved by virtue of its
+      definition in the XML specification.
+
+      Father (in any context at all): denotes Jon Bosak, the chair of
+      the original XML Working Group. This name is reserved by
+      the following decision of the W3C XML Plenary and
+      XML Coordination groups:
+
+      In appreciation for his vision, leadership and dedication
+      the W3C XML Plenary on this 10th day of February, 2000
+      reserves for Jon Bosak in perpetuity the XML name
+      xml:Father
+    </xs:documentation>
+  </xs:annotation>
+
+  <xs:annotation>
+    <xs:documentation>This schema defines attributes and an attribute
+      group
+      suitable for use by
+      schemas wishing to allow xml:base, xml:lang or xml:space attributes
+      on elements they define.
+
+      To enable this, such a schema must import this schema
+      for the XML namespace, e.g. as follows:
+      &lt;schema . . .>
+      . . .
+      &lt;import namespace="http://www.w3.org/XML/1998/namespace"
+      schemaLocation="http://www.w3.org/2001/03/xml.xsd"/>
+
+      Subsequently, qualified reference to any of the attributes
+      or the group defined below will have the desired effect, e.g.
+
+      &lt;type . . .>
+      . . .
+      &lt;attributeGroup ref="xml:specialAttrs"/>
+
+      will define a type which will schema-validate an instance
+      element with any of those attributes
+    </xs:documentation>
+  </xs:annotation>
+
+  <xs:annotation>
+    <xs:documentation>In keeping with the XML Schema WG's standard
+      versioning
+      policy, this schema document will persist at
+      http://www.w3.org/2004/10/xml.xsd.
+      At the date of issue it can also be found at
+      http://www.w3.org/2001/xml.xsd.
+      The schema document at that URI may however change in the future,
+      in order to remain compatible with the latest version of XML Schema
+      itself, or with the XML namespace itself. In other words, if the
+      XML
+      Schema or XML namespaces change, the version of this document at
+      http://www.w3.org/2001/xml.xsd will change
+      accordingly; the version at
+      http://www.w3.org/2004/10/xml.xsd will not change.
+    </xs:documentation>
+  </xs:annotation>
+
+  <xs:attribute name="lang" type="xs:language">
+    <xs:annotation>
+      <xs:documentation>Attempting to install the relevant ISO 2- and
+        3-letter
+        codes as the enumerated possible values is probably never
+        going to be a realistic possibility. See
+        RFC 3066 at http://www.ietf.org/rfc/rfc3066.txt and the IANA registry
+        at http://www.iana.org/assignments/lang-tag-apps.htm for
+        further information.
+      </xs:documentation>
+    </xs:annotation>
+  </xs:attribute>
+
+  <xs:attribute name="space">
+    <xs:simpleType>
+      <xs:restriction base="xs:NCName">
+        <xs:enumeration value="default" />
+        <xs:enumeration value="preserve" />
+      </xs:restriction>
+    </xs:simpleType>
+  </xs:attribute>
+
+  <xs:attribute name="base" type="xs:anyURI">
+    <xs:annotation>
+      <xs:documentation>See http://www.w3.org/TR/xmlbase/ for
+        information about this attribute.
+      </xs:documentation>
+    </xs:annotation>
+  </xs:attribute>
+
+  <xs:attribute name="id" type="xs:ID">
+    <xs:annotation>
+      <xs:documentation>See http://www.w3.org/TR/xml-id/ for
+        information about this attribute.
+      </xs:documentation>
+    </xs:annotation>
+  </xs:attribute>
+
+  <xs:attributeGroup name="specialAttrs">
+    <xs:attribute ref="xml:base" />
+    <xs:attribute ref="xml:lang" />
+    <xs:attribute ref="xml:space" />
+  </xs:attributeGroup>
+
+</xs:schema>