Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I can't get the base ComplexType of a Restriction inside a complexContent #44

Closed
SamirAxelor opened this issue Aug 3, 2022 · 2 comments

Comments

@SamirAxelor
Copy link

Describe the bug
In the case of a restriction inside a complexContent, I'm not able to get the base complexType

Expected behavior
Hello
I'm working on a interactive xsd to xml builder, and inside my xsd there is a complexType witch define a complex content that restrict an other base complexType, but unfortunately i couldn't get this base complexType. the class XsdRestriction has a method getSimpleType, but doesn't have a methode getComplexType. Unlike the XsdExtension class that posses getBaseAsComplexType method.
Thanks.
Library Version
1.2.0

Additional context
xsd:complexContent
<xsd:restriction base="dm:RelationalColumn">
<xsd:attribute name="orphanRemoval" type="xsd:boolean" use="prohibited"/>
<xsd:attribute name="unique" type="xsd:boolean" use="prohibited"/>
<xsd:attribute name="index" type="xsd:boolean" use="prohibited"/>
<xsd:attribute name="massUpdate" type="xsd:boolean" use="prohibited"/>
</xsd:restriction>
</xsd:complexContent>

@lcduarte
Copy link
Member

lcduarte commented Aug 6, 2022

Hello,

Thanks for using the library!

It was indeed an issue, both XsdExtension and XsdRestriction should be coherent according to the documentation. I did the fix and deployed a new version, 1.2.4.

Now you have getBaseAsComplexType and getBaseAsSimpleType in the XsdRestriction type.

If you identify anything else, let me know.

@lcduarte lcduarte closed this as completed Aug 6, 2022
@SamirAxelor
Copy link
Author

Hello,

Thanks for taking my request into account, that was so helpful !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants