xml spy
Previous  Top  Next
Schema design content model

The content model view, enables you to directly manipulate the symbols depicting your schema. You can insert or append elements, as well as change their parameters directly.

Element Symbols

el_single   
Mandatory single element. Details: MinOcc=1, MaxOcc=1

el_pcdata   
Mandatory single element, containing Parsed Character Data (#PC-Data).
The content may be simple content or mixed complex content.
Details: MinOcc=1, MaxOcc=1, type=xsd:string, content=simple.

el_optional   
Single optional element. Details: MinOcc=0, MaxOcc=1
The context menu option Optional, converts a mandatory element into an optional one.

el_multiple   
Mandatory multiple element. Details MinOcc=1, MaxOcc=5.

el_unbound   
Mandatory multiple element containing child elements.
Details: MinOcc=1, MaxOcc=unbounded, type=DivisionType, content=complex.
The context menu option Unbounded, changes the max. occurrence of an element to unbounded.

Clicking on the + character of the element expands the tree view and shows the child elements.
el_open_child

usr_sch_group
Group element. Details: name=Subsidiaries.
A named collection of elements to allow reuse in the construction of different complex types.

el_any
"Any" can be a placeholder for any element from a certain namespace.

Please note:
To display the definition of any element, hold down the CTRL key, and double click on the element you want to see the definition of.

To add / insert / append, elements or child elements:
1.Click right on the element (or "model type" symbol), to open the context menu.  
2.Select the operation you want to carry out from the menu.  

Please note:  
Only those operations that are possible with the element, appear in the context menu. Invalid operations are grayed out in the context menu and cannot be selected.  

ref_p103c

Simple types:
A "simple type" element, is defined as a datatype that only contains values and no element or attributes. The element type is usually prefixed by the namespace prefix xsd: string, indicating that it is a predefined XML Schema datatype.
el_pcdata
Details: name=Name, type=xsd:string, content=simple.

Complex types:
"Complex type" is a datatype which may contain attributes, elements and text.
Adding sub elements to an element, automatically defines the element with the content model as complex (Details entry helper content=complex.). Click on the "Com" tab of the component navigator, to see the complex types.

XML Spy displays references to "external" complex types with a yellow background. In the example below, the Person element references the PersonType complex element.

To view the referenced complex type element:

1.Double click the complex type name in the yellow box (here, PersonType), or  
2.Click on the "Com" tab of the Component Navigator, and double click on the PersonType entry.  

   ref_p104a

The PersonType element definition, appears in the main window.  

ref_p104b  

Previous  Top  Next

⌐ 2002 Altova