Output View
Figure 3-1 shows the output of our stylesheet. In this graphical
view of the document, the nested HTML tables illustrate which nodes
are contained inside of others, as well as the sequence in which these
nodes occur in the original document. In the section of the document
visible in Figure 3-1, the root of the
document contains, in order, two processing instructions and two
comments, followed by the <sonnet> element and two more
comments. The <sonnet>
element, in turn, contains two attributes and an <auth:author> element. The <auth:author> element contains a
namespace node and an
element.
Be aware that if you throw a very large XML document at this stylesheet, you’ll get an HTML file with hundreds, perhaps thousands of tables. It’s possible that your XSLT processor will run out of memory before it’s finished with the document. For example, using this stylesheet to process the XML source of the Function Reference appendix creates an HTML file with more than 17,000 tables.

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