<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:output method="xml" indent="no"/>
	<xsl:strip-space elements="*"/>
	<xsl:template match="/">
		<xsl:apply-templates/>
	</xsl:template>
	<xsl:template match="node()">
		<xsl:copy>
			<xsl:copy-of select="@*"/>
			<xsl:apply-templates/>
		</xsl:copy>
	</xsl:template>
	
	<xsl:template match="br">
	</xsl:template>
	
	<xsl:template match="*/text()">
		<xsl:variable name="psn" select="count(preceding-sibling::*)"/>
		<xsl:variable name="fsn" select="count(following-sibling::*)"/>
		<xsl:variable name="pfsn" select="$psn + $fsn"/>
		<xsl:if test="$pfsn = 0">
			<xsl:element name="new_line">		
				<xsl:value-of select="."/>
			</xsl:element>				
		</xsl:if>
		<xsl:if test="$pfsn > 0">
			<xsl:element name="new_line">
				<xsl:value-of select="."/>
			</xsl:element>
		</xsl:if>
	</xsl:template>
	<xsl:template match="comment()">
		<xsl:comment>
			<xsl:value-of select="."/>
		</xsl:comment>
	</xsl:template>
	
	<xsl:template match="processing-instruction()">
	</xsl:template>

</xsl:stylesheet>
