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

maxOccurs on sequence level doesnt make element repeatable #45

Open
journeym opened this issue Jul 2, 2021 · 4 comments
Open

maxOccurs on sequence level doesnt make element repeatable #45

journeym opened this issue Jul 2, 2021 · 4 comments

Comments

@journeym
Copy link

journeym commented Jul 2, 2021

maxOccurs on sequence level doesn't make element repeatable, though on element level it does
I'm not really an expert on XML structure, just noticed that with one of supplied schemes.
Is this intentional, on is that an issue? :)

@journeym
Copy link
Author

journeym commented Jul 2, 2021

Just to clarify, element is a child of a mentioned sequence

@MichielCM
Copy link
Owner

If I'm not mistaken, maxOccurs is not allowed on sequence elements according to the XML standard.

@journeym
Copy link
Author

journeym commented Jul 6, 2021

I wasn't able to create a simple example, it seems in simple xsd (that doesn't contain references) everything working as intended, and maxOccurs on sequence level is creating repeatable structure.
I only have the document I've been working on creating a form for, and it's a bit to complex to analyze.

This is the mentioned xsd file http://ivis.eps.gov.lv/XMLSchemas/100008/eLieta/v1-0/CrimBankExchange.xsd

To create a working form using this application i had to:

  1. Download all the references
  2. Remove annotation block from main xsd CrimBankExchange.xsd
  3. Rewrite ResponseFileStructure and AccountSummaryFileStructure in main XSD with the original from referenced scheme
    4. Copy all occurriences of xs:sequence maxOccurs value to below element xs:element

After that, the form seemed to become compliant with xsd

@qlobafftar
Copy link

If I'm not mistaken, maxOccurs is not allowed on sequence elements according to the XML standard.

minOccurs and maxOccurs are allowed in elements "all", "sequence" and "choise" according to https://www.w3.org/TR/2004/REC-xmlschema-1-20041028/structures.html#element-all

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

3 participants