Namespaces in output documents

Namespace details may need to be added to the elements and attributes output by the XSLT processor. Indeed, this is vital when the created document contains elements from more than one namespace.

Multiple namespaces

It is a simple matter to include output elements in the stylesheet that have different prefixes, though it is of course necessary to include namespace declarations for each one.

When the output document contains elements from more than one namespace, the root element usually needs to contain multiple namespace declarations. All namespace declarations in the stylesheet are automatically copied to the output document, except for the XSLT namespace declaration and any others that are explicitly excluded ...

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.