Controlling Output Type
A lot of the examples in this chapter have converted XML into HTML, and you might have wondered how an XSLT processor knows to omit the <?xml?> declaration from the beginning of such output documents. It turns out that there's a special rule here: If the document node of the output document is <HTML>, the XSLT processor knows that the output document type is HTML and writes the document accordingly.
In fact, you can specify three types of output documents:
XML. This is the default, and such documents start with an <?xml?> declaration. In addition, entity references will not be replaced with characters such as < or & in the output document; the actual entity reference will appear in the output.
HTML. This is standard ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access