Liquid XML Studio 2019
XsdEditorNotation OpenContent
XSD Editor > Graphical Notation Overview > XsdEditorNotation OpenContent
 Graphical Representation

The xs:openContent provides an mechanism for making XSD's extensible.

The xs:openContent node tells the validator the containing element (in the instance document) can contain additional XML elements that are not defined within this schema. Prior to XSD 1.1 the only way to do with was via the xs:any node, however xs:openContent allows a greater level of control and freedom.


The xs:openContent node can be added to an xs:element or xs:complexType by right clicking on it and selecting the Open Content menu item, or selecting the () item from the toolbar.

The xs:schema element can also have a xs:defaultOpenContent node which works the same as the xs:openContent node, but is applied to all elements defined within the schema.

If an xs:defaultOpenContent node is defined for a schema then it can be turned off for a given element by declaring an xs:openContent node and setting the mode=none

Id user defined ID to uniquely identify the entity within the schema

Valid values

  • none - no additional elements may be contained within the instance element
  • suffix - additional elements must appear after all the ones defined explicitly in the schema
  • interleave - additional elements can appear between elements defined within the schema.

 The xs:openContent node can have a child xs:any which defines the rules that additional elements must comply with.


The following XSD code 

XSD Sample Code
Copy Code
    <element name="Book">
            <openContent mode="interleave">
                <any namespace=""
                     processContents="strict" />
                <element name="Title"
                         type="string" />
                <element name="Author"
                         type="string" />
                <element name="Date"
                         type="gYear" />
                <element name="ISBN"
                         type="string" />
                <element name="Publisher"
                         type="string" />

Will be represented like this 

Resulting XML Document
Copy Code
        <Book xmlns:bk="">
                <Title>My Life and Times</Title>
                <bk:Size>5 x 7</bk:Size>
                <Author>Paul McCartney</Author>
                <Publisher>McMillin Publishing</Publisher>
 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.





See Also