Applying a Design Pattern to an XML Schema
See Also
You can use XML schema tools to apply one of the following design patterns to an XML schema file:
- Venetian Blind. In the Venetian Blind design, there is a single global element; all other elements are local. Element declarations are nested within a single global declaration, using named complex types and element groups. Complex types and element groups can be reused throughout the schema. Only the root element must be defined within the global namespace.
- Russian Doll. In the Russian Doll design, there is a single global element; all other elements are local. Element declarations are nested within a single global declaration and element declarations can only be used once. Only the root element must be defined within the global namespace.
- Garden of Eden. The Garden of Eden design is a combination of the Venetian Blind and Salami Slice designs. All elements and types are defined in the global namespace with the elements referenced as needed.
- Salami Slice. In the Salami Slice design, all elements are global. There is no nesting of element declarations and element declarations can be reused throughout the schema. All elements must be defined within the global namespace.
To apply a design pattern to an XML schema file:
- In the Projects window, select the node of the XML schema file.
- Right-click and choose Apply Design Pattern.
The Apply Design Pattern dialog box opens.
- If your schema is invalid, not well-formed, or empty, you will see an error message in the lower part of the dialog box and you will not be able to proceed until you fix or populate the schema file. In this case, click Cancel, fix or populate the schema file, and try again.
The Apply Design Pattern dialog box has the following components:
- Global Element and Type radio buttons. Combinations of these settings let you select the design pattern to apply.
- Selected Design Pattern. Shows the name of the design pattern you selected.
- Current Design Pattern. Shows the name of the design pattern currently applied to your schema.
- Pattern description. Shows the description of the design pattern you selected.
- Example. Shows an example of the design pattern.
- Select the appropriate radio buttons to select the design pattern to apply.
As you make your selections, information and error messages appear in the lower part of the dialog box.
- Click Finish.
The IDE applies the new design pattern to your XML schema file.
- See Also
- Validating XML Schema Files
- About XML Schema Tools
Legal Notices