<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="[URL unfurl="true"]http://www.w3.org/1999/XSL/Transform"[/URL] xmlns:text="[URL unfurl="true"]http://openoffice.org/2000/text">[/URL]
<xsl:output method="xml"/>
<xsl:namespace-alias stylesheet-prefix="test" result-prefix="#default"/>
<xsl:template match="/">
<root>
<xsl:apply-templates select="//text:section"/>
<xsl:apply-templates select="mypath/somenode"/>
</root>
</xsl:template>
<xsl:template match="text:section">
<comment name="{@text:name}">
<xsl:apply-templates/>
</comment>
</xsl:template>
<xsl:template match="somenode">
<somenode>
<xsl:value-of select="."/>
<xsl:apply-templates select="mypath/anothernode"/>
</somenode>
</xsl:template>
<xsl:template match="anothernode">
<anothernode>
<xsl:value-of select="."/>
</anothernode>
</xsl:template>
</xsl:stylesheet>