Stages of development

Development of a DTD should ideally involve the following steps:

  • analysis (including document and database schema analysis)

  • model definition (including use of existing standards)

  • writing the DTD (or schema)

  • testing and debugging.

Analysis

DTD and XML Schema document models are very important. They are used to guide authors and ensure that relevant documents conform to agreed standards. If a model is in some way inadequate, or simply defines inappropriate rules, the implications can be very significant. Later corrections may involve modifications to many documents (perhaps thousands) that were built to conform to the incorrect model, as well as to software filters and stylesheets. Great care should therefore be taken to ensure that the model is correct first time.

The creation of a document model requires a number of skills that in most cases cannot be found in any single person. Specifically, it is necessary to consider the features and limitations of the modelling language (as well as significant adjunct standards, such as XPath), the level of complexity and its impact on any custom software development, the existing document model (which may not be fully apparent from simply studying previously published material and style guides) and likely future electronic publishing or information dissemination needs.

The following roles are likely to be spread across a small number of individuals:

  • document author or editor

  • editorial system administrator

  • software developer or integrator

  • XML consultant

  • database designer.

Model definition

Ultimately, the results of analysis are used to create a concrete model. But there may be many ways to implement a valid model. There are choices to make, such as whether or not to adapt an existing model, whether to describe a feature of the document with an element or an attribute, and what names to assign to each element and attribute. The following sections discuss appropriate element and attribute names, how to choose whether to use an element or attribute in a given circumstance, when to consider using or adapting an industry standard model, how to model lists and tabular matter, and whether to consider a concept called 'architectural forms'.

Writing the DTD

The layout of the model deserves consideration, such as the arrangement of declarations, the use of comments, and the division of the DTD into re-usable entities. XML allows a lot of freedom in the construction of the DTD. A recommended approach to formatting a DTD is outlined below, followed by a look at DTD writing tools.

Debugging

Testing a model is an important exercise that requires a number of considerations. These are also discussed below.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.222.117.109