Chapter 2 XML Model Basics


Objects in an XML model

An XML model represents the structure of a potential or existing XML document through an XSD, a DTD or an XDR file.

An XML model is a tree structure of child elements attached to parent elements. Elements are the basic describing items of an XML model. They can be made of other elements combined in different ways through group particles. Elements are specified by attributes and data types which can be predefined or user-defined. Simple and complex data types can be defined as global (directly linked to the <schema> tag) or local (embedded in an element declaration).

The following table displays the specific objects of an XML model:

Tool Object Description

Element The basic object of an XML model. An element can contain other elements or attributes

Group A group of elements arranged by a group particle. A group is defined once and reused elsewhere in the model through references

Any Any type of object. Any can only be attached to a sequence or a choice group particle
Attribute Additional information about an element or a complex type. An attribute is defined by a built-in data type or a simple data type
Attribute Group A group of attributes. An attribute group is defined once and reused elsewhere in the model through references
Simple Type A simple data type. A simple type is used in the case of elements or attributes with text-only content. Only available in a model targeted with XSD

Complex Type A complex data type. A complex type is used to introduce elements or attributes within an element declaration. Only available in a model targeted with XSD

Sequence A group particle to arrange a set of elements. A sequence group particle indicates that elements must appear at least once in the order of their declaration

Choice A group particle to arrange a set of elements. A choice group particle indicates that one element must be chosen among all elements

All A group particle to arrange a set of elements. An all group particle indicates that each element can appear once or not, in any order
Notation A notation is used to define and process non-XML objects within an XML model

These tools are available in the palette of the diagram window.

The main objects of an XML model are represented by symbols in its diagram.

Note   Objects in a diagram
Some objects may not appear in a diagram because they do not have a symbol or this symbol has been deleted or hidden.
Always check the existence of objects in the Browser tree view.

Example of an XML diagram:


You can use several diagrams to have partial views of a complex diagram.

 


Copyright (C) 2006. Sybase Inc. All rights reserved.