W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > July to September 2001

Re: FW: spaces in value fields

From: Henry S. Thompson <ht@cogsci.ed.ac.uk>
Date: 21 Sep 2001 10:03:52 +0100
To: "Penick, Thomas" <tpenick@vignette.com>
Cc: "'www-xml-schema-comments@w3.org'" <www-xml-schema-comments@w3.org>, "Miller, Scott" <smiller@vignette.com>
Message-ID: <f5b8zf8530n.fsf@cogsci.ed.ac.uk>
This is a bit tricky, but the bottom line is straightforward -- your
documents are fine, the parser has a problem.

Full story:  ' 3.5' is not in the lexical space of the 'double'
builtin primitive datatype.  _However_  both

  <foo> 3.5</foo>
  <baz f=' 3.5'/>

_are_ XML Schema-valid if <foo> and 'f' are declared as xs:double.

Why?  Because all non-string datatypes by definition have the
'collapse' value for their 'whitespace' facet, which means that
parsers must _inter alia_ strip leading and trailing whitespace from
the input to _construct_ the candidate lexical space string.

So in both those cases, the string to be considered is '3.5', which is 

Hope this helps

  Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
          W3C Fellow 1999--2001, part-time member of W3C Team
     2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
	    Fax: (44) 131 650-4587, e-mail: ht@cogsci.ed.ac.uk
		     URL: http://www.ltg.ed.ac.uk/~ht/
Received on Friday, 21 September 2001 05:03:16 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:08:53 UTC