W3C home > Mailing lists > Public > xmlschema-dev@w3.org > January 2016

True or False: Every element has a type, even if none is specified

From: Costello, Roger L. <costello@mitre.org>
Date: Thu, 21 Jan 2016 12:51:15 +0000
To: "xmlschema-dev@w3.org" <xmlschema-dev@w3.org>
Message-ID: <DM2PR09MB0351AA4FF53AF7D77D12764FC8C30@DM2PR09MB0351.namprd09.prod.outlook.com>
Hi Folks,

I claim this statement is true: 

	Every element has a type, even if none is specified; 
	if none is specified, then the element has the default type.

For example, no type is specified in this element declaration:

	<element name="E" />

So it has the default type:

   <element name="E">
      <complexType mixed="true">
         <sequence>
            <any maxOccurs="unbounded" minOccurs="0"/>
         </sequence>
         <anyAttribute/>
      </complexType>
   </element>

Likewise, no type is specified in this attribute declaration:

	<attribute name="A" />

So it has the default type:

	<attribute name="A" type="anySimpleType" />

Do you agree with this statement: 

	Every element has a type, even if none is specified; 
	if none is specified, then the element has the default type.

/Roger
Received on Thursday, 21 January 2016 12:51:46 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:16:09 UTC