1) The inventory item "XML document" should describe at least one inventory item.
In this Simulation, we will go through the steps needed to create an internal DTD for XML document shown here.
Each inventory item has <ITEM-NAME>, <ITEM-SERIAL-NUMBER>, and <QUANTITY-ON-HAND> -element that must be present in that order.
2) Each one of the item elements may only contain parsed character data. The next step is shown in the following slide.
3) <!DOCTYPE INVENTORY-ITEMS [
To begin, you will define a document type declaration that specifies <INVENTORY-ITEMS> as the root element.
Type <!DOCTYPE INVENTORY-ITEMS [ and press Enter.
4) The root element should contain at least one inventory <ITEM> element. Use the DTD symbol +
to indicate one or more elements.
Type <!ELEMENT INVENTORY-ITEMS (ITEM)+> and press Enter.
5) An <ITEM> should contain <ITEM-NAME>, <ITEM-SERIAL-NUMBER>, and <QUANTITY--ON-HAND>, in that order.
Type <!ELEMENT ITEM (ITEM-NAME,ITEM-SERIAL-NUMBER,QUANTITY-ON-HAND)> and press Enter.
6) <ITEM-NAME> should contain only parsed character data.
Type <!ELEMENT ITEM-NAME (#PCDATA)> and press Enter.
7) <ITEM-SERIAL-NUMBER> should contain only parsed character data.
Type <!ELEMENT ITEM-SERIAL-NUMBER (#PCDATA)> and press Enter.
8) <QUANTITY-ON-HAND> should contain only parsed character data.
Type <!ELEMENT QUANTITY-ON-HAND (#PCDATA)> and press Enter.
9) Complete the <!DOCTYPE> declaration by typing ]> and press Enter.
This completes the Simulation. Click the Exit button.<