Dr. AIT ISE Web Technology MODEL PAPER SOLVED, Dr. Ambedkar Institute of Technology
A DTD is a set of structural rules called declarations. These rules specify a set of elements, along with how and where they can appear in a document
<!keyword … >
There are four possible declaration keywords:
ELEMENT, ATTLIST, ENTITY, and NOTATION
<!ELEMENT element_name(list of child names)>
e.g.,
<!ELEMENT memo (from, to, date, re, body)>
This element structure can describe the document tree structure shown below.
_ + -> One or more occurrences
_ * -> Zero or more occurrences
_ ? ->Zero or one occurrences
Ex: consider below DTD declaration
<!ELEMENT person (parent+, age, spouse?, sibling*)>
_ One or more parent elements
_ One age element
_ Possible a spouse element.
_ Zero or more sibling element.
<!ATTLIST element_name attribute_name attribute_type [default
_value]> More than one attribute
< !ATTLIST element_name attribute_name1 attribute_type
default_value_1 attribute_name 2 attribute_type default_value_2…>
_ Attribute type :There are ten different types, but we will consider only CDATA
_ Possible Default value for attributes:
Value – value ,which is used if none is specified
#Fixed value – value ,which every element have and can‘t be changed
# Required – no default value is given ,every instance must specify a value
#Implied – no default value is given ,the value may or may not be specified
Example :
<!ATTLIST car doors CDATA “4”>
<!ATTLIST car engine_type CDATA #REQUIRED>
<!ATTLIST car make CDATA #FIXED “Ford”>
<!ATTLIST car price CDATA #IMPLIED>
<car doors = “2” engine_type = “V8”>
…
</car>
An XML document consists of three parts, in the order given:
Download Tag | Dr. AIT ISE WEB TECHNOLOGY MODEL PAPER SOLVED, VTU Notes |
Download Category | Dr. Ambedkar Institute of Technology, Bangalore, VTU |
Reviews
You must log in and be a buyer of this download to submit a review.