Extension Elements

An extension element is an element that should be processed by a piece of code external to the XSLT processor. The implementation details vary from one XSLT processor to the next, as you’d expect. We’ll discuss how an extension element can access the XPath representation of our XML source document, how (or if) it can process attribute value templates, how it can generate output, and how (or if) it can move through the XPath tree to manipulate the source document. We’ll demonstrate various APIs to do all of these things; the APIs, of course, vary quite a bit between processors. Finally, although XSLT processors typically provide an extension writer with access to the XML source, the standard doesn’t define a set of functions or access methods that must be supported.

Get XSLT, 2nd 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.