Uploaded image for project: 'Daffodil'
  1. Daffodil
  2. DFDL-1763

Scoping properties doesn't take "applicability" into consideration

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Normal
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: deferred
    • Component/s: Compatibility, Front End
    • Labels:
      None

      Description

      Daffodil allows some properties that are only allowed on dfdl:element annotations to be inherited from the lexical context of a simpleType that is referenced from an element.

      In the DFDL spec section 8.3 the algorithm for combining properties between element-refs, elements, simple types, and base simpleTypes is given. A key word in the descriptions is "applicable" properties. Daffodil is not filtering the properties it takes from a simple type, for example, by their applicability to simple types.

      E.g., one should not be able to put dfdl:nilValue on a simpleType. I believe we enforce this if it is directly placed in a dfdl:simpleType long form property, but might not be checked for short-form or dfdl:property-element form.

      Furthermore, if a nilValue property is defined in the default format surrounding a simpleType, that's ignored by any element that uses the simple type.

      Furthermore if a nilValue property is defined in a named format definition that is referenced from a simpleType, that nilValue is ignored and not used by an element having that simpleType.

      The same is true for other element-only properties such as nilKind, and occursCountKind, occursCount. (Nillability and Dimension are two things that are often thought of as "type" information, but in XSD these are not characteristics of types, but of element declarations. DFDL just follows XSD in this.)

        Gliffy Diagrams

          Attachments

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              mbeckerle.dfdl Mike Beckerle
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:

                  Tasks

                  Progress: 
                   0/0