Putting the DOM to Work
In the example discussed in this section, a direct marketing company (ABC Corporation) needs to provides information in an XML format that differs from the format currently used in its structure and semantics.
Listing 9.2 shows a fragment of the DTD for the XML data.
Listing 9.2. This DTD Defines People as the Root Element of a Document Containing Information About a Person
<!ELEMENT People (Person*)> <!ELEMENT Person (FirstName, LastName, Address)> <!ELEMENT FirstName (#PCDATA)> <!ELEMENT LastName (#PCDATA)> <!ELEMENT Address (Street, City, State, ZipCode)> <!ELEMENT Street (#PCDATA)> <!ELEMENT City (#PCDATA)> <!ELEMENT State (#PCDATA)> <!ELEMENT ZipCode (#PCDATA)> |
Listing 9.3 shows a sample XML document that could ...
Get Special Edition Using XSLT now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.