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

Michael Beckerle commented on DAFFODIL-1902:
--------------------------------------------

The example is this:
{code}
<xs:annotation>
   <xs:appinfo source="http://www.ogf.org/dfdl/";>
       <dfdl:format ... a regular dfdl annotation .../>
       <stf:Unit ... an STF annotation living along side the dfdl annotation 
element. />
   </xs:appinfo>
</xs:annotation>
{code}

This is probably not something we want to support. As supporting this means a 
variety of malformed DFDL annotation elements would slip by if they looked like 
3rd party annotations like this. E.g.,
{code}
<xs:annotation>
   <xs:appinfo source="http://www.ogf.org/dfdl/";>
       <dfdl:formt ... a regular dfdl annotation .../> <!-- TYPOGRAPHICAL ERROR 
formt not format-->
       <stf:Unit ... an STF annotation living along side the dfdl annotation 
element. />
   </xs:appinfo>
</xs:annotation>
 {code}

In the above, I have a typo in the name of the DFDL annotation, but if we're 
going to
ignore annotations by choosing only the annotations that are known to us, we 
would just
skip this broken one and not detect this error.

Another mistake I want to be able to catch
{code} 
<xs:annotation>
   <xs:appinfo source="http://www.ogf.org/dfdl/";>
       <format... a regular dfdl annotation .../> <!-- ERROR missing dfdl: 
prefix. -->
       <stf:Unit ... an STF annotation living along side the dfdl annotation 
element. />
   </xs:appinfo>
</xs:annotation>
{code}

I suggested to the user that they need their own xs:appinfo with their own 
source attribute URI. I.e., 
{code}
<xs:annotation>
   <xs:appinfo source="http://www.ogf.org/dfdl/";>
       <dfdl:format ... a regular dfdl annotation .../>
   </xs:appinfo>
 
   <xs:appinfo source="SomeSTFURI">
       <stf:Unit ... an STF annotation in its own appinfo />
  </xs:appinfo>
</xs:annotation>
{code}
This is more verbose, but I think is the correct thing, or at least is a 
workaround. 

> Daffodil disallows attributes on xs:appinfo element
> ---------------------------------------------------
>
>                 Key: DAFFODIL-1902
>                 URL: https://issues.apache.org/jira/browse/DAFFODIL-1902
>             Project: Daffodil
>          Issue Type: Bug
>          Components: Front End
>    Affects Versions: 2.1.0
>            Reporter: Michael Beckerle
>            Priority: Major
>             Fix For: 2.1.0
>
>
> Users at NATO report that Daffodil doesn't tolerate the xs:appinfo element 
> carrying additional attributes. They want to combine appinfo DFDL attributes 
> with other appinfo for other purposes on the same schema.
> (I will get a clarifying example.)



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to