<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:output method="xml" indent="yes" encoding="UTF-8"/>
	<xsl:template match="/">
		<xsl:apply-templates/>
	</xsl:template>
	<xsl:template match="tree">
		<OUT_TREE>
			<xsl:apply-templates/>
		</OUT_TREE>
	</xsl:template>
	<xsl:template match="twig">
		<OUT_TWIG>
			<xsl:apply-templates/>
		</OUT_TWIG>
	</xsl:template>
	<xsl:template match="leaf[1]">
		<OUT_LEAF_FIRST>
			<xsl:value-of select="."/>
		</OUT_LEAF_FIRST>
	</xsl:template>
	<xsl:template match="leaf[position()>1]">
		<OUT_LEAF_OTHER>
			<xsl:value-of select="."/>
		</OUT_LEAF_OTHER>
	</xsl:template>
</xsl:stylesheet>
