<?xml version="1.0" encoding="utf-8"?>
<!--
	Copyright © 2002 Ned Martin
	http://copyright.the-i.org/

	Saves XML comments file
-->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:output method="xml" encoding="utf-8"/>
	<xsl:param name="page">page</xsl:param>
	<xsl:param name="ip">ip</xsl:param>
	<xsl:param name="author">author</xsl:param>
	<xsl:param name="comment">comment</xsl:param>
	<xsl:param name="date">date</xsl:param>
	<xsl:template match="comments">
		<comments>
			<xsl:for-each select="comment">
				<xsl:copy-of select="."/>
			</xsl:for-each>
			<comment>
				<xsl:attribute name="page"><xsl:value-of select="$page"/></xsl:attribute>
				<xsl:attribute name="ip"><xsl:value-of select="$ip"/></xsl:attribute>
				<xsl:attribute name="author"><xsl:value-of select="$author"/></xsl:attribute>
				<xsl:attribute name="date"><xsl:value-of select="$date"/></xsl:attribute>
				<xsl:value-of select="$comment"/>
			</comment>
		</comments>
	</xsl:template>
</xsl:stylesheet>
