| <?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> |
| <head> |
| <!-- /******************************************************************************* |
| * Copyright (c) 2000, 2005 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 |
| *******************************************************************************/ --> |
| <link rel="stylesheet" type="text/css" href="../../org.eclipse.wst.doc.user/common.css" /> |
| <title>Adding a global attribute</title> |
| </head> |
| <body id="taddglba"><a name="taddglba"><!-- --></a> |
| |
| <h1 class="topictitle1">Adding a global attribute</h1> |
| <div><p>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. </p><div class="skipspace"><p>The following instructions were written for the Resource perspective, |
| but they will also work in many other perspectives. </p> |
| <p>To add a global |
| attribute, follow these steps:</p> |
| </div> |
| <ol><li class="skipspace"><span>Open your XML schema in the XML schema editor.</span></li> |
| <li class="skipspace"><span>In the Outline view, select your schema.</span> The entire |
| schema and its contents should be displayed in the Graph view.</li> |
| <li class="skipspace"><span>In the Graph view, right click in the <b>Attributes</b> section |
| and click <span class="uicontrol">Add Global Attribute</span>.</span></li> |
| <li class="skipspace"><span>In the Properties view, type the attribute <span class="uicontrol">Name</span>.</span> </li> |
| <li class="skipspace"><span>Click the <b>More</b> button next to the <span class="uicontrol">Type</span> field |
| to launch the Available Types dialog.</span></li> |
| <li class="skipspace"><span>Click the <span class="uicontrol">Built-in simple type</span> or <span class="uicontrol">User-defined |
| simple type</span> radio button, select the type you want in the type |
| list, then click <span class="uicontrol">OK</span>. </span> If you want to create |
| a local simple type, select the <span class="uicontrol">User-defined simple type</span> radio |
| button, and select <span class="uicontrol">**anonymous**</span>.</li> |
| <li class="skipspace"><span>Click the <span class="uicontrol">Documentation</span> tab if you want |
| to provide any information about this global attribute.</span> The <span class="uicontrol">Documentation</span> page is used for human readable |
| material, such as a description, and the <span class="uicontrol">App Info</span> page |
| can be used to provide information for applications. </li> |
| </ol> |
| </div> |
| </body> |
| </html> |