Web Technologies - Old Questions
10. Discuss the private external declaration of DTD with example.
5 marks
|
Asked in 2072
Private external DTDs are identified by the keyword SYSTEM, and are intended for use by a single author or group of authors.
<!DOCTYPE root_element SYSTEM "DTD_location">
where,
DTD_location: relative or absolute URL
E.g.
<?xml version="1.0"?>
<!DOCTYPE note SYSTEM "note.dtd">
<note>
<to>Tulsi</to>
<from>Girii</from>
<heading>Reminder</heading>
<body>Don't forget me this weekend!</body>
</note>
And this is the file "note.dtd" which contains the DTD:
<!ELEMENT note (to,from,heading,body)>
<!ELEMENT to (#PCDATA)>
<!ELEMENT from (#PCDATA)>
<!ELEMENT heading (#PCDATA)>
<!ELEMENT body (#PCDATA)>