<?xml version="1.0" encoding="UTF-8"?>
<!-- $Revision: 10 $ -->
<!-- $LastChangedDate: 2009-02-14 17:01:26 -0500 (Sat, 14 Feb 2009) $ -->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output method="html"/>

    <xsl:template match="/">
        <html>
            <head>
                <title><xsl:value-of select="/html/head/title"/></title>
            </head>
            <body>
                <xsl:apply-templates select="/html/body"/>
            </body>
        </html>
    </xsl:template>

    <xsl:template match="/html/body">
        <!-- The post part -->
        <xsl:apply-templates select="//div[@class='article']"/>

        <!-- Comments -->
        <xsl:apply-templates select="//div[@class='commentTop newcomment']"/>
        <hr/>

        <!-- And, finally, the footer -->
        <xsl:copy-of select="//div[@id='footer']/div[@class='rightcontent']"/>
    </xsl:template>

    <xsl:template match="div[@class='article']">
        <!-- article title -->
        <xsl:copy-of select="div[@class='generaltitle']/div[@class='title']"/>

        <!-- article details: who posted it, dept, etc. -->
        <xsl:copy-of select="div[@class='details']"/>

        <!-- the post text -->
        <xsl:copy-of select="div[@class='body']/div[@class='intro']"/>

        <!-- the "read more below" stuff, if any -->
        <xsl:copy-of select="div[@class='body']/div[@class='full']"/>
    </xsl:template>

    <xsl:template match="div[@class='commentTop newcomment']">
        <hr/>
        <b><xsl:value-of select="div[@class='title']"/></b><br/>
        <small><xsl:value-of select="div[@class='details']"/></small>

        <!-- the commentBody div is a sibling of this one -->
        <p><xsl:apply-templates select="../div[@class='commentBody']"/></p>
        <!--
        <p><xsl:copy-of select="../div[@class='commentBody']"/></p>
        -->
    </xsl:template>

    <xsl:template match="div[@class='commentBody']">
        <!--<xsl:apply-templates select=".//div[@class='quote']"/>-->
        <xsl:copy-of select="."/>
    </xsl:template>

    <xsl:template match="div[@class='quote']">
        <blockquote><xsl:copy-of select="."/></blockquote>
    </xsl:template>

</xsl:stylesheet>

