O'Reilly logo

Special Edition Using XSLT by Michael Floyd

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required