Skip to content

Commit

Permalink
Abbreviate suffixes on cross-spec links
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelhkay committed Dec 4, 2024
1 parent 380ec50 commit 4c7ccbe
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions style/xsl-query-2016.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -743,7 +743,7 @@
<xsl:variable name="div" select="$doc//*[@id=$ref]"/>
<xsl:variable name="nt" select="($doc//*[@def=$ref])[1]"/>
<xsl:variable name="uri" select="replace($doc/document-summary/@uri, '^http:', 'https:')"/>

<xsl:variable name="shortSpec" select="replace(@spec, '40$', '')"/>
<xsl:choose>
<xsl:when test="$div">
<xsl:variable name="linktext">
Expand All @@ -770,7 +770,7 @@
</xsl:choose>
<sup>
<small>
<xsl:value-of select="@spec"/>
<xsl:value-of select="$shortSpec"/>
</small>
</sup>
</xsl:when>
Expand All @@ -787,7 +787,7 @@
</xsl:choose>
<sup>
<small>
<xsl:value-of select="@spec"/>
<xsl:value-of select="$shortSpec"/>
</small>
</sup>
</xsl:when>
Expand All @@ -804,7 +804,7 @@
</xsl:choose>
<sup>
<small>
<xsl:value-of select="@spec"/>
<xsl:value-of select="$shortSpec"/>
</small>
</sup>
</xsl:when>
Expand Down Expand Up @@ -855,7 +855,7 @@
-->
<xsl:variable name="nt" select="($doc//prod[@id=$ref], $doc//prod[.=$ref], $doc//nt[@def=$ref])[1]"/>
<xsl:variable name="uri" select="replace($doc/document-summary/@uri, '^http:', 'https:')"/>

<xsl:variable name="shortSpec" select="replace(@spec, '40$', '')"/>
<xsl:choose>
<xsl:when test="contains(@spec, 'XP') and not($nt)">
<!-- XP and XQ are a special case -->
Expand All @@ -879,7 +879,7 @@
</xsl:choose>
<sup>
<small>
<xsl:value-of select="@spec"/>
<xsl:value-of select="$shortSpec"/>
</small>
</sup>
</xsl:when>
Expand All @@ -906,7 +906,7 @@
</xsl:choose>
<sup>
<small>
<xsl:value-of select="@spec"/>
<xsl:value-of select="$shortSpec"/>
</small>
</sup>
</xsl:when>
Expand All @@ -929,7 +929,7 @@
</xsl:choose>
<sup>
<small>
<xsl:value-of select="@spec"/>
<xsl:value-of select="$shortSpec"/>
</small>
</sup>
</xsl:otherwise>
Expand Down Expand Up @@ -1002,6 +1002,7 @@
<xsl:variable name="doc" select="document(concat('../build/etc/', @spec, '.xml'))"/>
<xsl:variable name="termdef" select="$doc//termdef[@id=$ref]"/>
<xsl:variable name="uri" select="replace($doc/document-summary/@uri, '^http:', 'https:')"/>
<xsl:variable name="shortSpec" select="replace(@spec, '40$', '')"/>

<xsl:choose>
<xsl:when test="not($termdef)">
Expand Down Expand Up @@ -1035,7 +1036,7 @@
</xsl:choose>
<sup>
<small>
<xsl:value-of select="@spec"/>
<xsl:value-of select="$shortSpec"/>
</small>
</sup>
</xsl:when>
Expand All @@ -1052,7 +1053,7 @@
</xsl:choose>
<sup>
<small>
<xsl:value-of select="@spec"/>
<xsl:value-of select="$shortSpec"/>
</small>
</sup>
</xsl:otherwise>
Expand Down

0 comments on commit 4c7ccbe

Please sign in to comment.