XML
Sample XML files illustrating the use of a DTD
Caution: IE 8.0 and above does not seem to support DTD any more.
XML verison of yeats01 (transformed using XSLT),
which is the running verison which calls poem01.dtd an poem01.xsl.
HTML version of yeats01.xml
HTML version of poem01.xsl
HTML version of poem01.dtd
XML version of yeats01 with red author
GENERAL XML
Note that this is not HTML! Every tag must be closed. This
can be done with <tag>....</tag>
or sometimes with <tag />
DTD Statements
Expressions
a b... a followed by b
a | b... a or b but not both (one
item from the list at most)
a-b... the set of strings represented by a but
not represented by b
a?... a or null in other words a is optional
a+...
one or more occurences of a
a*... zero or more occurences of a
Elements and Attributes
XSL and XSLT
The example here converts XML tags to HTML with XSLT, the
XML Style Language Transformations. For more about XSLT to the XSLT section of
these notes.
Examples borrowed from Dr. Doug Oard.
Last updated: 2/17/2012