XML technologies / XSLT / Introduction to XSLT 2.0 / Getting started with XSLT and XPath / Structure controls processing / Default rules for comment and PI nodes
(Excerpt from "XSLT 2.0 & XPath 2.0" by Frank Bongers, Chapter 1.)
The default behavior for comment and processing-instruction nodes is to do nothing. This can be expressed by a single empty default template rule:
<xsl:template match="comment()|processing-instruction()"/>These are also two separate rules: if an explicit rule is added to the stylesheet for only one of the two node types, the default behavior for the other node type remains unchanged.
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