play.xsl

<?xml version="1.0"?>
<x:stylesheet 
        xmlns:x="http://www.w3.org/1999/XSL/Transform"
        version="1.0">
    <x:output method="html"/>
    <x:strip-space elements="*"/>

    <x:template match="/PLAY">
        <html>
        <head>
        <link rel="stylesheet" type="text/css" href="play.css"/>
        </head>
        <body>
        <x:apply-templates/>
        </body>
        </html>
    </x:template>

    <x:template match="/PLAY/TITLE">
        <h1><x:apply-templates/></h1>
    </x:template>

    <x:template match="/PLAY/ACT/TITLE">
        <h2><x:apply-templates/></h2>
    </x:template>

    <x:template match="/PLAY/ACT/SCENE/TITLE">
        <h3><x:apply-templates/></h3>
    </x:template>

    <x:template match="SPEECH/STAGEDIR">
        <span class="stagedir">
        <x:text>(</x:text>
        <x:apply-templates/>
        <x:text>)</x:text><br/>
        </span>
    </x:template>

    <x:template match="PERSONAE">
        <hr/>
        <h2><x:value-of select="TITLE"/></h2>
        <ul><x:apply-templates/></ul>
    </x:template>

    <x:template match="PERSONAE/TITLE">
    </x:template>

    <x:template match="ACT">
        <hr/>
        <x:apply-templates/>
    </x:template>

    <x:template match="PERSONA">
        <li><x:apply-templates/></li>
    </x:template>

    <x:template match="PGROUP">
        <li><x:value-of select="GRPDESCR"/></li>
        <ul><x:apply-templates/></ul>
    </x:template>

    <x:template match="PGROUP/PERSONA">
        <li><x:apply-templates/></li>
    </x:template>

    <x:template match="PGROUP/GRPDESCR">
    </x:template>

    <x:template match="SPEECH">
        <p class="speech">
        <span class="speaker">
        <x:value-of select="SPEAKER"/><x:text>: </x:text>
        </span><br/>
        <x:apply-templates/>
        </p>
    </x:template>

    <x:template match="SPEECH/LINE">
        <x:apply-templates/><br/>
    </x:template>

    <x:template match="STAGEDIR">
        <p class="stagedir">
        <x:text>(</x:text>
        <x:apply-templates/>
        <x:text>)</x:text>
        </p>
    </x:template>

    <x:template match="FM">
    </x:template>

    <x:template match="SPEAKER">
    </x:template>

    <x:template match="SCNDESCR">
    </x:template>

    <x:template match="PLAYSUBT">
    </x:template>

</x:stylesheet>