Sybase XML manual Element general properties, Global and local elements in XDR files

Models: XML

1 290
Download 290 pages 48.58 Kb
Page 49
Image 49

Chapter 2 Building an XML model

Element general properties

There are global and local elements:

Global elements have no parent element in a diagram. They are directly linked to the <schema> tag (root element) in a schema. They can be reused in the model through referencing elements (See “XML_declaration” in the Defining elements example)

Local elements have a parent element in a diagram. They are unique within their parent scope. They can be defined by reference to a global element (See Reference in the following table)

Global and local elements in XDR files

In a model targeted with the XML-Data Reduced language, local elements are first declared separately, like global elements (with the <ElementType> tag and a name attribute), then within their parent element (with the <element> tag and a type attribute).

Extract of an XDR file:

Parent elements are linked to their child elements through group particles (sequence, choice or all). A parent element can contain a group of child elements (See Group type in the following table)

You can derive an element data type to extend or restrict its values. (Only with a model targeted with XSD)

The General page of an element property sheet displays the following properties:

 

Property

Description

 

 

Name

The name of the item which should be clear and meaningful,

 

 

and should convey the item's purpose to non-technical users

 

Code

The technical name of the item used for generating code or

 

 

scripts, which may be abbreviated, and should not generally

 

 

include spaces

 

Comment

Descriptive label of the element

 

Stereotype

Sub-classification used to extend the semantics of an object

 

 

without changing its structure. It can be predefined or user-

 

 

defined

 

 

XSM User's Guide

37

Page 49
Image 49
Sybase XML manual Element general properties, Global and local elements in XDR files