XML technologies / XSLT / Introduction to XSLT 2.0 / Getting started with XSLT and XPath / Namespaces and literal result elements
(Excerpt from "XSLT 2.0 & XPath 2.0" by Frank Bongers, Chapter 1.)
Another property of literal result elements becomes apparent when compared with XSLT instructions: they are not in the XSLT namespace; in the case considered here, where HTML is generated, they are not in any namespace at all. If the elements have no prefix (as here), no namespace URI is explicitly associated with them, at least not in this way.
Since HTML has no concept of namespaces, this is perfectly correct. However, the absence of a namespace is not always desirable, for example when generating an XML or XHTML document instead of an HTML document. If naming conflicts could occur in the target document, you may also want to give the literal result elements their own namespace.
Copyright © Galileo Press, Bonn 2008
You may print the online version for your private use.
Otherwise, this chapter from "XSLT 2.0 & XPath 2.0 ― Das umfassende Handbuch" is subject to the same terms as the printed edition: the work and all its parts are protected by copyright. All rights are reserved, including reproduction, translation, microfilming, and storage and processing in electronic systems.
Galileo Press, Rheinwerkallee 4, 53227 Bonn