Reputation: 10026
I'm tasked with validating and interpreting and XSD Schema, this schema starts with:
<xsd:schema xmlns:xsd="http://....">
<xsd:complexType name="TemplateType"> <!-- Nowhere referenced -->
<xsd:sequence>
<xsd:element name="DataType" type="DocumentDataType"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="DocumentDataType">
It's been too long since my last XSD task, but somewhere I would expect a <element type="templateType">
, but this is not the case.
What is wrong here? My rusty XSD knowledge or the delivered XSD?
Upvotes: 2
Views: 809
Reputation: 111686
A complex type name (xsd:complexType/@name
) could be
xsd:element/@type
), as you say.xsd:extension/@base
) or
restriction (xsd:restriction/@base
).xsi:type
. [Credit @MichaelKay]So, your TemplateType
may serve another purpose besides the direct definition of an element type, or it may have become vestigial over the course of the evolution of the XSD.
Upvotes: 2