You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The ·XML Schema· corresponding to contains not only the components corresponding to its definition and declaration [children], but also all the components of all the ·XML Schemas· corresponding to any d schema documents. Such included schema documents must either (a) have the same targetNamespace as the ing schema document, or (b) no targetNamespace at all, in which case the d schema document is converted to the ing schema document's targetNamespace.
xsdata is using the above directive to assign the source namespace that a type was defined. Also every schema is only processed once. During import by directory the following scenario results in a conflict when the analyzer tries to locate a specific type.
Scenario:
a.xsd with target namespace foo includes schema c.xsd with no target namespace. This converts all schema c.xsd types to the parent namespace foo
in the same run another schema
b.xsd with target namespace bar includes schema c.xsd with no target namespace. Since schema c.xsd has been already processed the cli will skip it and the analyze process for the b.xsd types will only look by default in the bar namespace to locate types from c.xsd but they have already been assign to another source namespace.
Thus the analyzer finder methods will miss the real classes issue a warning Missing type or Missing extension and reset the real type to xs:string
Solutions:
Raise an exception early if this is detected
Add documentation for people to use the cli directory option with caution
Far fetched stop relying on the source namespace to locate types
The text was updated successfully, but these errors were encountered:
Based on this https://www.w3.org/TR/xmlschema-1/#element-include
xsdata is using the above directive to assign the source namespace that a type was defined. Also every schema is only processed once. During import by directory the following scenario results in a conflict when the analyzer tries to locate a specific type.
Scenario:
a.xsd with target namespace
foo
includes schema c.xsd with no target namespace. This converts all schema c.xsd types to the parent namespacefoo
in the same run another schema
b.xsd with target namespace
bar
includes schema c.xsd with no target namespace. Since schema c.xsd has been already processed the cli will skip it and the analyze process for the b.xsd types will only look by default in thebar
namespace to locate types from c.xsd but they have already been assign to another source namespace.Thus the analyzer finder methods will miss the real classes issue a warning
Missing type
orMissing extension
and reset the real type toxs:string
Solutions:
The text was updated successfully, but these errors were encountered: