below is my xslt , basically there are nested complex type.
<xs:complexType name="onlineExpressRemitService">
<xs:sequence>
<xs:element minOccurs="0" name="return" type="tns:onlineExpressRemitResponse"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="onlineExpressRemitResponse">
<xs:complexContent>
<xs:extension base="tns:endpointResponse">
<xs:sequence>
<xs:element minOccurs="0" name="description" type="xs:string"/>
<xs:element minOccurs="0" name="hostResponseCode" type="xs:string"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="endpointResponse">
<xs:sequence>
<xs:element minOccurs="0" name="response" type="tns:endpointResponseHeader"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="endpointResponseHeader">
<xs:sequence>
<xs:element minOccurs="0" name="requesttimestamp" type="xs:string"/>
<xs:element minOccurs="0" name="responsetimestamp" type="xs:string"/>
<xs:element name="statuscode" type="xs:int"/>
</xs:sequence>
</xs:complexType>
my input xml
<return>
<response>
<requesttimestamp>2015-05-18t11:20:40.201+0800</requesttimestamp>
<responsetimestamp>2015-05-18t11:20:40.218+0800</responsetimestamp>
<statuscode>1</statuscode>
</response>
<description>Successful</description>
<hostResponseCode>000</hostResponseCode>
</return>
there are no error with my input xml, however this is not what i want, my expected input is description tag and hostresponsecode tag located at above of response tag
<return>
<description>Successful</description>
<hostResponseCode>000</hostResponseCode>
<response>
<requesttimestamp>2015-05-18t11:20:40.201+0800</requesttimestamp>
<responsetimestamp>2015-05-18t11:20:40.218+0800</responsetimestamp>
<statuscode>1</statuscode>
</response>
</return>
i did try nested complexType, nested sequence, however this is not working at all.i am lost at moments, need some guidance, please lets me know if any others information is needed.
When you define one complex type derived from another by extension, the additional elements can only go at the end. So if you want to support the content model you are describing, you can't do it by extending a base complex type in this way.