While breaking schemas into modules is helpful in large-scale situations where entire sets of declarations are shared within schemas, there are many cases where smaller chunks of declarations can be usefully shared and centrally managed. When working with DTDs, XML Authority's reusables, which build on XML 1.0's parameter entities, provide convenient control over information you'll need to use repeatedly within declarations.
Reusables come in four varieties:
Type | Usage |
---|---|
Content Model | Contains content models or portions of content models that can be reused in multiple element type declarations. |
Attribute Set | Contains a list of attribute declarations that can be applied to multiple element types. |
Constraints | Contains a list of possible values for an attribute, simplifying the management of acceptable values. |
Text | Contains any text you like. |
XML Authority's tools for managing reusables will check to make sure that the content you enter for a reusable makes sense (except for Text reusables, which can have any content), and will present you with options appropriate to the type of reusable you are creating. XML Authority also does some 'behind-the-scenes' work for you, such as keeping track of attribute data types in attribute reusables.
In general, reusables are stored in the schema for which they are appropriate. In some cases, you may want to split your reusables out of the schema and make them a separate module that can be shared with other schema modules.
While you can edit reusables directly in the Parameter Entities Tab of the Advanced Pane, it is generally safer to use the Define Reusables... and Edit Reusables... options on the Edit Menu, especially for attribute sets. Direct editing is acceptable, but you'll need a firm understanding of XML 1.0 DTD syntax and the conventions XML Authority uses to represent data types.
Copyright 2000 Extensibility, Inc.
Suite 250, 200 Franklin Street, Chapel Hill, North Carolina 27516