Open dolgorukee opened 1 year ago
`<?xml version="1.0" encoding="UTF-8"?> <xsd:schema xmlns="http://www.example.com/schema-a" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:schema-b="http://www.example.com/schema-b" targetNamespace="http://www.example.com/schema-a" elementFormDefault="qualified">
<xsd:import schemaLocation="schema-b.xsd" namespace="http://www.example.com/schema-b"/> <xsd:complexType name="exampleType"> <xsd:sequence> <xsd:element name="property-a" type="xsd:positiveInteger" minOccurs="0"/> <xsd:element ref="schema-b:example-element" minOccurs="0"/> </xsd:sequence> </xsd:complexType>
</xsd:schema> `
`<?xml version="1.0" encoding="UTF-8"?> <xsd:schema xmlns="http://www.example.com/schema-b" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.example.com/schema-b" elementFormDefault="qualified">
<xsd:element name="example-element" > <xsd:complexType> <xsd:sequence> <xsd:choice> <xsd:sequence> <xsd:element name="element-a" type="xsd:string"/> <xsd:element name="element-b" type="xsd:string" minOccurs="0"/> </xsd:sequence> <xsd:element name="element-b" type="xsd:string"/> </xsd:choice> <xsd:element name="blah" type="xsd:string"/> </xsd:sequence> </xsd:complexType> </xsd:element>
How to simplify the choice in example-element. Adding binding or directly in the schema results in the error from the title.
Need to check but seems to be duplicate of https://github.com/highsource/jaxb2-basics/issues/133
`<?xml version="1.0" encoding="UTF-8"?> <xsd:schema xmlns="http://www.example.com/schema-a" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:schema-b="http://www.example.com/schema-b" targetNamespace="http://www.example.com/schema-a" elementFormDefault="qualified">
</xsd:schema> `
`<?xml version="1.0" encoding="UTF-8"?> <xsd:schema xmlns="http://www.example.com/schema-b" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.example.com/schema-b" elementFormDefault="qualified">
</xsd:schema> `
How to simplify the choice in example-element. Adding binding or directly in the schema results in the error from the title.