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