document #196
dfdl:valueLength function - unclear what it does
Status: | closed | Start date: | 09/26/2013 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | Michael Beckerle | % Done: | 100% |
|
Category: | - | |||
Target version: | DFDL v1.0 | |||
Document Type: | Proposed Recommendation |
Description
Spec says:
dfdl:valueLength(path, lengthUnits) - returns the value length which excludes any padding or filling which might be added for a specified length
Is this well defined even?
It seems an abstract value other than a string doesn’t have an inherent length. E.g., the number 1000 is an abstract concept. It its content takes up a minimum of 4 characters base 10, but 3 in base 16. Depending on textNumberPattern, it may need a grouping separator, which increases the size of the content region in our grammar. So that's not the 'value' it's the content region within the overall representation of the element.
Do we really want functions named paddedContentLength and unpaddedContentLength ?
Related issues
History
Updated by Steve Hanson about 8 years ago
- Status changed from public comment to accepted
- Assignee set to Michael Beckerle
- % Done changed from 0 to 40
See http://redmine.ogf.org/boards/15/topics/63
Ongoing. Tracked by action 242 in DFDL-WG calls.
Updated by Steve Hanson about 8 years ago
- Status changed from accepted to public comment
Updated by Steve Hanson almost 5 years ago
- Target version set to DFDL v1.0
Updated by Michael Beckerle over 3 years ago
The key to this is not to overthink the concept of "value" here. What DFDL calls "value" isn't some abstract logical value such as an integer. DFDL refers to logical values sometimes, but in the case of valueLength it is referring to specific regions of the DFDL Data Syntax Grammar.
That's why it is ok for a digits grouping separator to make the "value" bigger. It's not some logical value. It's the representation of that value.
The valueLength description needs to mention the specific regions it provides the length of.
These are SimpleValue, NilLiteralValue, NilLogicalValue, or for a complex type, ComplexContent (because Content and Value are equivalent for Complex types)
Updated by Michael Beckerle about 3 years ago
This appears to have been fixed a while ago.
DFDL Spec says "Returns the length of the supplied node's SimpleValue or NilLogicalValue region for elements of simple type, or ComplexContent region for elements of complex type. These regions are defined in Section 9.2 DFDL Data Syntax Grammar. The value is returned as an xs:unsignedLong. "
So this calls out the specific grammar regions and clearly states what it is measuring.
Closing this issue as already fixed.
Updated by Michael Beckerle about 3 years ago
- % Done changed from 40 to 100
Updated by Michael Beckerle over 2 years ago
- Status changed from public comment to accepted
Updated by Michael Beckerle about 2 years ago
- Status changed from accepted to closed
(Other formats not available in this archive.