HTML and CSS Reference
In-Depth Information
You'll recall that we began the section on entities with a mention of un-
parsed entities whose only purpose is to be used as values to certain
attributes. You declare an unparsed entity by appending the keyword
NDATA to an external general entity declaration, followed by the name of
the unparsed entity. If we wanted to convert our general boilerplate en-
tity to an unparsed general entity for use as an attribute value, we could
<!ENTITY boilerplate SYSTEM "" NDATA text>
With this declaration, attributes defined as type ENTITY (as described in
Section 15.5.1 ) could use boilerplate as one of their values.
15.3.4. Elements
Elements are definitions of the tags that you can use in documents
based on your XML markup language. In some ways, element declara-
tions are easier than entity declarations because all you need to do is
specify the name of the tag and what sort of content that tag may con-
<!ELEMENT name contents >
The name follows the same rules as names for entity definitions. The con-
tents section may be one of four types described here:
The keyword EMPTY defines a tag with no content, such as <hr>
and <br> in HTML. Empty elements in XML get a bit of special
handling, as described in section 15.4.5 .
The keyword ANY indicates that the tag can have any content,
without restriction or further processing by the XML processor.
Search WWH ::

Custom Search