Re: comments and pi inside simple content

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 UTC