W3C home > Mailing lists > Public > xmlschema-dev@w3.org > October 2002

Re: comments and pi inside simple content

From: Henry S. Thompson <ht@cogsci.ed.ac.uk>
Date: 04 Oct 2002 11:21:19 +0100
To: Tom Moog <tmoog@sarvega.com>
Cc: xmlschema-dev@w3.org
Message-ID: <f5b7kgya4io.fsf@erasmus.inf.ed.ac.uk>

Tom Moog <tmoog@sarvega.com> writes:

> In 3.1.4 of Structures, it states that comments and pi are ignored
> when constructing the content of an element.  This does not appear
> to depend on whether the content is simple or complex.  Thus
> 
>      <number>1<!-- this is a comment -->2</number>
> 
> is the same as <number>12</number> for purposes of validation.

That's what the REC says, yes.

> This seems rather counter-intuitive.  It also conflicts with the
> way xslt and other xml processors handle content - they would
> treat the "1" and the "2" as separate text items.

XML Schema doesn't have a notion of 'text item', for better or worse.

> Do I correctly understand the document, or did I miss something ?

I think you understand it correctly.

ht
-- 
  Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
          W3C Fellow 1999--2002, 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/
 [mail really from me _always_ has this .sig -- mail without it is forged spam]
Received on Friday, 4 October 2002 06:21:20 GMT

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