XSD doc: issue with local element definitions
Posted: Mon Jun 01, 2015 3:46 pm
Hello,
I have noticed some strange inconsistancies when using the WSDL documentation generator on XSD models. We have a number of parameter types externally defined in other XSD files. However the elements are defined locally in the message structure. The problem is that for locally defined parameters there is no link to the type definition. However if the parameter is globally declared the link to the type definition will be generated in the "model" and "children" section of the HTML document.
Here is an example. The definition of the complex "MessageParameterType" of the locally declared "Parameter" element will not show up in the generated HTML documentation:
However if I declare the parameter globally with a reference it will appear as a link to the type definition diagram in the model/children section:
I have noticed some strange inconsistancies when using the WSDL documentation generator on XSD models. We have a number of parameter types externally defined in other XSD files. However the elements are defined locally in the message structure. The problem is that for locally defined parameters there is no link to the type definition. However if the parameter is globally declared the link to the type definition will be generated in the "model" and "children" section of the HTML document.
Here is an example. The definition of the complex "MessageParameterType" of the locally declared "Parameter" element will not show up in the generated HTML documentation:
Code: Select all
...
<xs:include schemaLocation="message_parameters.xsd"/>
<xs:complexType name="MessageRequestType">
<xs:complexContent>
<xs:sequence>
<xs:element name="Parameter" type="MessageParameterType"/>
</xs:sequence>
</xs:complexContent>
</xs:complexType>
<xs:element name="MessageRequest" type="MessageRequestType"/>
</xs:schema>
Code: Select all
...
<xs:include schemaLocation="message_parameters.xsd"/>
<xs:complexType name="MessageRequestType">
<xs:complexContent>
<xs:sequence>
<xs:element ref="Parameter"/>
</xs:sequence>
</xs:complexContent>
</xs:complexType>
<xs:element name="MessageRequest" type="MessageRequestType"/>
<xs:element name="Parameter" type="MessageParameterType"/>
</xs:schema>