Skip to content

Commit

Permalink
Merge pull request #1164 from michaelhkay/1155-Glossary-consistency
Browse files Browse the repository at this point in the history
1155 Consistency of glossaries
  • Loading branch information
ndw authored Apr 23, 2024
2 parents d073f23 + 0e2414a commit 171147c
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 19 deletions.
4 changes: 2 additions & 2 deletions specifications/xpath-datamodel-40/style/data-model.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@
</xsl:template>
-->

<xsl:template match="processing-instruction('glossary')">
<!--<xsl:template match="processing-instruction('glossary')">
<table class="glossarytab">
<xsl:for-each select="//termdef[not(ancestor-or-self::*[@diff][1][@diff='del'])]">
<xsl:sort select="@term"/>
Expand All @@ -214,7 +214,7 @@
</tr>
</xsl:for-each>
</table>
</xsl:template>
</xsl:template>-->

<!-- changed templates to auto generate an appendix with a list
of links to open issues. -->
Expand Down
5 changes: 5 additions & 0 deletions specifications/xpath-functions-40/src/xpath-functions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11571,6 +11571,11 @@ ISBN 0 521 77752 6.</bibl>
<?doc schema-for-csv.xsd?>
</div2>
</div1>

<inform-div1 id="glossary">
<head>Glossary</head>
<?glossary?>
</inform-div1>

<inform-div1 id="other-functions">
<head>Other Functions</head>
Expand Down
15 changes: 2 additions & 13 deletions specifications/xslt-40/style/xslt.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ constructor. These elements are:</p>
</pre>
</xsl:template>

<xsl:template match="processing-instruction('glossary')">
<!--<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)"/>
Expand All @@ -495,18 +495,7 @@ constructor. These elements are:</p>
</dd>
</xsl:for-each>
</dl>
<!--
<table width="100%" cellspacing="10">
<xsl:for-each select="//termdef[not(ancestor-or-self::*[@diff][1][@diff='del'])]">
<xsl:sort select="@term"/>
<tr>
<td width="20%" valign="top"><a href="#{@id}"><xsl:value-of select="@term"/></a></td>
<td valign="top"><p><xsl:apply-templates/></p></td>
</tr>
</xsl:for-each>
</table>
-->
</xsl:template>
</xsl:template>-->


<xsl:template match="processing-instruction('xslt-defined-functions')">
Expand Down
20 changes: 16 additions & 4 deletions style/xsl-query-2016.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -473,13 +473,25 @@

<xsl:template match="processing-instruction('glossary')">
<dl>
<xsl:apply-templates select="//termdef" mode="glossary-list">
<xsl:for-each select="//termdef[not(ancestor-or-self::*[@diff][1][@diff='del'])]">
<xsl:sort select="@term" data-type="text" order="ascending" lang="en"/>
</xsl:apply-templates>
<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="termdef" mode="glossary-list">
<!--<xsl:template match="termdef" mode="glossary-list">
<xsl:variable name="diff_governor" select="ancestor-or-self::*[@diff][1]"/>
<xsl:variable name="diff_effect" select="my:diff-markup-effect($diff_governor)"/>
<xsl:choose>
Expand Down Expand Up @@ -518,7 +530,7 @@
</xsl:when>
</xsl:choose>
</xsl:template>
</xsl:template>-->

<!-- ====================================================================== -->
<!-- Automatic lists of impl def/dep features -->
Expand Down

0 comments on commit 171147c

Please sign in to comment.