The name after !DOCTYPE which is "PARTS" must be the same name as the encapsulating element in the XML file which is <PARTS> in this case.
A CSS file called "xmlpartsstyle.css". This is done on the third line using a processing instruction:
<?xml-stylesheet type="text/css" href="xmlpartsstyle.css"?>
The DTD File
The following file is called "parts.dtd".
<!ELEMENT PARTS (TITLE?, PART*)>
<!ELEMENT TITLE (#PCDATA)>
<!ELEMENT PART (ITEM, MANUFACTURER, MODEL, COST)+>
<!ATTLIST PART
type (computer|auto|airplane) #IMPLIED>
<!ELEMENT ITEM (#PCDATA)>
<!ELEMENT MANUFACTURER (#PCDATA)>
<!ELEMENT MODEL (#PCDATA)>
<!ELEMENT COST (#PCDATA)>
The root element is PARTS. The root element may contain no TITLE element or one TITLE element along with any number of PART elements. The PART element must contain one each of items ITEM, MANUFACTURER, MODEL, and COST in order. The PART element may contain an attribute called "type" which may have a value of "computer", "auto", or "airplane". The elements TITLE, ITEM, MANUFACTURER, MODEL, and COST all contain PCDATA which is parsed character data.
The Style File
The following file is used to set the style of the elements in the XML file. It is called "xmlpartstyle.css".
PARTS
{ display: block }
TITLE
{ display: block;
font-family: arial;
color: #008000;
font-weight: 600;
font-size: 22;
margin-top: 12pt;
text-align: center }
PART
{ display: block }
ITEM
{ display: block;
font-family: arial;
color: #000080;
font-weight: 400;
margin-left: 15pt;
margin-top: 12pt;
font-size: 18 }
MANUFACTURER
{ display: block;
font-family: arial;
color: #600060;
font-weight: 400;
margin-left: 45pt;
margin-top: 5pt;
font-size: 18 }
MODEL
{ display: block;
font-family: arial;
color: #006000;
font-weight: 400;
margin-left: 45pt;
margin-top: 5pt;
font-size: 18 }
COST
{ display: block;
font-family: arial;
color: #800000;
font-weight: 400;
margin-left: 45pt;
margin-top: 5pt;
font-size: 18 }
How it Displays on your browser
If you click on the following link and the loaded document does not display in color, your browser probably does not support XML. In this case, you should update your browser to the most recent version.
Click Here to see the PARTS.XML file (USE your browser's BACK button to return).