blob: 0a41c6ab0ba0fbd5218a4c7d5b6f3c4e33a15472 [file] [log] [blame]
kprice159fa582006-05-08 21:30:45 +00001<?xml version="1.0" encoding="utf-8"?>
2<!--Arbortext, Inc., 1988-2005, 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>
8<titlealts>
9<searchtitle>Adding element references</searchtitle>
10</titlealts>
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
14declaration.</shortdesc>
15<prolog><metadata>
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>
19</metadata></prolog>
20<taskbody>
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
kprice647b7352006-05-17 21:27:16 +000023reference:</p></context>
kprice159fa582006-05-08 21:30:45 +000024<steps>
kprice647b7352006-05-17 21:27:16 +000025<step><cmd>In the Design view, right-click the content model you want to work
kprice159fa582006-05-08 21:30:45 +000026with and click <uicontrol>Add Element Ref</uicontrol>.</cmd><stepresult>If
27no global element is defined in the document, a new global element is created
28for you, and the element reference will point to it.</stepresult></step>
kprice647b7352006-05-17 21:27:16 +000029<step><cmd>Select the element reference. To specify values for an element
30reference:</cmd>
kprice159fa582006-05-08 21:30:45 +000031<choices>
kprice647b7352006-05-17 21:27:16 +000032<choice>Click the name of the element reference in the Design view. Enter
33the name of the element reference.</choice>
kprice9623e9d2007-05-03 03:43:05 +000034<choice>Click the element reference type in the Design view.
kprice647b7352006-05-17 21:27:16 +000035Select a type from the menu, or select <uicontrol>Browse</uicontrol> for more
36options.</choice>
kprice159fa582006-05-08 21:30:45 +000037</choices>
38</step>
39<step><cmd>(Optional) Select the appropriate value in the <uicontrol>MinOccurs</uicontrol> field.</cmd>
40<info>This is the number of times the global element referenced can appear
41in an instance document. If you want the element to be optional, select <uicontrol>0</uicontrol>.
42Otherwise, select <uicontrol>1</uicontrol>. </info></step>
43<step><cmd>(Optional) Select the appropriate value in the <uicontrol>MaxOccurs</uicontrol> field.</cmd>
44<info>This is the maximum number of times the global element referenced can
45appear. You can select <uicontrol>unbounded</uicontrol> to indicate there
46is no maximum number of occurrences.</info></step>
47<step><cmd>Click the <uicontrol>Documentation</uicontrol> tab if you want
48to provide any information about this element reference.</cmd><info>The <uicontrol>Documentation</uicontrol> page
kprice647b7352006-05-17 21:27:16 +000049is used for human readable material, such as a description.</info></step>
50<step><cmd>Click the <uicontrol>Extensions</uicontrol> tab if you want to
51add application information elements to your annotations of schema components.</cmd>
52<info>The <uicontrol>Extensions</uicontrol> page allows you to specify the
53schema and add XML content to your annotations.</info></step>
kprice159fa582006-05-08 21:30:45 +000054</steps>
55</taskbody>
56</task>
kprice647b7352006-05-17 21:27:16 +000057<?Pub *0000003232?>