Skip to content

Handling of xsd:squence with maxOccurs="unbounded" #149

@Hanmac

Description

@Hanmac

Having this part of xsd:

<xsd:element name="EMAILS">
	<xsd:complexType>
		<xsd:sequence maxOccurs="unbounded">
			<xsd:element ref="EMAIL"/>
			<xsd:element ref="PUBLIC_KEY" minOccurs="0" maxOccurs="unbounded"/>
		</xsd:sequence>
	</xsd:complexType>
</xsd:element>	

my problem currently is about <xsd:sequence maxOccurs="unbounded">

because of this, wouldn't that make this valid?

<EMAILS>
  <EMAIL>A</EMAIL>
  <PUBLIC_KEY>K1A</PUBLIC_KEY>
  <EMAIL>B</EMAIL>
  <PUBLIC_KEY>K1B</PUBLIC_KEY>
</EMAILS>

and wouldn't that cause problems when serializing, and de-serializing?
because currently, it would be serialized as this which isn't valid:

<EMAILS>
  <EMAIL>A</EMAIL>
  <EMAIL>B</EMAIL>
  <PUBLIC_KEY>K1A</PUBLIC_KEY>
  <PUBLIC_KEY>K1B</PUBLIC_KEY>
</EMAILS>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions