| <?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| <html lang="en-us" xml:lang="en-us"> |
| <head> |
| <meta content="text/html; charset=utf-8" http-equiv="Content-Type" /> |
| <meta name="copyright" content="Copyright (c) 2000, 2008 IBM Corporation and others. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html. Contributors: IBM Corporation - initial API and implementation" /> |
| <meta name="DC.rights.owner" content="(C) Copyright 2000, 2008" /> |
| <meta content="public" name="security" /> |
| <meta content="index,follow" name="Robots" /> |
| <meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' /> |
| <meta content="task" name="DC.Type" /> |
| <meta name="DC.Title" content="Adding element references" /> |
| <meta name="abstract" content="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." /> |
| <meta name="description" content="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." /> |
| <meta content="XML schema editor, element references, XML schema files" name="DC.subject" /> |
| <meta content="XML schema editor, element references, XML schema files" name="keywords" /> |
| <meta scheme="URI" name="DC.Relation" content="../topics/taddglem.html" /> |
| <meta scheme="URI" name="DC.Relation" content="../topics/taddelm.html" /> |
| <meta scheme="URI" name="DC.Relation" content="../topics/taddanye.html" /> |
| <meta scheme="URI" name="DC.Relation" content="../topics/taddglba.html" /> |
| <meta content="XHTML" name="DC.Format" /> |
| <meta content="taddelmr" name="DC.Identifier" /> |
| <meta content="en-us" name="DC.Language" /> |
| <link href="../../org.eclipse.wst.doc.user/common.css" type="text/css" rel="stylesheet" /> |
| <title>Adding element references</title> |
| </head> |
| <body id="taddelmr"><a name="taddelmr"><!-- --></a> |
| |
| |
| <h1 class="topictitle1">Adding element references</h1> |
| |
| |
| |
| |
| <div><p>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.</p> |
| |
| <div class="section"><p>The following instructions were written for the Resource perspective, |
| but they will also work in many other perspectives.</p> |
| <p>To add an element |
| reference, complete the following steps:</p> |
| </div> |
| |
| <ol> |
| <li class="stepexpand"><span>In the Design view, right-click the content model (sequence, choice, |
| or all element) you want to work with and click <span class="uicontrol">Add Element Ref</span>.</span> |
| 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. |
| </li> |
| |
| <li class="stepexpand"><span>Select the element reference. To specify values for an element |
| reference:</span> |
| <ul> |
| <li>Click the name of the element reference in the Design view. Enter |
| the name of the element reference.</li> |
| |
| <li>Click the element reference type in the Design view. Select a type |
| from the menu, or select <span class="uicontrol">Browse</span> for more options.</li> |
| |
| </ul> |
| |
| </li> |
| |
| <li class="stepexpand"><span>(Optional) Select the appropriate value in the <span class="uicontrol">Minimum |
| Occurrence</span> field.</span> 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 <span class="uicontrol">0</span>. Otherwise, select <span class="uicontrol">1</span>. |
| </li> |
| |
| <li class="stepexpand"><span>(Optional) Select the appropriate value in the <span class="uicontrol">Maximum |
| Occurrence</span> field.</span> This is the maximum |
| number of times the global element referenced can appear. You can select <span class="uicontrol">unbounded</span> to |
| indicate there is no maximum number of occurrences.</li> |
| |
| <li class="stepexpand"><span>Click the <span class="uicontrol">Documentation</span> tab if you want |
| to provide any information about this element reference.</span> The <span class="uicontrol">Documentation</span> page |
| is used for human readable material, such as a description.</li> |
| |
| <li class="stepexpand"><span>Click the <span class="uicontrol">Extensions</span> tab if you want to |
| add application information elements to your annotations of schema components.</span> |
| The <span class="uicontrol">Extensions</span> page allows you to specify the |
| schema and add XML content to your annotations.</li> |
| |
| </ol> |
| |
| </div> |
| |
| <div><div class="reltasks"><strong>Related tasks</strong><br /> |
| <div><a href="../topics/taddglem.html" title="A global element is an element with a global scope. It is one that has been declared as part of the main schema rather than as part of a content model.">Adding global elements</a></div> |
| <div><a href="../topics/taddelm.html" title="Elements are fundamental building blocks in XML. Element declarations provide value constraints, provide a description that can be used for validation, establish constraining relationships between related elements and attributes, and control the substitution of elements.">Adding elements</a></div> |
| <div><a href="../topics/taddanye.html" title="You can use the any element in a similar way as a DTD's ANY content model, however, it must be done in conjunction with namespaces. This enables you to include any well-formed XML content, such as an HTML Web page that conforms to XHTML 1.0 syntax.">Adding an any element</a></div> |
| <div><a href="../topics/taddglba.html" title="A global attribute is an attribute that can be recognized anywhere in a document. Once declared, a global attribute can be referenced in one or more declarations using an attribute reference.">Adding global attributes</a></div> |
| </div> |
| </div> |
| |
| </body> |
| </html> |