In: Computer Science
The two most used HTTP document are Document Type Declaration and document instance. Compare these parts. Write in your own words. (At least 100 words) Not a picture please
Document Type Declaration
It is also referred as DOCTYPE.Document type declaration is an instruction that associates a particular XML document with a document type definition(DTD).Most of the web browsers are implemented with special-purpose HTML parsers than general purpose DTD-based parsers.These web browsers don't use DTDs and will never access them even if a URL is provided.
Syntax for a document type declaration:
The document type declaration consists of an internal DTD or an external DTD.It can also have a combination of both internal and external DTDs.
Syntax of DOCTYPE for an internal DTD:
<!DOCTYPE root_element
[
Document type Definition(DTD):
elements/attributes/entities/notations/processing instructions/comments
]>
Syntax of DOCTYPE for an external DTD:
Two types:
1)private external DTD
Syntax: <!DOCTYPE root_element SYSTEM "DTD_location">
private external DTDs are identified by the keyword SYSTEM.
2)public external DTD
<!DOCTYPE root_element PUBLIC "DTD_name" "DTD_location">
Document Instance
As there are many types of XML documents,either for transforming or validating.The document instance is classified as an XML file that contains data.
XML Document must be well-formed.An XML document is said to be well-formed if and only if
A Document instance decribes the concept of data present in the document.Document instances are classified into
1)Current Document Instance
2)Particular Document instance
The Current Document Instance is an instance which refers to any document instance that was or could be attained at ot near the time of discussion.
The Particular document instance:
The HTTP protocol allows each one to be uniquely identified by an "Etag" in the document header.If we want to refer a particular document instance ,there are two ways to refer that instane,
Finally,
The Document Type Declaration represents what type of a document it is.
The Document Instance represents concept of data present in the document.