Changeset 704 for rfc2629xslt/rfc2629toXHTML.xslt
- Timestamp:
- 02/10/09 10:46:42 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
rfc2629xslt/rfc2629toXHTML.xslt
r689 r704 7 7 <xsl:output doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" encoding="UTF-8" method="xml"/> 8 8 9 <!-- process some of the processing instructions supported by Marshall T. Rose's10 xml2rfc sofware, see <http://xml.resource.org/> -->11 12 <!-- delimiters in PIs -->13 <xsl:variable name="quote-chars">"'</xsl:variable>14 15 9 <!-- rfc comments PI --> 16 10 17 <xsl:param name="xml2rfc-comments" select="substring-after( translate(/processing-instruction('rfc')[contains(.,'comments=')], concat($quote-chars,' '), ''), 'comments=')"/> 11 <xsl:param name="xml2rfc-comments"> 12 <xsl:call-template name="parse-pis"> 13 <xsl:with-param name="nodes" select="/processing-instruction('rfc')"/> 14 <xsl:with-param name="attr" select="'comments'"/> 15 <xsl:with-param name="default" select="'no'"/> 16 </xsl:call-template> 17 </xsl:param> 18 18 19 19 <!-- rfc compact PI --> 20 20 21 <xsl:param name="xml2rfc-compact" select="substring-after( translate(/processing-instruction('rfc')[contains(.,'compact=')], concat($quote-chars,' '), ''), 'compact=')"/> 21 <xsl:param name="xml2rfc-compact"> 22 <xsl:call-template name="parse-pis"> 23 <xsl:with-param name="nodes" select="/processing-instruction('rfc')"/> 24 <xsl:with-param name="attr" select="'compact'"/> 25 <xsl:with-param name="default" select="$xml2rfc-rfcedstyle"/> 26 </xsl:call-template> 27 </xsl:param> 22 28 23 29 <!-- rfc footer PI --> 24 30 25 <xsl:param name="xml2rfc-footer" select="substring-after( translate(/processing-instruction('rfc')[contains(.,'footer=')], concat($quote-chars,' '), ''), 'footer=')"/> 31 <xsl:param name="xml2rfc-footer"> 32 <xsl:call-template name="parse-pis"> 33 <xsl:with-param name="nodes" select="/processing-instruction('rfc')"/> 34 <xsl:with-param name="attr" select="'footer'"/> 35 </xsl:call-template> 36 </xsl:param> 26 37 27 38 <!-- rfc header PI --> 28 39 29 <xsl:param name="xml2rfc-header" select="substring-after( translate(/processing-instruction('rfc')[contains(.,'header=')], concat($quote-chars,' '), ''), 'header=')"/> 40 <xsl:param name="xml2rfc-header"> 41 <xsl:call-template name="parse-pis"> 42 <xsl:with-param name="nodes" select="/processing-instruction('rfc')"/> 43 <xsl:with-param name="attr" select="'header'"/> 44 </xsl:call-template> 45 </xsl:param> 30 46 31 47 <!-- rfc inline PI --> 32 48 33 <xsl:param name="xml2rfc-inline" select="substring-after( translate(/processing-instruction('rfc')[contains(.,'inline=')], concat($quote-chars,' '), ''), 'inline=')"/> 34 35 <!-- rfc strict PI --> 36 37 <xsl:param name="xml2rfc-strict" select="substring-after( translate(/processing-instruction('rfc')[contains(.,'strict=')], concat($quote-chars,' '), ''), 'strict=')"/> 49 <xsl:param name="xml2rfc-inline"> 50 <xsl:call-template name="parse-pis"> 51 <xsl:with-param name="nodes" select="/processing-instruction('rfc')"/> 52 <xsl:with-param name="attr" select="'inline'"/> 53 <xsl:with-param name="default" select="'no'"/> 54 </xsl:call-template> 55 </xsl:param> 38 56 39 57 <!-- include a table of contents if a processing instruction <?rfc?> 40 58 exists with contents toc="yes". Can be overriden by an XSLT parameter --> 41 59 42 <xsl:param name="xml2rfc-toc" select="substring-after( translate(/processing-instruction('rfc')[contains(.,'toc=')], concat($quote-chars,' '), ''), 'toc=')"/> 60 <xsl:param name="xml2rfc-toc"> 61 <xsl:call-template name="parse-pis"> 62 <xsl:with-param name="nodes" select="/processing-instruction('rfc')"/> 63 <xsl:with-param name="attr" select="'toc'"/> 64 <xsl:with-param name="default" select="'no'"/> 65 </xsl:call-template> 66 </xsl:param> 43 67 44 68 <!-- optional tocdepth--> 45 69 46 <xsl:param name="xml2rfc-tocdepth" select="substring-after( translate(/processing-instruction('rfc')[contains(.,'tocdepth=')], concat($quote-chars,' '), ''), 'tocdepth=')"/> 70 <xsl:param name="xml2rfc-tocdepth"> 71 <xsl:call-template name="parse-pis"> 72 <xsl:with-param name="nodes" select="/processing-instruction('rfc')"/> 73 <xsl:with-param name="attr" select="'tocdepth'"/> 74 <xsl:with-param name="default" select="'3'"/> 75 </xsl:call-template> 76 </xsl:param> 47 77 48 78 <xsl:variable name="parsedTocDepth"> … … 60 90 exists with contents tocblock="no". Can be overriden by an XSLT parameter --> 61 91 62 <xsl:param name="xml2rfc-topblock" select="substring-after( translate(/processing-instruction('rfc')[contains(.,'topblock=')], concat($quote-chars,' '), ''), 'topblock=')"/> 92 <xsl:param name="xml2rfc-topblock"> 93 <xsl:call-template name="parse-pis"> 94 <xsl:with-param name="nodes" select="/processing-instruction('rfc')"/> 95 <xsl:with-param name="attr" select="'topblock'"/> 96 <xsl:with-param name="default" select="'yes'"/> 97 </xsl:call-template> 98 </xsl:param> 63 99 64 100 <!-- Format to the RFC Editor's taste --> 65 101 66 <xsl:param name="xml2rfc-rfcedstyle" select="substring-after( translate(/processing-instruction('rfc')[contains(.,'rfcedstyle=')], concat($quote-chars,' '), ''), 'rfcedstyle=')"/> 102 <xsl:param name="xml2rfc-rfcedstyle"> 103 <xsl:call-template name="parse-pis"> 104 <xsl:with-param name="nodes" select="/processing-instruction('rfc')"/> 105 <xsl:with-param name="attr" select="'rfcedstyle'"/> 106 <xsl:with-param name="default" select="'no'"/> 107 </xsl:call-template> 108 </xsl:param> 109 110 <!-- the name of an automatically inserted references section --> 111 112 <xsl:param name="xml2rfc-refparent"> 113 <xsl:call-template name="parse-pis"> 114 <xsl:with-param name="nodes" select="/processing-instruction('rfc')"/> 115 <xsl:with-param name="attr" select="'refparent'"/> 116 <xsl:with-param name="default" select="'References'"/> 117 </xsl:call-template> 118 </xsl:param> 67 119 68 120 <!-- use symbolic reference names instead of numeric ones unless a processing instruction <?rfc?> 69 121 exists with contents symrefs="no". Can be overriden by an XSLT parameter --> 70 122 71 <xsl:param name="xml2rfc-symrefs" select="substring-after( translate(/processing-instruction('rfc')[contains(.,'symrefs=')], concat($quote-chars,' '), ''), 'symrefs=')"/> 123 <xsl:param name="xml2rfc-symrefs"> 124 <xsl:call-template name="parse-pis"> 125 <xsl:with-param name="nodes" select="/processing-instruction('rfc')"/> 126 <xsl:with-param name="attr" select="'symrefs'"/> 127 <xsl:with-param name="default" select="'yes'"/> 128 </xsl:call-template> 129 </xsl:param> 72 130 73 131 <!-- sort references if a processing instruction <?rfc?> 74 132 exists with contents sortrefs="yes". Can be overriden by an XSLT parameter --> 75 133 76 <xsl:param name="xml2rfc-sortrefs" select="substring-after( translate(/processing-instruction('rfc')[contains(.,'sortrefs=')], concat($quote-chars,' '), ''), 'sortrefs=')"/> 134 <xsl:param name="xml2rfc-sortrefs"> 135 <xsl:call-template name="parse-pis"> 136 <xsl:with-param name="nodes" select="/processing-instruction('rfc')"/> 137 <xsl:with-param name="attr" select="'sortrefs'"/> 138 <xsl:with-param name="default" select="'no'"/> 139 </xsl:call-template> 140 </xsl:param> 77 141 78 142 <!-- insert editing marks if a processing instruction <?rfc?> 79 143 exists with contents editing="yes". Can be overriden by an XSLT parameter --> 80 144 81 <xsl:param name="xml2rfc-editing" select="substring-after( translate(/processing-instruction('rfc')[contains(.,'editing=')], concat($quote-chars,' '), ''), 'editing=')"/> 145 <xsl:param name="xml2rfc-editing"> 146 <xsl:call-template name="parse-pis"> 147 <xsl:with-param name="nodes" select="/processing-instruction('rfc')"/> 148 <xsl:with-param name="attr" select="'editing'"/> 149 <xsl:with-param name="default" select="'no'"/> 150 </xsl:call-template> 151 </xsl:param> 82 152 83 153 <!-- make it a private paper --> 84 154 85 <xsl:param name="xml2rfc-private" select="substring-after( translate(/processing-instruction('rfc')[contains(.,'private=')], $quote-chars, ''), 'private=')"/> 155 <xsl:param name="xml2rfc-private"> 156 <xsl:call-template name="parse-pis"> 157 <xsl:with-param name="nodes" select="/processing-instruction('rfc')"/> 158 <xsl:with-param name="attr" select="'private'"/> 159 </xsl:call-template> 160 </xsl:param> 86 161 87 162 <!-- background image? --> 88 163 89 <xsl:param name="xml2rfc-background" select="substring-after( translate(/processing-instruction('rfc')[contains(.,'background=')], $quote-chars, ''), 'background=')"/> 164 <xsl:param name="xml2rfc-background"> 165 <xsl:call-template name="parse-pis"> 166 <xsl:with-param name="nodes" select="/processing-instruction('rfc')"/> 167 <xsl:with-param name="attr" select="'background'"/> 168 </xsl:call-template> 169 </xsl:param> 90 170 91 171 <!-- extension for XML parsing in artwork --> 92 172 93 <xsl:param name="xml2rfc-ext-parse-xml-in-artwork" select="substring-after( translate(/processing-instruction('rfc-ext')[contains(.,'parse-xml-in-artwork=')], concat($quote-chars,' '), ''), 'parse-xml-in-artwork=')"/> 173 <xsl:param name="xml2rfc-ext-parse-xml-in-artwork"> 174 <xsl:call-template name="parse-pis"> 175 <xsl:with-param name="nodes" select="/processing-instruction('rfc-ext')"/> 176 <xsl:with-param name="attr" select="'parse-xml-in-artwork'"/> 177 <xsl:with-param name="default" select="'no'"/> 178 </xsl:call-template> 179 </xsl:param> 94 180 95 181 <!-- extension for excluding DCMI properties in meta tag (RFC2731) --> 96 182 97 <xsl:param name="xml2rfc-ext-support-rfc2731" select="substring-after( translate(/processing-instruction('rfc-ext')[contains(.,'support-rfc2731=')], concat($quote-chars,' '), ''), 'support-rfc2731=')"/> 183 <xsl:param name="xml2rfc-ext-support-rfc2731"> 184 <xsl:call-template name="parse-pis"> 185 <xsl:with-param name="nodes" select="/processing-instruction('rfc-ext')"/> 186 <xsl:with-param name="attr" select="'support-rfc2731'"/> 187 <xsl:with-param name="default" select="'yes'"/> 188 </xsl:call-template> 189 </xsl:param> 98 190 99 191 <!-- extension for allowing markup inside artwork --> 100 192 101 <xsl:param name="xml2rfc-ext-allow-markup-in-artwork" select="substring-after( translate(/processing-instruction('rfc-ext')[contains(.,'allow-markup-in-artwork=')], concat($quote-chars,' '), ''), 'allow-markup-in-artwork=')"/> 193 <xsl:param name="xml2rfc-ext-allow-markup-in-artwork"> 194 <xsl:call-template name="parse-pis"> 195 <xsl:with-param name="nodes" select="/processing-instruction('rfc-ext')"/> 196 <xsl:with-param name="attr" select="'allow-markup-in-artwork'"/> 197 <xsl:with-param name="default" select="'no'"/> 198 </xsl:call-template> 199 </xsl:param> 102 200 103 201 <!-- extension for including references into index --> 104 202 105 <xsl:param name="xml2rfc-ext-include-references-in-index" select="substring-after( translate(/processing-instruction('rfc-ext')[contains(.,'include-references-in-index=')], concat($quote-chars,' '), ''), 'include-references-in-index=')"/> 203 <xsl:param name="xml2rfc-ext-include-references-in-index"> 204 <xsl:call-template name="parse-pis"> 205 <xsl:with-param name="nodes" select="/processing-instruction('rfc-ext')"/> 206 <xsl:with-param name="attr" select="'include-references-in-index'"/> 207 <xsl:with-param name="default" select="'no'"/> 208 </xsl:call-template> 209 </xsl:param> 106 210 107 211 <!-- position of author's section --> 108 212 109 <xsl:param name="xml2rfc-ext-authors-section" select="substring-after( translate(/processing-instruction('rfc-ext')[contains(.,'authors-section=')], concat($quote-chars,' '), ''), 'authors-section=')"/> 213 <xsl:param name="xml2rfc-ext-authors-section"> 214 <xsl:call-template name="parse-pis"> 215 <xsl:with-param name="nodes" select="/processing-instruction('rfc-ext')"/> 216 <xsl:with-param name="attr" select="'authors-section'"/> 217 </xsl:call-template> 218 </xsl:param> 110 219 111 220 <!-- justification? --> 112 221 113 <xsl:param name="xml2rfc-ext-justification" select="substring-after( translate(/processing-instruction('rfc-ext')[contains(.,'justification=')], concat($quote-chars,' '), ''), 'justification=')"/> 222 <xsl:param name="xml2rfc-ext-justification"> 223 <xsl:call-template name="parse-pis"> 224 <xsl:with-param name="nodes" select="/processing-instruction('rfc-ext')"/> 225 <xsl:with-param name="attr" select="'justification'"/> 226 <xsl:with-param name="default" select="'no'"/> 227 </xsl:call-template> 228 </xsl:param> 229 230 <!-- switch for doublesided layout --> 231 232 <xsl:param name="xml2rfc-ext-duplex"> 233 <xsl:call-template name="parse-pis"> 234 <xsl:with-param name="nodes" select="/processing-instruction('rfc-ext')"/> 235 <xsl:with-param name="attr" select="'duplex'"/> 236 <xsl:with-param name="default" select="'no'"/> 237 </xsl:call-template> 238 </xsl:param> 114 239 115 240 <!-- trailing dots in section numbers --> 116 241 117 <xsl:param name="xml2rfc-ext-sec-no-trailing-dots" select="substring-after( translate(/processing-instruction('rfc-ext')[contains(.,'sec-no-trailing-dots=')], concat($quote-chars,' '), ''), 'sec-no-trailing-dots=')"/> 242 <xsl:param name="xml2rfc-ext-sec-no-trailing-dots"> 243 <xsl:call-template name="parse-pis"> 244 <xsl:with-param name="nodes" select="/processing-instruction('rfc-ext')"/> 245 <xsl:with-param name="attr" select="'sec-no-trailing-dots'"/> 246 </xsl:call-template> 247 </xsl:param> 118 248 119 249 <!-- choose whether or not to do mailto links --> 120 250 121 <xsl:param name="xml2rfc-linkmailto" select="substring-after( translate(/processing-instruction('rfc')[contains(.,'linkmailto=')], concat($quote-chars,' '), ''), 'linkmailto=')"/> 122 251 <xsl:param name="xml2rfc-linkmailto"> 252 <xsl:call-template name="parse-pis"> 253 <xsl:with-param name="nodes" select="/processing-instruction('rfc-ext')"/> 254 <xsl:with-param name="attr" select="'linkmailto'"/> 255 <xsl:with-param name="default" select="'yes'"/> 256 </xsl:call-template> 257 </xsl:param> 123 258 124 259 <!-- iprnotified switch --> 125 260 126 <xsl:param name="xml2rfc-iprnotified" select="substring-after( translate(/processing-instruction('rfc')[contains(.,'iprnotified=')], concat($quote-chars,' '), ''), 'iprnotified=')"/> 261 <xsl:param name="xml2rfc-iprnotified"> 262 <xsl:call-template name="parse-pis"> 263 <xsl:with-param name="nodes" select="/processing-instruction('rfc')"/> 264 <xsl:with-param name="attr" select="'iprnotified'"/> 265 <xsl:with-param name="default" select="'no'"/> 266 </xsl:call-template> 267 </xsl:param> 127 268 128 269 <!-- URL templates for RFCs and Internet Drafts. --> … … 175 316 <xsl:variable name="ipr-rfc3667" select="( /rfc/@number > 3708) or not( (/rfc/@ipr = 'full2026') or (/rfc/@ipr = 'noDerivativeWorks2026') or (/rfc/@ipr = 'noDerivativeWorksNow') or (/rfc/@ipr = 'none') or (/rfc/@ipr = '') or not(/rfc/@ipr) )"/> 176 317 177 <xsl:variable name="ipr-rfc4748" select="( $ipr-rfc3667 and ( (/rfc/@number > 4671) or ($xml2rfc-ext-pub-year > 2006) or ($xml2rfc-ext-pub-year > 2005 and $xml2rfc-ext-pub-month-numeric >= 11) ) )"/> 178 179 <xsl:variable name="ipr-2007-08" select="( $ipr-rfc4748 and ( (/rfc/@number > 5000 and /rfc/@number != 5020 and /rfc/@number != 5021 and /rfc/@number != 5034 and /rfc/@number != 5052 and /rfc/@number != 5065 and /rfc/@number != 5094) or ($xml2rfc-ext-pub-year >= 2008) or (not(/rfc/@number) and $xml2rfc-ext-pub-year >= 2007 and $xml2rfc-ext-pub-month-numeric >= 9) ) )"/> 180 181 <xsl:variable name="ipr-2008-11" select="( /rfc/@number and ($xml2rfc-ext-pub-year >= 2009 or ($xml2rfc-ext-pub-year >= 2008 and $xml2rfc-ext-pub-month-numeric >= 11)) ) or ( /rfc/@ipr = 'trust200811' or /rfc/@ipr = 'noModificationTrust200811' or /rfc/@ipr = 'noDerivativesTrust200902' or /rfc/@ipr = 'trust200902' or /rfc/@ipr = 'noModificationTrust200902' or /rfc/@ipr = 'noDerivativesTrust200902' or /rfc/@ipr = 'pre5378Trust200902' )"/> 182 183 <xsl:variable name="ipr-2009-02" select="( $ipr-2008-11 and ($xml2rfc-ext-pub-year >= 2010 or ($xml2rfc-ext-pub-year >= 2009 and $xml2rfc-ext-pub-month-numeric >= 02)) )"/> 318 <xsl:variable name="rfcno" select="/rfc/@number"/> 319 320 <xsl:variable name="ipr-rfc4748" select="( $ipr-rfc3667 and ( $rfcno >= 4715 and ( $rfcno != 4718 and $rfcno != 4735 and $rfcno != 4749 )) or ( $rfcno=4578 or $rfcno=4582 or $rfcno=4583 or $rfcno=4628 or $rfcno=4629 or $rfcno=4639 or $rfcno=4651 or $rfcno=4682 or $rfcno=4684 or $rfcno=4695 or $rfcno=4696 ) or ( not(/rfc/@number) and $pub-yearmonth >= 200611) )"/> 321 322 <xsl:variable name="ipr-2007-08" select="( $ipr-rfc4748 and ( ($rfcno > 5000 and $rfcno != 5020 and $rfcno != 5021 and $rfcno != 5034 and $rfcno != 5052 and $rfcno != 5065 and $rfcno != 5094) or ($xml2rfc-ext-pub-year >= 2008) or (not(/rfc/@number) and $pub-yearmonth >= 200709) ) )"/> 323 324 <xsl:variable name="ipr-2008-11" select="( /rfc/@number and $pub-yearmonth >= 200811 ) or ( /rfc/@ipr = 'trust200811' or /rfc/@ipr = 'noModificationTrust200811' or /rfc/@ipr = 'noDerivativesTrust200902' or /rfc/@ipr = 'trust200902' or /rfc/@ipr = 'noModificationTrust200902' or /rfc/@ipr = 'noDerivativesTrust200902' or /rfc/@ipr = 'pre5378Trust200902' )"/> 325 326 <xsl:variable name="ipr-2009-02" select="( $ipr-2008-11 and $pub-yearmonth >= 200902 )"/> 327 328 <!-- this makes the Sep 2009 TLP text depend on the publication date to be >= 2009-12 329 for IDs, and around 2009-09 for RFCs--> 330 <xsl:variable name="ipr-2009-09" select="( ( not(/rfc/@number) and $pub-yearmonth >= 200912 ) or ( /rfc/@number and $pub-yearmonth >= 200909 and $rfcno!=5582 and $rfcno!=5621 and $rfcno!=5632 and $rfcno!=5645 and $rfcno!=5646 and $rfcno!=5681 ) )"/> 184 331 185 332 <!-- see http://mailman.rfc-editor.org/pipermail/rfc-interest/2009-June/001373.html --> 186 <xsl:variable name="abstract-first" select="( /rfc/@number and ( $xml2rfc-ext-pub-year >= 2010 or ($xml2rfc-ext-pub-year >= 2009 and $xml2rfc-ext-pub-month-numeric >= 07) ) )"/> 333 <!-- for IDs, implement the change as 2009-12 --> 334 <xsl:variable name="abstract-first" select="( (/rfc/@number and $pub-yearmonth >= 200907) or (not(/rfc/@number) and $pub-yearmonth >= 200912) )"/> 187 335 188 336 <!-- funding switch --> 189 <xsl:variable name="funding0" select="( /rfc/@number> 2499) or (not(/rfc/@number) and /rfc/@docName and $xml2rfc-ext-pub-year >= 1999 )"/>190 191 <xsl:variable name="funding1" select="( /rfc/@number> 4320) or (not(/rfc/@number) and /rfc/@docName and $xml2rfc-ext-pub-year >= 2006 )"/>337 <xsl:variable name="funding0" select="( $rfcno > 2499) or (not(/rfc/@number) and /rfc/@docName and $xml2rfc-ext-pub-year >= 1999 )"/> 338 339 <xsl:variable name="funding1" select="( $rfcno > 4320) or (not(/rfc/@number) and /rfc/@docName and $xml2rfc-ext-pub-year >= 2006 )"/> 192 340 193 341 <xsl:variable name="no-funding" select="$ipr-2007-08"/> … … 261 409 <xsl:otherwise/> 262 410 </xsl:choose> 411 </xsl:template> 412 413 <xsl:template name="insert-begin-code"> 414 <xsl:if test="@x:isCodeComponent='yes'"> 415 <pre xmlns="http://www.w3.org/1999/xhtml" class="ccmarker cct"><span><CODE BEGINS></span></pre> 416 </xsl:if> 417 </xsl:template> 418 419 <xsl:template name="insert-end-code"> 420 <xsl:if test="@x:isCodeComponent='yes'"> 421 <pre xmlns="http://www.w3.org/1999/xhtml" class="ccmarker ccb"><span><CODE ENDS></span></pre> 422 </xsl:if> 263 423 </xsl:template> 264 424 … … 304 464 <xsl:when test="@align='right'"> 305 465 <div xmlns="http://www.w3.org/1999/xhtml" style="display:table; margin-left: auto; margin-right: 0pt;"> 466 <xsl:call-template name="insert-begin-code"/> 306 467 <pre style="margin-left: 0em;"> 307 468 <xsl:call-template name="add-artwork-class"/> … … 309 470 <xsl:copy-of select="$display"/> 310 471 </pre> 472 <xsl:call-template name="insert-end-code"/> 311 473 </div> 312 474 </xsl:when> 313 475 <xsl:when test="@align='center'"> 314 476 <div xmlns="http://www.w3.org/1999/xhtml" style="display:table; margin-left: auto; margin-right: auto;"> 477 <xsl:call-template name="insert-begin-code"/> 315 478 <pre style="margin-left: 0em;"> 316 479 <xsl:call-template name="add-artwork-class"/> … … 318 481 <xsl:copy-of select="$display"/> 319 482 </pre> 483 <xsl:call-template name="insert-end-code"/> 320 484 </div> 321 485 </xsl:when> 322 486 <xsl:otherwise> 487 <xsl:call-template name="insert-begin-code"/> 323 488 <pre xmlns="http://www.w3.org/1999/xhtml"> 324 489 <xsl:call-template name="add-artwork-class"/> … … 326 491 <xsl:copy-of select="$display"/> 327 492 </pre> 493 <xsl:call-template name="insert-end-code"/> 328 494 </xsl:otherwise> 329 495 </xsl:choose> … … 455 621 <xsl:for-each select="address/postal/street"> 456 622 <span class="street-address vcardline"> 457 <xsl:value-of select="."/> 623 <xsl:call-template name="extract-normalized"> 624 <xsl:with-param name="node" select="."/> 625 <xsl:with-param name="name" select="'street'"/> 626 </xsl:call-template> 458 627 </span> 459 628 </xsl:for-each> … … 461 630 <xsl:if test="address/postal/city|address/postal/region|address/postal/code"> 462 631 <span class="vcardline"> 463 <xsl:if test="address/postal/city"><span class="locality"><xsl:value-of select="address/postal/city"/></span>, </xsl:if> 464 <xsl:if test="address/postal/region"><span class="region"><xsl:value-of select="address/postal/region"/></span> </xsl:if> 465 <xsl:if test="address/postal/code"><span class="postal-code"><xsl:value-of select="address/postal/code"/></span></xsl:if> 632 <xsl:if test="address/postal/city"> 633 <span class="locality"> 634 <xsl:call-template name="extract-normalized"> 635 <xsl:with-param name="node" select="address/postal/city"/> 636 <xsl:with-param name="name" select="'address/postal/city'"/> 637 </xsl:call-template> 638 </span> 639 <xsl:text>, </xsl:text> 640 </xsl:if> 641 <xsl:if test="address/postal/region"> 642 <span class="region"> 643 <xsl:call-template name="extract-normalized"> 644 <xsl:with-param name="node" select="address/postal/region"/> 645 <xsl:with-param name="name" select="'address/postal/region'"/> 646 </xsl:call-template> 647 </span> 648 <xsl:text> </xsl:text> 649 </xsl:if> 650 <xsl:if test="address/postal/code"> 651 <span class="postal-code"> 652 <xsl:call-template name="extract-normalized"> 653 <xsl:with-param name="node" select="address/postal/code"/> 654 <xsl:with-param name="name" select="'address/postal/code'"/> 655 </xsl:call-template> 656 </span> 657 </xsl:if> 466 658 </span> 467 659 </xsl:if> 468 660 <xsl:if test="address/postal/country"> 469 <span class="country-name vcardline"><xsl:value-of select="address/postal/country"/></span> 661 <span class="country-name vcardline"> 662 <xsl:call-template name="extract-normalized"> 663 <xsl:with-param name="node" select="address/postal/country"/> 664 <xsl:with-param name="name" select="'address/postal/country'"/> 665 </xsl:call-template> 666 </span> 470 667 </xsl:if> 471 668 </span> … … 541 738 </xsl:if> 542 739 543 <xsl:if test=" not($xml2rfc-private)">740 <xsl:if test="$xml2rfc-private=''"> 544 741 <!-- copyright statements --> 545 742 <xsl:variable name="copyright"><xsl:call-template name="insertCopyright"/></xsl:variable> … … 602 799 603 800 <!-- insert the collected information --> 604 <table xmlns="http://www.w3.org/1999/xhtml" summary="header information"class="header" border="0" cellpadding="1" cellspacing="1">801 <table xmlns="http://www.w3.org/1999/xhtml" class="header" border="0" cellpadding="1" cellspacing="1"> 605 802 <xsl:choose> 606 803 <xsl:when test="function-available('exslt:node-set')"> … … 670 867 </xsl:choose> 671 868 672 <xsl:if test=" not($xml2rfc-private)and not($abstract-first)">869 <xsl:if test="$xml2rfc-private='' and not($abstract-first)"> 673 870 <xsl:call-template name="emit-ietf-preamble"/> 674 871 </xsl:if> … … 680 877 <xsl:apply-templates select="ed:replace[.//note]"/> 681 878 682 <xsl:if test=" not($xml2rfc-private)and $abstract-first">879 <xsl:if test="$xml2rfc-private='' and $abstract-first"> 683 880 <xsl:call-template name="emit-ietf-preamble"/> 684 881 </xsl:if> … … 1231 1428 </xsl:call-template> 1232 1429 </a> 1233 <xsl:text> References</xsl:text> 1430 <xsl:text> </xsl:text> 1431 <xsl:value-of select="$xml2rfc-refparent"/> 1234 1432 </h1> 1235 1433 </xsl:if> … … 1244 1442 <xsl:variable name="title"> 1245 1443 <xsl:choose> 1246 <xsl:when test="not(@title) or @title=''"> References</xsl:when>1444 <xsl:when test="not(@title) or @title=''"><xsl:value-of select="$xml2rfc-refparent"/></xsl:when> 1247 1445 <xsl:otherwise><xsl:value-of select="@title"/></xsl:otherwise> 1248 1446 </xsl:choose> … … 1272 1470 </xsl:element> 1273 1471 1274 <table xmlns="http://www.w3.org/1999/xhtml" summary="{$title}">1472 <table xmlns="http://www.w3.org/1999/xhtml"> 1275 1473 <xsl:choose> 1276 1474 <xsl:when test="$xml2rfc-sortrefs='yes' and $xml2rfc-symrefs!='no'"> … … 1297 1495 </xsl:if> 1298 1496 1497 <xsl:variable name="ignored"> 1498 <xsl:call-template name="parse-pis"> 1499 <xsl:with-param name="nodes" select="//processing-instruction('rfc-ext')"/> 1500 <xsl:with-param name="attr" select="'SANITYCHECK'"/> 1501 </xsl:call-template> 1502 </xsl:variable> 1503 1299 1504 <xsl:variable name="lang"> 1300 1505 <xsl:call-template name="get-lang"/> … … 1313 1518 <xsl:apply-templates select="front/title" mode="get-text-content"/> 1314 1519 </title> 1315 <style type="text/css" title="Xml2Rfc (sans serif)"> 1316 <xsl:call-template name="insertCss"/> 1317 </style> 1520 <xsl:call-template name="insertCss"/> 1318 1521 <!-- <link rel="alternate stylesheet" type="text/css" media="screen" title="Plain (typewriter)" href="rfc2629tty.css" /> --> 1319 1522 … … 1323 1526 </xsl:if> 1324 1527 <link rel="Author" href="#{$anchor-prefix}.authors"/> 1325 <xsl:if test=" not($xml2rfc-private)">1528 <xsl:if test="$xml2rfc-private=''"> 1326 1529 <link rel="Copyright" href="#{$anchor-prefix}.copyright"/> 1327 1530 </xsl:if> … … 1372 1575 </xsl:for-each> 1373 1576 1374 <xsl:if test=" not($xml2rfc-private)">1577 <xsl:if test="$xml2rfc-private=''"> 1375 1578 <xsl:choose> 1376 1579 <xsl:when test="@number"> … … 1384 1587 <meta name="DC.Date.Issued" scheme="ISO8601"> 1385 1588 <xsl:attribute name="content"> 1386 <xsl:value-of select="concat($xml2rfc-ext-pub-year,'-',$ xml2rfc-ext-pub-month-numeric)"/>1589 <xsl:value-of select="concat($xml2rfc-ext-pub-year,'-',$pub-month-numeric)"/> 1387 1590 <xsl:if test="$xml2rfc-ext-pub-day != '' and not(@number)"> 1388 1591 <xsl:value-of select="concat('-',format-number($xml2rfc-ext-pub-day,'00'))"/> … … 1678 1881 </xsl:attribute> 1679 1882 <xsl:choose> 1680 <xsl:when test=" @format='counter'">1883 <xsl:when test="$from/@format='counter'"> 1681 1884 <xsl:value-of select="$refnum"/> 1682 1885 </xsl:when> 1683 <xsl:when test=" @format='title'">1886 <xsl:when test="$from/@format='title'"> 1684 1887 <xsl:value-of select="$to/@title"/> 1685 1888 </xsl:when> … … 1757 1960 1758 1961 <xsl:otherwise> 1759 <a xmlns="http://www.w3.org/1999/xhtml" href="#{$target}"><xsl:apply-templates/></a> 1962 <a xmlns="http://www.w3.org/1999/xhtml" href="#{$target}"> 1963 <xsl:if test="@format='none'"> 1964 <xsl:if test="$xml2rfc-ext-include-references-in-index='yes'"> 1965 <xsl:attribute name="id"><xsl:value-of select="$anchor"/></xsl:attribute> 1966 </xsl:if> 1967 </xsl:if> 1968 <xsl:apply-templates/> 1969 </a> 1760 1970 <xsl:if test="not(@format='none')"> 1761 1971 <xsl:for-each select="$src/rfc/back/references//reference[@anchor=$target]"> … … 1780 1990 <xsl:template match="xref[not(node())]"> 1781 1991 1782 <xsl:variable name="target" select="@target"/> 1783 <xsl:variable name="anchor"><xsl:value-of select="$anchor-prefix"/>.xref.<xsl:value-of select="@target"/>.<xsl:number level="any" count="xref[@target=$target]"/></xsl:variable> 1784 <xsl:variable name="node" select="key('anchor-item',$target)"/> 1785 <xsl:if test="count($node)=0 and not(ancestor::ed:del)"> 1786 <xsl:call-template name="error"> 1787 <xsl:with-param name="msg" select="concat('Undefined target: ',@target)"/> 1788 </xsl:call-template> 1789 </xsl:if> 1790 1791 <xsl:choose> 1792 1793 <!-- Section links --> 1794 <xsl:when test="$node/self::section or $node/self::appendix"> 1795 <a xmlns="http://www.w3.org/1999/xhtml" href="#{@target}"> 1796 <!-- insert id when a backlink to this xref is needed in the index --> 1797 <xsl:if test="key('iref-xanch',$target) | key('iref-xanch','')[../@anchor=$target]"> 1798 <xsl:attribute name="id"><xsl:value-of select="$anchor"/></xsl:attribute> 1799 </xsl:if> 1800 <xsl:call-template name="render-section-ref"> 1801 <xsl:with-param name="from" select="."/> 1802 <xsl:with-param name="to" select="$node"/> 1803 </xsl:call-template> 1804 </a> 1805 </xsl:when> 1806 1807 <!-- Figure links --> 1808 <xsl:when test="$node/self::figure"> 1809 <a xmlns="http://www.w3.org/1999/xhtml" href="#{$target}"> 1810 <xsl:variable name="figcnt"> 1811 <xsl:for-each select="$node"> 1812 <xsl:number level="any" count="figure[(@title!='' or @anchor!='') and not(@suppress-title='true')]"/> 1813 </xsl:for-each> 1814 </xsl:variable> 1815 <xsl:choose> 1816 <xsl:when test="@format='counter'"> 1817 <xsl:value-of select="$figcnt"/> 1818 </xsl:when> 1819 <xsl:when test="@format='title'"> 1820 <xsl:value-of select="$node/@title"/> 1821 </xsl:when> 1822 <xsl:otherwise> 1823 <xsl:value-of select="normalize-space(concat('Figure ',$figcnt))"/> 1824 </xsl:otherwise> 1825 </xsl:choose> 1826 </a> 1827 </xsl:when> 1992 <xsl:variable name="xref" select="."/> 1993 <xsl:variable name="anchor"><xsl:value-of select="$anchor-prefix"/>.xref.<xsl:value-of select="$xref/@target"/>.<xsl:number level="any" count="xref[@target=$xref/@target]"/></xsl:variable> 1994 1995 <!-- ensure we have the right context, this <xref> may be processed from within the boilerplate --> 1996 <xsl:for-each select="$src"> 1997 1998 <xsl:variable name="node" select="key('anchor-item',$xref/@target)"/> 1999 <xsl:if test="count($node)=0 and not($node/ancestor::ed:del)"> 2000 <xsl:call-template name="error"> 2001 <xsl:with-param name="msg" select="concat('Undefined target: ',$xref/@target)"/> 2002 </xsl:call-template> 2003 </xsl:if> 2004 2005 <xsl:choose> 1828 2006 1829 <!-- Table links --> 1830 <xsl:when test="$node/self::texttable"> 1831 <a xmlns="http://www.w3.org/1999/xhtml" href="#{$target}"> 1832 <xsl:variable name="tabcnt"> 1833 <xsl:for-each select="$node"> 1834 <xsl:number level="any" count="texttable[(@title!='' or @anchor!='') and not(@suppress-title='true')]"/> 1835 </xsl:for-each> 1836 </xsl:variable> 1837 <xsl:choose> 1838 <xsl:when test="@format='counter'"> 1839 <xsl:value-of select="$tabcnt"/> 1840 </xsl:when> 1841 <xsl:when test="@format='title'"> 1842 <xsl:value-of select="$node/@title"/> 1843 </xsl:when> 1844 <xsl:otherwise> 1845 <xsl:value-of select="normalize-space(concat('Table ',$tabcnt))"/> 1846 </xsl:otherwise> 1847 </xsl:choose> 1848 </a> 1849 </xsl:when> 1850 1851 <!-- Paragraph links --> 1852 <xsl:when test="$node/self::t"> 1853 <a xmlns="http://www.w3.org/1999/xhtml" href="#{$target}"> 1854 <xsl:variable name="tcnt"> 1855 <xsl:for-each select="$node"> 1856 <xsl:call-template name="get-paragraph-number"/> 1857 </xsl:for-each> 1858 </xsl:variable> 1859 <xsl:choose> 1860 <xsl:when test="@format='counter'"> 1861 <xsl:value-of select="$tcnt"/> 1862 </xsl:when> 1863 <xsl:when test="@format='title'"> 1864 <xsl:value-of select="$node/@title"/> 1865 </xsl:when> 1866 <xsl:otherwise> 1867 <xsl:value-of select="normalize-space(concat('Paragraph ',substring-after($tcnt,'p.')))"/> 1868 </xsl:otherwise> 1869 </xsl:choose> 1870 </a> 1871 </xsl:when> 1872 1873 <!-- Comment links --> 1874 <xsl:when test="$node/self::cref"> 1875 <a xmlns="http://www.w3.org/1999/xhtml" href="#{$target}"> 1876 <xsl:variable name="name"> 1877 <xsl:for-each select="$node"> 1878 <xsl:call-template name="get-comment-name"/> 1879 </xsl:for-each> 1880 </xsl:variable> 1881 <xsl:choose> 1882 <xsl:when test="@format='counter'"> 1883 <xsl:value-of select="$name"/> 1884 </xsl:when> 1885 <xsl:when test="@format='title'"> 1886 <xsl:value-of select="$node/@title"/> 1887 </xsl:when> 1888 <xsl:otherwise> 1889 <xsl:value-of select="normalize-space(concat('Comment ',$name))"/> 1890 </xsl:otherwise> 1891 </xsl:choose> 1892 </a> 1893 </xsl:when> 1894 1895 <!-- Reference links --> 1896 <xsl:when test="$node/self::reference"> 1897 1898 <xsl:variable name="href"> 1899 <xsl:call-template name="computed-target"> 1900 <xsl:with-param name="bib" select="$node"/> 1901 <xsl:with-param name="ref" select="."/> 1902 </xsl:call-template> 1903 </xsl:variable> 1904 1905 <xsl:variable name="sec"> 1906 <xsl:choose> 1907 <xsl:when test="starts-with(@x:rel,'#') and not(@x:sec) and $node/x:source/@href"> 1908 <xsl:variable name="extdoc" select="document($node/x:source/@href)"/> 1909 <xsl:variable name="nodes" select="$extdoc//*[@anchor=substring-after(current()/@x:rel,'#')]"/> 1910 <xsl:if test="not($nodes)"> 1911 <xsl:call-template name="error"> 1912 <xsl:with-param name="msg">Anchor '<xsl:value-of select="substring-after(current()/@x:rel,'#')"/>' not found in <xsl:value-of select="$node/x:source/@href"/>.</xsl:with-param> 1913 </xsl:call-template> 1914 </xsl:if> 1915 <xsl:for-each select="$nodes"> 1916 <xsl:call-template name="get-section-number"/> 1917 </xsl:for-each> 1918 </xsl:when> 1919 <xsl:otherwise> 1920 <xsl:value-of select="@x:sec"/> 1921 </xsl:otherwise> 1922 </xsl:choose> 1923 </xsl:variable> 1924 1925 <xsl:variable name="secterm"> 1926 <xsl:choose> 1927 <!-- starts with letter? --> 1928 <xsl:when test="translate(substring($sec,1,1),$ucase,'')=''">Appendix</xsl:when> 1929 <xsl:otherwise>Section</xsl:otherwise> 1930 </xsl:choose> 1931 </xsl:variable> 1932 1933 <xsl:variable name="fmt"> 1934 <xsl:choose> 1935 <xsl:when test="@x:fmt!=''"><xsl:value-of select="@x:fmt"/></xsl:when> 1936 <xsl:when test="ancestor::artwork">,</xsl:when> 1937 <xsl:otherwise>of</xsl:otherwise> 1938 </xsl:choose> 1939 </xsl:variable> 1940 1941 <xsl:variable name="title"> 1942 <xsl:choose> 1943 <xsl:when test="starts-with(@x:rel,'#') and not(@x:sec) and $node/x:source/@href"> 1944 <xsl:variable name="extdoc" select="document($node/x:source/@href)"/> 1945 <xsl:variable name="nodes" select="$extdoc//*[@anchor=substring-after(current()/@x:rel,'#')]"/> 1946 <xsl:if test="not($nodes)"> 1947 <xsl:call-template name="error"> 1948 <xsl:with-param name="msg">Anchor '<xsl:value-of select="substring-after(current()/@x:rel,'#')"/>' not found in <xsl:value-of select="$node/x:source/@href"/>.</xsl:with-param> 1949 </xsl:call-template> 1950 </xsl:if> 1951 <xsl:for-each select="$nodes"> 1952 <xsl:value-of select="@title"/> 1953 </xsl:for-each> 1954 </xsl:when> 1955 <xsl:otherwise/> 1956 </xsl:choose> 1957 </xsl:variable> 1958 1959 <!-- 1960 Formats: 1961 1962 () [XXXX] (Section SS) 1963 , [XXXX], Section SS 1964 of Section SS of [XXXX] 1965 sec Section SS 1966 number SS 1967 --> 1968 1969 <xsl:if test="$fmt and not($fmt='()' or $fmt=',' or $fmt='of' or $fmt='sec' or $fmt='anchor' or $fmt='number')"> 1970 <xsl:call-template name="error"> 1971 <xsl:with-param name="msg" select="concat('unknown xref/@x:fmt extension: ',$fmt)"/> 1972 </xsl:call-template> 1973 </xsl:if> 1974 1975 <xsl:if test="$sec!=''"> 1976 1977 <xsl:choose> 1978 <xsl:when test="$fmt='of' or $fmt='sec'"> 1979 <xsl:choose> 1980 <xsl:when test="$href!=''"> 1981 <a xmlns="http://www.w3.org/1999/xhtml" href="{$href}"> 1982 <xsl:if test="$title!=''"> 1983 <xsl:attribute name="title"><xsl:value-of select="$title"/></xsl:attribute> 1984 </xsl:if> 1985 <xsl:if test="$fmt='sec' and $xml2rfc-ext-include-references-in-index='yes'"> 1986 <xsl:attribute name="id"><xsl:value-of select="$anchor"/></xsl:attribute> 1987 </xsl:if> 1988 <xsl:value-of select="$secterm"/> 1989 <xsl:text> </xsl:text> 1990 <xsl:value-of select="$sec"/> 1991 </a> 1992 </xsl:when> 1993 <xsl:otherwise><xsl:value-of select="$secterm"/><xsl:text> </xsl:text><xsl:value-of select="$sec"/></xsl:otherwise> 1994 </xsl:choose> 1995 <xsl:if test="$fmt='of'"> 1996 <xsl:text> of </xsl:text> 1997 </xsl:if> 1998 </xsl:when> 1999 <xsl:when test="$fmt='number'"> 2000 <xsl:choose> 2001 <xsl:when test="$href!=''"> 2002 <a xmlns="http://www.w3.org/1999/xhtml" href="{$href}"> 2003 <xsl:if test="$title!=''"> 2004 <xsl:attribute name="title"><xsl:value-of select="$title"/></xsl:attribute> 2005 </xsl:if> 2006 <xsl:if test="$xml2rfc-ext-include-references-in-index='yes'"> 2007 <xsl:attribute name="id"><xsl:value-of select="$anchor"/></xsl:attribute> 2008 </xsl:if> 2009 <xsl:value-of select="$sec"/> 2010 </a> 2011 </xsl:when> 2012 <xsl:otherwise><xsl:value-of select="$sec"/></xsl:otherwise> 2013 </xsl:choose> 2014 </xsl:when> 2015 <xsl:otherwise/> 2016 </xsl:choose> 2017 </xsl:if> 2018 2019 <xsl:if test="$sec='' or ($fmt!='sec' and $fmt!='number')"> 2020 <a xmlns="http://www.w3.org/1999/xhtml" href="#{$target}"> 2021 <xsl:if test="$xml2rfc-ext-include-references-in-index='yes'"> 2007 <!-- Section links --> 2008 <xsl:when test="$node/self::section or $node/self::appendix"> 2009 <a xmlns="http://www.w3.org/1999/xhtml" href="#{$xref/@target}"> 2010 <!-- insert id when a backlink to this xref is needed in the index --> 2011 <xsl:if test="key('iref-xanch',$xref/@target) | key('iref-xanch','')[../@anchor=$xref/@target]"> 2022 2012 <xsl:attribute name="id"><xsl:value-of select="$anchor"/></xsl:attribute> 2023 2013 </xsl:if> 2024 <cite title="{normalize-space($node/front/title)}"> 2025 <xsl:variable name="val"> 2026 <xsl:call-template name="referencename"> 2027 <xsl:with-param name="node" select="$node"/> 2028 </xsl:call-template> 2029 </xsl:variable> 2030 <xsl:choose> 2031 <xsl:when test="$fmt='anchor'"> 2032 <!-- remove brackets --> 2033 <xsl:value-of select="substring($val,2,string-length($val)-2)"/> 2034 </xsl:when> 2035 <xsl:otherwise> 2036 <xsl:value-of select="$val"/> 2037 </xsl:otherwise> 2038 </xsl:choose> 2039 </cite> 2014 <xsl:call-template name="render-section-ref"> 2015 <xsl:with-param name="from" select="$xref"/> 2016 <xsl:with-param name="to" select="$node"/> 2017 </xsl:call-template> 2040 2018 </a> 2041 </xsl:if> 2019 </xsl:when> 2020 2021 <!-- Figure links --> 2022 <xsl:when test="$node/self::figure"> 2023 <a xmlns="http://www.w3.org/1999/xhtml" href="#{$xref/@target}"> 2024 <xsl:variable name="figcnt"> 2025 <xsl:for-each select="$node"> 2026 <xsl:number level="any" count="figure[(@title!='' or @anchor!='') and not(@suppress-title='true')]"/> 2027 </xsl:for-each> 2028 </xsl:variable> 2029 <xsl:choose> 2030 <xsl:when test="$xref/@format='counter'"> 2031 <xsl:value-of select="$figcnt"/> 2032 </xsl:when> 2033 <xsl:when test="$xref/@format='title'"> 2034 <xsl:value-of select="$node/@title"/> 2035 </xsl:when> 2036 <xsl:otherwise> 2037 <xsl:value-of select="normalize-space(concat('Figure ',$figcnt))"/> 2038 </xsl:otherwise> 2039 </xsl:choose> 2040 </a> 2041 </xsl:when> 2042 2042 2043 <xsl:if test="$sec!=''"> 2044 <xsl:choose> 2045 <xsl:when test="$fmt='()'"> 2046 <xsl:text> (</xsl:text> 2047 <xsl:choose> 2048 <xsl:when test="$href!=''"> 2049 <a xmlns="http://www.w3.org/1999/xhtml" href="{$href}"><xsl:value-of select="$secterm"/><xsl:text> </xsl:text><xsl:value-of select="$sec"/></a> 2050 </xsl:when> 2051 <xsl:otherwise><xsl:value-of select="$secterm"/><xsl:text> </xsl:text><xsl:value-of select="$sec"/></xsl:otherwise> 2052 </xsl:choose> 2053 <xsl:text>)</xsl:text> 2054 </xsl:when> 2055 <xsl:when test="$fmt=','"> 2056 <xsl:text>, </xsl:text> 2057 <xsl:choose> 2058 <xsl:when test="$href!=''"> 2059 <a xmlns="http://www.w3.org/1999/xhtml" href="{$href}"> 2060 <xsl:if test="$title!=''"> 2061 <xsl:attribute name="title"><xsl:value-of select="$title"/></xsl:attribute> 2062 </xsl:if> 2063 <xsl:value-of select="$secterm"/> 2064 <xsl:text> </xsl:text> 2065 <xsl:value-of select="$sec"/> 2066 </a> 2067 </xsl:when> 2068 <xsl:otherwise><xsl:value-of select="$secterm"/><xsl:text> </xsl:text><xsl:value-of select="$sec"/></xsl:otherwise> 2069 </xsl:choose> 2070 </xsl:when> 2071 <xsl:otherwise/> 2072 </xsl:choose> 2073 </xsl:if> 2074 </xsl:when> 2075 2076 <xsl:otherwise> 2077 <xsl:call-template name="error"> 2078 <xsl:with-param name="msg" select="concat('xref to unknown element: ',name($node))"/> 2079 </xsl:call-template> 2080 </xsl:otherwise> 2081 </xsl:choose> 2043 <!-- Table links --> 2044 <xsl:when test="$node/self::texttable"> 2045 <a xmlns="http://www.w3.org/1999/xhtml" href="#{$xref/@target}"> 2046 <xsl:variable name="tabcnt"> 2047 <xsl:for-each select="$node"> 2048 <xsl:number level="any" count="texttable[(@title!='' or @anchor!='') and not(@suppress-title='true')]"/> 2049 </xsl:for-each> 2050 </xsl:variable> 2051 <xsl:choose> 2052 <xsl:when test="$xref/@format='counter'"> 2053 <xsl:value-of select="$tabcnt"/> 2054 </xsl:when> 2055 <xsl:when test="$xref/@format='title'"> 2056 <xsl:value-of select="$node/@title"/> 2057 </xsl:when> 2058 <xsl:otherwise> 2059 <xsl:value-of select="normalize-space(concat('Table ',$tabcnt))"/> 2060 </xsl:otherwise> 2061 </xsl:choose> 2062 </a> 2063 </xsl:when> 2064 2065 <!-- Paragraph links --> 2066 <xsl:when test="$node/self::t"> 2067 <a xmlns="http://www.w3.org/1999/xhtml" href="#{$xref/@target}"> 2068 <xsl:variable name="tcnt"> 2069 <xsl:for-each select="$node"> 2070 <xsl:call-template name="get-paragraph-number"/> 2071 </xsl:for-each> 2072 </xsl:variable> 2073 <xsl:choose> 2074 <xsl:when test="$xref/@format='counter'"> 2075 <xsl:value-of select="$tcnt"/> 2076 </xsl:when> 2077 <xsl:when test="$xref/@format='title'"> 2078 <xsl:value-of select="$node/@title"/> 2079 </xsl:when> 2080 <xsl:otherwise> 2081 <xsl:value-of select="normalize-space(concat('Paragraph ',substring-after($tcnt,'p.')))"/> 2082 </xsl:otherwise> 2083 </xsl:choose> 2084 </a> 2085 </xsl:when> 2086 2087 <!-- Comment links --> 2088 <xsl:when test="$node/self::cref"> 2089 <a xmlns="http://www.w3.org/1999/xhtml" href="#{$xref/@target}"> 2090 <xsl:variable name="name"> 2091 <xsl:for-each select="$node"> 2092 <xsl:call-template name="get-comment-name"/> 2093 </xsl:for-each> 2094 </xsl:variable> 2095 <xsl:choose> 2096 <xsl:when test="$xref/@format='counter'"> 2097 <xsl:value-of select="$name"/> 2098 </xsl:when> 2099 <xsl:when test="$xref/@format='title'"> 2100 <xsl:value-of select="$node/@title"/> 2101 </xsl:when> 2102 <xsl:otherwise> 2103 <xsl:value-of select="normalize-space(concat('Comment ',$name))"/> 2104 </xsl:otherwise> 2105 </xsl:choose> 2106 </a> 2107 </xsl:when> 2108 2109 <!-- Reference links --> 2110 <xsl:when test="$node/self::reference"> 2111 2112 <xsl:variable name="href"> 2113 <xsl:call-template name="computed-target"> 2114 <xsl:with-param name="bib" select="$node"/> 2115 <xsl:with-param name="ref" select="$xref"/> 2116 </xsl:call-template> 2117 </xsl:variable> 2118 2119 <xsl:variable name="sec"> 2120 <xsl:choose> 2121 <xsl:when test="starts-with($xref/@x:rel,'#') and not($xref/@x:sec) and $node/x:source/@href"> 2122 <xsl:variable name="extdoc" select="document($node/x:source/@href)"/> 2123 <xsl:variable name="nodes" select="$extdoc//*[@anchor=substring-after($xref/@x:rel,'#')]"/> 2124 <xsl:if test="not($nodes)"> 2125 <xsl:call-template name="error"> 2126 <xsl:with-param name="msg">Anchor '<xsl:value-of select="substring-after($xref/@x:rel,'#')"/>' not found in <xsl:value-of select="$node/x:source/@href"/>.</xsl:with-param> 2127 </xsl:call-template> 2128 </xsl:if> 2129 <xsl:for-each select="$nodes"> 2130 <xsl:call-template name="get-section-number"/> 2131 </xsl:for-each> 2132 </xsl:when> 2133 <xsl:otherwise> 2134 <xsl:value-of select="$xref/@x:sec"/> 2135 </xsl:otherwise> 2136 </xsl:choose> 2137 </xsl:variable> 2138 2139 <xsl:variable name="secterm"> 2140 <xsl:choose> 2141 <!-- starts with letter? --> 2142 <xsl:when test="translate(substring($sec,1,1),$ucase,'')=''">Appendix</xsl:when> 2143 <xsl:otherwise>Section</xsl:otherwise> 2144 </xsl:choose> 2145 </xsl:variable> 2146 2147 <xsl:variable name="fmt"> 2148 <xsl:choose> 2149 <xsl:when test="$xref/@x:fmt!=''"><xsl:value-of select="$xref/@x:fmt"/></xsl:when> 2150 <xsl:when test="$xref/ancestor::artwork">,</xsl:when> 2151 <xsl:otherwise>of</xsl:otherwise> 2152 </xsl:choose> 2153 </xsl:variable> 2154 2155 <xsl:variable name="title"> 2156 <xsl:choose> 2157 <xsl:when test="starts-with($xref/@x:rel,'#') and not($xref/@x:sec) and $node/x:source/@href"> 2158 <xsl:variable name="extdoc" select="document($node/x:source/@href)"/> 2159 <xsl:variable name="nodes" select="$extdoc//*[@anchor=substring-after($xref//@x:rel,'#')]"/> 2160 <xsl:if test="not($nodes)"> 2161 <xsl:call-template name="error"> 2162 <xsl:with-param name="msg">Anchor '<xsl:value-of select="substring-after($xref//@x:rel,'#')"/>' not found in <xsl:value-of select="$node/x:source/@href"/>.</xsl:with-param> 2163 </xsl:call-template> 2164 </xsl:if> 2165 <xsl:for-each select="$nodes"> 2166 <xsl:value-of select="@title"/> 2167 </xsl:for-each> 2168 </xsl:when> 2169 <xsl:otherwise/> 2170 </xsl:choose> 2171 </xsl:variable> 2172 2173 <!-- 2174 Formats: 2175 2176 () [XXXX] (Section SS) 2177 , [XXXX], Section SS 2178 of Section SS of [XXXX] 2179 sec Section SS 2180 number SS 2181 --> 2182 2183 <xsl:if test="$fmt and not($fmt='()' or $fmt=',' or $fmt='of' or $fmt='sec' or $fmt='anchor' or $fmt='number')"> 2184 <xsl:call-template name="error"> 2185 <xsl:with-param name="msg" select="concat('unknown xref/@x:fmt extension: ',$fmt)"/> 2186 </xsl:call-template> 2187 </xsl:if> 2188 2189 <xsl:if test="$sec!=''"> 2190 2191 <xsl:choose> 2192 <xsl:when test="$fmt='of' or $fmt='sec'"> 2193 <xsl:choose> 2194 <xsl:when test="$href!=''"> 2195 <a xmlns="http://www.w3.org/1999/xhtml" href="{$href}"> 2196 <xsl:if test="$title!=''"> 2197 <xsl:attribute name="title"><xsl:value-of select="$title"/></xsl:attribute> 2198 </xsl:if> 2199 <xsl:if test="$fmt='sec' and $xml2rfc-ext-include-references-in-index='yes'"> 2200 <xsl:attribute name="id"><xsl:value-of select="$anchor"/></xsl:attribute> 2201 </xsl:if> 2202 <xsl:value-of select="$secterm"/> 2203 <xsl:text> </xsl:text> 2204 <xsl:value-of select="$sec"/> 2205 </a> 2206 </xsl:when> 2207 <xsl:otherwise><xsl:value-of select="$secterm"/><xsl:text> </xsl:text><xsl:value-of select="$sec"/></xsl:otherwise> 2208 </xsl:choose> 2209 <xsl:if test="$fmt='of'"> 2210 <xsl:text> of </xsl:text> 2211 </xsl:if> 2212 </xsl:when> 2213 <xsl:when test="$fmt='number'"> 2214 <xsl:choose> 2215 <xsl:when test="$href!=''"> 2216 <a xmlns="http://www.w3.org/1999/xhtml" href="{$href}"> 2217 <xsl:if test="$title!=''"> 2218 <xsl:attribute name="title"><xsl:value-of select="$title"/></xsl:attribute> 2219 </xsl:if> 2220 <xsl:if test="$xml2rfc-ext-include-references-in-index='yes'"> 2221 <xsl:attribute name="id"><xsl:value-of select="$anchor"/></xsl:attribute> 2222 </xsl:if> 2223 <xsl:value-of select="$sec"/> 2224 </a> 2225 </xsl:when> 2226 <xsl:otherwise><xsl:value-of select="$sec"/></xsl:otherwise> 2227 </xsl:choose> 2228 </xsl:when> 2229 <xsl:otherwise/> 2230 </xsl:choose> 2231 </xsl:if> 2232 2233 <xsl:if test="$sec='' or ($fmt!='sec' and $fmt!='number')"> 2234 <a xmlns="http://www.w3.org/1999/xhtml" href="#{$xref/@target}"> 2235 <xsl:if test="$xml2rfc-ext-include-references-in-index='yes'"> 2236 <xsl:attribute name="id"><xsl:value-of select="$anchor"/></xsl:attribute> 2237 </xsl:if> 2238 <cite title="{normalize-space($node/front/title)}"> 2239 <xsl:variable name="val"> 2240 <xsl:call-template name="referencename"> 2241 <xsl:with-param name="node" select="$node"/> 2242 </xsl:call-template> 2243 </xsl:variable> 2244 <xsl:choose> 2245 <xsl:when test="$fmt='anchor'"> 2246 <!-- remove brackets --> 2247 <xsl:value-of select="substring($val,2,string-length($val)-2)"/> 2248 </xsl:when> 2249 <xsl:otherwise> 2250 <xsl:value-of select="$val"/> 2251 </xsl:otherwise> 2252 </xsl:choose> 2253 </cite> 2254 </a> 2255 </xsl:if> 2256 2257 <xsl:if test="$sec!=''"> 2258 <xsl:choose> 2259 <xsl:when test="$fmt='()'"> 2260 <xsl:text> (</xsl:text> 2261 <xsl:choose> 2262 <xsl:when test="$href!=''"> 2263 <a xmlns="http://www.w3.org/1999/xhtml" href="{$href}"><xsl:value-of select="$secterm"/><xsl:text> </xsl:text><xsl:value-of select="$sec"/></a> 2264 </xsl:when> 2265 <xsl:otherwise><xsl:value-of select="$secterm"/><xsl:text> </xsl:text><xsl:value-of select="$sec"/></xsl:otherwise> 2266 </xsl:choose> 2267 <xsl:text>)</xsl:text> 2268 </xsl:when> 2269 <xsl:when test="$fmt=','"> 2270 <xsl:text>, </xsl:text> 2271 <xsl:choose> 2272 <xsl:when test="$href!=''"> 2273 <a xmlns="http://www.w3.org/1999/xhtml" href="{$href}"> 2274 <xsl:if test="$title!=''"> 2275 <xsl:attribute name="title"><xsl:value-of select="$title"/></xsl:attribute> 2276 </xsl:if> 2277 <xsl:value-of select="$secterm"/> 2278 <xsl:text> </xsl:text> 2279 <xsl:value-of select="$sec"/> 2280 </a> 2281 </xsl:when> 2282 <xsl:otherwise><xsl:value-of select="$secterm"/><xsl:text> </xsl:text><xsl:value-of select="$sec"/></xsl:otherwise> 2283 </xsl:choose> 2284 </xsl:when> 2285 <xsl:otherwise/> 2286 </xsl:choose> 2287 </xsl:if> 2288 </xsl:when> 2289 2290 <xsl:otherwise> 2291 <xsl:call-template name="error"> 2292 <xsl:with-param name="msg" select="concat('xref to unknown element: ',name($node))"/> 2293 </xsl:call-template> 2294 </xsl:otherwise> 2295 </xsl:choose> 2296 </xsl:for-each> 2082 2297 </xsl:template> 2083 2298 … … 2101 2316 <xsl:param name="mode"/> 2102 2317 <!-- default case --> 2103 <xsl:if test=" not($xml2rfc-private)">2318 <xsl:if test="$xml2rfc-private=''"> 2104 2319 <xsl:choose> 2105 2320 <xsl:when test="/rfc/front/workgroup"> … … 2170 2385 2171 2386 <!-- private case --> 2172 <xsl:if test="$xml2rfc-private ">2387 <xsl:if test="$xml2rfc-private!=''"> 2173 2388 <myns:item><xsl:value-of select="$xml2rfc-private"/></myns:item> 2174 2389 </xsl:if> … … 2272 2487 <xsl:call-template name="normalize-date"> 2273 2488 <xsl:with-param name="year" select="$xml2rfc-ext-pub-year"/> 2274 <xsl:with-param name="month" select="$ xml2rfc-ext-pub-month-numeric"/>2489 <xsl:with-param name="month" select="$pub-month-numeric"/> 2275 2490 <xsl:with-param name="day" select="$xml2rfc-ext-pub-day + 185"/> 2276 2491 </xsl:call-template> … … 2425 2640 <t> 2426 2641 <xsl:choose> 2427 <xsl:when test="$ipr-2007-08"/>2428 2642 <xsl:when test="$ipr-rfc4748"> 2429 2643 Copyright © The IETF Trust (<xsl:value-of select="$xml2rfc-ext-pub-year"/>). … … 2592 2806 2593 2807 <xsl:template name="insertCss"> 2808 <style xmlns="http://www.w3.org/1999/xhtml" type="text/css" title="Xml2Rfc (sans serif)"> 2594 2809 a { 2595 2810 text-decoration: none; … … 2698 2913 background-color: lightyellow; 2699 2914 padding: .25em; 2700 } 2915 }<xsl:if test="//artwork[@x:isCodeComponent='yes']"><!-- support "<CODE BEGINS>" and "<CODE ENDS>" markers--> 2916 pre.ccmarker { 2917 background-color: white; 2918 color: gray; 2919 } 2920 pre.ccmarker > span { 2921 font-size: small; 2922 } 2923 pre.cct { 2924 margin-bottom: -1em; 2925 } 2926 pre.ccb { 2927 margin-top: -1em; 2928 }</xsl:if> 2701 2929 pre.text2 { 2702 2930 border-style: dotted; … … 3021 3249 } 3022 3250 </xsl:if>} 3023 3251 <xsl:choose><xsl:when test="$xml2rfc-ext-duplex='yes'"> 3252 @page:right { 3253 @top-left { 3254 content: "<xsl:call-template name="get-header-left"/>"; 3255 } 3256 @top-right { 3257 content: "<xsl:call-template name="get-header-right"/>"; 3258 } 3259 @top-center { 3260 content: "<xsl:call-template name="get-header-center"/>"; 3261 } 3262 @bottom-left { 3263 content: "<xsl:call-template name="get-author-summary"/>"; 3264 } 3265 @bottom-center { 3266 content: "<xsl:call-template name="get-category-long"/>"; 3267 } 3268 @bottom-right { 3269 content: "[Page " counter(page) "]"; 3270 } 3271 } 3272 @page:left { 3273 @top-left { 3274 content: "<xsl:call-template name="get-header-right"/>"; 3275 } 3276 @top-right { 3277 content: "<xsl:call-template name="get-header-left"/>"; 3278 } 3279 @top-center { 3280 content: "<xsl:call-template name="get-header-center"/>"; 3281 } 3282 @bottom-left { 3283 content: "[Page " counter(page) "]"; 3284 } 3285 @bottom-center { 3286 content: "<xsl:call-template name="get-category-long"/>"; 3287 } 3288 @bottom-right { 3289 content: "<xsl:call-template name="get-author-summary"/>"; 3290 } 3291 } 3292 </xsl:when><xsl:otherwise> 3024 3293 @page { 3025 3294 @top-left { … … 3042 3311 } 3043 3312 } 3044 3313 </xsl:otherwise></xsl:choose> 3045 3314 @page:first { 3046 3315 @top-left { … … 3054 3323 } 3055 3324 } 3325 </style> 3056 3326 </xsl:template> 3057 3327 … … 3409 3679 </xsl:template> 3410 3680 3411 3412 3413 3414 3681 <xsl:template name="insertPreamble" myns:namespaceless-elements="xml2rfc"> 3682 3683 <xsl:variable name="escapeclause"> 3684 This document may contain material from IETF Documents or IETF Contributions published or 3685 made publicly available before November 10, 2008. The person(s) controlling the copyright in 3686 some of this material may not have granted the IETF Trust the right to allow modifications of such 3687 material outside the IETF Standards Process. Without obtaining an adequate license from the 3688 person(s) controlling the copyright in such materials, this document may not be modified outside 3689 the IETF Standards Process, and derivative works of it may not be created outside the IETF 3690 Standards Process, except to format it for publication as an RFC or to translate it into languages 3691 other than English. 3692 </xsl:variable> 3415 3693 3416 3694 <section myns:unnumbered="unnumbered" myns:notoclink="notoclink" anchor="{$anchor-prefix}.status"> … … 3470 3748 translate it into languages other than English<xsl:if test="/rfc/@iprExtract">, 3471 3749 other than to extract <xref target="{/rfc/@iprExtract}"/> as-is 3472 for separate use .</xsl:if>.3750 for separate use</xsl:if>. 3473 3751 </xsl:when> 3474 3752 <xsl:when test="/rfc/@ipr = 'noDerivatives3667'"> … … 3481 3759 document may not be modified, and derivative works of it may 3482 3760 not be created<xsl:if test="/rfc/@iprExtract">, other than to extract 3483 <xref target="{/rfc/@iprExtract}"/> as-is for separate use .</xsl:if>.3761 <xref target="{/rfc/@iprExtract}"/> as-is for separate use</xsl:if>. 3484 3762 </xsl:when> 3485 3763 … … 3501 3779 translate it into languages other than English<xsl:if test="/rfc/@iprExtract">, 3502 3780 other than to extract <xref target="{/rfc/@iprExtract}"/> as-is 3503 for separate use .</xsl:if>.3781 for separate use</xsl:if>. 3504 3782 </xsl:when> 3505 3783 <xsl:when test="/rfc/@ipr = 'noDerivatives3978'"> … … 3510 3788 document may not be modified, and derivative works of it may 3511 3789 not be created<xsl:if test="/rfc/@iprExtract">, other than to extract 3512 <xref target="{/rfc/@iprExtract}"/> as-is for separate use .</xsl:if>.3790 <xref target="{/rfc/@iprExtract}"/> as-is for separate use</xsl:if>. 3513 3791 </xsl:when> 3514 3792 3515 <!-- as of Nov 2008 -->3516 <xsl:when test="/rfc/@ipr = 'trust200811' or /rfc/@ipr = 'noModificationTrust200811' or /rfc/@ipr = 'noDerivativesTrust200811'">3517 This Internet-Draft is submitted to IETF pursuant to, and in full3518 conformance with,the provisions of BCP 78 and BCP 79.3793 <!-- as of Nov 2008, Feb 2009 and Sep 2009 --> 3794 <xsl:when test="/rfc/@ipr = 'trust200811' or /rfc/@ipr = 'noModificationTrust200811' or /rfc/@ipr = 'noDerivativesTrust200811' or /rfc/@ipr = 'trust200902' or /rfc/@ipr = 'noModificationTrust200902' or /rfc/@ipr = 'noDerivativesTrust200902' or /rfc/@ipr = 'pre5378Trust200902'"> 3795 This Internet-Draft is submitted to IETF in full conformance with 3796 the provisions of BCP 78 and BCP 79. 3519 3797 </xsl:when> 3520 3521 <!-- as of Feb 2009 -->3522 <xsl:when test="/rfc/@ipr = 'trust200902' or /rfc/@ipr = 'noModificationTrust200902' or /rfc/@ipr = 'noDerivativesTrust200902' or /rfc/@ipr = 'pre5378Trust200902'">3523 This Internet-Draft is submitted to IETF pursuant to, and in full3524 conformance with, the provisions of BCP 78 and BCP 79.3525 </xsl:when>3526 <xsl:when test="/rfc/@ipr = 'noModificationTrust200902'">3527 This document may not be modified, and derivative works of it may3528 not be created, except to format it for publication as an RFC or3529 to translate it into languages other than English.3530 </xsl:when>3531 <xsl:when test="/rfc/@ipr = 'noDerivativesTrust200902'">3532 This document may not be modified, and derivative works of it may3533 not be created, and it may not be published except as an Internet-Draft.3534 </xsl:when>3535 <xsl:when test="/rfc/@ipr = 'pre5378Trust200902'">3536 This document may contain material from IETF Documents or IETF Contributions published or3537 made publicly available before November 10, 2008. The person(s) controlling the copyright in3538 some of this material may not have granted the IETF Trust the right to allow modifications of such3539 material outside the IETF Standards Process. Without obtaining an adequate license from the3540 person(s) controlling the copyright in such materials, this document may not be modified outside3541 the IETF Standards Process, and derivative works of it may not be created outside the IETF3542 Standards Process, except to format it for publication as an RFC or to translate it into languages3543 other than English.3544 </xsl:when>3545 3546 3798 <xsl:otherwise> 3547 3799 CONFORMANCE UNDEFINED. … … 3560 3812 not be created, and it may not be published except as an Internet-Draft. 3561 3813 </xsl:when> 3562 3563 3814 <xsl:when test="/rfc/@ipr = 'noModificationTrust200902'"> 3564 3815 This document may not be modified, and derivative works of it may … … 3570 3821 not be created, and it may not be published except as an Internet-Draft. 3571 3822 </xsl:when> 3572 <xsl:when test="/rfc/@ipr = 'pre5378Trust200902'"> 3573 This document may contain material from IETF Documents or IETF Contributions published or 3574 made publicly available before November 10, 2008. The person(s) controlling the copyright in 3575 some of this material may not have granted the IETF Trust the right to allow modifications of such 3576 material outside the IETF Standards Process. Without obtaining an adequate license from the 3577 person(s) controlling the copyright in such materials, this document may not be modified outside 3578 the IETF Standards Process, and derivative works of it may not be created outside the IETF 3579 Standards Process, except to format it for publication as an RFC or to translate it into languages 3580 other than English. 3823 <!-- escape clause moved to Copyright Notice as of 2009-12 --> 3824 <xsl:when test="/rfc/@ipr = 'pre5378Trust200902' and $pub-yearmonth < 200912"> 3825 <xsl:value-of select="$escapeclause"/> 3581 3826 </xsl:when> 3582 3827 … … 3661 3906 </t> 3662 3907 <xsl:choose> 3908 <xsl:when test="$ipr-2009-09"> 3909 <t> 3910 This document is subject to BCP 78 and the IETF Trust's Legal 3911 Provisions Relating to IETF Documents (<eref target="http://trustee.ietf.org/license-info">http://trustee.ietf.org/license-info</eref>) 3912 in effect on the date of publication of this document. Please 3913 review these documents carefully, as they describe your rights 3914 and restrictions with respect to this document. Code Components 3915 extracted from this document must include Simplified BSD License 3916 text as described in Section 4.e of the Trust Legal Provisions 3917 and are provided without warranty as described in the BSD License. 3918 </t> 3919 </xsl:when> 3663 3920 <xsl:when test="$ipr-2009-02"> 3664 3921 <t> … … 3684 3941 3685 3942 <!-- special case: RFC5378 escape applies to RFCs as well --> 3686 <!-- currently only applied to RFCs, need to discuss for IDs-->3687 <xsl:if test=" /rfc/@numberand /rfc/@ipr = 'pre5378Trust200902'">3943 <!-- for IDs historically in Status Of This Memo, over here starting 2009-12 --> 3944 <xsl:if test="(/rfc/@number or $pub-yearmonth >= 200912) and /rfc/@ipr = 'pre5378Trust200902'"> 3688 3945 <t> 3689 This document may contain material from IETF Documents or IETF Contributions published or 3690 made publicly available before November 10, 2008. The person(s) controlling the copyright in 3691 some of this material may not have granted the IETF Trust the right to allow modifications of such 3692 material outside the IETF Standards Process. Without obtaining an adequate license from the 3693 person(s) controlling the copyright in such materials, this document may not be modified outside 3694 the IETF Standards Process, and derivative works of it may not be created outside the IETF 3695 Standards Process, except to format it for publication as an RFC or to translate it into languages 3696 other than English. 3946 <xsl:value-of select="$escapeclause"/> 3697 3947 </t> 3698 3948 </xsl:if> … … 3824 4074 3825 4075 <!-- copyright statements --> 3826 <xsl:if test=" not($xml2rfc-private)and not($no-copylong)">4076 <xsl:if test="$xml2rfc-private='' and not($no-copylong)"> 3827 4077 <li xmlns="http://www.w3.org/1999/xhtml"> 3828 4078 <xsl:call-template name="insert-toc-line"> … … 3873 4123 <xsl:choose> 3874 4124 <xsl:when test="@title!=''"><xsl:value-of select="@title"/></xsl:when> 3875 <xsl:otherwise> References</xsl:otherwise>4125 <xsl:otherwise><xsl:value-of select="$xml2rfc-refparent"/></xsl:otherwise> 3876 4126 </xsl:choose> 3877 4127 </xsl:variable> … … 3896 4146 </xsl:with-param> 3897 4147 <xsl:with-param name="target" select="concat($anchor-prefix,'.references')"/> 3898 <xsl:with-param name="title" select=" 'References'"/>4148 <xsl:with-param name="title" select="$xml2rfc-refparent"/> 3899 4149 </xsl:call-template> 3900 4150 … … 3905 4155 <xsl:choose> 3906 4156 <xsl:when test="@title!=''"><xsl:value-of select="@title"/></xsl:when> 3907 <xsl:otherwise> References</xsl:otherwise>4157 <xsl:otherwise><xsl:value-of select="$xml2rfc-refparent"/></xsl:otherwise> 3908 4158 </xsl:choose> 3909 4159 </xsl:variable> … … 4383 4633 4384 4634 <xsl:template match="/" mode="cleanup-edits"> 4385 4635 <xsl:copy><xsl:apply-templates select="node()" mode="cleanup-edits"/></xsl:copy> 4386 4636 </xsl:template> 4387 4637 … … 4597 4847 </xsl:variable> 4598 4848 4599 <table xmlns="http://www.w3.org/1999/xhtml" summary="issue {@name}"class="{$class}">4849 <table xmlns="http://www.w3.org/1999/xhtml" class="{$class}"> 4600 4850 <tr> 4601 4851 <td colspan="3"> … … 4740 4990 4741 4991 <h2 xmlns="http://www.w3.org/1999/xhtml" id="{$anchor-prefix}.issues-list"><a href="#{$anchor-prefix}.issues-list">Issues list</a></h2> 4742 <table xmlns="http://www.w3.org/1999/xhtml" summary="Issues list">4992 <table xmlns="http://www.w3.org/1999/xhtml"> 4743 4993 <thead> 4744 4994 <tr> … … 5130 5380 </xsl:when> 5131 5381 <xsl:when test="$col/@align='left' or not($col/@align)"> 5132 < !-- that's the default, nothing to do here -->5382 <xsl:attribute name="class">left</xsl:attribute> 5133 5383 </xsl:when> 5134 5384 <xsl:otherwise> 5135 <xsl:message>Unknown align attribute on ttcol: <xsl:value-of select="$col/@align"/></xsl:message> 5385 <xsl:call-template name="warning"> 5386 <xsl:with-param name="inline" select="'no'"/> 5387 <xsl:with-param name="msg">Unknown align attribute on ttcol: <xsl:value-of select="$col/@align"/></xsl:with-param> 5388 </xsl:call-template> 5136 5389 </xsl:otherwise> 5137 5390 </xsl:choose> … … 5203 5456 </a> 5204 5457 <xsl:text>: </xsl:text> 5205 <xsl:apply-templates select="text()|eref "/>5458 <xsl:apply-templates select="text()|eref|xref"/> 5206 5459 <xsl:if test="@source"> --<xsl:value-of select="@source"/></xsl:if> 5207 5460 <xsl:text>]</xsl:text> … … 5210 5463 <xsl:attribute name="title"> 5211 5464 <xsl:if test="@source"><xsl:value-of select="@source"/>: </xsl:if> 5212 <xsl:apply-templates select="text()|eref "/>5465 <xsl:apply-templates select="text()|eref|xref"/> 5213 5466 </xsl:attribute> 5214 5467 <xsl:text>[</xsl:text> … … 5303 5556 <xsl:attribute name="title"> 5304 5557 <xsl:call-template name="get-references-section-number"/> 5305 <xsl:text> References</xsl:text> 5558 <xsl:text> </xsl:text> 5559 <xsl:value-of select="$xml2rfc-refparent"/> 5306 5560 </xsl:attribute> 5307 5561 </xsl:otherwise> … … 5328 5582 <xsl:template name="get-category-long"> 5329 5583 <xsl:choose> 5330 <xsl:when test="$xml2rfc-footer "><xsl:value-of select="$xml2rfc-footer"/></xsl:when>5331 <xsl:when test="$xml2rfc-private "/> <!-- private draft, footer not set -->5584 <xsl:when test="$xml2rfc-footer!=''"><xsl:value-of select="$xml2rfc-footer"/></xsl:when> 5585 <xsl:when test="$xml2rfc-private!=''"/> <!-- private draft, footer not set --> 5332 5586 <xsl:when test="/rfc/@category='bcp'">Best Current Practice</xsl:when> 5333 5587 <xsl:when test="/rfc/@category='historic'">Historic</xsl:when> … … 5352 5606 <xsl:template name="get-header-left"> 5353 5607 <xsl:choose> 5354 <xsl:when test="$xml2rfc-header "><xsl:value-of select="$xml2rfc-header"/></xsl:when>5355 <xsl:when test="$xml2rfc-private "/> <!-- private draft, header not set -->5608 <xsl:when test="$xml2rfc-header!=''"><xsl:value-of select="$xml2rfc-header"/></xsl:when> 5609 <xsl:when test="$xml2rfc-private!=''"/> <!-- private draft, header not set --> 5356 5610 <xsl:when test="/rfc/@ipr and not(/rfc/@number)">INTERNET DRAFT</xsl:when> 5357 5611 <xsl:otherwise>RFC <xsl:value-of select="/rfc/@number"/></xsl:otherwise> … … 5363 5617 <xsl:text>http://greenbytes.de/tech/webdav/rfc2629.xslt, </xsl:text> 5364 5618 <!-- when RCS keyword substitution in place, add version info --> 5365 <xsl:if test="contains('$Revision: 1.4 51$',':')">5366 <xsl:value-of select="concat('Revision ',normalize-space(translate(substring-after('$Revision: 1.4 51$', 'Revision: '),'$','')),', ')"/>5619 <xsl:if test="contains('$Revision: 1.475 $',':')"> 5620 <xsl:value-of select="concat('Revision ',normalize-space(translate(substring-after('$Revision: 1.475 $', 'Revision: '),'$','')),', ')"/> 5367 5621 </xsl:if> 5368 <xsl:if test="contains('$Date: 2009- 08-28 12:08:05$',':')">5369 <xsl:value-of select="concat(normalize-space(translate(substring-after('$Date: 2009- 08-28 12:08:05$', 'Date: '),'$','')),', ')"/>5622 <xsl:if test="contains('$Date: 2009-10-02 10:40:00 $',':')"> 5623 <xsl:value-of select="concat(normalize-space(translate(substring-after('$Date: 2009-10-02 10:40:00 $', 'Date: '),'$','')),', ')"/> 5370 5624 </xsl:if> 5371 5625 <xsl:value-of select="concat('XSLT vendor: ',system-property('xsl:vendor'),' ',system-property('xsl:vendor-url'))"/> … … 5507 5761 </xsl:template> 5508 5762 5763 <xsl:template name="extract-normalized"> 5764 <xsl:param name="node"/> 5765 <xsl:param name="name"/> 5766 <xsl:variable name="text" select="normalize-space($node)"/> 5767 <xsl:if test="string-length($node) != string-length($text)"> 5768 <xsl:call-template name="warning"> 5769 <xsl:with-param name="inline" select="'no'"/> 5770 <xsl:with-param name="msg">excessive whitespace in <xsl:value-of select="$name"/>: '<xsl:value-of select="$node"/>'</xsl:with-param> 5771 </xsl:call-template> 5772 </xsl:if> 5773 <xsl:value-of select="$text"/> 5774 </xsl:template> 5775 5509 5776 <!-- checking for email element --> 5510 5777 <xsl:template name="extract-email"> … … 5573 5840 </xsl:template> 5574 5841 5842 <!-- parsing of processing instructions --> 5843 <xsl:template name="parse-pis"> 5844 <xsl:param name="nodes"/> 5845 <xsl:param name="attr"/> 5846 <xsl:param name="sep"/> 5847 <xsl:param name="ret"/> 5848 <xsl:param name="default"/> 5849 5850 <xsl:choose> 5851 <xsl:when test="count($nodes)=0"> 5852 <xsl:choose> 5853 <xsl:when test="$ret!=''"> 5854 <xsl:value-of select="$ret"/> 5855 </xsl:when> 5856 <xsl:otherwise> 5857 <xsl:value-of select="$default"/> 5858 </xsl:otherwise> 5859 </xsl:choose> 5860 </xsl:when> 5861 <xsl:otherwise> 5862 <xsl:variable name="ret2"> 5863 <xsl:for-each select="$nodes[1]"> 5864 <xsl:call-template name="parse-one-pi"> 5865 <xsl:with-param name="str" select="."/> 5866 <xsl:with-param name="attr" select="$attr"/> 5867 <xsl:with-param name="sep" select="$sep"/> 5868 <xsl:with-param name="ret" select="$ret"/> 5869 </xsl:call-template> 5870 </xsl:for-each> 5871 </xsl:variable> 5872 5873 <xsl:call-template name="parse-pis"> 5874 <xsl:with-param name="nodes" select="$nodes[position()!=1]"/> 5875 <xsl:with-param name="attr" select="$attr"/> 5876 <xsl:with-param name="sep" select="$sep"/> 5877 <xsl:with-param name="ret" select="$ret2"/> 5878 <xsl:with-param name="default" select="$default"/> 5879 </xsl:call-template> 5880 5881 </xsl:otherwise> 5882 </xsl:choose> 5883 5884 </xsl:template> 5885 5886 <xsl:template name="parse-one-pi"> 5887 <xsl:param name="str"/> 5888 <xsl:param name="attr"/> 5889 <xsl:param name="sep"/> 5890 <xsl:param name="ret"/> 5891 5892 <xsl:variable name="str2"> 5893 <xsl:call-template name="eat-leading-whitespace"> 5894 <xsl:with-param name="str" select="$str"/> 5895 </xsl:call-template> 5896 </xsl:variable> 5897 5898 <xsl:choose> 5899 <xsl:when test="$str2=''"> 5900 <!-- done --> 5901 <xsl:value-of select="$ret"/> 5902 </xsl:when> 5903 <xsl:otherwise> 5904 <xsl:variable name="attrname" select="substring-before($str2,'=')"/> 5905 5906 <xsl:choose> 5907 <xsl:when test="$attrname=''"> 5908 <xsl:call-template name="warning"> 5909 <xsl:with-param name="msg">bad PI syntax: <xsl:value-of select="$str2"/></xsl:with-param> 5910 <xsl:with-param name="inline" select="'no'"/> 5911 </xsl:call-template> 5912 <xsl:value-of select="$ret"/> 5913 </xsl:when> 5914 <xsl:otherwise> 5915 <xsl:variable name="remainder" select="substring($str2,2+string-length($attrname))"/> 5916 <xsl:choose> 5917 <xsl:when test="string-length($remainder) < 2"> 5918 <xsl:call-template name="warning"> 5919 <xsl:with-param name="msg">bad PI value syntax: <xsl:value-of select="$remainder"/></xsl:with-param> 5920 <xsl:with-param name="inline" select="'no'"/> 5921 </xsl:call-template> 5922 <xsl:value-of select="$ret"/> 5923 </xsl:when> 5924 <xsl:otherwise> 5925 <xsl:variable name="rem"> 5926 <xsl:call-template name="eat-leading-whitespace"> 5927 <xsl:with-param name="str" select="$remainder"/> 5928 </xsl:call-template> 5929 </xsl:variable> 5930 <xsl:variable name="qchars">'"</xsl:variable> 5931 <xsl:variable name="qchar" select="substring($rem,1,1)"/> 5932 <xsl:variable name="rem2" select="substring($rem,2)"/> 5933 <xsl:choose> 5934 <xsl:when test="not(contains($qchars,$qchar))"> 5935 <xsl:call-template name="warning"> 5936 <xsl:with-param name="msg">pseudo-attribute value needs to be quoted: <xsl:value-of select="$rem"/></xsl:with-param> 5937 <xsl:with-param name="inline" select="'no'"/> 5938 </xsl:call-template> 5939 <xsl:value-of select="$ret"/> 5940 </xsl:when> 5941 <xsl:when test="not(contains($rem2,$qchar))"> 5942 <xsl:call-template name="warning"> 5943 <xsl:with-param name="msg">unmatched quote in: <xsl:value-of select="$rem2"/></xsl:with-param> 5944 <xsl:with-param name="inline" select="'no'"/> 5945 </xsl:call-template> 5946 <xsl:value-of select="$ret"/> 5947 </xsl:when> 5948 <xsl:otherwise> 5949 <xsl:variable name="value" select="substring-before($rem2,$qchar)"/> 5950 5951 <!-- check pseudo-attribute names --> 5952 <xsl:if test="name()='rfc-ext' and $attr='SANITYCHECK'"> 5953 <xsl:choose> 5954 <xsl:when test="$attrname='allow-markup-in-artwork'"/> 5955 <xsl:when test="$attrname='authors-section'"/> 5956 <xsl:when test="$attrname='duplex'"/> 5957 <xsl:when test="$attrname='include-references-in-index'"/> 5958 <xsl:when test="$attrname='justification'"/> 5959 <xsl:when test="$attrname='parse-xml-in-artwork'"/> 5960 <xsl:when test="$attrname='sec-no-trailing-dots'"/> 5961 <xsl:otherwise> 5962 <xsl:call-template name="warning"> 5963 <xsl:with-param name="msg">unsupported rfc-ext pseudo-attribute '<xsl:value-of select="$attrname"/>'</xsl:with-param> 5964 <xsl:with-param name="inline" select="'no'"/> 5965 </xsl:call-template> 5966 </xsl:otherwise> 5967 </xsl:choose> 5968 </xsl:if> 5969 5970 <xsl:choose> 5971 <xsl:when test="$attrname != $attr"> 5972 <!-- pseudo-attr does not match, continue --> 5973 <xsl:call-template name="parse-one-pi"> 5974 <xsl:with-param name="str" select="substring($rem2, 2 + string-length($value))"/> 5975 <xsl:with-param name="attr" select="$attr"/> 5976 <xsl:with-param name="sep" select="$sep"/> 5977 <xsl:with-param name="ret" select="$ret"/> 5978 </xsl:call-template> 5979 </xsl:when> 5980 <xsl:when test="$sep='' and $ret!=''"> 5981 <!-- pseudo-attr does match, but we only want one value --> 5982 <xsl:if test="$ret != $value"> 5983 <xsl:call-template name="warning"> 5984 <xsl:with-param name="msg">duplicate pseudo-attribute <xsl:value-of select="$attr"/>, overwriting value <xsl:value-of select="$ret"/></xsl:with-param> 5985 <xsl:with-param name="inline" select="'no'"/> 5986 </xsl:call-template> 5987 </xsl:if> 5988 <xsl:call-template name="parse-one-pi"> 5989 <xsl:with-param name="str" select="substring($rem2, 2 + string-length($value))"/> 5990 <xsl:with-param name="attr" select="$attr"/> 5991 <xsl:with-param name="sep" select="$sep"/> 5992 <xsl:with-param name="ret" select="$value"/> 5993 </xsl:call-template> 5994 </xsl:when> 5995 <xsl:otherwise> 5996 <!-- pseudo-attr does match --> 5997 <xsl:call-template name="parse-one-pi"> 5998 <xsl:with-param name="str" select="substring($rem2, 2 + string-length($value))"/> 5999 <xsl:with-param name="attr" select="$attr"/> 6000 <xsl:with-param name="sep" select="$sep"/> 6001 <xsl:with-param name="ret"> 6002 <xsl:choose> 6003 <xsl:when test="$ret!=''"> 6004 <xsl:value-of select="concat($ret,$sep,$value)"/> 6005 </xsl:when> 6006 <xsl:otherwise> 6007 <xsl:value-of select="$value"/> 6008 </xsl:otherwise> 6009 </xsl:choose> 6010 </xsl:with-param> 6011 </xsl:call-template> 6012 </xsl:otherwise> 6013 6014 </xsl:choose> 6015 6016 </xsl:otherwise> 6017 </xsl:choose> 6018 </xsl:otherwise> 6019 </xsl:choose> 6020 </xsl:otherwise> 6021 </xsl:choose> 6022 </xsl:otherwise> 6023 </xsl:choose> 6024 6025 </xsl:template> 6026 6027 <xsl:template name="eat-leading-whitespace"> 6028 <xsl:param name="str"/> 6029 6030 <xsl:choose> 6031 <xsl:when test="$str=''"> 6032 </xsl:when> 6033 <xsl:when test="translate(substring($str,1,1),' 

	',' ')=' '"> 6034 <xsl:call-template name="eat-leading-whitespace"> 6035 <xsl:with-param name="str" select="substring($str,2)"/> 6036 </xsl:call-template> 6037 </xsl:when> 6038 <xsl:otherwise> 6039 <xsl:value-of select="$str"/> 6040 </xsl:otherwise> 6041 </xsl:choose> 6042 6043 </xsl:template> 6044 5575 6045 <!-- diag support --> 5576 6046 <xsl:template name="lineno"> … … 5619 6089 <xsl:variable name="may-default-dates"> 5620 6090 <xsl:choose> 5621 <xsl:when test="function-available('date:year') and function-available('date:month-in-year') and date:day-in-month()">6091 <xsl:when test="function-available('date:year') and function-available('date:month-in-year') and function-available('date:day-in-month')"> 5622 6092 <xsl:variable name="year-specified" select="/rfc/front/date/@year and /rfc/front/date/@year!=''"/> 5623 6093 <xsl:variable name="month-specified" select="/rfc/front/date/@month and /rfc/front/date/@month!=''"/> … … 5647 6117 <xsl:value-of select="/rfc/front/date/@year"/> 5648 6118 </xsl:when> 5649 <xsl:when test="function-available('date:year')"> 5650 <xsl:if test="/rfc/front/date/@month and /rfc/front/date/@month!=''"> 5651 <xsl:call-template name="error"> 5652 <xsl:with-param name="msg" select="'defaulting publication year although month was specified'"/> 5653 </xsl:call-template> 5654 </xsl:if> 5655 <xsl:if test="/rfc/front/date/@day and /rfc/front/date/@day!=''"> 5656 <xsl:call-template name="error"> 5657 <xsl:with-param name="msg" select="'defaulting publication year although day was specified'"/> 5658 </xsl:call-template> 5659 </xsl:if> 6119 <xsl:when test="function-available('date:year') and $may-default-dates='yes'"> 5660 6120 <xsl:value-of select="date:year()"/> 6121 </xsl:when> 6122 <xsl:when test="function-available('date:year') and $may-default-dates!='yes'"> 6123 <xsl:call-template name="warning"> 6124 <xsl:with-param name="inline" select="'no'"/> 6125 <xsl:with-param name="msg" select="$may-default-dates"/> 6126 </xsl:call-template> 5661 6127 </xsl:when> 5662 6128 <xsl:otherwise> … … 5692 6158 </xsl:param> 5693 6159 5694 <xsl:param name=" xml2rfc-ext-pub-month-numeric">6160 <xsl:param name="pub-month-numeric"> 5695 6161 <xsl:call-template name="get-month-as-num"> 5696 6162 <xsl:with-param name="month" select="$xml2rfc-ext-pub-month"/> … … 5710 6176 </xsl:param> 5711 6177 6178 <xsl:param name="pub-yearmonth"> 6179 <!-- year or 0000 --> 6180 <xsl:choose> 6181 <xsl:when test="$xml2rfc-ext-pub-year!=''"> 6182 <xsl:value-of select="format-number($xml2rfc-ext-pub-year,'0000')"/> 6183 </xsl:when> 6184 <xsl:otherwise>0000</xsl:otherwise> 6185 </xsl:choose> 6186 <!-- month or 00 --> 6187 <xsl:choose> 6188 <xsl:when test="$pub-month-numeric > 0"> 6189 <xsl:value-of select="format-number($pub-month-numeric,'00')"/> 6190 </xsl:when> 6191 <xsl:otherwise>00</xsl:otherwise> 6192 </xsl:choose> 6193 6194 </xsl:param> 6195 5712 6196 </xsl:transform>
Note: See TracChangeset
for help on using the changeset viewer.