tuxji commented on code in PR #1192:
URL: https://github.com/apache/daffodil/pull/1192#discussion_r1538269295
##########
daffodil-core/src/main/scala/org/apache/daffodil/core/dsom/ElementBase.scala:
##########
@@ -960,12 +962,73 @@ trait ElementBase
typeDef.optRestriction.flatMap { _.enumerationValues }
}
+ final lazy val length: java.math.BigDecimal = {
+ Assert.invariant(hasLength)
+ schemaDefinitionUnless(
+ isSimpleType,
+ "Facet length is allowed only on types string and hexBinary.",
Review Comment:
How is calling `isSimpleType` supposed to tell you if the type is string,
hexBinary, or something else?
--
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]