<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output method="html"/>
    <xsl:template match="/">
        <html>
            <body>
                <xsl:apply-templates/>
            </body>
        </html>
    </xsl:template>

    <xsl:template match="figure">
        <p align="center">
            <img>
                <xsl:attribute name="src">
                    <xsl:value-of select="@src"/>
                </xsl:attribute>
                <xsl:attribute name="width">
                    <xsl:value-of select="@width"/>
                </xsl:attribute>
                <xsl:attribute name="height">
                    <xsl:value-of select="@height"/>
                </xsl:attribute>
            </img>
        </p>
    </xsl:template>
    
    <xsl:template match="front">
        <h1 align="center">
            <xsl:apply-templates/>
        </h1>
    </xsl:template>
   
    <xsl:template match="party">
        <h2 align="center">
            <xsl:value-of select="@type"/>
        </h2>
    </xsl:template>

<xsl:template match="body">
<h3><xsl:value-of select="heading"/></h3>
<p><b>For: </b><xsl:value-of select="for"/></p>
<p><b>When: </b> <xsl:value-of select="when"/></p>
<p><b>Where: </b><xsl:value-of select="where"/></p>
<p><b>RSVP: </b><xsl:value-of select="rsvp"/></p>
<p><xsl:value-of select="comments"/></p>
</xsl:template>
</xsl:stylesheet>

