Add comments to generated xml
File: Data.xml <documentation>test</documentation> File: Transform.xslt <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output method="xml" omit-xml-declaration="yes" indent="no" /> <xsl:template match="poem"> <html> <xsl:comment> Created by release 3 </xsl:comment> <xsl:apply-templates /> </html> </xsl:template> </xsl:stylesheet> Output: test
1. | Hyphens in xsl:comment element make it illegal | ||
2. | Create comment in style sheet | ||
3. | Copy comment with comment() function | ||
4. | match comment |