0
3.5kviews
Explain XML DTD
written 6.9 years ago by | • modified 6.9 years ago |
Mumbai University > Information Technology > Sem 4 > Web Programming
Marks: 5M
Year: May 2014
ADD COMMENT
EDIT
1 Answer
written 6.9 years ago by | • modified 6.9 years ago |
Mumbai University > Information Technology > Sem 4 > Web Programming
Marks: 5M
Year: May 2014
written 6.9 years ago by |
Internal DTD:
Following is a example of Internal DTD:
!DOCTYPE root_element [
Document Type Definition (DTD):
elements/attributes/entities/notations/
processing instructions/comments/PE references
]>
Rules:
Example:
<?xml version="1.0" standalone="yes" ?>
<!--open the DOCTYPE declaration -
the open square bracket indicates an internal DTD-->
<!DOCTYPE foo [
<!--define the internal DTD-->
<!ELEMENT foo (#PCDATA)>
<!--close the DOCTYPE declaration-->
]>
<foo>Hello World.</foo>
The External DTD:
Rules:
"Private" External DTDs:
Private external DTDs are identified by the keyword SYSTEM, and are intended for use by a single author or group of authors.
where:
DTD_location: relative or absolute URLglossary
XML Code:
<!--inform the XML processor
that an external DTD is referenced-->
<?xml version="1.0" standalone="no" ?>