Consultor Eletrônico



Kbase 21202: Document Type Definition (DTD) and Progress (XML)
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   4/26/2002
Solution ID: 21202

GOAL:

Why you would use DTD with Progress.

FACT(s) (Environment):

Progress 9.1C

FIX:

DTD and Progress

These features characterize Document Type Definitions:

A) Used to create Valid XML Documents
B) They describe Document Structure
C) Originally used to describe structures and restrictions of "document-like"
objects. (articles, books,...)
D) Language is SGML

A DTD Example

<!ELEMENT BookCatalogue (Book*)>
<!ELEMENT Book (Title, Author, Date, ISBN, Publisher)>
<!ELEMENT Title (#PCDATA)>
<!ELEMENT Author (#PCDATA)>
<!ELEMENT Date (#PCDATA)>
<!ELEMENT ISBN (#PCDATA)>
<!ELEMENT Publisher (#PCDATA)>

DTD's Allow

A) Companies and departments to set standards
B) Common format for exchange of information
C) Control of Content and look of documents
D) Automatic validation of XML documents
E) Data Exchange between like systems/databases

DTD's allow you to define

A) Elements (Naming, Sequences, Occurrences, Nesting, Choices)
B) Attributes (Naming, Default Values, Datatypes very limited)

DTD's paired with a validating parser allows detection of

A) Missing Elements
B) Improper Nesting of Elements
C) Improper Ordering of Elements
D) Elements/Attributes not defined in the DTD

What DTD's Cannot do

A) Constrain attributes to basic data types (integer, float, Boolean)
B) Constrain values to particular patterns (phone numbers, Postal codes,
dates, Email)
C) Constrain attributes to a range of values (without listing each value)