Subject:WhiteSpace facet default Author:lucrecia chiartano Date:14 Dec 2006 12:29 PM
is there anyone who knows what must be the default behaviour with leading and ending whitespaces, while validating an xml against a XMLSchema with a simpleType definition derived by restriction from a string and NO WhiteSpace facet defined within ?
I've found in the XML-Schema specs that : " for any type ĚderivedĚ by ĚrestrictionĚ from string the value of whiteSpace can be any of the three legal values." (i.e. preserve, replace, collapse)
But this makes not clear to me what happends when this facet is not present.
Node to be validated :
<DigitCartaSIM>0 0 5 0 </DigitCartaSIM>
I've tried validation with Excelon and several other tools, and found that it behaves as if WhiteSpace facet was 'preserve'.
Nonetheless I've been asked to change my xml-schema code because nodes like the one copied in the above example, are not beeing validated. I've been told that the parser normalizes the value before validating, end then length matches no more it's definition.