mbeckerle closed pull request #152: Daffodil 2028 cross test
URL: https://github.com/apache/incubator-daffodil/pull/152
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/daffodil-lib/src/main/resources/org/apache/daffodil/xsd/DFDLGeneralFormat.dfdl.xsd
 
b/daffodil-lib/src/main/resources/org/apache/daffodil/xsd/DFDLGeneralFormat.dfdl.xsd
index 093d8e393..d46072012 100644
--- 
a/daffodil-lib/src/main/resources/org/apache/daffodil/xsd/DFDLGeneralFormat.dfdl.xsd
+++ 
b/daffodil-lib/src/main/resources/org/apache/daffodil/xsd/DFDLGeneralFormat.dfdl.xsd
@@ -23,7 +23,15 @@
   <xs:annotation>
     <xs:appinfo source="http://www.ogf.org/dfdl/";>
 
-      <dfdl:defineFormat name="GeneralFormat">
+      <!--
+        This set of properties should never change. It can be added to 
+        if properties are missing, but should not be changed.
+        
+        Changes should be introduced by way of defining new formats in
+        terms of this one, which override definitions. See below in 
+        the file for examples. 
+       -->
+      <dfdl:defineFormat name="GeneralFormatOriginal">
         <dfdl:format
           alignment="1"
           alignmentUnits="bytes"
@@ -93,6 +101,17 @@
           utf16Width="fixed"
         />
       </dfdl:defineFormat>
+      
+      <dfdl:defineFormat name="GeneralFormat">
+        <dfdl:format ref="GeneralFormatOriginal" />
+      </dfdl:defineFormat>
+        
+      <dfdl:defineFormat name="GeneralFormatPortable">
+        <dfdl:format ref="GeneralFormatOriginal"
+          calendarTimeZone="UTC"
+          encodingErrorPolicy="error"
+        />   
+      </dfdl:defineFormat>
 
     </xs:appinfo>
   </xs:annotation>
diff --git a/daffodil-lib/src/main/resources/org/apache/daffodil/xsd/tdml.xsd 
b/daffodil-lib/src/main/resources/org/apache/daffodil/xsd/tdml.xsd
index b7db436c6..2b0cdfd18 100644
--- a/daffodil-lib/src/main/resources/org/apache/daffodil/xsd/tdml.xsd
+++ b/daffodil-lib/src/main/resources/org/apache/daffodil/xsd/tdml.xsd
@@ -76,7 +76,7 @@
       <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="xs:string" 
use="optional"/>
+      <attribute name="defaultImplementations" type="tns:implementationsType" 
use="optional"/>
     </complexType>
     <unique name="unique-parserTestCase-name">
       <selector xpath="parserTestCase"/>
@@ -96,6 +96,17 @@
     </unique>
   </element>
   
+  <simpleType name="implementationsType">
+    <list itemType="tns:implementationItem"/>
+  </simpleType>
+  
+  <simpleType name="implementationItem">
+    <restriction base="xs:token">
+      <enumeration value="daffodil"/>
+      <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. -->
@@ -156,7 +167,7 @@
     <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="xs:string" use="optional"/>
+    <attribute name="implementations" type="tns:implementationsType" 
use="optional"/>
 
   </attributeGroup>
 
diff --git 
a/daffodil-tdml-lib/src/main/scala/org/apache/daffodil/tdml/RunnerFactory.scala 
b/daffodil-tdml-lib/src/main/scala/org/apache/daffodil/tdml/RunnerFactory.scala
index 36fb3b932..08c19e47e 100644
--- 
a/daffodil-tdml-lib/src/main/scala/org/apache/daffodil/tdml/RunnerFactory.scala
+++ 
b/daffodil-tdml-lib/src/main/scala/org/apache/daffodil/tdml/RunnerFactory.scala
@@ -67,7 +67,20 @@ object Runner {
    * A test or test suite can override this to specify more or different 
implementations
    * that the test should pass for.
    */
-  def defaultImplementationsDefaultDefault = Seq("daffodil")
+  def defaultImplementationsDefaultDefault = Seq("daffodil", "ibm")
+
+  /**
+   * By default we don't run Daffodil negative TDML tests against 
cross-testers.
+   * The error messages are simply too varied.
+   *
+   * Negative tests must fail, but error messages aren't compared.
+   */
+  def defaultShouldDoErrorComparisonOnCrossTests = false
+  
+  /**
+   * By default we don't cross test warning messages because they are too 
varied.
+   */
+  def defaultShouldDoWarningComparisonOnCrossTests = false
 
 }
 
diff --git 
a/daffodil-tdml-lib/src/main/scala/org/apache/daffodil/tdml/TDMLRunner.scala 
b/daffodil-tdml-lib/src/main/scala/org/apache/daffodil/tdml/TDMLRunner.scala
index 834cf56d4..5c3f9cdc9 100644
--- a/daffodil-tdml-lib/src/main/scala/org/apache/daffodil/tdml/TDMLRunner.scala
+++ b/daffodil-tdml-lib/src/main/scala/org/apache/daffodil/tdml/TDMLRunner.scala
@@ -164,6 +164,12 @@ private[tdml] object DFDLTestSuite {
  *
  * defaultImplementationsDefault the implementations default for the test 
suite will be
  * taken from this value if it is not specified on the testSuite itself.
+ *
+ * shouldDoErrorComparisonOnCrossTests controls whether negative test error 
messages  are compared
+ * during cross testing, or the tests are just run to determine that they fail.
+ *
+ * shouldDoWarningComparisonOnCrossTests controls whether test warning 
messages  are compared
+ * during cross testing.
  */
 
 class DFDLTestSuite private[tdml] (val __nl: Null, // this extra arg allows us 
to make this primary constructor package private so we can deprecate the one 
generally used.
@@ -173,7 +179,9 @@ class DFDLTestSuite private[tdml] (val __nl: Null, // this 
extra arg allows us t
   val compileAllTopLevel: Boolean,
   val defaultRoundTripDefault: RoundTrip,
   val defaultValidationDefault: String,
-  val defaultImplementationsDefault: Seq[String])
+  val defaultImplementationsDefault: Seq[String],
+  val shouldDoErrorComparisonOnCrossTests: Boolean,
+  val shouldDoWarningComparisonOnCrossTests: Boolean)
   extends Logging
   with HasSetDebugger {
 
@@ -188,11 +196,15 @@ class DFDLTestSuite private[tdml] (val __nl: Null, // 
this extra arg allows us t
     compileAllTopLevel: Boolean = false,
     defaultRoundTripDefault: RoundTrip = Runner.defaultRoundTripDefaultDefault,
     defaultValidationDefault: String = Runner.defaultValidationDefaultDefault,
-    defaultImplementationsDefault: Seq[String] = 
Runner.defaultImplementationsDefaultDefault) =
+    defaultImplementationsDefault: Seq[String] = 
Runner.defaultImplementationsDefaultDefault,
+    shouldDoErrorComparisonOnCrossTests: Boolean = 
Runner.defaultShouldDoErrorComparisonOnCrossTests,
+    shouldDoWarningComparisonOnCrossTests: Boolean = 
Runner.defaultShouldDoWarningComparisonOnCrossTests) =
     this(null, aNodeFileOrURL, validateTDMLFile, validateDFDLSchemas, 
compileAllTopLevel,
       defaultRoundTripDefault,
       defaultValidationDefault,
-      defaultImplementationsDefault)
+      defaultImplementationsDefault,
+      shouldDoErrorComparisonOnCrossTests,
+      shouldDoWarningComparisonOnCrossTests)
 
   if (!aNodeFileOrURL.isInstanceOf[scala.xml.Node])
     System.err.println("Creating DFDL Test Suite for " + aNodeFileOrURL)
@@ -442,6 +454,10 @@ abstract class TestCase(testCaseXML: NodeSeq, val parent: 
DFDLTestSuite)
     }
   }
 
