You can use the redefine mechanism to redefine simple and complex
types, groups, and attribute groups obtained from external schema files. Like
the include mechanism, redefine requires the external components to be in
the same target namespace as the redefining schema, although external components
from schemas that have no namespace can also be redefined.
In the XML schema editor, you can add a redefine element to an
XML schema.
The following instructions were written for the Resource
perspective, but they will also work in many other perspectives.
To
add a redefine element , 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 Directives section
and click Add Redefine.
- In the Properties view, click the General tab and click
the More button to the right of the Schema
location field. The XML schema file you select must
have the same namespace as the current schema.
- If you want to select an XML schema located in the workbench, select
the Workbench projects radio button and click Next.
- Select the schema you want to include and click Finish.
- If you want to select an XML schema located on the Web, select
the HTTP radio button and click Next.
- Type the URL of the XML schema and click Finish.
Note: A local copy of the schema will not be stored in the workbench.
Every time you validate your schema, the schema's contents will be checked
from the URL you specify.
- The XML schema editor will retrieve the location of the included
XML schema file and display it as read-only in the Schema location field.
- Click the Documentation tab if you want
to provide any information about this redefine element. 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.
Once you have added the redefine element to your XML schema, you
can redefine any of the simple and complex types, groups, and attribute groups
in the XML schema you selected in the redefine element.
(c) Copyright 2001, World Wide Web Consortium (Massachusetts Institute
of Technology, Institut National de Recherche en Informatique et en Automatique,
Keio University).
(C) Copyright IBM Corporation 2000, 2005. All Rights Reserved.