<?xml version='1.0'?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="yes"/>

<xsl:template match="/">
	<xsl:apply-templates/>	
</xsl:template>

<xsl:template match="text()"/>

<xsl:template match="family">
	<xsl:copy>
		<xsl:copy-of select="@name"/>
		<xsl:call-template name="children">
			<xsl:with-param name="tokens" select="concat(@childs, ' ')"/>
		</xsl:call-template>
	</xsl:copy>
</xsl:template>

<xsl:template name="children">
	<xsl:param name="tokens"/>

	<xsl:variable name="child" select="substring-before($tokens, ' ')"/>
	<xsl:if test="$child">
		<child><xsl:value-of select="normalize-space($child)"/></child>
	</xsl:if>

	<xsl:variable name="others" select="substring-after($tokens, ' ')"/>
	<xsl:if test="$others">
		<xsl:call-template name="children">
			<xsl:with-param name="tokens" select="$others"/>
		</xsl:call-template>
	</xsl:if>

</xsl:template>

</xsl:stylesheet><!-- Stylus Studio meta-information - (c) 2004-2006. Progress Software Corporation. All rights reserved.
<metaInformation>
<scenarios ><scenario default="yes" name="family.xml" userelativepaths="yes" externalpreview="no" url="family.xml" htmlbaseurl="" outputurl="" processortype="saxon8" useresolver="yes" profilemode="0" profiledepth="" profilelength="" urlprofilexml="" commandline="" additionalpath="" additionalclasspath="" postprocessortype="none" postprocesscommandline="" postprocessadditionalpath="" postprocessgeneratedext="" validateoutput="no" validator="internal" customvalidator="" ><advancedProp name="sInitialMode" value=""/><advancedProp name="bSchemaAware" value="true"/><advancedProp name="bXsltOneIsOkay" value="true"/><advancedProp name="bXml11" value="false"/><advancedProp name="iValidation" value="0"/><advancedProp name="bExtensions" value="true"/><advancedProp name="iWhitespace" value="0"/><advancedProp name="sInitialTemplate" value=""/><advancedProp name="bTinyTree" value="true"/><advancedProp name="bUseDTD" value="false"/><advancedProp name="bWarnings" value="true"/></scenario></scenarios><MapperMetaTag><MapperInfo srcSchemaPathIsRelative="yes" srcSchemaInterpretAsXML="no" destSchemaPath="" destSchemaRoot="" destSchemaPathIsRelative="yes" destSchemaInterpretAsXML="no"/><MapperBlockPosition></MapperBlockPosition><TemplateContext></TemplateContext><MapperFilter side="source"></MapperFilter></MapperMetaTag>
</metaInformation>
-->