<?xml version="1.0"?>
<!--
      links.xsl, by Jelks Cabaniss
      to be applied to wedig.xml to create the links page -
      a list of all links used in the presentation

      using James Clark's XT

      Usage:  xt wedig.xml links.xsl links.html
-->

<xsl:stylesheet version="1.0"
                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                >
<!--
      Note: there is a bug in the current version of XT (Nov. '99):
      One should be able to put xmlns="http://http://www.w3.org/1999/xhtml"
      up with the other namespace, so that the root element becomes

        <html xmlns="http://http://www.w3.org/1999/xhtml">

      on output.  Well, that part works, but it then adds stuff like

        <p xmlns="">

      (emtpy namespaces on elements directly under body).  So, you
      have to leave out the namespace declaration.  That's OK, the
      pages still validate.  Namespaces are a pain anyway.

      BUT - that namespace is supposedly required for XHTML!  See:
      http://www.w3.org/TR/xhtml1/#docconf

      Note that an output namespace does not apply to old-style HTML.
-->

<xsl:output method="xml" indent="yes"
     omit-xml-declaration="yes"
     doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
     doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" />

<xsl:template match="/">
    <html>
    <head>
	    <title>Links from XHTML Presentation</title>
      <link rel="stylesheet" type="text/css" href="slides.css" />
    </head>
    <body>
        <h1>Links from this Presentation</h1>
        <h2 class="centered">(excluding
        <a href="index.html">opening</a> slide)</h2>
        <ul> <!-- links will be in a "bulleted" list -->
          <xsl:for-each select="//a">
            <!-- exclude 1st slide and page this stylesheet creates -->
           <xsl:if test=
            "not(./ancestor::page[@title='XHTML and the Future of the Web'])
            and not(starts-with(@href,'links.'))">
              <li>
                <xsl:copy>
                  <xsl:apply-templates select="@*"/>
                  <xsl:apply-templates select="node()"/>
                </xsl:copy>
              </li>
            </xsl:if>
          </xsl:for-each>
        </ul>
        <p>This page created by James Clark's <a href="
        http://www.jclark.com/xml/xt.html">XT</a> using
        <a href="links.xsl">this stylesheet</a>.</p>
        <hr/>
    </body>
    </html>
</xsl:template>

<xsl:template match="*|@*">
  <xsl:copy>
    <xsl:apply-templates select="@*"/>
    <xsl:apply-templates select="node()"/>
  </xsl:copy>
</xsl:template>

</xsl:stylesheet>
