Property
|
Description
|
Type
|
For elements, the type is always
Element . For references to elements, the type is always
Ref. to Element .
|
Name
|
The tag name you use in an instance document. Specify the name you want the element to have.
|
Min Occur.
|
Specifies the minimum number of instances of this element that can be present. If an element is not required to be present, specify
0 . You cannot specify this property for a global element. If you do, Stylus Studio ignores it.
|
Max Occur.
|
Specifies the maximum number of instances of this element that can be present. If there is no limit to the number of instances, specify
unbounded . You cannot specify this property for a global element. If you do, Stylus Studio ignores it.
|
Data Type
|
The type of the data that the element contains. Select from all simpleTypes defined in an XML Schema, and all types (simple or complex) that you define in the same schema. Nodes that are references to elements do not have this property.
|
Default
|
Specifies the default value for this element. Specification of this property makes sense only for optional elements. If you specified
0 for the
Min Occur. property, you can specify a default value.
When this element is in an instance document, the element has whatever value you specify. If you do not specify this element, the schema processor behaves as though you had specified it with the default value. When you specify a default value for an element, that element must be optional in an instance document. An element can have a value for the
Default property or a value for the
Fixed Value property. The two properties are mutually exclusive.
|
Fixed Value
|
When you specify a value for
Fixed Value , it is optional for the element to appear in an instance document. However, if the element does appear, it must have the value specified by
Fixed Value . Whether or not you specify this element in an instance document, the schema processor behaves as though you had specified this element with the fixed value. An element can have a value for the
Fixed Value property or a value for the
Default property. The two properties are mutually exclusive.
|
Abstract
|
A Boolean value that indicates whether substitution for this element is required. When
Abstract is
true , the element cannot be used in an instance document. Instead, a member of the element's substitution group must appear in the instance document.
|
Nillable
|
A Boolean value that indicates whether the contents of the element can be set to nil. A value of
true indicates that the element can be empty; that is, it is permissible for the element to not contain any subelements, attributes, or data.
|
Form
|
An element's form is either
qualified or
unqualified . A form of
qualified means that each time the element is referenced in the schema document, you must specify the prefix of its namespace. Every element has a
form attribute. If it is not explicitly defined, the schema processor checks the default attribute form specified for the
Schema node.
|
Blocked Substitutions
|
Defines that this element cannot be derived in some forms. That is, it specifies that one or more extensions, restrictions or substitutions cannot be permitted. For example, an enumeration for all the states in the United States can block extensions and substitutions, thus allowing derived data types only so as to restrict the number of valid states.
|
Final Substitutions
|
Specifies that this element is not allowed to be substituted in a substitution group if these are extensions or restrictions of the same base type. For example, suppose an
Invoice contains a reference to a
PO document. The
PO document is derived from
AccountingDocument . If
PO document has the
final="extensions" attribute, and
PartialPO is defined as an extension from
AccountingDocument , the
Invoice cannot substitute
PO with
PartialPO .
|
Substitution Groups
|
If an element defines an element name definition in a substitution group, it means that it can be used in all the places where there is a reference to that element. For example, suppose the
PO document definition indicates that it can refer to an
RFQ element. You can specify that a
foo element is in the substitution group for an RFQ element. If you do, a
PO document is valid if it refers to a foo element.
|
Table 43. Element and Element Reference Properties