blob: 91bb71c743a7b13c36976437f7206b4d6fca048f [file] [log] [blame]
<?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 global attributes" />
<meta name="abstract" content="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." />
<meta name="description" content="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." />
<meta content="XML schema editor, global attributes, XML schema files" name="DC.subject" />
<meta content="XML schema editor, global attributes, XML schema files" name="keywords" />
<meta content="XHTML" name="DC.Format" />
<meta content="taddglba" 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 global attributes</title>
</head>
<body id="taddglba"><a name="taddglba"><!-- --></a>
<h1 class="topictitle1">Adding global attributes</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="section"><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, complete the following steps:</p>
</div>
<ol>
<li class="stepexpand"><span>Open your XML schema in the XML schema editor.</span></li>
<li class="stepexpand"><span>In the Design view, right-click in the <strong>Attributes</strong> section
and click <span class="uicontrol">Add Attribute</span>.</span></li>
<li class="stepexpand"><span>In the Properties view, enter a name for the attribute in the <span class="uicontrol">Name</span> field.</span>
</li>
<li class="stepexpand"><span>In the Properties view, you can select the attribute <span class="uicontrol">Type</span> from
the predefined list in the menu next to the <span class="uicontrol">Type</span> field.</span>
<p>Alternatively, you can select <span class="uicontrol">Browse</span> from
the list for more options. </p>
<div class="p">The Set Type dialog will appear, and lists
all built-in and user-defined types currently available. You can change the <span class="uicontrol">Scope</span> of
the list by selecting one of the following options:<ul>
<li><span class="uicontrol">Workspace</span>: lists all of the types available in
your workspace. </li>
<li><span class="uicontrol">Enclosing Project</span>: lists all of the types available
in the project that contains your file. </li>
<li>(Default) <span class="uicontrol">Current Resource</span>: list all of the types
available in your current file.</li>
<li><span class="uicontrol">Working Sets</span>: list all the types available
within the selected working set.</li>
</ul>
</div>
<p>Select the type you want in the type list, then click <span class="uicontrol">OK</span>. </p>
</li>
<li class="stepexpand"><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.</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>
</body>
</html>