Introduction

The presence of a DTD is not required for a stylesheet to be developed for use with a document collection. But creating XSL stylesheets for documents that are not controlled by a DTD would be a very dangerous task. Templates must be created for all elements that are to be presented (or hidden), and so the names of these elements must be known in advance and with certainty. With no DTD, document authors are able to create new elements as required, and the stylesheet will have no mappings for new elements.

Assuming the presence of a DTD, it can of course be ignored by the stylesheet designed. However, it is an ideal source of information as it explicitly describes all the elements that may appear and all the contexts in which they ...

Get XSL companion, The now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.