This trait is to be used with prefixed length unparsers where the length must be calculated based on the value length of the data.
For dfdl:outputValueCalc elements.
For regular (not dfdl:outputValueCalc) elements.
Base class for unparsing elements
Base class for unparsing elements
Depends on use of separate unparsers for the padding/fill regions which calculate their own sizes, generally after the length of the value region has been determined.
The unparser used for an element that has inputValueCalc.
The unparser used for an element that has inputValueCalc.
The only thing we do is move over one child element, because the inputValueCalc element does take up one child element position. However, not in the group - because that is what is used to decide whether to place separators, and there should not be any separator corresponding to an IVC element.
specifies the way the element will consume infoset events,
Elements that, when unparsing, have no length specified.
Elements that, when unparsing, have no length specified.
That is, lengtKind delimited, pattern, and implicit(for complexTypes)
Use when the element is of simple type hexBinary, not nillable.
This trait is to be used with prefixed length unparsers where the length is known without needing to unparse the data.
This trait is to be used with prefixed length unparsers where the length is known without needing to unparse the data. This means there is either a fixed length (like in the case of some binary numbers), or the length can be determined completly be inspecting the infoset data (like in the case of packed decimals). The length calculation performed in the getBitLength function, which returns the length of the data in bits.
Several sub-unparsers need to have the value length, and the target length in order to compute their own length.
Use when analysis shows the element can never be zero length.
Use for nillable hexBinary when they can be zero length two different ways.
Use for nillable strings when they can be zero length two different ways.
Use when the characteristics of the nil representation are such that unparsing a nilled element will result in zero length.
Applies to both simple and complex types that are nillable.
Doesn't matter if we're left or right padding if we're the only padding
When dfdl:lengthKind is 'explicit' (and dfdl:length is an expression), 'delimited', 'prefixed', 'pattern' the data value is padded to the length given by the XSD minLength facet for type 'xs:string' or dfdl:textOutputMinLength property for other types.
When dfdl:lengthKind is 'explicit' (and dfdl:length is an expression), 'delimited', 'prefixed', 'pattern' the data value is padded to the length given by the XSD minLength facet for type 'xs:string' or dfdl:textOutputMinLength property for other types.
dfdl:textOutputMinLength: Only used when dfdl:textPadKind is 'padChar' and dfdl:lengthKind is 'delimited', 'prefixed', 'pattern', 'explicit' (when dfdl:length is an expression) or 'endOfParent', and type is not xs:string Specifies the minimum content length during unparsing for simple types that do not allow the XSD minLength facet to be specified. For dfdl:lengthKind 'delimited', 'pattern' and 'endOfParent' the length units are always characters, for other dfdl:lengthKinds the length units are specified by the dfdl:lengthUnits property. If dfdl:textOutputMinLength is zero or less than the length of the representation text then no padding occurs.
Base for unparsers of array/optional elements.
Base for unparsers of array/optional elements.
The unparse() method unparses exactly one occurrance, does NOT iterate over all the occurrences.
DFDL Spec.
DFDL Spec. section 14.2.3 specifies only a few different behaviors for separator suppression. Each has an algorithm.
base for unparsers for the children of sequences.
base for unparsers for the children of sequences.
There is one sequence child unparser for each child (declared) of the sequence.
These do not iterate over multiple recurring instances. That iteration happens in the caller. These unparse only a single occurrence when the child unparser is for an array/optional element.
Used when unparsing to evaluate dfdl:setVariable statements.
Used when unparsing to evaluate dfdl:setVariable statements.
TODO: Possible bug. This will allow expressions to forward reference, even when the variables are being referenced from expressions that are NOT allowed to forward reference - e.g., property value expressions such as delimiters and byte order.
This forward suspension is only supposed to be allowed for dfdl:outputValueCalc.
Restricts the bits available for unparsing to just those within the specified length computed.
Restricts the bits available for unparsing to just those within the specified length computed.
If a unparser (supplied as arg) runs past the available space, that's an unparse error.
Truncation of strings - the only case where we truncate, and only when dfdl:truncateSpecifiedLengthString is 'yes', is handled elsewhere.
Truncates strings to the right length measured in bits.
Truncates strings to the right length measured in bits. LengthUnits is Bits, but we still don't know whether the encoding is fixed width or variable width.
Truncates strings to the right length measured in characters.
Truncates strings to the right length measured in characters.
LengthUnits is 'characters', but we still don't know what encoding so whether it is fixed or variable width.
What's interesting is that we don't care whether the encoding is fixed or variable width in this case.
This is more efficient for variable-width encodings than lengthUnits 'bytes' (or bits), because we don't need a pass to measure the number of bits.
So, for utf-8, we should recommend lengthUnits 'characters' ? Maybe so.
Use when the element is of simple type string, not nillable.
Carries out computation of the target length for a specified-length element.
Carries out computation of the target length for a specified-length element.
This is not a SuspendableExpression because the dfdl:length property cannot be forward referencing. However, it can refer backward to elements that have dfdl:outputValueCalc or variables that have not yet been computed. So we have to retry this in order to get the target length used to compute the amount of padding or the amount of unused space.
Rapidly determines if an Infoset Element will have zero length when unparsed.
Rapidly determines if an Infoset Element will have zero length when unparsed.
This is required for proper separator suppression in sequence unparsers.
The specific concrete sub-class is selected based on a compile time analysis of whether the element can have zero length at all, and if so, under what conditions.
This trait is to be used with prefixed length unparsers where the length must be calculated based on the value length of the data. This means the data must be unparsed, the value length calculated, and that value will be assigned to the prefix length element.