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

Scoping properties doesn't take "applicability" into consideration

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • Compatibility, Front End
    • 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.)

      Attachments

        Activity

          People

            Unassigned Unassigned
            mbeckerle Mike Beckerle
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: