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

Mike Beckerle edited comment on DAFFODIL-2798 at 12/19/24 8:43 PM:
-------------------------------------------------------------------

I am getting unused property warnings on 
{code:java}
[error] [warning] Schema Definition Warning: DFDL property was ignored: 
choiceBranchKeyRanges="0 8175" (id: ignoreDFDLProperty)
[error] Schema context: sequence[1] Location line 5658 column 10 in 
/com/owlcyberdefense/mil-std-6016f1/xsd/types.gen.dfdl.xsd{code}
on every line of my schema that uses dfdlx:choiceBranchKeyRanges which is a 
legit daffodil extension to DFDL and the property is not being ignored. 


was (Author: mbeckerle):
I am getting unused property warnings on 

```

[error] [warning] Schema Definition Warning: DFDL property was ignored: 
choiceBranchKeyRanges="0 8175" (id: ignoreDFDLProperty)
[error] Schema context: sequence[1] Location line 5658 column 10 in 
/com/owlcyberdefense/mil-std-6016f1/xsd/types.gen.dfdl.xsd

```

on every line of my schema that uses dfdlx:choiceBranchKeyRanges which is a 
legit daffodil extension to DFDL and the property is not being ignored. 

> No warning on unused dfdlx properties on xs:enumeration
> -------------------------------------------------------
>
>                 Key: DAFFODIL-2798
>                 URL: https://issues.apache.org/jira/browse/DAFFODIL-2798
>             Project: Daffodil
>          Issue Type: Bug
>          Components: Front End
>    Affects Versions: 3.4.0
>            Reporter: Steve Lawrence
>            Assignee: Olabusayo Kilo
>            Priority: Minor
>             Fix For: 4.0.0
>
>
> Say we have a schema like this (note that dfdlx:repValue is an intentional 
> typo and should be dfdl:repValues):
> {code:xml}
>   <simpleType name="rep" dfdl:lengthKind="explicit" dfdl:length="1">
>     <restriction base="xs:string" />
>   </simpleType>
>   <simpleType name="value" dfdlx:repType="ex:rep">
>     <restriction base="xs:string">
>       <enumeration value="ZERO" dfdlx:repValue="0" />
>       <enumeration value="ONE" dfdlx:repValue="1" />
>       <enumeration value="TWO" dfdlx:repValue="2" />
>     </restriction>
>   </simpleType>
>   <element name="root" type="ex:value" />
> {code}
> Because *dfdlx:repValue* is a typo, Daffodil ignores it--we do not error on 
> unknown extension properties because those properties may be used for other 
> DFDL implementations.  But with this property being ignored, it can leads to 
> unexpected behavior or even confusing SDE's if the typo is not discovered.
> Because it is ignored, we should output a warning which helps user discover 
> the error. But in this case, with the unknown property being on an 
> enumeration, no warning is generated.
> It looks like the issue is that we only check for unused properties on Terms, 
> but xs:enumeration is not a Term so we do not check them. Ideally this logic 
> would be moved to something more generic so we can warn on all schema 
> components instead of just terms.



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

Reply via email to