Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: fixed inputValueCalc to inputTypeCalc in an example

...

Code Block
<xs:simpleType name="fruitLocalType"
     dfdlx:inputValueCalcinputTypeCalc ="{ dfdlx:repTypeValue() – 2 }"
     dfdlx:outputValueCalcoutputTypeCalc ="{ dfdlx:logicalTypeValue() + 2 }" 
     dfdlx:repType=”tns:fruitIntType”
     dfdlx:repValues="12 14"
     dfdlx:repValueRanges="3 10 16 255" >
  <xs:restriction base=”xs:int” />
</xs:simpleType>

...

  • dfdlx:inputTypeCalc(f: QName, x:A)
    • f must be a constant QName resolving to a simpleType with a transform defined
    • The type of x is determined statically at compile time as the primitive type of the repType of f.
    • The return type is given by the primitive type of the logical type of f.
    • If the types given by f do not match what is required, the relevent expression may be cast according to standard DFDL expression casting rules.
    • Returns the result of applying the inputTypeCalc function associated with f to x
  • dfdlx:outputTypeCalc(f: QName, x:Any)
    • f must be a constant QName resolving to a simpleType with a transform defined
    • The type of x is determined statically at compile time as the primitive type of the logical type of f.
    • The return type is given by the primitive type of the repType of f.
    • If the types given by f do not match what is required, the relevent expression may be cast according to standard DFDL expression casting rules.
    • Returns the result of applying the outputTypeCalc function associated with f to x
  • dfdlx:outputTypeCalcNextSiblingInt(f: QName, x:Any)
    • The following sibling must be a simpleType whose repType is a restriction of xs:int
    • Returns the result of applying the outputTypeCalc function associated with the type of the following element to the value of the following element
  • dfdlx:outputTypeCalcNextSibling()
    • Returns the result of applying the outputTypeCalc defined by the immidietly following sibling of the current node, to the value contained by the immidietly immediately following sibling of the current node.
    • Can only be used on unparse.
    • Requires that all potential following siblings have the same repType and define an outputTypeCalc.
    • The return type is the primitive type of the repType of the following sibling.
    • If the return type does not match what is expected by the containing expression, it will be cast according to standard DFDL expression casting rules.
  • dfdlx:repTypeValue()
    • Can only be called from inside dfdlx:inputTransform
    • Returns the value of the underlying repType.
  • dfdlx:logicalTypeValue()
    • Can only be called from inside dfdlx:outputTransform
    • Returns the logical value of this element.