+  final def isCrossTest(implString: String) = implString != "daffodil"
+
+  final def isNegativeTest = optExpectedErrors.isDefined
+
   lazy val tdmlDFDLProcessorFactory: AbstractTDMLDFDLProcessorFactory = {
     import scala.language.reflectiveCalls
     import scala.language.existentials
@@ -653,7 +669,10 @@ abstract class TestCase(testCaseXML: NodeSeq, val parent: 
DFDLTestSuite)
     //
     // Should we run the test?
     //
-    if (!implementationStrings.contains(impl.implementationName)) {
+    val implName = impl.implementationName
+    val istrings = implementationStrings
+    val useThisImpl = istrings.contains(implName)
+    if (!useThisImpl) {
       //
       // skip the test
       //
@@ -706,6 +725,22 @@ abstract class TestCase(testCaseXML: NodeSeq, val parent: 
DFDLTestSuite)
 
     }
   }
+
+  protected def checkDiagnosticMessages(diagnostics: Seq[Throwable],
+    errors: ExpectedErrors,
+    optWarnings: Option[ExpectedWarnings],
+    implString: Option[String]) {
+    Assert.usage(this.isNegativeTest)
+
+    // check for any test-specified errors or warnings
+    if (!isCrossTest(implString.get) ||
+      parent.shouldDoErrorComparisonOnCrossTests)
+      VerifyTestCase.verifyAllDiagnosticsFound(diagnostics, Some(errors), 
implString)
+
+    if (!isCrossTest(implString.get) ||
+      parent.shouldDoWarningComparisonOnCrossTests)
+      VerifyTestCase.verifyAllDiagnosticsFound(diagnostics, optWarnings, 
implString)
+  }
 }
 
 case class ParserTestCase(ptc: NodeSeq, parentArg: DFDLTestSuite)
@@ -735,9 +770,9 @@ case class ParserTestCase(ptc: NodeSeq, parentArg: 
DFDLTestSuite)
         }
       }
 
-      case (None, Some(_)) => {
+      case (None, Some(errors)) => {
         compileResult.left.foreach { diags =>
-          VerifyTestCase.verifyAllDiagnosticsFound(diags, optExpectedErrors, 
implString)
+          checkDiagnosticMessages(diags, errors, optExpectedWarnings, 
implString)
         }
         compileResult.right.foreach {
           case (_, processor) =>
@@ -790,15 +825,11 @@ case class ParserTestCase(ptc: NodeSeq, parentArg: 
DFDLTestSuite)
         (actual, diagnostics, isErr)
       }
     }
-    // check for any test-specified warnings
-    VerifyTestCase.verifyAllDiagnosticsFound(diagnostics, optWarnings, 
implString)
-    if (isError) {
-      // good we expected an error
-      // check for any test-specified errors
-      VerifyTestCase.verifyAllDiagnosticsFound(diagnostics, Some(errors), 
implString)
-    } else {
+    if (!isError) {
       throw TDMLException("Expected error. Didn't get one. Actual result 
was\n" + parseResult.getResult.toString, implString)
     }
+
+    checkDiagnosticMessages(diagnostics, errors, optWarnings, implString)
   }
 
   /**
@@ -859,7 +890,9 @@ case class ParserTestCase(ptc: NodeSeq, parentArg: 
DFDLTestSuite)
     }
 
     val allDiags = processor.getDiagnostics ++ actual.getDiagnostics
-    VerifyTestCase.verifyAllDiagnosticsFound(allDiags, optExpectedWarnings, 
implString)
+    if (!isCrossTest(implString.get) ||
+      parent.shouldDoWarningComparisonOnCrossTests)
+      VerifyTestCase.verifyAllDiagnosticsFound(allDiags, optExpectedWarnings, 
implString)
   }
 
   /**
@@ -1067,9 +1100,7 @@ case class UnparserTestCase(ptc: NodeSeq, parentArg: 
DFDLTestSuite)
 
       case (_, Some(errors)) => {
         compileResult.left.foreach { diags =>
-          VerifyTestCase.verifyAllDiagnosticsFound(diags, Some(errors), 
implString)
-          // check warnings even if there are errors expected.
-          VerifyTestCase.verifyAllDiagnosticsFound(diags, optWarnings, 
implString)
+          checkDiagnosticMessages(diags, errors, optWarnings, implString)
         }
         compileResult.right.foreach {
           case (_, processor) =>
@@ -1123,7 +1154,9 @@ case class UnparserTestCase(ptc: NodeSeq, parentArg: 
DFDLTestSuite)
       VerifyTestCase.verifyBinaryOrMixedData(expectedData, outStream, 
implString)
     }
     val allDiags = actual.getDiagnostics ++ processor.getDiagnostics
-    VerifyTestCase.verifyAllDiagnosticsFound(allDiags, optWarnings, implString)
+    if (!isCrossTest(implString.get) ||
+      parent.shouldDoWarningComparisonOnCrossTests)
+      VerifyTestCase.verifyAllDiagnosticsFound(allDiags, optWarnings, 
implString)
 
     if (roundTrip eq OnePassRoundTrip) {
 
@@ -1151,7 +1184,9 @@ case class UnparserTestCase(ptc: NodeSeq, parentArg: 
DFDLTestSuite)
 
       val xmlNode = parseActual.getResult
       VerifyTestCase.verifyParserTestData(xmlNode, inputInfoset, implString)
-      VerifyTestCase.verifyAllDiagnosticsFound(actual.getDiagnostics, 
optWarnings, implString)
+      if (!isCrossTest(implString.get) ||
+        parent.shouldDoWarningComparisonOnCrossTests)
+        VerifyTestCase.verifyAllDiagnosticsFound(actual.getDiagnostics, 
optWarnings, implString)
 
       (shouldValidate, expectsValidationError) match {
         case (true, true) => {
@@ -1194,7 +1229,6 @@ case class UnparserTestCase(ptc: NodeSeq, parentArg: 
DFDLTestSuite)
             case t: Throwable => toss(t, implString)
           }
 
-        // Verify that some partial output has shown up in the bytes.
         val dataErrors = {
           optExpectedData.flatMap { data =>
             try {
@@ -1224,9 +1258,9 @@ case class UnparserTestCase(ptc: NodeSeq, parentArg: 
DFDLTestSuite)
       }
     }
 
-    // check for any test-specified errors or warnings
-    VerifyTestCase.verifyAllDiagnosticsFound(diagnostics, Some(errors), 
implString)
-    VerifyTestCase.verifyAllDiagnosticsFound(diagnostics, optWarnings, 
implString)
+    if (diagnostics.isEmpty)
+      throw TDMLException("Unparser test expected error. Didn't get one.", 
implString)
+    checkDiagnosticMessages(diagnostics, errors, optWarnings, implString)
   }
 }
 
diff --git 
a/daffodil-tdml-processor/src/test/scala/org/apache/daffodil/tdml/TestTDMLCrossTest.scala
 
b/daffodil-tdml-processor/src/test/scala/org/apache/daffodil/tdml/TestTDMLCrossTest.scala
index bf79dae05..687ba5d35 100644
--- 
a/daffodil-tdml-processor/src/test/scala/org/apache/daffodil/tdml/TestTDMLCrossTest.scala
+++ 
b/daffodil-tdml-processor/src/test/scala/org/apache/daffodil/tdml/TestTDMLCrossTest.scala
@@ -36,7 +36,7 @@ class TestTDMLCrossTest {
   @Test def testUnrecognizedImpl1() {
 
     val testSuite =
-      <ts:testSuite xmlns:dfdl={ dfdl } xmlns:xs={ xsd } xmlns:ex={ example } 
xmlns:ts={ tdml } suiteName="theSuiteName" 
defaultImplementations="notAClassName alsoNotAClassName reallyNotAClassName">
+      <ts:testSuite xmlns:dfdl={ dfdl } xmlns:xs={ xsd } xmlns:ex={ example } 
xmlns:ts={ tdml } suiteName="theSuiteName" 
defaultImplementations="notAnImplName">
         <ts:defineSchema name="s">
           <xs:include 
schemaLocation="org/apache/daffodil/xsd/DFDLGeneralFormat.dfdl.xsd"/>
           <dfdl:format ref="ex:GeneralFormat"/>
@@ -52,11 +52,11 @@ class TestTDMLCrossTest {
         </ts:parserTestCase>
       </ts:testSuite>
     lazy val ts = new DFDLTestSuite(testSuite)
-    val e = intercept[AssumptionViolatedException] {
+    val e = intercept[TDMLException] {
       ts.runOneTest("test1")
     }
     val msg = e.getMessage()
-    assertTrue(msg.contains("Test 'test1' not compatible with implementation"))
+    assertTrue(msg.contains("notAnImplName"))
   }
 
 }
diff --git 
a/daffodil-test-ibm1/src/test/resources/test-suite/tresys-contributed/nested-separator-delimited.tdml
 
b/daffodil-test-ibm1/src/test/resources/test-suite/tresys-contributed/nested-separator-delimited.tdml
index 5f87878db..6556962e4 100644
--- 
a/daffodil-test-ibm1/src/test/resources/test-suite/tresys-contributed/nested-separator-delimited.tdml
+++ 
b/daffodil-test-ibm1/src/test/resources/test-suite/tresys-contributed/nested-separator-delimited.tdml
@@ -21,7 +21,7 @@
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:dfdl="http://www.ogf.org/dfdl/dfdl-1.0/";
   xmlns:xs="http://www.w3.org/2001/XMLSchema"; 
   xmlns:ex="http://example.com"; xmlns="http://example.com";
-  defaultImplementations="ibm dfdl">
+  defaultImplementations="ibm daffodil">
 
 
   <tdml:defineSchema name="baseline">
diff --git 
a/daffodil-test-ibm1/src/test/scala/org/apache/daffodil/TresysTests.scala 
b/daffodil-test-ibm1/src/test/scala/org/apache/daffodil/TresysTests.scala
index d5197dba7..1e48eae8a 100644
--- a/daffodil-test-ibm1/src/test/scala/org/apache/daffodil/TresysTests.scala
+++ b/daffodil-test-ibm1/src/test/scala/org/apache/daffodil/TresysTests.scala
@@ -109,10 +109,10 @@ class TresysTests {
   // not found. Debug later.
   // @Test def test_duplicateDefineFormatsOneSchema() { 
runnerMD.runOneTest("duplicateDefineFormatsOneSchema") }
 
-  @Test def test_nested_separator_delimited_baseline() { 
runnerNSD.trace.runOneTest("baseline") }
+  @Test def test_nested_separator_delimited_baseline() { 
runnerNSD.runOneTest("baseline") }
 
   // Fails in IBM DFDL - ambiguous separator/terminator not accepted.
-  @Test def test_nested_separator_delimited_baseline_ibm() { 
runnerNSD.trace.runOneTest("baseline_ibm") }
+  @Test def test_nested_separator_delimited_baseline_ibm() { 
runnerNSD.runOneTest("baseline_ibm") }
 
   @Test def test_nested_separator_delimited_basicNest() { 
runnerNSD.runOneTest("basicNest") }
   // Fails infinite loop
diff --git 
a/daffodil-test/src/test/resources/org/apache/daffodil/section02/schema_definition_errors/SchemaDefinitionErrors.tdml
 
b/daffodil-test/src/test/resources/org/apache/daffodil/section02/schema_definition_errors/SchemaDefinitionErrors.tdml
index 3f02dac23..fc82a7c3b 100644
--- 
a/daffodil-test/src/test/resources/org/apache/daffodil/section02/schema_definition_errors/SchemaDefinitionErrors.tdml
+++ 
b/daffodil-test/src/test/resources/org/apache/daffodil/section02/schema_definition_errors/SchemaDefinitionErrors.tdml
@@ -76,7 +76,7 @@
       calendarLanguage="en" calendarPatternKind="implicit"
       calendarTimeZone="UTC" decimalSigned="yes"
       documentFinalTerminatorCanBeMissing="no"
-      emptyValueDelimiterPolicy="both" encodingErrorPolicy="replace"
+      emptyValueDelimiterPolicy="both" encodingErrorPolicy="error"
       encoding="utf-8" escapeSchemeRef="" fillByte="%#r20;" ignoreCase="no"
       initiatedContent="no" initiator="" lengthKind="delimited"
       lengthUnits="bytes" occursCountKind="parsed" outputNewLine="%LF;"
diff --git 
a/daffodil-test/src/test/resources/org/apache/daffodil/section05/simple_types/BitOrder.tdml
 
b/daffodil-test/src/test/resources/org/apache/daffodil/section05/simple_types/BitOrder.tdml
index 50c805601..4f14ec7a6 100644
--- 
a/daffodil-test/src/test/resources/org/apache/daffodil/section05/simple_types/BitOrder.tdml
+++ 
b/daffodil-test/src/test/resources/org/apache/daffodil/section05/simple_types/BitOrder.tdml
@@ -633,7 +633,7 @@
       textStandardZeroRep="0" textStandardInfinityRep="Inf" 
textStandardNaNRep="NaN"
       textNumberPattern="#,##0.###;-#,##0.###" textNumberRounding="explicit"
       textNumberRoundingMode="roundUnnecessary" 
textNumberRoundingIncrement="0" decimalSigned="yes"
-      encodingErrorPolicy="replace" sequenceKind="ordered" 
calendarFirstDayOfWeek='Sunday'
+      encodingErrorPolicy="error" sequenceKind="ordered" 
calendarFirstDayOfWeek='Sunday'
       calendarDaysInFirstWeek='4' calendarTimeZone='UTC' 
calendarCheckPolicy='strict' calendarLanguage='en'
       bitOrder="leastSignificantBitFirst" outputNewLine="%LF;" 
textPadKind="none" fillByte="%#r20;"
       truncateSpecifiedLengthString="no" textStringPadCharacter="%SP;" 
textNumberPadCharacter="%SP;"
diff --git 
a/daffodil-test/src/test/resources/org/apache/daffodil/section05/simple_types/SimpleTypes.tdml
 
b/daffodil-test/src/test/resources/org/apache/daffodil/section05/simple_types/SimpleTypes.tdml
index 2a8927366..190127649 100644
--- 
a/daffodil-test/src/test/resources/org/apache/daffodil/section05/simple_types/SimpleTypes.tdml
+++ 
b/daffodil-test/src/test/resources/org/apache/daffodil/section05/simple_types/SimpleTypes.tdml
@@ -24,7 +24,7 @@
 
   <tdml:defineSchema name="SimpleTypes-Embedded.dfdl.xsd">
     <xs:include 
schemaLocation="org/apache/daffodil/xsd/DFDLGeneralFormat.dfdl.xsd"/>
-    <dfdl:format ref="ex:GeneralFormat" lengthKind="implicit" 
representation="text"
+    <dfdl:format ref="ex:GeneralFormatPortable" lengthKind="implicit" 
representation="text"
         lengthUnits="bytes" encoding="US-ASCII" initiator="" terminator=""
         separator="" textNumberCheckPolicy="lax" ignoreCase="no" 
textNumberRep="standard"
         textPadKind="padChar" textTrimKind="padChar"/>
@@ -196,7 +196,7 @@
 
   <tdml:defineSchema name="SimpleTypes-binary">
     <xs:include 
schemaLocation="org/apache/daffodil/xsd/DFDLGeneralFormat.dfdl.xsd"/>
-    <dfdl:format ref="ex:GeneralFormat" representation="binary"
+    <dfdl:format ref="ex:GeneralFormatPortable" representation="binary"
       lengthUnits="bytes"
       textPadKind="padChar" textTrimKind="padChar" />
 
@@ -364,7 +364,7 @@
 
     <xs:element name="dateBinPacked" type="xs:date" 
dfdl:calendarPattern="MMddyy" dfdl:calendarPatternKind="explicit"
       dfdl:lengthKind="explicit" dfdl:length="{ 4 }" dfdl:lengthUnits="bytes" 
dfdl:binaryCalendarRep="packed"
-      dfdl:binaryPackedSignCodes="C D F C" 
dfdl:binaryNumberCheckPolicy="strict" dfdl:calendarTimeZone=""/>
+      dfdl:binaryPackedSignCodes="C D F C" 
dfdl:binaryNumberCheckPolicy="strict" dfdl:calendarTimeZone="UTC"/>
     <xs:element name="dateBinPacked2" type="xs:date" 
dfdl:calendarPattern="MMddyy" dfdl:calendarPatternKind="explicit"
       dfdl:lengthKind="explicit" dfdl:length="{ 4 }" dfdl:lengthUnits="bytes" 
dfdl:binaryCalendarRep="packed" />
 
@@ -376,7 +376,7 @@
             dfdl:binaryNumberCheckPolicy="strict" />
           <xs:element name="date" type="xs:date" 
dfdl:calendarPattern="MMddyyyy" dfdl:encoding="ISO-8859-1"
             dfdl:calendarPatternKind="explicit" 
dfdl:binaryCalendarRep="packed" dfdl:lengthKind="delimited" dfdl:terminator=";"
-            dfdl:binaryPackedSignCodes="C D F C" 
dfdl:binaryNumberCheckPolicy="strict" dfdl:calendarTimeZone="" />
+            dfdl:binaryPackedSignCodes="C D F C" 
dfdl:binaryNumberCheckPolicy="strict" dfdl:calendarTimeZone="UTC" />
           <xs:element name="num2" type="xs:decimal" dfdl:encoding="ISO-8859-1" 
dfdl:representation="binary" dfdl:binaryNumberRep="packed"
             dfdl:lengthKind="delimited" dfdl:terminator=";" 
dfdl:binaryDecimalVirtualPoint="0" dfdl:binaryPackedSignCodes="C D F C"
             dfdl:binaryNumberCheckPolicy="strict" />
@@ -386,7 +386,7 @@
 
     <xs:element name="timeBinPacked" type="xs:time" 
dfdl:calendarPattern="HHmmss" dfdl:calendarPatternKind="explicit"
       dfdl:lengthKind="explicit" dfdl:length="{ 4 }" dfdl:lengthUnits="bytes" 
dfdl:binaryCalendarRep="packed"
-      dfdl:binaryPackedSignCodes="C D F C" 
dfdl:binaryNumberCheckPolicy="strict" dfdl:calendarTimeZone=""/>
+      dfdl:binaryPackedSignCodes="C D F C" 
dfdl:binaryNumberCheckPolicy="strict" dfdl:calendarTimeZone="UTC"/>
     <xs:element name="timeBinPacked2">
       <xs:complexType>
         <xs:sequence>
@@ -394,7 +394,7 @@
             dfdl:lengthKind="explicit" dfdl:length="{ 1 }" 
dfdl:lengthUnits="bytes" />
           <xs:element name="time" type="xs:time" dfdl:calendarPattern="HHmmss" 
dfdl:calendarPatternKind="explicit"
             dfdl:lengthKind="explicit" dfdl:length="{ ../ex:length }" 
dfdl:lengthUnits="bytes" dfdl:binaryCalendarRep="packed"
-            dfdl:binaryPackedSignCodes="C D F C"  
dfdl:binaryNumberCheckPolicy="strict" dfdl:calendarTimeZone="" />
+            dfdl:binaryPackedSignCodes="C D F C"  
dfdl:binaryNumberCheckPolicy="strict" dfdl:calendarTimeZone="UTC" />
         </xs:sequence>
       </xs:complexType>
     </xs:element>
@@ -2105,7 +2105,7 @@
     <tdml:document><![CDATA[Wednesday, July 10, '96]]></tdml:document>
     <tdml:infoset>
       <tdml:dfdlInfoset>
-        <dateText>1996-07-10</dateText>
+        <dateText xsi:type="xs:date">1996-07-10+00:00</dateText>
       </tdml:dfdlInfoset>
     </tdml:infoset>
   </tdml:parserTestCase>
@@ -2116,7 +2116,7 @@
     <tdml:document><![CDATA[12:08 PM]]></tdml:document>
     <tdml:infoset>
       <tdml:dfdlInfoset>
-        <timeText>12:08:00</timeText>
+        <timeText xsi:type="xs:time">12:08:00+00:00</timeText>
       </tdml:dfdlInfoset>
     </tdml:infoset>
   </tdml:parserTestCase>
@@ -2818,7 +2818,7 @@
     </tdml:document>
     <tdml:infoset>
       <tdml:dfdlInfoset>
-        <dateBinPacked>2023-12-14</dateBinPacked>
+        <dateBinPacked>2023-12-14+00:00</dateBinPacked>
       </tdml:dfdlInfoset>
     </tdml:infoset>
   </tdml:parserTestCase>
@@ -2847,7 +2847,7 @@
       <tdml:dfdlInfoset>
         <dateBinPacked4>
           <num1>-14</num1>
-          <date>1978-01-01</date>
+          <date>1978-01-01+00:00</date>
           <num2>67</num2>
         </dateBinPacked4>
       </tdml:dfdlInfoset>
@@ -2863,7 +2863,7 @@
     </tdml:document>
     <tdml:infoset>
       <tdml:dfdlInfoset>
-        <timeBinPacked>06:13:27</timeBinPacked>
+        <timeBinPacked>06:13:27+00:00</timeBinPacked>
       </tdml:dfdlInfoset>
     </tdml:infoset>
   </tdml:parserTestCase>
@@ -2879,7 +2879,7 @@
       <tdml:dfdlInfoset>
         <timeBinPacked2>
           <length>4</length>
-          <time>04:15:08</time>
+          <time>04:15:08+00:00</time>
         </timeBinPacked2>
       </tdml:dfdlInfoset>
     </tdml:infoset>
@@ -2894,7 +2894,7 @@
     </tdml:document>
     <tdml:infoset>
       <tdml:dfdlInfoset>
-        <dateTimeBinPacked>1645-12-25T19:36:50</dateTimeBinPacked>
+        <dateTimeBinPacked 
xsi:type="xs:dateTime">1645-12-25T19:36:50+00:00</dateTimeBinPacked>
       </tdml:dfdlInfoset>
     </tdml:infoset>
   </tdml:parserTestCase>
@@ -4616,13 +4616,7 @@
     <xs:element name="date31" type="ex:explicDate" dfdl:calendarPattern="dd MM 
yyyy, mm:ss"/>
     
     <xs:element name="date32" type="ex:explicDate" dfdl:encoding="UTF-8" 
dfdl:calendarPattern="EEEE MMM yyyy" dfdl:calendarLanguage="ru-RU"/>
-    <xs:element name="date33">
-      <xs:complexType>
-        <xs:sequence dfdl:separator=",">
-          <xs:element name="date" type="xs:date" dfdl:lengthKind="delimited" 
dfdl:calendarPatternKind="explicit" dfdl:calendarPattern="yyyy-MM-dd" 
dfdl:calendarTimeZone=""/>
-        </xs:sequence>
-      </xs:complexType>
-    </xs:element>
+  
     <xs:element name="date34">
       <xs:complexType>
         <xs:sequence dfdl:separator=",">
@@ -4683,13 +4677,7 @@
     <xs:element name="time28" type="ex:strictExplicTime" 
dfdl:calendarPattern="hh:mm.zzz" dfdl:calendarTimeZone="UTC+1:30"/>
     <xs:element name="time29" type="ex:strictExplicTime" 
dfdl:calendarPattern="hh:mm:ss.SSSSSSSSS"/>
     <xs:element name="time30" type="ex:strictExplicTime" 
dfdl:calendarPattern="hh:mm:ss.SSSSSSSSSS"/>
-    <xs:element name="time31">
-      <xs:complexType>
-        <xs:sequence dfdl:separator=",">
-          <xs:element name="time" type="xs:time" dfdl:lengthKind="delimited" 
dfdl:calendarPatternKind="explicit" dfdl:calendarPattern="HH:mm:ss" 
dfdl:calendarTimeZone="" />
-        </xs:sequence>
-      </xs:complexType>
-    </xs:element>
+  
     <xs:element name="time32">
       <xs:complexType>
         <xs:sequence dfdl:separator=",">
@@ -4724,23 +4712,58 @@
     <xs:element name="dateTime12" type="xs:dateTime" 
dfdl:calendarCheckPolicy="lax" dfdl:calendarPatternKind="explicit" 
dfdl:textTrimKind="padChar"
                 dfdl:textCalendarJustification="right" 
dfdl:textCalendarPadCharacter="%HT;" dfdl:lengthKind="delimited" 
dfdl:calendarPattern="MM.dd.yyyy hh:mm:ssaa"/>
     <xs:element name="dateTime13" type="xs:dateTime" 
dfdl:lengthKind="delimited" dfdl:calendarPatternKind="explicit" 
dfdl:calendarPattern="dd-MM-yyyy hh:mm:ss.SSSSSSSSSS"/>
-    <xs:element name="dateTime14"><!-- No Time Zone -->
+   
+    <xs:element name="dateTime15"><!-- EST Time Zone -->
       <xs:complexType>
         <xs:sequence dfdl:separator=",">
-          <xs:element name="dateTime" type="xs:dateTime" 
dfdl:lengthKind="delimited" dfdl:calendarPatternKind="explicit" 
dfdl:calendarPattern="yyyy-MM-dd HH:mm:ss" dfdl:calendarTimeZone=""/>
+          <xs:element name="dateTime" type="xs:dateTime" 
dfdl:lengthKind="delimited" dfdl:calendarPatternKind="explicit" 
dfdl:calendarPattern="yyyy-MM-dd HH:mm:ss" dfdl:calendarTimeZone="UTC-05:00"/>
         </xs:sequence>
       </xs:complexType>
     </xs:element>
-    <xs:element name="dateTime15"><!-- EST Time Zone -->
+    
+  </tdml:defineSchema>
+  
+  <!-- 
+  This schema exists to isolate all schema parts that use calendarTimeZone="".
+  
+  This is DFDL standard, but not portable to IBM. If this is present in a 
schema on any element, 
+  then IBM DFDL will produce an SDE, and no test using elements from that 
schema
+  can be run. 
+  
+  By isolating it here, tests that use this feature can be setup to only run 
on 
+  daffodil, and all other tests can run portably.
+   -->
+  <tdml:defineSchema name="tzEmptySchema">
+  
+    <xs:include 
schemaLocation="org/apache/daffodil/xsd/DFDLGeneralFormat.dfdl.xsd"/>
+    <dfdl:format ref="ex:GeneralFormat" />
+    
+    <xs:element name="date33">
       <xs:complexType>
         <xs:sequence dfdl:separator=",">
-          <xs:element name="dateTime" type="xs:dateTime" 
dfdl:lengthKind="delimited" dfdl:calendarPatternKind="explicit" 
dfdl:calendarPattern="yyyy-MM-dd HH:mm:ss" dfdl:calendarTimeZone="UTC-05:00"/>
+          <xs:element name="date" type="xs:date" dfdl:lengthKind="delimited" 
dfdl:calendarPatternKind="explicit" dfdl:calendarPattern="yyyy-MM-dd" 
dfdl:calendarTimeZone=""/>
+        </xs:sequence>
+      </xs:complexType>
+    </xs:element>
+    
+      <xs:element name="time31">
+      <xs:complexType>
+        <xs:sequence dfdl:separator=",">
+          <xs:element name="time" type="xs:time" dfdl:lengthKind="delimited" 
dfdl:calendarPatternKind="explicit" dfdl:calendarPattern="HH:mm:ss" 
+            dfdl:calendarTimeZone="" />
+        </xs:sequence>
+      </xs:complexType>
+    </xs:element>
+    
+     <xs:element name="dateTime14"><!-- No Time Zone -->
+      <xs:complexType>
+        <xs:sequence dfdl:separator=",">
+          <xs:element name="dateTime" type="xs:dateTime" 
dfdl:lengthKind="delimited" dfdl:calendarPatternKind="explicit" 
dfdl:calendarPattern="yyyy-MM-dd HH:mm:ss" dfdl:calendarTimeZone=""/>
         </xs:sequence>
       </xs:complexType>
     </xs:element>
     
   </tdml:defineSchema>
-  
   <!--
      Test Name: dateTime_calendarTimeZone_EmptyString
         Schema: dateTimeSchema
@@ -4752,8 +4775,9 @@
   -->
   
   <tdml:parserTestCase name="dateTime_calendarTimeZone_EmptyString" 
root="dateTime14"
-    model="dateTimeSchema" description="Section 13 Simple Types - xs:dateTime 
calendarTimeZone Empty String - DFDL-13-XXXR"
-    roundTrip="true">
+    model="tzEmptySchema" description="Section 13 Simple Types - xs:dateTime 
calendarTimeZone Empty String - DFDL-13-XXXR"
+    roundTrip="true"
+    implementations="daffodil">
 
     <tdml:document><![CDATA[1995-03-24 01:30:00]]></tdml:document>
     <tdml:infoset>
@@ -6503,9 +6527,10 @@
                calendarTimeZone="", no time zone expected in the result
   -->
 
-  <tdml:parserTestCase name="time_calendarTimeZone_EmptyString" root="time31" 
model="dateTimeSchema"
+  <tdml:parserTestCase name="time_calendarTimeZone_EmptyString" root="time31" 
model="tzEmptySchema"
     description="Section 13 - Simple Types - xs:time calendarTimeZone Empty 
String  - DFDL-13-XXXR"
-    roundTrip="true">
+    roundTrip="true"
+    implementations="daffodil">
 
     <tdml:document>
       <tdml:documentPart type="text">12:49:00</tdml:documentPart>
@@ -6554,8 +6579,9 @@
                calendarTimeZone="", expect no time zone in result
   -->
 
-  <tdml:parserTestCase name="date_calendarTimeZone_EmptyString" root="date33" 
model="dateTimeSchema"
-    description="Section 13 - Simple Types - xs:date calendarTimeZone Empty 
String  - DFDL-13-XXXR">
+  <tdml:parserTestCase name="date_calendarTimeZone_EmptyString" root="date33" 
model="tzEmptySchema"
+    description="Section 13 - Simple Types - xs:date calendarTimeZone Empty 
String  - DFDL-13-XXXR"
+    implementations="daffodil">
 
     <tdml:document>
       <tdml:documentPart type="text">1991-03-04</tdml:documentPart>
diff --git 
a/daffodil-test/src/test/resources/org/apache/daffodil/section06/namespaces/format.dfdl.xsd
 
b/daffodil-test/src/test/resources/org/apache/daffodil/section06/namespaces/format.dfdl.xsd
index f6b41ad6c..0d001c31a 100644
--- 
a/daffodil-test/src/test/resources/org/apache/daffodil/section06/namespaces/format.dfdl.xsd
+++ 
b/daffodil-test/src/test/resources/org/apache/daffodil/section06/namespaces/format.dfdl.xsd
@@ -94,7 +94,7 @@ A general purpose defineFormat annotation.
 <dfdl:format 
 
 encoding="UTF-8" utf16Width="fixed" byteOrder="bigEndian"
-encodingErrorPolicy="replace"
+encodingErrorPolicy="error"
 ignoreCase="no" outputNewLine="%CR;%LF;"
 
 alignment="1" alignmentUnits="bytes" fillByte="0"
diff --git 
a/daffodil-test/src/test/resources/org/apache/daffodil/section06/namespaces/multi_A_03.dfdl.xsd
 
b/daffodil-test/src/test/resources/org/apache/daffodil/section06/namespaces/multi_A_03.dfdl.xsd
index b1c2dc358..81e7d87f0 100644
--- 
a/daffodil-test/src/test/resources/org/apache/daffodil/section06/namespaces/multi_A_03.dfdl.xsd
+++ 
b/daffodil-test/src/test/resources/org/apache/daffodil/section06/namespaces/multi_A_03.dfdl.xsd
@@ -35,7 +35,7 @@
         byteOrder="littleEndian" calendarCheckPolicy='strict'
         calendarDaysInFirstWeek='4' calendarFirstDayOfWeek='Sunday'
         calendarLanguage='en' calendarPatternKind='implicit' 
calendarTimeZone='UTC'
-        encoding="ASCII" encodingErrorPolicy="replace" escapeSchemeRef=""
+        encoding="ASCII" encodingErrorPolicy="error" escapeSchemeRef=""
         fillByte="%#r20;" ignoreCase="no" initiatedContent="no" initiator=""
         leadingSkip='0' occursCountKind="parsed" outputNewLine="%LF;"
         representation="text" separator="" separatorPosition="infix"
diff --git 
a/daffodil-test/src/test/resources/org/apache/daffodil/section06/namespaces/multi_base_03.dfdl.xsd
 
b/daffodil-test/src/test/resources/org/apache/daffodil/section06/namespaces/multi_base_03.dfdl.xsd
index 151cdd473..8538b1266 100644
--- 
a/daffodil-test/src/test/resources/org/apache/daffodil/section06/namespaces/multi_base_03.dfdl.xsd
+++ 
b/daffodil-test/src/test/resources/org/apache/daffodil/section06/namespaces/multi_base_03.dfdl.xsd
@@ -21,7 +21,7 @@
 
   <xs:annotation>
     <xs:appinfo source="http://www.ogf.org/dfdl/";>
-      <dfdl:format sequenceKind='ordered' bitOrder="mostSignificantBitFirst" 
encodingErrorPolicy="replace" separator="'" initiator="" terminator="" 
leadingSkip='0' textTrimKind="none" initiatedContent="no"
+      <dfdl:format sequenceKind='ordered' bitOrder="mostSignificantBitFirst" 
encodingErrorPolicy="error" separator="'" initiator="" terminator="" 
leadingSkip='0' textTrimKind="none" initiatedContent="no"
         separatorPosition="infix" ignoreCase="no" 
separatorSuppressionPolicy="anyEmpty" representation="text" 
         textNumberRep="standard" lengthKind="delimited" encoding="ASCII"
         alignment="implicit" alignmentUnits="bytes" trailingSkip="0" 
outputNewLine="%LF;"
diff --git 
a/daffodil-test/src/test/resources/org/apache/daffodil/section07/property_syntax/property_syntax.dfdl.xsd
 
b/daffodil-test/src/test/resources/org/apache/daffodil/section07/property_syntax/property_syntax.dfdl.xsd
index a05a24586..6a6bdf6ae 100644
--- 
a/daffodil-test/src/test/resources/org/apache/daffodil/section07/property_syntax/property_syntax.dfdl.xsd
+++ 
b/daffodil-test/src/test/resources/org/apache/daffodil/section07/property_syntax/property_syntax.dfdl.xsd
@@ -23,7 +23,8 @@
   <xs:annotation>
     <xs:appinfo source="http://www.ogf.org/dfdl/";>
       <dfdl:format ref="GeneralFormat" separator="" initiator="" terminator="" 
leadingSkip='0' textTrimKind="none" initiatedContent="no"
-        ignoreCase="no" alignment='implicit' alignmentUnits='bytes' 
trailingSkip='0'/>
+        ignoreCase="no" alignment='implicit' alignmentUnits='bytes' 
trailingSkip='0'
+        lengthKind="delimited"/>
     </xs:appinfo>
   </xs:annotation>
   
diff --git 
a/daffodil-test/src/test/resources/org/apache/daffodil/section10/representation_properties/PropertiesDefined.dfdl.xsd
 
b/daffodil-test/src/test/resources/org/apache/daffodil/section10/representation_properties/PropertiesDefined.dfdl.xsd
index 2528d2901..51c663ffd 100644
--- 
a/daffodil-test/src/test/resources/org/apache/daffodil/section10/representation_properties/PropertiesDefined.dfdl.xsd
+++ 
b/daffodil-test/src/test/resources/org/apache/daffodil/section10/representation_properties/PropertiesDefined.dfdl.xsd
@@ -25,7 +25,7 @@
     <appinfo source="http://www.ogf.org/dfdl/";>
         <dfdl:format alignment="1"
           alignmentUnits="bytes" binaryFloatRep="ieee" binaryNumberRep="binary"
-          byteOrder="bigEndian" bitOrder="mostSignificantBitFirst" 
encodingErrorPolicy="replace"
+          byteOrder="bigEndian" bitOrder="mostSignificantBitFirst" 
encodingErrorPolicy="error"
           documentFinalTerminatorCanBeMissing="no" 
emptyValueDelimiterPolicy="both"
           encoding="US-ASCII" escapeSchemeRef="" ignoreCase="no"
           initiatedContent="no" initiator="" leadingSkip="0" 
lengthKind="delimited"
diff --git 
a/daffodil-test/src/test/resources/org/apache/daffodil/section10/representation_properties/RepProps.tdml
 
b/daffodil-test/src/test/resources/org/apache/daffodil/section10/representation_properties/RepProps.tdml
index 01d12c69c..2b5bd186c 100644
--- 
a/daffodil-test/src/test/resources/org/apache/daffodil/section10/representation_properties/RepProps.tdml
+++ 
b/daffodil-test/src/test/resources/org/apache/daffodil/section10/representation_properties/RepProps.tdml
@@ -32,7 +32,7 @@
       calendarLanguage="en" calendarPatternKind="implicit"
       calendarTimeZone="UTC" decimalSigned="yes"
       documentFinalTerminatorCanBeMissing="no"
-      emptyValueDelimiterPolicy="both" encodingErrorPolicy="replace"
+      emptyValueDelimiterPolicy="both" encodingErrorPolicy="error"
       encoding="utf-8" escapeSchemeRef="" fillByte="%#r20;" ignoreCase="no"
       initiatedContent="no" initiator="" leadingSkip="0" lengthKind="delimited"
       lengthUnits="bytes" occursCountKind="parsed" outputNewLine="%LF;"
@@ -73,7 +73,7 @@
       calendarLanguage="en" calendarPatternKind="implicit"
       calendarTimeZone="UTC" decimalSigned="yes"
       documentFinalTerminatorCanBeMissing="no"
-      emptyValueDelimiterPolicy="both" encodingErrorPolicy="replace"
+      emptyValueDelimiterPolicy="both" encodingErrorPolicy="error"
       encoding="utf-8" escapeSchemeRef="" fillByte="%#r20;" ignoreCase="no"
       initiatedContent="no" initiator="" leadingSkip="0" lengthKind="delimited"
       lengthUnits="bytes" occursCountKind="parsed" outputNewLine="%LF;"
@@ -112,7 +112,7 @@
       calendarLanguage="en" calendarPatternKind="implicit"
       calendarTimeZone="UTC" decimalSigned="yes"
       documentFinalTerminatorCanBeMissing="no"
-      emptyValueDelimiterPolicy="both" encodingErrorPolicy="replace"
+      emptyValueDelimiterPolicy="both" encodingErrorPolicy="error"
       encoding="utf-8" escapeSchemeRef="" fillByte="%#r20;" ignoreCase="no"
       initiatedContent="no" initiator="" leadingSkip="0" lengthKind="delimited"
       lengthUnits="bytes" occursCountKind="parsed" outputNewLine="%LF;"
diff --git 
a/daffodil-test/src/test/resources/org/apache/daffodil/section12/lengthKind/PatternTests.tdml
 
b/daffodil-test/src/test/resources/org/apache/daffodil/section12/lengthKind/PatternTests.tdml
index 773467ecb..f5568f05e 100644
--- 
a/daffodil-test/src/test/resources/org/apache/daffodil/section12/lengthKind/PatternTests.tdml
+++ 
b/daffodil-test/src/test/resources/org/apache/daffodil/section12/lengthKind/PatternTests.tdml
@@ -384,7 +384,7 @@
       ignoreCase='no' initiatedContent='no' lengthKind='implicit'
       occursCountKind='parsed' separatorSuppressionPolicy='anyEmpty'
       separatorPosition='infix' textNumberRep='standard' initiator=""
-      terminator="" separator="" />
+      terminator="" separator=""/>
 
     <xs:element name="doctors">
       <xs:complexType>
@@ -472,24 +472,6 @@
       dfdl:lengthKind="pattern" dfdl:lengthPattern="!!.*!!"
       dfdl:encoding="utf-8" />
 
-    <xs:element name="def_04" dfdl:lengthKind="pattern"
-      dfdl:lengthPattern="!!.*!!" dfdl:lengthUnits="characters"
-      dfdl:encoding="utf-8" dfdl:encodingErrorPolicy="replace">
-      <xs:complexType>
-        <xs:sequence>
-          <xs:element name="first" type="xs:string"
-            dfdl:lengthKind="explicit" dfdl:length="{2}"
-            dfdl:lengthUnits="characters" dfdl:encoding="utf-8"/>
-          <xs:element name="inner" type="xs:string"
-            dfdl:lengthKind="explicit" dfdl:length="{2}"
-            dfdl:lengthUnits="characters" dfdl:encoding="utf-8" 
dfdl:encodingErrorPolicy="replace"/>
-          <xs:element name="last" type="xs:string"
-            dfdl:lengthKind="explicit" dfdl:length="{2}"
-            dfdl:lengthUnits="characters" dfdl:encoding="utf-8"/>
-        </xs:sequence>
-      </xs:complexType>
-    </xs:element>
-
     <xs:element name="def_05" dfdl:lengthKind="pattern"
       dfdl:lengthPattern="!!.*!!" dfdl:lengthUnits="characters"
       dfdl:encoding="utf-8" dfdl:encodingErrorPolicy="error">
@@ -615,6 +597,37 @@
     </tdml:errors>
   </tdml:parserTestCase>
 
+<tdml:defineSchema name="DFDL-207-non-portable">
+
+    <xs:include 
schemaLocation="org/apache/daffodil/xsd/DFDLGeneralFormat.dfdl.xsd"/>
+    <dfdl:format ref="ex:GeneralFormat" representation="text"
+      lengthUnits="bytes" encoding="US-ASCII" byteOrder='bigEndian'
+      ignoreCase='no' initiatedContent='no' lengthKind='implicit'
+      occursCountKind='parsed' separatorSuppressionPolicy='anyEmpty'
+      separatorPosition='infix' textNumberRep='standard' initiator=""
+      terminator="" separator=""
+      encodingErrorPolicy="replace"/>
+      
+    <xs:element name="def_04" dfdl:lengthKind="pattern"
+      dfdl:lengthPattern="!!.*!!" dfdl:lengthUnits="characters"
+      dfdl:encoding="utf-8">
+      <xs:complexType>
+        <xs:sequence>
+          <xs:element name="first" type="xs:string"
+            dfdl:lengthKind="explicit" dfdl:length="{2}"
+            dfdl:lengthUnits="characters" dfdl:encoding="utf-8"/>
+          <xs:element name="inner" type="xs:string"
+            dfdl:lengthKind="explicit" dfdl:length="{2}"
+            dfdl:lengthUnits="characters" dfdl:encoding="utf-8" 
dfdl:encodingErrorPolicy="replace"/>
+          <xs:element name="last" type="xs:string"
+            dfdl:lengthKind="explicit" dfdl:length="{2}"
+            dfdl:lengthUnits="characters" dfdl:encoding="utf-8"/>
+        </xs:sequence>
+      </xs:complexType>
+    </xs:element>
+    
+  </tdml:defineSchema>
+  
   <!--
        Test Name: LengthPatternIllegalBits_02_EncodingErrorPolicy_Replace
           Schema: DFDL-207-Embedded.dfdl.xsd
@@ -623,9 +636,10 @@
                   with encodingErrorPolicy = 'replace'.
   -->
   <tdml:parserTestCase 
name="LengthPatternIllegalBits_02_EncodingErrorPolicy_Replace"
-    root="def_04" model="DFDL-207-Embedded.dfdl.xsd"
+    root="def_04" model="DFDL-207-non-portable"
     description="Section 12 lengthKind-pattern -c2c2 is an invalid code point 
in utf-8 - DFDL-12-088R"
-    roundTrip="twoPass">
+    roundTrip="twoPass"
+    implementations="daffodil">
     <tdml:document>
       <tdml:documentPart type="byte">2121c2c22121</tdml:documentPart>
     </tdml:document>
@@ -944,7 +958,8 @@
 
   <tdml:parserTestCase name="lengthPatternEncodingErrorReplace"
     root="e1" model="lengthKindPattern-Embedded-2.dfdl.xsd" 
description="Section 12 lengthKind-pattern - DFDL-12-087R"
-    roundTrip="twoPass">
+    roundTrip="twoPass"
+    implementations="daffodil">
 
     <tdml:document>
       <tdml:documentPart type="bits">11000000 10100000</tdml:documentPart>
diff --git 
a/daffodil-test/src/test/resources/org/apache/daffodil/section13/text_number_props/TextNumberProps.tdml
 
b/daffodil-test/src/test/resources/org/apache/daffodil/section13/text_number_props/TextNumberProps.tdml
index c5e2c7161..8aa5a666f 100644
--- 
a/daffodil-test/src/test/resources/org/apache/daffodil/section13/text_number_props/TextNumberProps.tdml
+++ 
b/daffodil-test/src/test/resources/org/apache/daffodil/section13/text_number_props/TextNumberProps.tdml
@@ -306,7 +306,7 @@
       calendarLanguage="en" calendarPatternKind="implicit"
       calendarTimeZone="UTC" decimalSigned="yes"
       documentFinalTerminatorCanBeMissing="no" emptyValueDelimiterPolicy="both"
-      encodingErrorPolicy="replace" encoding="US-ASCII" escapeSchemeRef=""
+      encodingErrorPolicy="error" encoding="US-ASCII" escapeSchemeRef=""
       fillByte="f" floating="no" ignoreCase="no" initiatedContent="no"
       initiator="" leadingSkip="0" lengthKind="delimited" lengthUnits="bytes"
       nilValueDelimiterPolicy="both" occursCountKind="implicit"
@@ -3507,7 +3507,7 @@
       calendarLanguage="en" calendarPatternKind="implicit"
       calendarTimeZone="UTC" decimalSigned="yes"
       documentFinalTerminatorCanBeMissing="no" emptyValueDelimiterPolicy="both"
-      encodingErrorPolicy="replace" encoding="US-ASCII" escapeSchemeRef=""
+      encodingErrorPolicy="error" encoding="US-ASCII" escapeSchemeRef=""
       fillByte="%#r20;" ignoreCase="no" initiatedContent="no" initiator=""
       leadingSkip="0" lengthKind="implicit" lengthUnits="bytes"
       occursCountKind="parsed" outputNewLine="%LF;" representation="text"
@@ -3538,7 +3538,7 @@
       calendarLanguage="en" calendarPatternKind="implicit"
       calendarTimeZone="UTC" decimalSigned="yes"
       documentFinalTerminatorCanBeMissing="no" emptyValueDelimiterPolicy="both"
-      encodingErrorPolicy="replace" encoding="US-ASCII" escapeSchemeRef=""
+      encodingErrorPolicy="error" encoding="US-ASCII" escapeSchemeRef=""
       fillByte="%#r20;" ignoreCase="no" initiatedContent="no" initiator=""
       leadingSkip="0" lengthKind="implicit" lengthUnits="bytes"
       occursCountKind="parsed" outputNewLine="%LF;" representation="text"
diff --git 
a/daffodil-test/src/test/resources/org/apache/daffodil/section23/dfdl_functions/Functions.tdml
 
b/daffodil-test/src/test/resources/org/apache/daffodil/section23/dfdl_functions/Functions.tdml
index 775c9f49e..b8c3d942e 100644
--- 
a/daffodil-test/src/test/resources/org/apache/daffodil/section23/dfdl_functions/Functions.tdml
+++ 
b/daffodil-test/src/test/resources/org/apache/daffodil/section23/dfdl_functions/Functions.tdml
@@ -697,7 +697,7 @@
       <xs:complexType>
         <xs:sequence>
           <xs:element name="date" type="xs:dateTime" 
dfdl:calendarCheckPolicy="lax" dfdl:calendarPatternKind="implicit"
-            dfdl:lengthKind="explicit" dfdl:length="19" 
dfdl:calendarTimeZone="" />
+            dfdl:lengthKind="explicit" dfdl:length="19" 
dfdl:calendarTimeZone="UTC" />
           <xs:element name="year" type="xs:int" dfdl:inputValueCalc="{ 
fn:year-from-dateTime(../ex:date) }"/>
           <xs:element name="month" type="xs:int" dfdl:inputValueCalc="{ 
fn:month-from-dateTime(../ex:date) }"/>
           <xs:element name="day" type="xs:int" dfdl:inputValueCalc="{ 
fn:day-from-dateTime(../ex:date) }"/>
@@ -2445,14 +2445,14 @@
     <tdml:infoset>
       <tdml:dfdlInfoset>
         <e_xfromdatetime2>
-          <date>2014-01-01T00:02:30</date>
+          <date xsi:type="xs:dateTime">2014-01-01T00:02:30+00:00</date>
           <year>2014</year>
           <month>1</month>
           <day>1</day>
           <hours>0</hours>
           <minutes>2</minutes>
           <seconds>30</seconds>
-          <timeZone/>
+          <timeZone>+00:00</timeZone>
         </e_xfromdatetime2>
       </tdml:dfdlInfoset>
     </tdml:infoset>
@@ -2473,14 +2473,14 @@
     <tdml:infoset>
       <tdml:dfdlInfoset>
         <e_xfromdatetime2>
-          <date>0101-01-13T00:12:39</date>
+          <date xsi:type="xs:dateTime">0101-01-13T00:12:39+00:00</date>
           <year>101</year>
           <month>1</month>
           <day>13</day>
           <hours>0</hours>
           <minutes>12</minutes>
           <seconds>39</seconds>
-          <timeZone/>
+          <timeZone>+00:00</timeZone>
         </e_xfromdatetime2>
       </tdml:dfdlInfoset>
     </tdml:infoset>
@@ -6348,7 +6348,7 @@
       <xs:complexType>
         <xs:sequence dfdl:separator=",">
           <xs:element name="date" type="xs:date" dfdl:lengthKind="delimited" 
dfdl:calendarPatternKind="explicit" dfdl:calendarPattern="MM-dd-yyyy" 
dfdl:calendarTimeZone="UTC-09:00"/>
-          <xs:element name="time" type="xs:time" dfdl:lengthKind="delimited" 
dfdl:calendarPatternKind="explicit" dfdl:calendarPattern="hh:mm:ss" 
dfdl:calendarTimeZone=""/>
+          <xs:element name="time" type="xs:time" dfdl:lengthKind="delimited" 
dfdl:calendarPatternKind="explicit" dfdl:calendarPattern="hh:mm:ss" 
dfdl:calendarTimeZone="UTC-09:00"/>
           <xs:element name="dateTime" type="xs:dateTime" 
dfdl:inputValueCalc="{ fn:dateTime(../ex:date, ../ex:time) }"/>
         </xs:sequence>
       </xs:complexType>
@@ -6356,7 +6356,7 @@
     <xs:element name="dateTime13">
       <xs:complexType>
         <xs:sequence dfdl:separator=",">
-          <xs:element name="date" type="xs:date" dfdl:lengthKind="delimited" 
dfdl:calendarPatternKind="explicit" dfdl:calendarPattern="MM-dd-yyyy" 
dfdl:calendarTimeZone=""/>
+          <xs:element name="date" type="xs:date" dfdl:lengthKind="delimited" 
dfdl:calendarPatternKind="explicit" dfdl:calendarPattern="MM-dd-yyyy" 
dfdl:calendarTimeZone="UTC+11:00"/>
           <xs:element name="time" type="xs:time" dfdl:lengthKind="delimited" 
dfdl:calendarPatternKind="explicit" dfdl:calendarPattern="hh:mm:ss" 
dfdl:calendarTimeZone="UTC+11:00"/>
           <xs:element name="dateTime" type="xs:dateTime" 
dfdl:inputValueCalc="{ fn:dateTime(../ex:date, ../ex:time) }"/>
         </xs:sequence>
@@ -6978,7 +6978,8 @@
   -->
 
   <tdml:parserTestCase name="fnDateTime_constructor_06" root="dateTime10" 
model="constructorSchema"
-    description="Section 23 - Constructor Functions - fn:dateTime()  - 
DFDL-23-089R">
+    description="Section 23 - Constructor Functions - fn:dateTime()  - 
DFDL-23-089R"
+    implementations="daffodil">
 
     <tdml:document>
       <tdml:documentPart type="text">03-31-1996,04:55:30</tdml:documentPart>
@@ -7041,7 +7042,7 @@
       <tdml:dfdlInfoset>
         <dateTime12>
           <date>1996-03-31-09:00</date>
-          <time>04:55:30</time>
+          <time>04:55:30-09:00</time>
           <dateTime>1996-03-31T04:55:30-09:00</dateTime>
         </dateTime12>
       </tdml:dfdlInfoset>
@@ -7067,7 +7068,7 @@
     <tdml:infoset>
       <tdml:dfdlInfoset>
         <dateTime13>
-          <date>1996-03-31</date>
+          <date>1996-03-31+11:00</date>
           <time>04:55:30+11:00</time>
           <dateTime>1996-03-31T04:55:30+11:00</dateTime>
         </dateTime13>
diff --git 
a/daffodil-test/src/test/resources/org/apache/daffodil/usertests/DefaultProperties.dfdl.xsd
 
b/daffodil-test/src/test/resources/org/apache/daffodil/usertests/DefaultProperties.dfdl.xsd
index 15d9e5ab3..cf29c3d94 100644
--- 
a/daffodil-test/src/test/resources/org/apache/daffodil/usertests/DefaultProperties.dfdl.xsd
+++ 
b/daffodil-test/src/test/resources/org/apache/daffodil/usertests/DefaultProperties.dfdl.xsd
@@ -40,7 +40,7 @@
                                        calendarPatternKind="implicit" 
calendarTimeZone="UTC"
                                        choiceLengthKind="implicit" 
decimalSigned="yes"
                                        
documentFinalTerminatorCanBeMissing="yes" emptyValueDelimiterPolicy="none"
-                                       encoding="UTF-8" 
encodingErrorPolicy="replace"
+                                       encoding="UTF-8" 
encodingErrorPolicy="error"
                                        escapeSchemeRef="" fillByte="0" 
floating="no" ignoreCase="no"
                                        initiatedContent="no" initiator="" 
leadingSkip="0" lengthKind="delimited"
                                        lengthUnits="characters" 
nilKind="literalValue" nilValueDelimiterPolicy="none"
diff --git 
a/daffodil-test/src/test/resources/org/apache/daffodil/usertests/backtrack.dfdl.xsd
 
b/daffodil-test/src/test/resources/org/apache/daffodil/usertests/backtrack.dfdl.xsd
index d2746d70b..1f94715c6 100644
--- 
a/daffodil-test/src/test/resources/org/apache/daffodil/usertests/backtrack.dfdl.xsd
+++ 
b/daffodil-test/src/test/resources/org/apache/daffodil/usertests/backtrack.dfdl.xsd
@@ -36,7 +36,7 @@
           calendarPattern="yyyy-MM-dd'T'HH:mm:ss" calendarTimeZone="UTC"
           choiceLengthKind="implicit" decimalSigned="yes"
           documentFinalTerminatorCanBeMissing="no" 
emptyValueDelimiterPolicy="none"
-          encoding="UTF-8" encodingErrorPolicy="replace" escapeSchemeRef=""
+          encoding="UTF-8" encodingErrorPolicy="error" escapeSchemeRef=""
           fillByte="0" floating="no" ignoreCase="no" initiatedContent="no"
           initiator="" leadingSkip="0" lengthKind="implicit" lengthUnits="bits"
           nilKind="literalValue" nilValueDelimiterPolicy="none" nilValue="NIL"


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to