Document Type Definition (DTD) 10/20/2006
- Dr. Kanda Runapongsa, Computer Engineering, Khon Kaen University
1
1
- Asst. Prof. Dr. Kanda Runapongsa
(krunapon@kku.ac.th)
- Dept. of Computer Engineering
Khon Kaen University
Document Type Definition (DTD)
2
Overview Document type declaration Element type declaration - - PDF document
Document Type Definition (DTD) 10/20/2006 Document Type Definition (DTD) Asst. Prof. Dr. Kanda Runapongsa (krunapon@kku.ac.th) Dept. of Computer Engineering Khon Kaen University 1 Overview Document type declaration Element type
1
2
3
4
5
6
This indicates the owner of the FPI If this string start with “ISO” then this is an ISO
Otherwise, this string will either look like
7
8
It indicates the type of document
Any description you want to supply for the
9
10
11
12
13
14
15
16
17
In DTD
In XML
18
<!ELEMENT paragraph (#PCDATA|emph)*>
19
20
21
Invalid XML
Valid XML
22
23
Invalid XML
Valid XML
24
25
Invalid XML
Valid XML
26
27
Invalid XML
Valid XML
28
29
30
31
32
<!ELEMENT person (#PCDATA)> <!ATTLIST person email CDATA
33
34
35
36
CDATA: Character data (not include
In DTD: <!ATTLIST person email
In XML: <person email=“manee@thai.com”>
In DTD:
In XML: <company name=“ibm”>
37
In DTD:
In XML:
38
39
40
41
NOTATION: Specify the format of non-
In DTD:
In XML:
42
In DTD:
In XML:
ID values must be proper XML names, thus they
43
44
45
46
Default values
47
48
49
50
51
52
<!ENTITY dtd “document type definition”>
53
There are two kinds of entities: general
54
The document itself is considered an entity
an external source, such as a binary file, and a reference to them usually includes a uniform
55
56
<!ENTITY xml “Extensible Markup Language”> <course>&xml; for Enterprise Data
57
58
59
60
61
<!NOTATION name PUBLIC std> <!NOTATION name SYSTEM URL>
name is the name you are giving to the
Std is the published name of a public notation URL is the a reference to a program that can
62
63
64
65
File “students.dtd”
66
67
68
Document type declaration
Element type declaration
Attribute-list declaration
69