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.
The
following instructions were written for the Resource perspective, but
they will also work in many other perspectives.
To add a global
attribute, follow these steps:
- Open your XML schema in the XML schema editor.
- In the Outline view, select your schema. The entire
schema and its contents should be displayed in the Graph view.
- In the Graph view, right click in the Attributes section
and click Add Global Attribute.
- In the Properties view, type the attribute Name.
- Click the Browse button next to the Type field
to launch the Set Types dialog.
- Select the type you want in the type
list, then click OK. The Set Type dialog lists all built-in and user-defined types currently
available. You can change the Scope of the list by
selecting one of the following options:
- Workspace. Lists all of the types available in
your workspace.
- Enclosing Project. Lists all of the types available
in the project that contains your file.
- (Default) Current Resource. List all of the types
available in your current file.
- Click the Documentation tab if you want
to provide any information about this global attribute. The Documentation page is used for human readable
material, such as a description, and the App Info
page can be used to provide information for applications.