When working with a DTD, XML Authority provides tools to help you use modules within your schemas, simplifying the process of creating elements and attributes with similar content models. Reusables allow you to define pieces of declarations, which you can then reuse as appropriate. If you later need to make changes to that content, you just change the reusable, and all of the declarations using that reusable will be updated automatically.
Reusables can be created and edited from a number of different locations, including the Edit Menu (as shown below in Figure A), the popup menus on the element and attribute entry areas, and the Parameter Entity tab of the Advanced Pane.
Figure A - The Define Reusables... and Edit Reusables... options on the Edit Menu let you create and modify XML Authority reusables of several different types.
XML Authority provides four kinds of reusables for different situations. All are created and edited using the same basic tools, but have different constraints:
All of these reusables can be created through the appropriate dialog box. Different reusables have slightly different dialog boxes (each of which enforces the appropriate rules) providing extra tools, but all of them use the same basic format shown in Figure B.
Figure B - The Reusables Editors, whatever the type, provide the same basic set of tools, with different features (like the content model toolbar) that vary slightly depending on what type of reusable is being edited.
You enter the name of the reusable in the text box at the top of the dialog, and its content in the large text area. The tabbed lists at the left provide a reference to the available components in your application that are appropriate to this type of reusable. To add one of them, just click on it. To save your new reusable, click the Save button, and it will be available for future use. To cancel, click the Cancel button.
Editing reusables is much like entering them, except that you are restricted to a drop-down list of existing reusables, and a Delete button is available to remove a reusable from the schema, as shown below in Figure C.
Figure C - Editing reusables is much like creating them, but with the extra option of deletion.
Copyright 2000 Extensibility, Inc.
Suite 250, 200 Franklin Street, Chapel Hill, North Carolina 27516