[DFDL-WG] "all whitespace as zero"

Mike Beckerle mbeckerle.dfdl at gmail.com
Mon Aug 11 14:19:40 EDT 2014


>
> If 'lax' and dfdl:textNumberRep is 'standard' then grouping
> separators can be omitted, decimal separator can be either '.'
> or ',' (as long as this is unambiguous), leading positive sign
> can be omitted, all whitespace is treated as zero, and leading
> and trailing whitespace is ignored. Also the exponent is also
> optional and assumed to be '1' if not supplied

The part that seems odd:  "all whitespace is treated as zero"
 So according to this, if the data is:

  "  9 9  "

then with textNumberCheckPolicy="lax", the leading/trailing whitespace
is trimmed and the middle whitespace is converted to zero, so this is
equivalent to "909".

This feels like a spec bug to me, but I wanted to have others confirm this.

Note that I don't think this behavior is consistent with what icu4j
does. It simply ignores the middle space and converts the data to "99".
It's possible we're not setting an ICU4J flag, though, I don't see an
obvious ICU4J flag that would control this.


Mike Beckerle | OGF DFDL Workgroup Co-Chair | Tresys Technology |
www.tresys.com
Please note: Contributions to the DFDL Workgroup's email discussions are
subject to the OGF Intellectual Property Policy
<http://www.ogf.org/About/abt_policies.php>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.ogf.org/pipermail/dfdl-wg/attachments/20140811/991356b9/attachment.html>


More information about the dfdl-wg mailing list