xmlet / XsdParser

A Parser that parses a XSD file into a Java Structure.
MIT License
80 stars 34 forks source link

Attributes are ignored #66

Closed skfcz closed 6 months ago

skfcz commented 6 months ago

Describe the bug

In the following schema, I do not get the refType attribute on SeamRef_T

''

Type definition Custom property name Type description Type definition '' **Expected behavior** I expect to get the attribute in e.g. the following code xsdComplexType.getAllXsdAttributes().forEach(xsdAttribute -> LOG.info("getAllXsdAttributes found {}", xsdAttribute.getName())); **Additional context** Full xsd on https://3docx.org/fileadmin/ocx_schema/V300rc7/OCX_Schema.xsd
lcduarte commented 6 months ago

Hello,

The method getAllXsdAttributes only returns two kinds of attributes:

Since the refType attribute is a child of the XsdExtension it isn't returned when invoking the method on the XsdComplexType object.

Sample code to obtain the attribute using your full xsd:

imagem