This is a simple stylesheet that transforms source <para> and <emphasis> elements into HTML:
<?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:template match="para">
<p><xsl:apply-templates/></p>
</xsl:template>
<xsl:template match="emphasis">
<i><xsl:apply-templates/></i>
</xsl:template>
</xsl:stylesheet>
With this stylesheet, the following XML document:
<?xml version='1.0'?>
<para>This is a <emphasis>test</emphasis>.</para>
Would be transformed into:
<?xml version="1.0" encoding="utf-8"?>
<p>This is a <i>test</i>.</p>
Note that this has been serialized as XML.