Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

It may be desirable to include both the raw and logical values in the infosets. Traditionally, this usecase use case has been accomplished using inputValueCalc and outputValueCalc annotations. This remains the case here. To support this usecaseuse case, we expose the inputTypeCalc/outputTypeCalc functions to the DFDL expression language:

...

  • dfdlx:inputTypeCalc
    • Applies to xs:simpleType
    • Requires dfdlx:repType to also be present
    • Is a DFDL expression
    • On parse, first parse according to the repType, then populate the value of this element to the result of evaluating the dfdlx:inputTypeCalc expression
    • The value of the repType may be accessed by the expression through the dfdlx:repTypeValue functions
  • dfdlx:ouputTypeCalcoutputTypeCalc
    • Applies to xs:simpleType
    • Requires dfdlx:repType to also be present
    • Is a DFDL expression
    • On unparse, first evaluate this expression, then unparse according to the repType as if the logical value were the result of evaluating this expression
    • The original logical value of this type may be accessed by the expression through the dfdlx:logicalTypeValue functions
  • dfdlx:repValues
    • Applies to xs:enumeration and xs:simpleType
    • A space separated list of values
    • Values must be of a type consistend with repType
    • When applied to xs:enumeration:
      • Defines a KeySet-Value transform, and associates the annotated enumeration value with the listed keys
      • Adds the listed values to the repValue set of the parent simpleType
    • When Applied to xs:simpleType
      • Adds the listed keys to the repValue set of the parent
      • This set will be used by xs:choice when choiceBranchKeyKind=byType
  • dfdlx:repValueRanges
    • Applies to xs:enumeration and xs:simpleType
    • Requires dfdlx:repType to be present and refer to an integer type
    • A space separated list of integers defining ranges of integers
    • Takes the form “min1 max1 min2 max2 … minN maxN”
    • Represents the set of integers described by the union of the intervals [mink, maxK]
    • Behaves as if all members of this set were included in the dfdlx:repValues annotation

...