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

olabusayo pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/daffodil.git


The following commit(s) were added to refs/heads/main by this push:
     new bfad358a9 Update SDW message for clarity
bfad358a9 is described below

commit bfad358a92368ffa42d36c2b82c94bec1e989907
Author: olabusayoT <[email protected]>
AuthorDate: Fri Sep 20 10:46:15 2024 -0400

    Update SDW message for clarity
    
    - update test to show new warning
    
    DAFFODIL-2929
---
 .../main/scala/org/apache/daffodil/core/dsom/ElementBase.scala    | 2 +-
 .../daffodil/section00/general/testUnparserFileBuffering.tdml     | 8 +++++++-
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git 
a/daffodil-core/src/main/scala/org/apache/daffodil/core/dsom/ElementBase.scala 
b/daffodil-core/src/main/scala/org/apache/daffodil/core/dsom/ElementBase.scala
index 5a1e74ac3..d057b696c 100644
--- 
a/daffodil-core/src/main/scala/org/apache/daffodil/core/dsom/ElementBase.scala
+++ 
b/daffodil-core/src/main/scala/org/apache/daffodil/core/dsom/ElementBase.scala
@@ -1231,7 +1231,7 @@ trait ElementBase
         if (!isEmptyAnObservableConcept)
           SDW(
             WarnID.NoEmptyDefault,
-            "Element with no empty representation. XSD default='%s' can only 
be used when unparsing.",
+            "Element with no empty representation. XSD default='%s' will be 
ignored when parsing.",
             defaultValueAsString
           )
         schemaDefinitionWhen(
diff --git 
a/daffodil-test/src/test/resources/org/apache/daffodil/section00/general/testUnparserFileBuffering.tdml
 
b/daffodil-test/src/test/resources/org/apache/daffodil/section00/general/testUnparserFileBuffering.tdml
index 2e6211a19..d7e8178c4 100644
--- 
a/daffodil-test/src/test/resources/org/apache/daffodil/section00/general/testUnparserFileBuffering.tdml
+++ 
b/daffodil-test/src/test/resources/org/apache/daffodil/section00/general/testUnparserFileBuffering.tdml
@@ -183,7 +183,7 @@
 -->
 
   <tdml:parserTestCase name="parseFixedLengthStringLength0_ffb" root="e4" 
model="fixedLengthStrings" roundTrip="true"
-    config="cfg_forceFileBuffering">
+    config="cfg_forceFileBuffering" ignoreUnexpectedWarnings="false">
     <tdml:document>[,2]</tdml:document>
 
     <tdml:infoset>
@@ -195,6 +195,12 @@
       </tdml:dfdlInfoset>
     </tdml:infoset>
 
+    <tdml:warnings>
+      <tdml:warning>Element with no empty representation</tdml:warning>
+      <tdml:warning>XSD default</tdml:warning>
+      <tdml:warning>will be ignored when parsing</tdml:warning>
+    </tdml:warnings>
+
   </tdml:parserTestCase>
 
 

Reply via email to