XML:
<doc>
<Para>
Here some <EmphasizedText emphasisType='b'>words</EmphasizedText> are
<EmphasizedText emphasisType='i'>recursively
<EmphasizedText emphasisType='b'>
emphasized
</EmphasizedText>
</EmphasizedText>.
However, this word is <Superscript>not</Superscript>. This next word is <EmphasizedText>bold</EmphasizedText>. This word is <EmphasizedText emphasisType='u'>underlined</EmphasizedText>.
</Para>
</doc>
XSL:
<xsl:template match="doc">
<html>
<head>
<title>A Document</title>
</head>
<body>
<xsl:apply-templates/>
</body>
</html>
</xsl:template>
<xsl:template match="Para">
<p><xsl:apply-templates/></p>
</xsl:template>
<xsl:template match="EmphasizedText | Superscript | Subscript">
<xsl:choose>
<xsl:when test="not(@emphasisType) or @emphasisType = 'b'">
<b><xsl:apply-templates/></b>
</xsl:when>
<xsl:when test="@emphasisType = 'i'">
<i><xsl:apply-templates/></i>
</xsl:when>
<xsl:when test="@emphasisType = 'u'">
<u><xsl:apply-templates/></u>
</xsl:when>
<xsl:when test="name() = 'Superscript'">
<u><xsl:apply-templates/></u>
</xsl:when>
<xsl:when test="name() = 'Subscript'">
<u><xsl:apply-templates/></u>
</xsl:when>
<xsl

therwise>
<xsl:apply-templates/>
</xsl

therwise>
</xsl:choose>
</xsl:template>