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

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>

If we disallow all but the first example (which would be my leaning), how do we allow for the leading or trailing processing instructions or comments?  The intervening comments and PIs look pretty
silly and shouldn't be accepted unless they were separating items in a list of integers.

This would seem a place where it might be useful to create a complexType whose particle is a simpleType.  The complexType would allow PIs and comments and the simpleType would not.

On a related thought, should you be able to block PIs and comments in a complexType definition?

Received on Wednesday, 21 June 2000 11:23:51 UTC