Information Technology Reference
In-Depth Information
Choice
The <choice> indicator specifies that either one child element or another can occur:
[VHOHPHQWQDPH ³SHUVRQ´!
[VFRPSOH[7\SH!
[VFKRLFH!
[VHOHPHQWQDPH ³HPSOR\HH´W\SH ³HPSOR\HH´!
[VHOHPHQWQDPH ³PHPEHU´W\SH ³PHPEHU´!
[VFKRLFH!
[VFRPSOH[7\SH!
[VHOHPHQW!
We can also apply an XSD Graph (Fong 2005 ), as shown in Fig. 2.12 , as an XML
conceptual schema to model and analyze the structure of an XML database. The
benefit of using the XSD Graph is being able to visualize, specify, and document
structural constraints in a visible diagram, and also to construct executable systems.
The model can be used to represent the interrelationship of elements inside a logical
schema, such as XSD, DTD, Schematron, XDR, SOX, DSD, and so on, together
with various data semantics specifications.
In general, an XSD Graph can be used to represent the structural constraints of
an XML schema and an XML document with the following specifications:
Rule 1 Root element—An XML schema must be in a hierarchical tree structure
starting with a root element. Other relevant elements must be under the root element.
Rule 2 Parent-child positions—Elements are in a relative parent-child position.
A parent element is above a child element and a grandchild element. The child ele-
ment is a parent element to the grandchild element relatively.
Rule 3 A curved line represents a reference while a straight line represents hierar-
chical links between two elements.
Rule 4 minOccurs and maxOccurs are the minimum and the maximum data vol-
ume (cardinality) of a child element under a parent element. There are one-to-one,
one-to-many, and many-to-many cardinality.
Rule 5 An extension element and a base element are in an isa relationship such
that they are in one-to-one cardinality and the extension subclass element is a part
of the base superclass element.
Rule 6 A group element consists of multiple mandatory component elements
under it.
Rule 7 A circle with a letter “d” means disjoint generalization with mutually
exclusive subclass elements' instances under a superclass element. A circle with a
letter “o” means overlap generalization with mutually inclusive subclass elements'
instances.
Search WWH ::




Custom Search