IBM WebSphere Multichannel Bank Transformation Toolkit, Version 7.1

DTD file layout

The following table shows the layout of information for a Document Type Definition file:
Table 1. DTD
DTD tag Description
<:?XML version="1.0" encoding="iso-8859-1" ?>: This is the first line in the file. It identifies the version of the XML specification used.
<:!-- Comment -->: Comments inside the file.
<:!ELEMENT ElementName (SubElement1?, SubElement2*, SubElement3+)>: This is how to define an element named "ElementName", which is composed of three types of elements named SubElement1, SubElement2, and SubElement3. These elements must also be defined in the file as ELEMENT entries. The symbol immediately after the element names indicates the multiplicity of the relationship; that is, how many sub-elements an element contains:
  • ? means 0 or 1
  • * means 0 or more
  • + means 1 or more
If no symbol is found, the element has one, and only one, sub-element.
<:!ELEMENT ElementName EMPTY>: An element with no sub-elements.
<:!ATTLIST ElementName attribute1 CDATA #IMPLIED attribute2 CDATA #REQUIRED attributeN CDATA "default value">: This is the way to define a set of attributes for an element named "ElementName". This example shows that attributes can be defined as either mandatory (#REQUIRED) or optional (#IMPLIED), based on whether they must be present in the definition of the element in the XML file. The last line, with a value included in double quotes, shows how a default value can be set for an attribute.


Feedback