stevedlawrence commented on a change in pull request #214: Sequences and
Separators Refactoring and Rewrite
URL: https://github.com/apache/incubator-daffodil/pull/214#discussion_r285124058
##########
File path:
daffodil-core/src/main/scala/org/apache/daffodil/dsom/ElementBase.scala
##########
@@ -1133,19 +1177,17 @@ trait ElementBase
if (!isRepresented) false
else if (!hasDefaultValue) false
else {
- if (!emptyIsAnObservableConcept)
+ if (!isEmptyAnObservableConcept)
SDW(WarnID.NoEmptyDefault, "Element with no empty representation.
XSD default='%s' can only be used when unparsing.", defaultValueAsString)
schemaDefinitionWhen(isOptional, "Optional elements cannot have
default values but default='%s' was found.", defaultValueAsString)
if (isArray && !isArraywithAtLeastOneRequiredArrayElement) {
(minOccurs, occursCountKind) match {
case (_, OccursCountKind.Parsed) |
(_, OccursCountKind.StopValue) =>
- SDE(
- "XSD default='%s' can never be used since an element with
dfdl:occursCountKind='%s' has no required occurrences.",
- defaultValueAsString, occursCountKind)
- case (0, _) => SDE(
- "XSD default='%s' can never be used since an element with XSD
minOccurs='0' has no required occurrences.",
- defaultValueAsString)
+ SDE("XSD default='%s' can never be used since an element with
dfdl:occursCountKind='%s' has no required occurrences.",
+ defaultValueAsString, occursCountKind)
+ case (0, _) => SDE("XSD default='%s' can never be used since an
element with XSD minOccurs='0' has no required occurrences.",
+ defaultValueAsString)
Review comment:
So many formatting changes. Would be really nice to get thsi resolved.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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