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

Olabusayo Kilo commented on DAFFODIL-1842:
------------------------------------------

I'm unable to reproduce this. I have the following and it doesn't complain 
about  the referencer and referencee having the same properties expressed 
directly on them. Does my example look correct?


{code:xml}
<tdml:defineSchema name="PropertySyntaxOverlap">

    <xs:include 
schemaLocation="/org/apache/daffodil/xsd/DFDLGeneralFormat.dfdl.xsd"/>
    <dfdl:format ref="ex:GeneralFormat" lengthKind="delimited"
        lengthUnits="bytes" encoding="UTF-8" separator="" initiator=""
        terminator="" occursCountKind="parsed" ignoreCase="no"
        textNumberRep="standard" representation="text" initiatedContent="no" />
    
    <xs:element name="e1" type="xs:string" dfdl:lengthUnits="bits"/>
    
    <xs:element name="outer">
      <xs:complexType>
        <xs:sequence>
          <xs:element ref="ex:e1" dfdl:lengthUnits="bits"/>
        </xs:sequence>
      </xs:complexType>
    </xs:element>
    
  </tdml:defineSchema>
  
  <tdml:parserTestCase name="overlappingProperties1" root="outer" 
roundTrip="onePass"
      model="PropertySyntaxOverlap"
      ignoreUnexpectedWarnings="false">
    <tdml:document>hello</tdml:document>
    <tdml:errors>
      <tdml:error>Overlap is not allowed</tdml:error>
    </tdml:errors>
<!--    <tdml:infoset>-->
<!--      <tdml:dfdlInfoset>-->
<!--        <ex:outer>-->
<!--          <e1>hello</e1>-->
<!--        </ex:outer>-->
<!--      </tdml:dfdlInfoset>-->
<!--    </tdml:infoset>-->
  </tdml:parserTestCase>
{code}

> Property scoping bug -  spurious SDE
> ------------------------------------
>
>                 Key: DAFFODIL-1842
>                 URL: https://issues.apache.org/jira/browse/DAFFODIL-1842
>             Project: Daffodil
>          Issue Type: Bug
>          Components: Front End
>            Reporter: Mike Beckerle
>            Priority: Major
>              Labels: reverify
>
> Element references and the elements they reference cannot have the same 
> properties expressed directly on them.
> However, they should be able to override the properties that are inherited 
> from the default properties surrounding the global element decl. 
> But this error message, from the overlap check, is clearly saying it is 
> looking at a SchemaDocument:format annotation, and complaining about overlap 
> with it.
> This is not correct. The overlap check should not be considering the default 
> format of any schema when determining the overlap.
> TODO: create a public test case that reproduces this error. Right now it came 
> up in an FOUO schema that is not publicly available.
> {code}
> edu.illinois.ncsa.daffodil.tdml.TDMLException: Schema Definition Error: 
> Overlapping properties: lengthUnits overlaps between element reference 
> link16:Link16 and {color:#d04437}_+SchemaDocument::format.+_{color} Overlap 
> is not allowed.
> Schema context: ms:Link16 Location line 70 column 5 in 
> file:/home/mbeckerle/FOUO/fouo-schemas/nato-stanag-5516/bin/scala-2.11/test-classes/nato/xsd/link16ed6-daffodil-compliant.xsd
> {code}



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

Reply via email to