source: rfc2629xslt/rfc2629toHhk.xslt @ 723

Last change on this file since 723 was 713, checked in by julian.reschke@…, 10 years ago

upgrade to latest version of rfc2629.xslt/xml2rfc.tcl; remove now superfluous empty <organization/> elements in references

  • Property svn:eol-style set to native
File size: 2.3 KB
Line 
1<!--
2    XSLT transformation from RFC2629 XML format to Microsoft HTML Help Keyword (Index) File
3
4    Copyright (c) 2003 Julian F. Reschke (julian.reschke@greenbytes.de)
5
6    placed into the public domain
7
8    change history:
9
10    2003-11-16  julian.reschke@greenbytes.de
11
12    Initial release.
13-->
14
15<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
16                version="1.0"
17>
18
19<xsl:param name="basename" />
20
21<xsl:include href="rfc2629.xslt" />
22
23<xsl:template match="/" priority="9">
24<html>
25  <head>
26    <meta name="generator" content="rfc2629toHhk.xslt $Id: rfc2629toHhk.xslt,v 1.6 2003/11/16 14:52:40 jre Exp $" />
27  </head>
28  <body>
29    <ul>
30      <xsl:for-each select="//iref">
31        <xsl:sort select="@item" />
32        <xsl:if test="generate-id(.) = generate-id(key('index-item',@item))">
33          <li>
34            <xsl:variable name="num"><xsl:number level="any" /></xsl:variable>
35            <object type="text/sitemap">
36              <param name="Keyword" value="{@item}" />
37              <xsl:for-each select="key('index-item',@item)[not(@subitem) or @subitem='']">
38                <xsl:variable name="sec"><xsl:call-template name="get-section-number" /></xsl:variable>
39                <param name="Name" value="{$sec} {ancestor::section[1]/@title}" />
40                <param name="Local" value="{$basename}.html#rfc.section.{$sec}" />
41              </xsl:for-each>
42              <xsl:if test="key('index-item',@item)[@subitem!='']">
43                <param name="See Also" value="{@item}" />
44              </xsl:if>
45            </object>
46            <xsl:if test="key('index-item',@item)[@subitem!='']">
47              <ul>
48                <xsl:for-each select="key('index-item',@item)[@subitem!='']">
49                  <li>
50                    <object type="text/sitemap">
51                      <param name="Keyword" value="{@subitem}" />
52                      <xsl:variable name="sec"><xsl:call-template name="get-section-number" /></xsl:variable>
53                      <param name="Name" value="{$sec} {ancestor::section[1]/@title}" />
54                      <param name="Local" value="{$basename}.html#rfc.section.{$sec}" />
55                    </object>
56                  </li>
57                </xsl:for-each>
58              </ul>
59            </xsl:if>
60          </li>
61        </xsl:if>
62      </xsl:for-each>
63    </ul>
64  </body>
65</html>
66</xsl:template>
67
68</xsl:transform>
Note: See TracBrowser for help on using the repository browser.