DTD versus XDR Schemas

DTDs validate XML data formats as do XML schemas, which include XDR and XSD. This section covers DTD versus XDR schemas in detail.

DTD

First look at the DTD, as shown in Listing A.4.

Listing A.4. An XML DTD
<?xml version='1.0' encoding='UTF-8' ?>
<!ELEMENT Transactions (Transaction+)>
<!ATTLIST Transactions  location CDATA  #REQUIRED
                         type     CDATA  #REQUIRED >
<!ELEMENT Transaction (Amount , Type , Facility , Location)>
<!ATTLIST Transaction  date CDATA  #REQUIRED
                        id   CDATA  #REQUIRED >
<!ELEMENT Amount (#PCDATA)*>
<!ATTLIST Amount  currency  (usd )  #REQUIRED >
<!ELEMENT Type (#PCDATA)*>
<!ELEMENT Facility (#PCDATA)*>
<!ELEMENT Location (Name , Address)>
<!ELEMENT Name (#PCDATA)*>
<!ELEMENT Address (#PCDATA)*>

The first line in ...

Get BizTalk™ Unleashed now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.