Re: Processing instructions and/or comments in elements with simpleTy pe content

"Arnold, Curt" <Curt.Arnold@hyprotech.com> writes:

> I don't recall any section of the schema drafts addressing the appearance of processing instructions or comments within an element who is associated with a simpleType.
> 
> For example, with this schema:
> 
> <xsd:schema>
> 	<xsd:element name="integer" type="xsd:integer"/>
> </xsd:schema>
> 
> Which are the following are should be legal:
> 
> <number>12345678</number>
> <number><!-- leading comment     -->12345678</number>
> <number>1234<!-- intervening comment   -->5678</number>
> <number>12345678<!--  trailing comment --></number>
> 
> <number><?example on="true"?>12345678</number>
> <number>1234<?example on="true"?>5678</number>
> <number>12345678<?example on="true"?></number>

They're all valid, no new mechanism is required, the semantics of
validation for both simple _and_ complex types explicitly ignores PI
and comment IIs, as well as entity start, end and udr IIs.

Although it may be somewhat confusing in principle that this is true
even for e.g. comments in the midst of text, in practice this will not 
arise often, and it's much
simpler to define and to explain to simply say 'PIs and comments have
_no_ impact on schema-validity whatsoever'.

ht
-- 
  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 Saturday, 24 June 2000 08:10:42 UTC