Markup declarations

All remaining XML markup involves a single additional markup construct, called a markup declaration. Declarations identify or specify important features of the document. They create comments, re-usable document components, identify the DTD the document conforms to, and construct the DTD itself. The following sections and the next two chapters all involve the extensive use of markup declarations. A markup declaration is delimited by the characters '<!' and '>':

<! ... >

In a few specific circumstances, markup declarations may be embedded within other markup declarations. The embedded declarations are held in a subset structure, identified using the square bracket characters '[' and ']':

<! ... [
   <! ..... >
   <! ..... >
]>

A specific type of declaration is indicated using a keyword, which must appear at the start of the declaration, without any intervening spaces. The declaration types described below have the keywords 'DOCTYPE', '[CDATA[' and '--':

<!DOCTYPE ..... >
<![CDATA[ ..... ] ]>
<!-- ..... -->

The remainder, which are described in following chapters, have the following keywords:

<!ENTITY ..... >
<!NOTATION ..... >
<!ELEMENT ..... >
<!ATTLIST ..... >
<![IGNORE[ ..... ] ]>
<![INCLUDE[ ..... ] ]>

If some of these keywords look odd or obscure, the explanation lies in the historical roots of XML, which is a simplified subset of the SGML standard. XML, like English, is complicated due to its history (and Chapter 32 clarifies some of these apparent oddities). When XML was designed, backward compatibility with those parts of SGML it retained was considered paramount.

It is important to remember that, despite the name 'XML Declaration', the construct described in the previous section is actually a processing instruction, not a markup declaration.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.117.196.184