stevedlawrence commented on a change in pull request #240: Add 
dfdlx:choiceBranchKeyRanges
URL: https://github.com/apache/incubator-daffodil/pull/240#discussion_r295768117
 
 

 ##########
 File path: 
daffodil-propgen/src/main/resources/org/apache/daffodil/xsd/DFDL_part2_attributes.xsd
 ##########
 @@ -108,6 +108,7 @@
     <xsd:attribute name="encodingErrorPolicy" 
type="dfdl:EncodingErrorPolicyEnum"/>
     <xsd:attribute name="ignoreCase" type="dfdl:YesNoEnum" />
     <xsd:attribute name="choiceBranchKey" type="dfdl:ListOfDFDLStringLiteral" 
/>
+    <xsd:attribute ref="dfdlx:choiceBranchKeyRanges" />
 
 Review comment:
   I believe this reference is also needs to be added in CommonAGQualfied.
   
   CommonAG is used to validate things like ``<dfdl:format ...>``, 
``<dfdl:element ...>``, ``<dfdl:sequence>``, etc. where DFDL properties aren't 
qualified with the dfdl namespace (but dfdlx properties are still qualified). 
But for it to be allowed in ``<xs:element ...>``, ``<xs:sequence>``, etc. it 
needs to be referenced in CommonAGQualified, where DFDL (and DFDLX) properties 
do need to be qualified.
   
   I think the only reason this works is because the anyAttribute in XSD is 
pretty limited in functionality and only lets you strictly validate attributes 
in a single namespace (we chose DFDL)--all other namespaces are laxly 
validated. So right now, because dfdlx:choiceBranchKeyRanges isn't defined in 
CommonAGQualified, XSD isn't validating the property at all since it laxly 
allows anything it doesn't know about. If you add it, XSD should validate that 
it is a list of ints. You already have that validation scala code Daffodil, but 
doesn't hurt to catch it earlier.

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

Reply via email to