Skip to content

Commit

Permalink
Make section headings link to self
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelhkay committed Jan 13, 2025
1 parent 00a1a82 commit 2d4a885
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 87 deletions.
34 changes: 0 additions & 34 deletions specifications/xslt-40/style/diff.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -81,40 +81,6 @@

<xsl:param name="called.by.diffspec" as="xs:integer" select="1"/>

<!-- ==================================================================== -->

<!--<!-\- spec: the specification itself -\->
<xsl:template match="spec">
<html>
<xsl:call-template name="make-lang-attribute"/>
<xsl:call-template name="make-head"/>
<body>
<xsl:apply-templates/>
<xsl:if test="//footnote[not(ancestor::table)]">
<hr/>
<div class="endnotes">
<xsl:text>&#10;</xsl:text>
<h3>
<xsl:call-template name="anchor">
<xsl:with-param name="conditional" select="0"/>
<xsl:with-param name="default.id" select="'endnotes'"/>
</xsl:call-template>
<xsl:text>End Notes</xsl:text>
</h3>
<dl>
<xsl:apply-templates select="//footnote[not(ancestor::table)]"
mode="notes"/>
</dl>
</div>
</xsl:if>
</body>
</html>
</xsl:template>
-->


<!-- ==================================================================== -->

Expand Down
7 changes: 1 addition & 6 deletions specifications/xslt-40/style/xslt-diff.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,7 @@
xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">
<xsl:text>element-syntax-chg</xsl:text>
</xsl:template>

<!--<xsl:template match="*[@mark='yes']" priority="100">
<mark>
<xsl:next-match/>
</mark>
</xsl:template>-->


<!-- following template can be activated to insert paragraph numbers after every para -->
<xsl:template match="p[$show.diff.markup=1]" use-when="false()">
Expand Down
49 changes: 2 additions & 47 deletions specifications/xslt-40/style/xslt.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -526,27 +526,7 @@ constructor. These elements are:</p>
</pre>
</xsl:template>

<!--<xsl:template match="processing-instruction('glossary')">
<dl>
<xsl:for-each select="//termdef[not(ancestor-or-self::*[@diff][1][@diff='del'])]">
<xsl:sort select="lower-case(@term)"/>
<dt>
<a href="#{@id}"><xsl:value-of select="@term"/></a>
</dt>
<dd>
<p>
<xsl:apply-templates/>
</p>
<xsl:if test="@open='true'">
<xsl:variable name="close" select="../following-sibling::p[@role='closetermdef'][1]"/>
<xsl:apply-templates select="../following-sibling::*[$close >> .]"/>
</xsl:if>
</dd>
</xsl:for-each>
</dl>
</xsl:template>-->



<xsl:template match="processing-instruction('xslt-defined-functions')">
<xsl:variable name="content">
<glist>
Expand Down Expand Up @@ -824,32 +804,7 @@ constructor. These elements are:</p>
</a>
</xsl:template>

<!--
<xsl:template match="altlocs">
<p>
<xsl:text>This document is also available </xsl:text>
<xsl:text>in these non-normative formats: </xsl:text>
<xsl:for-each select="loc">
<xsl:if test="position() &gt; 1">
<xsl:if test="last() &gt; 2">
<xsl:text>, </xsl:text>
</xsl:if>
<xsl:if test="last() = 2">
<xsl:text> </xsl:text>
</xsl:if>
</xsl:if>
<xsl:if test="position() = last() and position() &gt; 1">and&#160;</xsl:if>
<!- - next line changed by MHK - ->
<xsl:apply-templates select="."/>
</xsl:for-each>
<xsl:text>.</xsl:text>
</p>
</xsl:template>
<xsl:template match="altlocs/loc">
<a href="{$latest}{@href}"><xsl:value-of select="."/></a>
</xsl:template>
-->


<!-- Links to Bugzilla entries in the form <loc href="bugNNNNN"/> -->

Expand Down
7 changes: 7 additions & 0 deletions style/xmlspec-2016.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -904,6 +904,13 @@
<xsl:text> (Non-Normative)</xsl:text>
</h2>
</xsl:template>

<xsl:template match="div1/head/text() | div2/head/text() | div3/head/text() | div4/head/text() | inform-div1/head/text()">
<!-- insert a link to self, to make the ID value visible for the benefit of anyone wanting to create a link -->
<a href="#{../../@id}" style="text-decoration: none">
<xsl:next-match/>
</a>
</xsl:template>

<xsl:template match="issue/head">
<p class="prefix">
Expand Down

0 comments on commit 2d4a885

Please sign in to comment.