stevedlawrence commented on code in PR #1192:
URL: https://github.com/apache/daffodil/pull/1192#discussion_r1539134301


##########
daffodil-core/src/main/scala/org/apache/daffodil/core/dsom/Facets.scala:
##########
@@ -387,7 +413,7 @@ trait Facets { self: Restriction =>
         errorOnLocalLessThanBaseFacet(theLocalFacet, theRemoteFacet, facetType)
         localFacet
       }
-      case Facet.maxLength | Facet.fractionDigits => {
+      case Facet.length | Facet.maxLength | Facet.fractionDigits => {
         errorOnLocalGreaterThanBaseFacet(theLocalFacet, theRemoteFacet, 
facetType)

Review Comment:
   Found this in the XSD spec:
   > Schema Component Constraint: length valid restriction
   It is an 
[·error·](https://www.w3.org/TR/2012/REC-xmlschema11-2-20120405/datatypes.html#dt-error)
 if 
[length](https://www.w3.org/TR/2012/REC-xmlschema11-2-20120405/datatypes.html#f-l)
 is among the members of 
[{facets}](https://www.w3.org/TR/2012/REC-xmlschema11-2-20120405/datatypes.html#std-facets)
 of [{base type 
definition}](https://www.w3.org/TR/2012/REC-xmlschema11-2-20120405/datatypes.html#std-base_type_definition)
 and 
[{value}](https://www.w3.org/TR/2012/REC-xmlschema11-2-20120405/datatypes.html#f-l-value)
 is not equal to the 
[{value}](https://www.w3.org/TR/2012/REC-xmlschema11-2-20120405/datatypes.html#f-l-value)
 of the parent 
[length](https://www.w3.org/TR/2012/REC-xmlschema11-2-20120405/datatypes.html#f-l).
   
   So I think this is wrong. This needs to error if local is not equal to base.



-- 
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]

Reply via email to