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

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

From: Arnold, Curt <Curt.Arnold@hyprotech.com>
Date: Tue, 20 Jun 2000 17:07:29 -0600
Message-ID: <B2C1451A181BD411B88A00E018C1C19C08A67C@THOR>
To: "'www-xml-schema-comments@w3.org'" <www-xml-schema-comments@w3.org>
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

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