May 28, 2021 XML Schema
Empty composite elements cannot contain content, only properties.
An empty XML element:
The "product" element above has nothing at all. In order to define a type without content, we must declare a type that can contain only elements in its content, but in fact we do not declare any element, such as this:
In the example above, we defined a composite type with composite content. The complexContent element gives the signal that we intend to qualify or expand the content model for a composite type, while the integer qualification declares a property without introducing any elemental content.
However, this "product" element can also be declared more compactly:
Or you can name a complexType element, then set a type property for the "product" element and reference the complexType name (by using this method, several elements can refer to the same composite type):