|
2 | 2 | XSLT transformation for the XML format defined in RFCs 2629, 7749 and 7991 |
3 | 3 | to HTML |
4 | 4 |
|
5 | | - Copyright (c) 2006- 2023, Julian Reschke ( [email protected]) |
| 5 | + Copyright (c) 2006- 2024, Julian Reschke ( [email protected]) |
6 | 6 | All rights reserved. |
7 | 7 |
|
8 | 8 | Redistribution and use in source and binary forms, with or without |
|
1694 | 1694 | <xsl:text> </xsl:text> |
1695 | 1695 | </xsl:if> |
1696 | 1696 | </xsl:if> |
1697 | | - <xsl:value-of select="$normalized"/> |
| 1697 | + <xsl:choose> |
| 1698 | + <xsl:when test="contains($normalized,' ') or contains($normalized,'‑')"> |
| 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> |
1698 | 1707 | <xsl:if test="$ends-with-ws and $normalized!=''"> |
1699 | 1708 | <xsl:variable name="t"> |
1700 | 1709 | <xsl:for-each select="following-sibling::node()"> |
|
1716 | 1725 | </xsl:if> |
1717 | 1726 | </xsl:template> |
1718 | 1727 |
|
| 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,' ') or contains($word,'‑')"> |
| 1754 | + <span class="nobr"> |
| 1755 | + <xsl:value-of select="translate($word,' ‑',' -')"/> |
| 1756 | + </span> |
| 1757 | + </xsl:when> |
| 1758 | + <xsl:otherwise> |
| 1759 | + <xsl:value-of select="$word"/> |
| 1760 | + </xsl:otherwise> |
| 1761 | + </xsl:choose> |
| 1762 | +</xsl:template> |
1719 | 1763 |
|
1720 | 1764 | <xsl:template match="abstract"> |
1721 | 1765 | <xsl:call-template name="check-no-text-content"/> |
|
7040 | 7084 | <ed:v>rtg</ed:v> |
7041 | 7085 | <ed:v>security</ed:v> |
7042 | 7086 | <ed:v>sec</ed:v> |
7043 | | - <ed:v>transport</ed:v> |
7044 | | - <ed:v>tsv</ed:v> |
| 7087 | + <xsl:if test="$pub-yearmonth < 202406"> |
| 7088 | + <ed:v>transport</ed:v> |
| 7089 | + <ed:v>tsv</ed:v> |
| 7090 | + </xsl:if> |
| 7091 | + <xsl:if test="$pub-yearmonth > 202402"> |
| 7092 | + <ed:v>web and internet transport</ed:v> |
| 7093 | + <ed:v>wit</ed:v> |
| 7094 | + </xsl:if> |
7045 | 7095 | </xsl:variable> |
7046 | 7096 | <xsl:variable name="allowed" select="exslt:node-set($rallowed)"/> |
7047 | 7097 | <xsl:choose> |
@@ -8624,6 +8674,9 @@ ul p { |
8624 | 8674 | .filename, h1, h2, h3, h4 { |
8625 | 8675 | font-family: <xsl:value-of select="$xml2rfc-ext-ff-title"/>; |
8626 | 8676 | } |
| 8677 | +.nobr { |
| 8678 | + white-space: nowrap; |
| 8679 | +} |
8627 | 8680 | <xsl:if test="$has-index">ul.ind, ul.ind ul { |
8628 | 8681 | list-style: none; |
8629 | 8682 | margin-left: 1.5em; |
@@ -12220,11 +12273,11 @@ dd, li, p { |
12220 | 12273 | <xsl:variable name="gen"> |
12221 | 12274 | <xsl:text>http://greenbytes.de/tech/webdav/rfcxml.xslt, </xsl:text> |
12222 | 12275 | <!-- 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: '),'$','')),', ')" /> |
12225 | 12278 | </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: '),'$','')),', ')" /> |
12228 | 12281 | </xsl:if> |
12229 | 12282 | <xsl:variable name="product" select="normalize-space(concat(system-property('xsl:product-name'),' ',system-property('xsl:product-version')))"/> |
12230 | 12283 | <xsl:if test="$product!=''"> |
|
0 commit comments