mbeckerle commented on code in PR #1305:
URL: https://github.com/apache/daffodil/pull/1305#discussion_r1769614116
##########
daffodil-test/src/test/resources/org/apache/daffodil/extensions/repType/repType.tdml:
##########
@@ -863,6 +878,11 @@
<tdml:error>ex:field</tdml:error>
<tdml:error>facet length (1)</tdml:error>
</tdml:validationErrors>
+ <tdml:warnings>
+ <tdml:warning>FacetsContradict</tdml:warning>
+ <tdml:warning>'t' contradicts with value of 'minLength'
facet</tdml:warning>
+ <tdml:warning>'three' contradicts with value of 'maxLength'
facet</tdml:warning>
Review Comment:
I'm ok with this change set. I just find this wording of the warning itself
a bit confusing.
What is contradictory here? Is this trying to issue a warning that 'three'
is too long for the maxLength facet? That sounds like a validation error, not a
warning, and why doesn't it say that it is too long instead of using this vague
'contradicts with the value of the maxLength facet, but without giving that
value of the facet?
Wording wise, "contradicts with value of" should be "contradicts with the
value of". I think the article "the" is actually needed in this phrase. But
this is one of the reasons I would make this sort of warning check be much less
specific.
I suggest searching for the keywords, not the specific phrasing. Like:
```
<tdml:warnings>
<tdml:warning>FacetContradict</tdml:warning>
<tdml:warning>'t'</tdml:warning>
<tdml:warning>three</tdml:warning>
<tdml:warning>contradicts</tdml:warning>
<tdml:warning>minLength</tdml:warning>
<tdml:warning>maxLength</tdml:warning>
</tdml:warnings>
```
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]