Skip to content

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

@dolgorukee

Description

@dolgorukee

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions