How to create DTD for book details in a bookstore?
DTD(Document Type Declaration) is mainly used to describe xml. The purpose of DTD is to check vocabulary of the xml. It also checks the validity of the structure of XML documents. It has the syntax given below. Syntax: <!DOCTYPE element DTD identifier [ Declaration 1 Declaration 2 ……………… Declaration n ]> It has two types listed as follows. · -> Internal DTD · -> External DTD First, how the internal DTD is created and used in XML is shown below… Internal DTD: This type of DTD is defined inside the XML file. We can use the above syntax here. In the XML declaration, set the standalone attribute to “yes”. The sample XML code for book store is given below. <?xml version=”1.0” encoding=”UTF-8” standalone=”yes”?> <! DOCTYPE book [ <!ELEMENT book(name,author,publisher)> <!ELEMENT name(#PC...