blob: 21c66d3ede6711b1cabfa4d845c47f4df8329bee [file] [log] [blame]
kprice159fa582006-05-08 21:30:45 +00001<?xml version="1.0" encoding="utf-8"?>
kpricede20a692008-04-24 00:27:47 +00002<!--Arbortext, Inc., 1988-2006, v.4002-->
kprice647b7352006-05-17 21:27:16 +00003<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN"
4 "task.dtd">
5<?Pub Inc?>
kprice159fa582006-05-08 21:30:45 +00006<task id="taddelmr" xml:lang="en-us">
7<title>Adding element references</title>
9<searchtitle>Adding element references</searchtitle>
11<shortdesc>An element reference provides a reference to a global element.
12A declaration that references a global element enables the referenced global
13element to appear in the instance document in the context of the referencing
kprice9623e9d2007-05-03 03:43:05 +000016<keywords><indexterm>XML schema editor<indexterm>element references</indexterm></indexterm>
17<indexterm>XML schema files<indexterm>element references</indexterm></indexterm>
kprice159fa582006-05-08 21:30:45 +000018</keywords>
21<context><p>The following instructions were written for the Resource perspective,
22but they will also work in many other perspectives.</p><p>To add an element
kpricede20a692008-04-24 00:27:47 +000023reference, complete the following steps:</p></context>
kprice159fa582006-05-08 21:30:45 +000024<steps>
kpricede20a692008-04-24 00:27:47 +000025<step><cmd>In the Design view, right-click the content model (sequence, choice,
26or all element) you want to work with and click <uicontrol>Add Element Ref</uicontrol>.</cmd>
27<stepresult>If no global element is defined in the document, a new global
28element is created for you, and the element reference will point to it.</stepresult>
kprice647b7352006-05-17 21:27:16 +000030<step><cmd>Select the element reference. To specify values for an element
kprice159fa582006-05-08 21:30:45 +000032<choices>
kprice647b7352006-05-17 21:27:16 +000033<choice>Click the name of the element reference in the Design view. Enter
34the name of the element reference.</choice>
kpricede20a692008-04-24 00:27:47 +000035<choice>Click the element reference type in the Design view. Select a type
36from the menu, or select <uicontrol>Browse</uicontrol> for more options.</choice>
kprice159fa582006-05-08 21:30:45 +000037</choices>
kpricede20a692008-04-24 00:27:47 +000039<step><cmd>(Optional) Select the appropriate value in the <uicontrol>Minimum
40Occurrence</uicontrol> field.</cmd><info>This is the number of times the global
41element referenced can appear in an instance document. If you want the element
42to be optional, select <uicontrol>0</uicontrol>. Otherwise, select <uicontrol>1</uicontrol>. </info>
44<step><cmd>(Optional) Select the appropriate value in the <uicontrol>Maximum
45Occurrence<?Pub Caret?></uicontrol> field.</cmd><info>This is the maximum
46number of times the global element referenced can appear. You can select <uicontrol>unbounded</uicontrol> to
47indicate there is no maximum number of occurrences.</info></step>
kprice159fa582006-05-08 21:30:45 +000048<step><cmd>Click the <uicontrol>Documentation</uicontrol> tab if you want
49to provide any information about this element reference.</cmd><info>The <uicontrol>Documentation</uicontrol> page
kprice647b7352006-05-17 21:27:16 +000050is used for human readable material, such as a description.</info></step>
51<step><cmd>Click the <uicontrol>Extensions</uicontrol> tab if you want to
52add application information elements to your annotations of schema components.</cmd>
53<info>The <uicontrol>Extensions</uicontrol> page allows you to specify the
54schema and add XML content to your annotations.</info></step>
kprice159fa582006-05-08 21:30:45 +000055</steps>
kpricede20a692008-04-24 00:27:47 +000058<?Pub *0000003039?>