Just as in the case of XSL, XSLT is always well-formed, valid XML. A
DTD is defined for XSL and XSLT that delineates the allowed
constructs. For this reason, you should only have to learn new syntax
to use XSLT as opposed to the entirely new structures that had to be
digested to use DTDs themselves. Just as in XSL, XSLT is based on a
hierarchical tree structure of data, where nested elements are
leaves, or children, of their parents. XSLT provides a mechanism for
matching patterns within the original XML document (using an XPath
expression, which I'll discuss next), and applying formatting
to that data. This results in simply outputting the data without the
unwanted XML element names, or inserting the data into a complex HTML
table and displaying it to the user with highlighting and coloring.
XSLT also provides syntax for many common operators, such as
conditionals, copying of document tree fragments, advanced pattern
matching, and the ability to access elements within the input XML
data in an absolute and relative path structure. All these constructs
are designed to ease the process of transforming an XML document into
a new format. For a thorough treatment of the XSLT language, see
Java and XSLT by Eric Burke (O'Reilly),
which has an excellent discussion of how to put XSLT to work with
Java.