When working with a DTD, the Parameter Entities tab provides access to and editing of internal and external parameter entities. Internal parameter entities are used to implement XML Authority's reusables, while external parameter entities are used to support the modular schema architectures provided by the Overview pane.
Warning: If you're an experienced SGML or XML schema builder, parameter entities may already be familiar to you -- read on to learn about XML Authority's tools for creating and editing them. If you're not an experienced schema builder, you may want to stick with XML Authority's built-in tools instead.
Parameter entities are used to identify reusable content that is typically used either to centralize sets of information (like attribute lists, content models, and constraints) used by multiple declarations, or to create modular schemas composed of multiple files. Internal parameter entities typically provide the first function, while external parameter entities support the second by importing other declaration sets, stored in separate files.
Parameter entities can be created in several different areas within XML Authority, including the various reusables editors and the Overview pane. The parameter entities created in those areas can be edited in the Advanced pane as well as in the areas where they were created.
Like the general entities tab, the parameter entities tab (shown in Figure A below) is divided into two panes. The top pane is used for internal parameter entities, whose values contain their replacement content directly, while the bottom pane is used for external parameter entities, which contain references to external files that contain content.
Figure A - The Parameter Entities tab of the Advanced Pane.
Internal parameter entities have only a name and a value. (Entity names must begin with a letter and may contain numbers, underscores, dashes, and full stops -- typically periods.) The value must contain either complete declarations (more common in external entities) or fragments of single declarations. Declarations may not cross entity boundaries, though they may contain multiple entities. Entities may also contain entities themselves.
For example, to create an entity named 'shortModel' that has the value '(title, paragraph)' (an element content model), the entries shown in Figure B would be appropriate.
Figure B - Entering an internal parameter entry requires a name and value.
All XML Authority reusables are internal parameter entities and may be edited here, though it may be better to edit them through the reusables-specific interfaces.
Once you have created a parameter entity, you can reference it within other declarations. To use parameter entity content, simply reference the entity using the following syntax:
%entityName;
For example, to reference the shortmodel entity declared above, you'd write:
%shortModel;
inside of a declaration or another entity.
External parameter entities have names and references to external resources. External
parameter entities must have system identifiers (a file or URL from which the content may
be retrieved) and may optionally have public identifiers as well. XML Authority also
provides an 'Include in DTD' checkbox that makes it easy to include external modules in
your DTDs. If the external DTD contains multiple declarations, you'll want to make sure it
gets checked. Modules that have been added through the Overview
pane will appear here, and modules added here will appear in the Overview pane. When
you add a module, XML Authority will download its content for use in the current schema. The parameter entity declarations for that module will also appear in the parameter entity window, preceded by an icon if the module hasn't been opened for editing in the Overview pane.
Figure C - Entering an external parameter entry requires a name and a System reference, and optionally a public identifier.
Note that in the declarations above (from the DDML DTD), the external ibtwsh
module is referenced with a System identifier - a complete URL. The parameter entities within that module (which are locked) use relative URLs and Public Identifiers. All are included in the DTD.
Copyright 2000 Extensibility, Inc.
Suite 250, 200 Franklin Street, Chapel Hill, North Carolina 27516