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

Incorrect XML output for repeatable elements #18

Open
ncjj opened this issue Apr 27, 2015 · 4 comments
Open

Incorrect XML output for repeatable elements #18

ncjj opened this issue Apr 27, 2015 · 4 comments
Labels

Comments

@ncjj
Copy link

ncjj commented Apr 27, 2015

Hello,
for schema like this:

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema targetNamespace="http://org.moten.david/example"
  xmlns="http://org.moten.david/example" xmlns:xs="http://www.w3.org/2001/XMLSchema"
  xmlns:i="http://moten.david.org/xsd-forms">
  <xs:element name="sections">
    <xs:annotation i:label="Sections"/>
    <xs:complexType>
      <xs:sequence>
        <xs:element name="section" minOccurs="1" maxOccurs="unbounded">
            <xs:annotation i:label="Section"/>
            <xs:complexType>
                <xs:sequence>
                    <xs:element name="name" type="xs:string"/>
                </xs:sequence>
            </xs:complexType>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>

the xml output is:

<?xml version="1.0" encoding="utf-8"?>
<sections xmlns="http://org.moten.david/example">
  <section>
    <name>name of section 1</name>
    <name>name of section 2</name>
  </section>
</sections>

but it should be:

<?xml version="1.0" encoding="utf-8"?>
<sections xmlns="http://org.moten.david/example">
  <section>
    <name>name of section 1</name>
  </section>
  <section>
    <name>name of section 2</name>
  </section>
</sections>

I used your web service to generate the form and the output. The form works as expected.

@davidmoten davidmoten added the bug label Apr 27, 2015
@davidmoten
Copy link
Owner

Thanks for the report, I'll have a look in the next couple of days.

@davidmoten
Copy link
Owner

I've got a full plate at the moment so might not get to this for a couple of weeks. Happy to look at a PR though.

@ncjj
Copy link
Author

ncjj commented May 8, 2015

Thanks for the heads up. I'm gonna try fixing it.

@ncjj
Copy link
Author

ncjj commented May 13, 2015

So I fixed the bug. I don't know how test if I broke something else so I'm just gonna use it for a while and see if something doesn't check out and then submit a PR.

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

No branches or pull requests

2 participants