File:  [Public] / html5 / spec / get-toc.xsl
Revision 1.1: download - view: text, annotated - select for diffs
Mon Jul 27 09:41:44 2009 UTC (15 years, 9 months ago) by mike
Branches: MAIN
CVS tags: HEAD
make a dynamic version of the status-annotated TOC

<xsl:stylesheet
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:h="http://www.w3.org/1999/xhtml"
  xmlns="http://www.w3.org/1999/xhtml"
  version='1.0'>
  <xsl:output method="xml"/>
  <xsl:template match="h:html">
    <xsl:processing-instruction name="xml-stylesheet">href="tocmix.xsl" type="text/xml"</xsl:processing-instruction>
    <xsl:text>&#10;</xsl:text>
    <html>
      <xsl:apply-templates />
    </html>
  </xsl:template>
  <xsl:template match="h:head">
    <head>
      <xsl:text>&#10;</xsl:text>
      <title>oops</title>
      <xsl:text>&#10;</xsl:text>
    </head>
  </xsl:template>
  <xsl:template match="h:body">
    <body>
      <xsl:text>&#10;</xsl:text>
      <xsl:for-each select="h:ol[@class='toc']">
        <xsl:copy>
          <xsl:apply-templates select="@* | node()"/>
        </xsl:copy>
      </xsl:for-each>
      <xsl:text>&#10;</xsl:text>
    </body>
  </xsl:template>
  <xsl:template match="node() | @*">
    <xsl:copy>
      <xsl:apply-templates select="@* | node()"/>
    </xsl:copy>
  </xsl:template>
</xsl:stylesheet>

Webmaster