An element reference provides a reference to a global element.
A declaration that references a global element enables the referenced global
element to appear in the instance document in the context of the referencing
declaration.
The following instructions were written for the Resource perspective,
but they will also work in many other perspectives.
To add an element
reference:
- In the Design view, right-click the content model you want to work
with and click Add Element Ref. If
no global element is defined in the document, a new global element is created
for you, and the element reference will point to it.
- Select the element reference. To specify values for an element
reference:
- Click the name of the element reference in the Design view. Enter
the name of the element reference.
- Click the element reference type in the Design view.
Select a type from the menu, or select Browse for more
options.
- (Optional) Select the appropriate value in the MinOccurs field.
This is the number of times the global element referenced can appear
in an instance document. If you want the element to be optional, select 0.
Otherwise, select 1.
- (Optional) Select the appropriate value in the MaxOccurs field.
This is the maximum number of times the global element referenced can
appear. You can select unbounded to indicate there
is no maximum number of occurrences.
- Click the Documentation tab if you want
to provide any information about this element reference. The Documentation page
is used for human readable material, such as a description.
- Click the Extensions tab if you want to
add application information elements to your annotations of schema components.
The Extensions page allows you to specify the
schema and add XML content to your annotations.