XML FOR DOMINO
You can view the domino DTD file in any text editor. If you accepted the defaults when installing Notes, the path of the file is Lotus/Notes/domino_6_0.dtd.
Elements
An element is a tag, defined as follows:
<!ELEMENT tagname ( content-model ) >
where tagname is the name of the tag. Tag names are case-sensitive. The content-model is an expression stating what content can appear inside the element. It can also contain nested tags. An element is used within start and end tags. For example, the viewentry element in the Domino DTD is defined thus:
<!ELEMENT viewentry ( entrydata* ) >
This element is used in an XML output as follows:
<viewentry children="3">
<entrydata columnnumber="1">
<text> Joe Smith </text>
</entrydata>
</viewentry>
The operators you can use to structure the content model are:
The following example shows the use of operators in structuring the content model:
<!ELEMENT acl ( role*, aclentry+, logentry* )>
In this case, an <acl> element can contain any number of <role> elements, followed by one or more <aclentry> elements, followed by any number of <logentry> elements.
Another example of operators is:
<!ELEMENT text ( #PCDATA | break )* >
Here a <text> element can contain any quantity of either plain text, or <break> elements, in any order. #PCDATA is parsed character data, which means it is plain text that does not recognize extra spacing and requires that characters, like an ampersand (&), for example, be represented by a character entity, such as &. The table below displays the characters that are internal entities which are predefined in XML and cannot be included in parsed character data unless they are represented in the specified XML format:
The attributes for any element are declared in the following manner:
<!ATTLIST tagname
Consider this example for the element with the tagname book:
<!ATTLIST book
All attributes are fundamentally strings, as shown in this table:
Entities
There are three types of XML entities:
<!ENTITY productName "2000 Calendar">
Then you could reference it in your .xml file as follows:
<response>Thank you for purchasing the &productName; from us.</response>
This means that in January of 2001, you could update the DTD to change the value of the &productName; entity to "2001 Calendar" and the change would be reflected in all XML documents that reference that entity.
The entities defined in the Domino DTD are parameter entities. Parameter entities are entities created to be referenced exclusively within the DTD itself. They facilitate code reusability and decrease the size of the DTD. You cannot reference parameter entities in an .xml file.
The Domino DTD entities serve as macros that are declared as shown below:
<!ENTITY macroname "macrocontent" >
For example:
Comments
Comments within a DTD are enclosed as shown below:
<!-- comment text, anything except two dashes. -->
See Also