Liquid Studio Documentation
XSD Editor / Graphical Notation Overview / Choice
In This Topic
    Choice
    In This Topic

    Graphical Representation

    Summary

    The <choice> element is a container for other elements, groups and any's.
    Only one of the contained entities can appear within the XML document.

    Creating

    An <choice> can be added to an element, group or schema object. This can be done using the right click context menu on any of these entities.

    Properties

    Min Occurs - the minimum number of times the elements described in the <choice> must appear in the XML Document (default 1).
    Max Occurs - The maximum number of times the elements described in the <choice> can appear in the XML Document (default 1).
    Id - A user defined ID to uniquely identify the entity within the schema

    Sample

    The following XSD code

    <xs:element name="ChoiceElm">

    <xs:complexType>

    <xs:choice>

    <xs:element name="FlightNumber" type="xs:string" />

    <xs:element name="BusNumber" type="xs:string" />

    </xs:choice>

    </xs:complexType>

    </xs:element>

    Will be represented like this

    Sample XML would look like this

    <?xml version="1.0" encoding="utf-16"?>

    <ChoiceElm>

    <FlightNumber>3453453453</FlightNumber>

    </ChoiceElm>

     Inline Properties

    Properties that apply to a type are shown inline at the bottom of the items container.

    Values that are inherited from the base types are shown in brackets, values specifically set against the item are shown without brackets.

    If a facet is not valid for a given type (typically because of its data type), then its value is shown in red.

    Inline properties can be disabled in the Options.