Re: Revised text for Whitespace MIP

Looks good to me. -Erik

On Wed, Apr 6, 2016 at 2:59 AM, Steven Pemberton <steven.pemberton@cwi.nl>
wrote:

> Here is the revised text, though I would be grateful for some help with
> the text for the changes to the processing model.
>
> Steven
>
> 6.1.x The whitespace property
>
> Description: specifies how whitespace is treated when converting strings
> to data.
>
> Computed Expression: No.
>
> Legal Values: preserve, trim, remove, collapse, normalize.
>
> Default Value: preserve.
>
> Inheritance Rules: does not inherit.
>
> Description.
>
> This property specifies how whitespace must be treated when a string is
> converted to the value that the whitespace property is attached to, for
> instance from an input control:
>
>         preserve: all whitespace is preserved,
>         trim: all whitespace from the beginning and end of the string is
> removed,
>         remove: all whitespace is removed,
>         collapse: each occurrence of multiple whitespace is replaced with
> a single space character (0x20),
>         normalize: a combination of 'trim' and 'collapse'.
>
> Whitespace is any character defined as whitespace ("WSpace=Y", "WS") in
> the Unicode Character Database [ref: "The Unicode Standard". Unicode
> Consortium.]
>
> Example
>
>         <instance>
>           <payment xmlns="">
>             <amount/>
>             <name/>
>             <cardnumber/>
>           </payment>
>         </instance>
>         <bind ref="amount" type="decimal"/>
>         <bind ref="name" whitespace="normalize"/>
>         <bind ref="cardnumber" type="card-number" whitespace="remove"/>
>
> Here, the whitespace properties indicate that if a user inputs a value for
> name, the leading and trailing whitespace will be removed, and all other
> consecutive sequences of whitespace will be collapsed to a single space; if
> the user inputs a credit card number with embedded whitespace, that
> whitespace will be removed before the value is added to the instance; for
> the amount value, by default whitespace is preserved (however XML rules
> specify that leading and trailing whitespace does not affect validity of
> numbers). [ref https://www.w3.org/TR/xmlschema-1/#d0e1654]
>
>

Received on Wednesday, 6 April 2016 13:33:43 UTC