Professional Documents
Culture Documents
<!ELEMENT
Attribute Declaration
<!ATTLIST element name declvalue default > keyword ATTLIST name of the associated element keyword or name of default value attribute what kind of value or list of values repeat for each attribute
name
(content-model) >
name of the keyword element type, formal definition of the element's allowed content ELEMENT its "tag"
Connectors ,
| Then Follow with (in sequence) Select (only) one from the group Or Only one connector type per group no mixing!
Occurrence Indicators
(no indicator) ? * + Required Optional Optional, repeatable Required, repeatable One and only one None or one None, one, or more One or more
Groupings
( ) Start content model or group End content model or group
Attribute Defaults
If attribute is omitted, assume this value. "value" #REQUIRED Required. Document is not valid if no value is provided. #IMPLIED Optional. Not constrained; no default can be inferred; an application is free to handle as appropriate. #FIXED Fixed value. (Requires a value as well as "value" the keyword.) If the attribute appears with a different value, thats an error.
name
ANY
>
keyword ANY
name
EMPTY
>
keyword EMPTY
Mulberry Technologies, Inc. 17 West Jefferson Street, Suite 207 Rockville, MD 20850 USA Phone: +1 301/315-9631 Fax: +1 301/315-8285 info@mulberrytech.com http://www.mulberrytech.com
Reserved Attributes
xml:space Preserve whitespace or use default xml:lang Indicate language of element and that elements attributes and children
DOCTYPE Declaration
<!DOCTYPE name External-ID [ declarations ] > name of the the internal document subset of type the DTD pointer to (optional) another file DSC DSO keyword Declaration Declaration DOCTYPE Subset Open Subset Close
XML Declaration
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
name
"
"
>
Internal Subset
D o c u m e n t E n t i t y
Standalone declaration: no: parsing affected by external DTD subset yes: parsing not affected by external DTD subset Character encoding of the document, expressed in Latin characters, e.g. UTF-8, UTF-16, EUC-JP, ISO-10646-UCS2
name
External-ID
>
]>
Tags and text: the document
name of keyword the entity ENTITY percent sign "%" shows this is a parameter entity
Processing Instruction
pointer to a file
Notation Declaration
<!NOTATION
External Subset
D o c u m e n t E n t i t y
name
External-ID
>
<?xml version="1.0"?> DOCTYPE declaration <!DOCTYPE whatnot refers to a DTD in a SYSTEM "whatnot.dtd" > external subset.
a file named:
keyword NOTATION
whatnot.dtd
name
"
" >
SYSTEM or PUBLIC identifier (PUBLIC does not require URI) name of the entity (FAX, JPG, CGS, etc.) must be unique in DTD
Comment
<!-- Whatever you want to say! --> Comment may contain any characters except the string "--".
DOCTYPE declaration refers to an external subset and includes an internal subset. DTD is sum of the parts. a file named:
name
External-ID
NDATA name
>
whatnot.dtd
Tags and text: the document
keyword SYSTEM or ENTITY PUBLIC identifier keyword NDATA name of followed by the entity notation name
External-ID
OR SYSTEM "URI" PUBLIC "Public ID" "URI"