I have an XSD that defines an complex type and has the targetNamespace
attribute set. Is it correct that the TestElement
will not gain the namespace set by targetNamespace
? It should gain the namespace from the complex type afn:ElementType
and therefore http://anotherfancy.namespace
, right?
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:sfn="http://somefancy.namespace"
xmlns:afn="http://anotherfancy.namespace"
attributeFormDefault="unqualified"
elementFormDefault="qualified"
targetNamespace="http://somefancy.namespace"
version="1.0">
<xs:import namespace="http://anotherfancy.namespace" schemaLocation="..."/>
<xs:element name="MyComplexType">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="TestElement" type="afn:ElementType">
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>