Skip to content

Commit b40f562

Browse files
committed
update stylesheet
1 parent 8dd5852 commit b40f562

File tree

1 file changed

+61
-8
lines changed

1 file changed

+61
-8
lines changed

specs/lib/rfc2629.xslt

Lines changed: 61 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
XSLT transformation for the XML format defined in RFCs 2629, 7749 and 7991
33
to HTML
44

5-
Copyright (c) 2006-2023, Julian Reschke ([email protected])
5+
Copyright (c) 2006-2024, Julian Reschke ([email protected])
66
All rights reserved.
77

88
Redistribution and use in source and binary forms, with or without
@@ -1694,7 +1694,16 @@
16941694
<xsl:text> </xsl:text>
16951695
</xsl:if>
16961696
</xsl:if>
1697-
<xsl:value-of select="$normalized"/>
1697+
<xsl:choose>
1698+
<xsl:when test="contains($normalized,'&#160;') or contains($normalized,'&#8209;')">
1699+
<xsl:call-template name="emit-words">
1700+
<xsl:with-param name="text" select="$normalized"/>
1701+
</xsl:call-template>
1702+
</xsl:when>
1703+
<xsl:otherwise>
1704+
<xsl:value-of select="$normalized"/>
1705+
</xsl:otherwise>
1706+
</xsl:choose>
16981707
<xsl:if test="$ends-with-ws and $normalized!=''">
16991708
<xsl:variable name="t">
17001709
<xsl:for-each select="following-sibling::node()">
@@ -1716,6 +1725,41 @@
17161725
</xsl:if>
17171726
</xsl:template>
17181727

1728+
<!-- emit one word at a time -->
1729+
<xsl:template name="emit-words">
1730+
<xsl:param name="text"/>
1731+
<xsl:choose>
1732+
<xsl:when test="contains($text,' ')">
1733+
<xsl:call-template name="emit-word">
1734+
<xsl:with-param name="word" select="substring-before($text,' ')"/>
1735+
</xsl:call-template>
1736+
<xsl:text> </xsl:text>
1737+
<xsl:call-template name="emit-words">
1738+
<xsl:with-param name="text" select="substring-after($text,' ')"/>
1739+
</xsl:call-template>
1740+
</xsl:when>
1741+
<xsl:otherwise>
1742+
<xsl:call-template name="emit-word">
1743+
<xsl:with-param name="word" select="$text"/>
1744+
</xsl:call-template>
1745+
</xsl:otherwise>
1746+
</xsl:choose>
1747+
</xsl:template>
1748+
1749+
<!-- emit word, potentially wrapping into span/nobr and replacing 'special' characters -->
1750+
<xsl:template name="emit-word">
1751+
<xsl:param name="word"/>
1752+
<xsl:choose>
1753+
<xsl:when test="contains($word,'&#160;') or contains($word,'&#8209;')">
1754+
<span class="nobr">
1755+
<xsl:value-of select="translate($word,'&#160;&#8209;',' -')"/>
1756+
</span>
1757+
</xsl:when>
1758+
<xsl:otherwise>
1759+
<xsl:value-of select="$word"/>
1760+
</xsl:otherwise>
1761+
</xsl:choose>
1762+
</xsl:template>
17191763

17201764
<xsl:template match="abstract">
17211765
<xsl:call-template name="check-no-text-content"/>
@@ -7040,8 +7084,14 @@
70407084
<ed:v>rtg</ed:v>
70417085
<ed:v>security</ed:v>
70427086
<ed:v>sec</ed:v>
7043-
<ed:v>transport</ed:v>
7044-
<ed:v>tsv</ed:v>
7087+
<xsl:if test="$pub-yearmonth &lt; 202406">
7088+
<ed:v>transport</ed:v>
7089+
<ed:v>tsv</ed:v>
7090+
</xsl:if>
7091+
<xsl:if test="$pub-yearmonth &gt; 202402">
7092+
<ed:v>web and internet transport</ed:v>
7093+
<ed:v>wit</ed:v>
7094+
</xsl:if>
70457095
</xsl:variable>
70467096
<xsl:variable name="allowed" select="exslt:node-set($rallowed)"/>
70477097
<xsl:choose>
@@ -8624,6 +8674,9 @@ ul p {
86248674
.filename, h1, h2, h3, h4 {
86258675
font-family: <xsl:value-of select="$xml2rfc-ext-ff-title"/>;
86268676
}
8677+
.nobr {
8678+
white-space: nowrap;
8679+
}
86278680
<xsl:if test="$has-index">ul.ind, ul.ind ul {
86288681
list-style: none;
86298682
margin-left: 1.5em;
@@ -12220,11 +12273,11 @@ dd, li, p {
1222012273
<xsl:variable name="gen">
1222112274
<xsl:text>http://greenbytes.de/tech/webdav/rfcxml.xslt, </xsl:text>
1222212275
<!-- when RCS keyword substitution in place, add version info -->
12223-
<xsl:if test="contains('$Revision: 1.1554 $',':')">
12224-
<xsl:value-of select="concat('Revision ',normalize-space(translate(substring-after('$Revision: 1.1554 $', 'Revision: '),'$','')),', ')" />
12276+
<xsl:if test="contains('$Revision: 1.1565 $',':')">
12277+
<xsl:value-of select="concat('Revision ',normalize-space(translate(substring-after('$Revision: 1.1565 $', 'Revision: '),'$','')),', ')" />
1222512278
</xsl:if>
12226-
<xsl:if test="contains('$Date: 2023/12/10 11:48:18 $',':')">
12227-
<xsl:value-of select="concat(normalize-space(translate(substring-after('$Date: 2023/12/10 11:48:18 $', 'Date: '),'$','')),', ')" />
12279+
<xsl:if test="contains('$Date: 2024/04/11 05:18:39 $',':')">
12280+
<xsl:value-of select="concat(normalize-space(translate(substring-after('$Date: 2024/04/11 05:18:39 $', 'Date: '),'$','')),', ')" />
1222812281
</xsl:if>
1222912282
<xsl:variable name="product" select="normalize-space(concat(system-property('xsl:product-name'),' ',system-property('xsl:product-version')))"/>
1223012283
<xsl:if test="$product!=''">

0 commit comments

Comments
 (0)