Closed jormeijer closed 8 years ago
An element that is referenced to an element in another schema will always get the XML namespace that is defined in the targetNamespace of the 'parent' schema.
For example:
<xs:schema targetNamespace="http://www.example.com" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ex="http://www.example2.com"> <xs:import namespace="http://www.example2.com" schemaLocation="data2.xsd"/> <xs:complexType name="complexType1"> <xs:sequence> <xs:element ref="ex:element1"/> </xs:sequence> </xs:complexType> </xs:schema>
Will get converted to:
properties: element1: ... xml_element: namespace: 'http://www.example.com' ...
Instead of namespace: 'http://www.example2.com' which is the namespace where the referenced element is in.
namespace: 'http://www.example2.com'
fixed in https://github.com/goetas/xsd2php/pull/112
An element that is referenced to an element in another schema will always get the XML namespace that is defined in the targetNamespace of the 'parent' schema.
For example:
Will get converted to:
Instead of
namespace: 'http://www.example2.com'
which is the namespace where the referenced element is in.