W3C home > Mailing lists > Public > xmlschema-dev@w3.org > May 2005

Re: cdata attribute value normalization in schema?

From: Henry S. Thompson <ht@inf.ed.ac.uk>
Date: Mon, 23 May 2005 10:42:48 +0100
To: Bryan Rasmussen <brs@itst.dk>
Cc: "'xmlschema-dev@w3.org'" <xmlschema-dev@w3.org>
Message-ID: <f5bk6lqjn1j.fsf@erasmus.inf.ed.ac.uk>

Bryan Rasmussen writes:

> How do I represent an Attribute of being type CDATA so that the further
> normalization represented here 
> "If the attribute type is not CDATA, then the XML processor MUST further
> process the normalized attribute value by discarding any leading and
> trailing space (#x20) characters, and by replacing sequences of space (#x20)
> characters by a single space (#x20) character.
> " is not done? Should I use whiteSpace facet replace since that corresponds
> to the rest of the algorithm?
> If so, how is this okay by the xml spec as the spec says that this
> normalization must be done prior to being passed to validation? 

See the documentation of whitespace processing [1] -- you can choose
whatever you like for your simple type definitions as long as they're
derived from xs:string.

W3C XML Schema's whitespace normalization is independent of XML's and
happens logically after it.

ht

[1] http://www.w3.org/TR/xmlschema-1/#d0e1654
-- 
 Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
                     Half-time member of W3C Team
    2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
            Fax: (44) 131 650-4587, e-mail: ht@inf.ed.ac.uk
                   URL: http://www.ltg.ed.ac.uk/~ht/
[mail really from me _always_ has this .sig -- mail without it is forged spam]
Received on Monday, 23 May 2005 09:42:52 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:50 GMT