W3C home > Mailing lists > Public > public-xformsusers@w3.org > April 2016

Re: Revised text for Whitespace MIP

From: Steven Pemberton <steven.pemberton@cwi.nl>
Date: Wed, 06 Apr 2016 11:59:14 +0200
To: "public-xformsusers@w3.org" <public-xformsusers@w3.org>
Message-ID: <op.yfhso0owsmjzpq@steven-aspire-s7>
Here is the revised text, though I would be grateful for some help with  
the text for the changes to the processing model.


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 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  


	  <payment xmlns="">
	<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 09:59:48 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 6 April 2016 09:59:48 UTC