<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE stylesheet [
    <!ENTITY nbsp "&#160;">
]>
<stylesheet
    xmlns="http://www.w3.org/1999/XSL/Transform"
    version="1.0"
    >

  <!--* Generate mgp slides *-->
  <output method="text" />

 <!--* strip white space from containers that don't have PCDATA in
     * them; this list may not be complete.
     * XSLT should have a way of doing this based on the DTD.
     *-->
 <strip-space
     elements="talk list slide code"
 />

  <template match="talk">%include "default.mgp"<text>
</text>
<apply-templates/><text>
%page

[end]

</text></template>

  <!--* *-->
  <template match="slide"><text>%page
%prefix "  "
</text><apply-templates/>
  </template>

  <template match="slide" mode="ofN">
    <if test="position() = last()">
      <value-of select="position()"/>
    </if>
  </template>

  <template match="title"><text>
</text>
    <text>Slide </text>
    <number count="slide"/>
    <text> of </text>
    <apply-templates select="//slide" mode="ofN"/>
    <text>: </text><apply-templates/><text>
</text></template>

  <template match="list"><apply-templates/></template>

  <template match="code"><apply-templates/></template>
  <template match="tt"><text>&#38;TT </text><apply-templates/><text>
</text></template>

  <template match="item">
    <if test="../@actuate = 'pause'">
      <text>%pause
</text>
    </if>
    <choose>
      <when test="ancestor::code">
	<text>%font "typewriter"
    </text>
      </when>
      <otherwise>
	<text>	</text>
      </otherwise>
    </choose>

    <apply-templates/><text>
</text></template>

  <template match="image"><text>%image "</text>
  <apply-templates/><text>"
</text></template>

  <template match="run"><text>%system "</text><apply-templates/><text>"
</text></template>

</stylesheet>

