Các yếu tố trích dẫn nội dung bài viết này có hai thuộc tính tùy chọn, nguồn và tác giả. Các yếu tố danh mục phải có hai yếu tố theo thứ tự, bắt đầu với amazon và kết thúc với elcorteingles. | 60 Part I Introducing XML While the first few elements provided opportunities to introduce you to the basic declarations and syntax of DTD documents the rest of the DTD provides additional examples of DTD descriptions of XML documents. The next element that is defined in the DTD is the quote element which is a child of the quotelist element. The quote element has two optional attributes source and author. ELEMENT quote PCDATA ATTLIST quote source cDaTA IMPLIED author CDATA IMPLIED The catalog element must contain two elements in sequence starting with amazon and ending with elcorteingles. The catalog element has one required attribute called items which contains a count of the items in the catalog ELEMENT catalog amazon elcorteingles ATTLIST catalog items CDATA rEqUIRED The amazon element contains one child element called product. The cardinality operator indicates that there can be one or more product child elements under amazon ELEMENT amazon product ATTLIST amazon items CDATA REQUIRED The elcorteingles element contains one child element called product. Because no cardinality operator is specified there can be only one product child element under elcorteingles ELEMENT elcorteingles product ATTLIST elcorteingles items CDATA REQUIRED The next element declaration is a great example of the combination of the DTD element declaration sequence and choice list operators and cardinality operators working in concert to solve a tricky data validation problem. The XML document supports both English and Spanish translations in nested elements of the product element. Unfortunately parsers have no way of automatically recognizing and translating the element names so it s up to the DTD developer to make sure that all possibilities in both formats are covered as part of the validation process. Chapter 3 XML Data Format and Validation 61 In this example all elements that have English and Spanish translations are offered as choice lists components in a sequence list of nested .