<slide title="My Slide">, title
is an attribute, and My Slide is its value. <!-- This
is a comment --> PCDATA),
in which the normal rules of XML syntax apply (for example, angle brackets demarcate XML
tags, tags define XML elements, etc.). CDATA sections are typically used to show examples
of XML syntax. Like this: <![CDATA[ <slide>..A sample slide..</slide> ]]>
which displays as:
<slide>..A sample slide.. </slide>
<?xml version="1.0"?>. The declaration is part
of the document prolog. <!ELEMENT
username (#PCDATA)> says that the XML element called username
contains "Parsed Character DATA" -- that is, text alone, with no other
structural elements under it. The DTD includes both the local
subset, defined in the current file, and the external subset,
which consists of the definitions contained in external .dtd files that are
referenced in the local subset using a parameter entity. <slideshow><slide>..</slide><slide>..</slide></slideshow>",
the <slideshow> element contains two <slide>
elements. <", which references the less-than
symbol, or left-angle bracket (<). An entity reference can also reference
an entire document, or external entity, or a collection of
DTD definitions (a parameter entity). <
or it may reference one that is defined in the DTD. In the XML data, the reference could
be to an entity that is defined in the local subset of the DTD
or to an external XML file (an external entity). The DTD can
also carve out a segment of DTD specifications and give it a name so that it can be reused
(included) at multiple points in the DTD by defining a parameter
entity. .dtd
files. #PCDATA, followed by
alternate elements, and must end with the "zero-or-more" asterisk symbol (*).
For example: <!ELEMENT item (#PCDATA | item)*
<name>
should be interpreted according to your DTD, rather than using the definition for an
element called "name" in a different DTD. < and >). For example, the element <name>My
Name</name> has the start tag <name>, the end tag </name>,
which enclose the data "My Name". To treat such markup syntax as data, you use
an entity reference or a CDATA
section. http:/ identifies a Web location. The ftp:/ prefix
identifies a downloadable file. Other prefixes include file:/ (a file on the
local disk system) and mailto:/ (an email address). <
and > are used to embed angle brackets in an XML document.) In
addition, all tags have an ending tag or are themselves self-ending (<slide>..</slide>
or <slide/>). In addition, in a well-formed document, all tags are
fully nested. They never overlap, so this arrangement would produce an error: <slide><image>..</slide></image>.
Knowing that a document is well formed makes it possible to process it. A well-formed
document may not be valid however. To determine that, you need a validating parser and a DTD. <em>
and <b> tags, rather than being limited to plain text.