Friday, December 4, 2015

Week 13:XMLII

Document Type Definitions
-way to describe the language of document. Same way you learn a grammar for a spoken language.
-internal and external

Document Type Declaration
-DOCTYPE
-shows doc should conform to DTD
-<!DOCTYPE   >
-root element must match exactly
-XML IS CASE SENSITIVE

System Identifier
-allows you to to specify location of external file w/ DTD
-keyword SYSTEM and URI

Public Identifiers
-2nd mechanism for locating DTD
-keyword PUBLIC
-entry in catalouge
-cant combine two diff vcabs in same doc

Use DTD that are widely accepted-easier to integrate
error free
simple URI
correct media type
provide documentation

Three Parts
-element declaration:must declare each element that appears
-attribute declarations: declare list of allowable attr for each element
-entity declarations

DTD Limitations
-bad support for XML namespace
-poor data typing
-limited content model desc


XML Schemas
-use same XML syntax
-support namespace rec
-enables text element content validation
-easily create complex and reusable content
-enable modeling of programming



No comments:

Post a Comment