tailieunhanh - Lecture Introduction to XML: Document Type Definitions

The purpose of a Document Type Definition (DTD) is to define the legal building blocks of an XML document. It defines the document structure with a list of legal elements. A DTD can be declared inline in your XML document, or as an external reference. | Ilííllll Welcome to Unit 5. Document Type Definitions Copyright IBM Corporation 2004 Course materials may not be reproduced in whole or in part without the prior written permission of IBM. Declaring Attributes in a DTD - Example Declaration ELEMENT book PCDATA ATTLIST book id isbn booktype storeloc ID year comment CDATA Hardcover Paperback CDATA CDATA CDATA IMPLIED REQUIRED Paperback 5th Avenue FIXED 2000 IMPLIED Valid XML book isbn 1-56592-709-5 storeloc Times Square XML Pocket Reference book Copyright IBM Corporation 2004 Attribute Value Processing XML processors perform two steps when processing attributes Attribute value normalization. - Replace all entity references by their replacement text. -Replace all space tab carriage-return and line-feed characters with spaces. Whitespace normalization for tokenized types. - Discard any leading or trailing spaces. - Replace any sequence of space characters x20 by a single space character. Described on the following chart. Copyright IBM Corporation .

TỪ KHÓA LIÊN QUAN