[ 
https://issues.apache.org/jira/browse/DAFFODIL-2800?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17695145#comment-17695145
 ] 

Mike Beckerle commented on DAFFODIL-2800:
-----------------------------------------

The choice of the two wildcards seems reasonable to try. 

We do need tests that insure we're ignoring appinfo that doesn't use the DFDL 
source URI. 

The workaround is fine for current schemas that must work with Daf 3.4.0. 

> appinfo annotations with distinct source are being misinterpreted as DFDL 
> annotations.
> --------------------------------------------------------------------------------------
>
>                 Key: DAFFODIL-2800
>                 URL: https://issues.apache.org/jira/browse/DAFFODIL-2800
>             Project: Daffodil
>          Issue Type: Bug
>          Components: Front End
>    Affects Versions: 3.4.0
>            Reporter: Mike Beckerle
>            Priority: Major
>
> This bug prevents use of annotations other than DFDL annotations in schemas. 
> This makes it impossible for me to use my XSAT2 schema scanner to check for 
> problems in DFDL schemas because the special annotations XSAT2 supports are 
> not being ignored by Daffodil. 
> I have this type which carries a special annotation that is NOT a DFDL 
> annotation:
> ```xml
> <xs:simpleType name="tHexBinary" dfdl:lengthKind="explicit">
>   <xs:restriction base="xs:hexBinary">
>     <xs:annotation>
>       <xs:appinfo source="urn:com.owlcyberdefense.xsat2">
>         <xsat2>
>           <nonRemediation>
>             This type is used only by DFI 9100 and DFI 4242 which are
>             defined to be opaque fixed length byte strings by the VMF 
> specification.
>           </nonRemediation>
>         </xsat2>
>       </xs:appinfo>
>     </xs:annotation>
>   </xs:restriction>
> </xs:simpleType>
> ```
> The source attribute indicates this is about something that is NOT DFDL. 
>  
> Note that the xsat2 and nonRemediation attributes do NOT carry a namespace 
> prefix. That may or may not be important. 
>  
> I get compilation errors like:
> ```
> [error] Schema Definition Error: Error loading schema due to 
> org.xml.sax.SAXParseException; lineNumber: 56; columnNumber: 24; 
> cvc-complex-type.2.4.a: Invalid content was found starting with element 
> 'xsat2'. One of '\{"http://www.ogf.org/dfdl/dfdl-1.0/":assert, 
> "http://www.ogf.org/dfdl/dfdl-1.0/":choice, 
> "http://www.ogf.org/dfdl/dfdl-1.0/":defineEscapeScheme, 
> "http://www.ogf.org/dfdl/dfdl-1.0/":defineFormat, 
> "http://www.ogf.org/dfdl/dfdl-1.0/":defineVariable, 
> "http://www.ogf.org/dfdl/dfdl-1.0/":discriminator, 
> "http://www.ogf.org/dfdl/dfdl-1.0/":element, 
> "http://www.ogf.org/dfdl/dfdl-1.0/":enumeration, 
> "http://www.ogf.org/dfdl/dfdl-1.0/":format, 
> "http://www.ogf.org/dfdl/dfdl-1.0/":group, 
> "http://www.ogf.org/dfdl/dfdl-1.0/":newVariableInstance, 
> "http://www.ogf.org/dfdl/dfdl-1.0/":sequence, 
> "http://www.ogf.org/dfdl/dfdl-1.0/":setVariable, 
> "http://www.ogf.org/dfdl/dfdl-1.0/":simpleType, 
> WC[##other:"http://www.ogf.org/dfdl/dfdl-1.0/"]}' is expected.
> ```
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to