Revised text for Whitespace MIP

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.


This property specifies how whitespace must be treated when a string is  
converted to the value that the 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  


   <payment xmlns="">
 <bind ref="amount" type="decimal"/>
 <bind ref="name" whitespace="normalize"/>
 <bind ref="cardnumber" type="card-number" whitespace="remove"/>

Here, the whitespace property indicates 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  
whitespaces will be removed before the value is added to the instance. For  
the amount value, by default, whitespace is preserved, but since the  
schema lexical space for numbers allows leading and trailing whitespace,  
such whitespace (but not embedded whitespace) will not effect validity.

Received on Wednesday, 30 March 2016 11:19:54 UTC