Liquid Studio 2021
XSD Editor / Graphical Notation Overview / Key
In This Topic
    Key
    In This Topic

    Graphical Representation

    Key Notation

    Summary

    The <key> element defines a key that unambiguously identifies an element within the XML Document.

    Creating

    A <key> can only be added to an element object. This can be done using the right click context menu on any of these entities.

    Properties

    Key Properties

    Name - the name of the key.
    XPath Fields - 1 or more XPath expressions that uniquely identify selected element.
    XPath Selector - The XPath expression that identifies the element to which this key applies.
    Id - A user defined ID to uniquely identify the entity within the schema

    Sample

    The following XSD code


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


    <
    xs:schema elementFormDefault="qualified" xmlns:xs=http://www.w3.org/2001/XMLSchema>


    <
    xs:element name="Library">


    <
    xs:complexType>


    <
    xs:sequence>


    <
    xs:element name="Book">


    <
    xs:complexType>


    <
    xs:sequence>


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


    </
    xs:sequence>


    <
    xs:attribute name="ISBN" type="xs:string" />


    </
    xs:complexType>


    </
    xs:element>


    </
    xs:sequence>


    </
    xs:complexType>


    <
    xs:key name="BookReference">


    <
    xs:selector xpath="Book" />


    <
    xs:field xpath="@ISBN" />


    </
    xs:key>


    </
    xs:element>


    </
    xs:schema>

     

    Will be represented like this

    Key Sample

     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.