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

No child elements in XsdRestriction #30

Closed
angocor opened this issue Oct 13, 2020 · 3 comments
Closed

No child elements in XsdRestriction #30

angocor opened this issue Oct 13, 2020 · 3 comments

Comments

@angocor
Copy link

angocor commented Oct 13, 2020

Hello. First thanks for this nice library.

I have a case like the following schema:

<xs:complexType name="customer">
  <xs:sequence>
    <xs:element name="firstname" type="xs:string"/>
    <xs:element name="lastname" type="xs:string"/>
    <xs:element name="country" type="xs:string"/>
  </xs:sequence>
</xs:complexType>

<xs:complexType name="Norwegian_customer">
  <xs:complexContent>
    <xs:restriction base="customer">
      <xs:sequence>
        <xs:element name="firstname" type="xs:string"/>
        <xs:element name="lastname" type="xs:string"/>
        <xs:element name="country" type="xs:string" fixed="Norway"/>
      </xs:sequence>
    </xs:restriction>
  </xs:complexContent>
</xs:complexType>

Given the XSDRestriction object obtained as result of parsing the previous schema. Is there anyway to access the sequence contained inside such restriction?.

@lcduarte
Copy link
Member

Hi,

Thanks for using the library.

It seems I missed the fact that xsd:restriction can have xsd:group, xsd:all, xsd:sequence or xsd:choice as children.

I'll try to implement it in the next few days.

@lcduarte
Copy link
Member

Hello,

I've implemented this in a new version, (1.1.2), feel free to test it out and give me feedback!

@angocor
Copy link
Author

angocor commented Nov 3, 2020

Hello. Thanks a lot for the change. I haven't been able to test it yet. I hope to test it this week and report back.

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