Use for outputValueCalc.
Use for outputValueCalc.
The whereBlockedLocation is modified via its block(...) method to indicate where the expression blocked (for forward progress checking).
tells us if the property is non-empty.
tells us if the property is non-empty. This is true if it is a constant non-empty expression (that is, is not ""), but it is also true if it is evaluated as a runtime expression that it is not allowed to return "".
Issue: are there properties which are string-valued, and where "" can in fact be returned at run time? Assumed no. This was clarified in an errata to the DFDL spec.
The target type of the expression.
The target type of the expression. This is the type that we want the expression to create.
used to obtain a constant value.
used to obtain a constant value.
isConstant must be true or this will throw.
(Since version Code should just call evaluate(...) on an Evaluatable object.) 2016-02-18
Note use of the stringOf(v)
below.
Note use of the stringOf(v)
below.
Turns out x.toString
creates some crappy printed representations,
particularly for Array[Byte]
. It prints a useless thing like "[@0909280".
Use of stringOf
prints "Array(....)".
For the DFDL path/expression language, this provides the place to type check the expression (SDE if not properly typed) and provides the opportunity to compile it for efficient evaluation.
The schemaNode is the schema component where the path is being evaluated which due to scoping, may not be the same one where it is defined. It is the combination of a property valued expression with a schema node that defines an evaluation of an expression.
TODO: Consider - that an expression could be constant in some contexts, not others. E.g., if a DFDL schema defines a format where the delimiters are in a header record, then those are constant once you are parsing the body records. This does imply keeping around the xpath compiler at runtime, which may not be desirable from a code size perspective. Whether it's worth it to compile or not is also a question of how often each xpath will be repeated.
TODO: provide enough scope information for this to optimize.