Output

In the examples above, the content of each element in the source document is identified and processed, and the text content is output, but no formatting is applied to this text. The element tags from the source document are also discarded during this process. But an XSLT transformation tool is typically required to write out a new document with meaningful tags (XML, HTML or some other recognized document or data-exchange format).

Direct element output

One way to write out XML elements is simply to insert the appropriate output element tags into the templates. The Namespaces standard (see Chapter 10) is applied in XSLT to distinguish these elements from XSLT elements. For example, to enclose the content of a Paragraph element in HTML P ...

Get XML Companion, The, Third Edition 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.