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

Simplifying element (rather than type) results in 'Unable to honor this as-element-property customization. It is attached to a wrong place, or its inconsistent with other bindings.'. #164

Open
dolgorukee opened this issue Jan 24, 2023 · 1 comment

Comments

@dolgorukee
Copy link

`
<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>
`

`
<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>

</xsd:schema>
`

How to simplify the choice in example-element. Adding binding or directly in the schema results in the error from the title.

@laurentschoelens
Copy link
Collaborator

Need to check but seems to be duplicate of
#133

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