O'Reilly logo

Oracle Database 11g: Building Oracle XML DB Applications by Jinyu Wang

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

DTD Validation

DTD defines the XML structure with a list of elements, attributes, and entities. DTD is widely used in document-centric applications. DTD can be stored as a file or embedded in XML documents. The DTDs included within an XML document are called “internal DTDs.” An example is shown as follows (contact_list_in.xml):

<?xml version = ‘1.0’ encoding = ‘UTF-8’?>

<!DOCTYPE contact_list[

<!ELEMENT contact_list (contact+)>

<!ELEMENT contact (first_name,last_name)>

<!ELEMENT first_name (#PCDATA)>

<!ELEMENT last_name (#PCDATA)>

<!ATTLIST contact id CDATA #REQUIRED>

<!ENTITY author “John Smith”>

<!ENTITY book “Oracle Database 11g: Building Oracle XML DB Applications”>]>

<contact_list>

<contact id=“1”>

     <first_name>John</first_name>

     <last_name>Smith</last_name> ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required