A complex type without an element in XSD



Is it possible to define an XSD having only complex types without xs:elements?


Something like:



<?xml version="1.0" encoding="UTF-8"?>
<xs:schema version="1.0" xml:lang="en" xmlns:xs="http://ift.tt/tphNwY" elementFormDefault="qualified">
<xs:complexType name="complexType1">
<xs:sequence>
<xs:element name="element1" type="xs:string" minOccurs="1" />
<xs:element name="element2" type="xs:string" minOccurs="1" />
</xs:sequence>
</xs:complexType>
</xs:schema>


Or do we have to include at least a single xs:element of the defined complex type?


No comments:

Post a Comment