|
14 | 14 | </xsl:choose> |
15 | 15 | </xsl:template> |
16 | 16 |
|
| 17 | + <xsl:template name="render-ipv4-sort-key"> |
| 18 | + <xsl:param name="address"/> |
| 19 | + <xsl:variable name="octet-1" select="substring-before($address, '.')"/> |
| 20 | + <xsl:variable name="rest-1" select="substring-after($address, '.')"/> |
| 21 | + <xsl:variable name="octet-2" select="substring-before($rest-1, '.')"/> |
| 22 | + <xsl:variable name="rest-2" select="substring-after($rest-1, '.')"/> |
| 23 | + <xsl:variable name="octet-3" select="substring-before($rest-2, '.')"/> |
| 24 | + <xsl:variable name="octet-4" select="substring-after($rest-2, '.')"/> |
| 25 | + <xsl:value-of select="concat( |
| 26 | + '4-', |
| 27 | + format-number(number($octet-1), '000'), |
| 28 | + '.', |
| 29 | + format-number(number($octet-2), '000'), |
| 30 | + '.', |
| 31 | + format-number(number($octet-3), '000'), |
| 32 | + '.', |
| 33 | + format-number(number($octet-4), '000') |
| 34 | + )"/> |
| 35 | + </xsl:template> |
| 36 | + |
| 37 | + <xsl:template name="render-address-sort-key"> |
| 38 | + <xsl:param name="address"/> |
| 39 | + <xsl:variable name="normalized-address" select="normalize-space($address)"/> |
| 40 | + <xsl:choose> |
| 41 | + <xsl:when test="string($normalized-address) = '' or $normalized-address = 'N/A'"> |
| 42 | + <xsl:text></xsl:text> |
| 43 | + </xsl:when> |
| 44 | + <xsl:when test="contains($normalized-address, '.') and not(contains($normalized-address, ':'))"> |
| 45 | + <xsl:call-template name="render-ipv4-sort-key"> |
| 46 | + <xsl:with-param name="address" select="$normalized-address"/> |
| 47 | + </xsl:call-template> |
| 48 | + </xsl:when> |
| 49 | + <xsl:when test="contains($normalized-address, ':')"> |
| 50 | + <xsl:value-of select="concat('6-', translate($normalized-address, 'ABCDEF', 'abcdef'))"/> |
| 51 | + </xsl:when> |
| 52 | + <xsl:otherwise> |
| 53 | + <xsl:value-of select="concat('z-', translate($normalized-address, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'))"/> |
| 54 | + </xsl:otherwise> |
| 55 | + </xsl:choose> |
| 56 | + </xsl:template> |
| 57 | + |
17 | 58 | <xsl:template name="extract-first-dns-name"> |
18 | 59 | <xsl:param name="text"/> |
19 | 60 | <xsl:variable name="normalized-text" select="normalize-space($text)"/> |
|
338 | 379 | <xsl:param name="secondary" select="''"/> |
339 | 380 | <xsl:param name="row-class" select="''"/> |
340 | 381 | <xsl:param name="value-class" select="''"/> |
| 382 | + <xsl:param name="data-valid-from" select="''"/> |
| 383 | + <xsl:param name="data-valid-to" select="''"/> |
341 | 384 | <xsl:if test="string($primary) != '' or string($secondary) != ''"> |
342 | 385 | <div> |
343 | 386 | <xsl:attribute name="class"> |
|
359 | 402 | <xsl:value-of select="$value-class"/> |
360 | 403 | </xsl:if> |
361 | 404 | </xsl:attribute> |
| 405 | + <xsl:if test="string($data-valid-from) != ''"> |
| 406 | + <xsl:attribute name="data-valid-from"> |
| 407 | + <xsl:value-of select="$data-valid-from"/> |
| 408 | + </xsl:attribute> |
| 409 | + </xsl:if> |
| 410 | + <xsl:if test="string($data-valid-to) != ''"> |
| 411 | + <xsl:attribute name="data-valid-to"> |
| 412 | + <xsl:value-of select="$data-valid-to"/> |
| 413 | + </xsl:attribute> |
| 414 | + </xsl:if> |
362 | 415 | <xsl:value-of select="$primary"/> |
363 | 416 | <xsl:if test="string($secondary) != ''"> |
364 | 417 | <xsl:text> – </xsl:text> |
|
0 commit comments