W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > April to June 2000

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

From: Henry S. Thompson <ht@cogsci.ed.ac.uk>
Date: 24 Jun 2000 13:10:39 +0100
To: "Arnold, Curt" <Curt.Arnold@hyprotech.com>
Cc: "'www-xml-schema-comments@w3.org'" <www-xml-schema-comments@w3.org>
Message-ID: <f5bk8ffnutc.fsf@cogsci.ed.ac.uk>
"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'.

  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

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