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
I'm encountering an obscure real-world scenario involving an XML schema that includes a schema element nested inside an appdata element. When this schema is parsed, the nested schema element seems to override the namespace information. While the generated dataclass includes the correct __NAMESPACE__ and Meta declarations from the primary schema, the metadata attributes for fields contain an empty string for the namespace.
A simple workaround is to remove the schema element from appdata element to generate valid classes. However, I wonder if this is expected behavior in xsdata, where it parses and processes elements within appinfo as if they were valid top-level schema elements. Should xsdata be handling this differently by ignoring the entire appdata block, and could this be considered a bug that needs to be fixed?
I'm encountering an obscure real-world scenario involving an XML schema that includes a
schema
element nested inside anappdata
element. When this schema is parsed, the nested schema element seems to override the namespace information. While the generated dataclass includes the correct__NAMESPACE__
andMeta
declarations from the primary schema, the metadata attributes for fields contain an empty string for the namespace.Example Schema:
Generated Data Classes:
Issue:
A simple workaround is to remove the
schema
element fromappdata
element to generate valid classes. However, I wonder if this is expected behavior in xsdata, where it parses and processes elements withinappinfo
as if they were valid top-level schema elements. Should xsdata be handling this differently by ignoring the entireappdata
block, and could this be considered a bug that needs to be fixed?For reference, this is the actual full schema: https://cwe.mitre.org/data/xsd/cwe_schema_latest.xsd
The text was updated successfully, but these errors were encountered: