Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "Introduction to the XSD Editor"
Line 24: | Line 24: | ||
<BR> | <BR> | ||
− | [[Image: | + | [[Image:Xsdeditor-figure1.jpg">]] |
</P> | </P> | ||
Revision as of 21:18, 4 October 2006
By Keith Chong and Craig Salter
This tutorial will use the catalog.xsd from the "Editing and validating XML files" Examples. To create it, select New -> Examples... to launch the wizard. Follow the instructions described in the wizard, then click Finish to create the example project.
Once created, under the PublicationCatalogue folder, locate the Catalogue.xsd file and double click the file to open it in the XML Schema Editor. As shown below, an Outline and Properties view is provided in addition
to the editor pane. At the bottom of the editor area you'll see that there is a 'Source' and a 'Design' tab at the bottom of the editor area. The 'Source' tab is used
for basic XML source editing. The 'Design' tab is used for higher level graphical editing. Select the 'Design' tab so that you're looking at the Graph view. As shown
below you should see a 'top-level' view of the XML Schema that summarizes all of the components (e.g. elements and types) that are defined in the schema.
In order to see these components in detail you can 'drill down' on a component of interest by double clicking on it. For example,
if we double click on the 'BookType' component, the editor will display the structure of the 'BookType' type as shown below.
To return to the 'top level' view, press the back button
<IMG border="0" src="images/xsdeditor-toplevelbutton.jpg">
at the top left of the editor, or right clicking within the editor and selecting 'Back to Schema' from the context menu. Editing the schema is achieved by invoking context menu actions on selected objects in the Graph view and using the properties view to modify the properties of the selected object. Follow the steps below to create a new element declaration and define its content.
|