<?xml version="1.0"?>
<!--
    Strip "comment"-Attributes, prettyprint and convert to UTF-8
	$Id: hanstrip.xsl,v 1.1.2.7 2004/09/02 14:25:41 thomas Exp $
-->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
                              xmlns:hans="http://www.hans-support.de/specs/hansxml/0.6/"
                              exclude-result-prefixes="hans">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes" />
<!-- xsl:preserve-space elements="hans:hansfield hans:subfield hans:hanscode" / -->
<xsl:strip-space elements="*" />

<!-- copy everything -->
<xsl:template match="/ | * | @* | comment() | processing-instruction()"> 
	<xsl:copy> 
		<xsl:apply-templates select="@* | * | comment() | processing-instruction() | text()"/> 
	</xsl:copy> 
</xsl:template> 

<!-- but normalize textnodes -->
<xsl:template match="text()"> 
	<xsl:value-of select="normalize-space(.)" />
</xsl:template> 

<!-- and strip comment attributes -->
<xsl:template match="@comment"/>

</xsl:stylesheet>
