Changeset 1522 for rfc2629xslt
- Timestamp:
- 01/02/12 01:11:11 (11 years ago)
- Location:
- rfc2629xslt
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
rfc2629xslt/clean-for-DTD.xslt
r1426 r1522 139 139 <xsl:template match="x:link" mode="cleanup"/> 140 140 <xsl:template match="x:source" mode="cleanup"/> 141 <xsl:template match="x:feedback" mode="cleanup"/> 141 142 142 143 <xsl:template match="x:parse-xml" mode="cleanup"> -
rfc2629xslt/rfc2629.xslt
r1497 r1522 2 2 XSLT transformation from RFC2629 XML format to HTML 3 3 4 Copyright (c) 2006-201 1, Julian Reschke (julian.reschke@greenbytes.de)4 Copyright (c) 2006-2012, Julian Reschke (julian.reschke@greenbytes.de) 5 5 All rights reserved. 6 6 … … 1081 1081 1082 1082 <xsl:template match="front"> 1083 1084 1083 <xsl:if test="$xml2rfc-topblock!='no'"> 1085 1084 <!-- collect information for left column --> … … 1899 1898 <xsl:apply-templates select="front/title" mode="get-text-content" /> 1900 1899 </title> 1900 <xsl:call-template name="insertScript" /> 1901 1901 <xsl:call-template name="insertCss" /> 1902 1902 <!-- <link rel="alternate stylesheet" type="text/css" media="screen" title="Plain (typewriter)" href="rfc2629tty.css" /> --> … … 2011 2011 </head> 2012 2012 <body> 2013 <xsl:if test="/rfc/x:feedback"> 2014 <xsl:attribute name="onload">init();</xsl:attribute> 2015 </xsl:if> 2016 2013 2017 <!-- insert diagnostics --> 2014 2018 <xsl:call-template name="insert-diagnostics"/> … … 3271 3275 </xsl:template> 3272 3276 3277 <!-- optional scripts --> 3278 <xsl:template name="insertScript"> 3279 <xsl:if test="/rfc/x:feedback"> 3280 <script> 3281 var buttonsAdded = false; 3282 3283 function init() { 3284 var fb = document.createElement("div"); 3285 fb.setAttribute("class", "feedback"); 3286 fb.setAttribute("onclick", "feedback();"); 3287 fb.appendChild(document.createTextNode("feedback")); 3288 3289 var bodyl = document.getElementsByTagName("body"); 3290 bodyl.item(0).appendChild(fb); 3291 } 3292 3293 function feedback() { 3294 toggleButtonsToElementsByName("h1"); 3295 toggleButtonsToElementsByName("h2"); 3296 toggleButtonsToElementsByName("h3"); 3297 toggleButtonsToElementsByName("h4"); 3298 3299 buttonsAdded = !buttonsAdded; 3300 } 3301 3302 function toggleButtonsToElementsByName(name) { 3303 var list = document.getElementsByTagName(name); 3304 for (var i = 0; i < list.length; i++) { 3305 toggleButton(list.item(i)); 3306 } 3307 } 3308 3309 function toggleButton(node) { 3310 if (! buttonsAdded) { 3311 3312 // docname 3313 var template = "<xsl:call-template name="replace-substring"> 3314 <xsl:with-param name="string" select="/rfc/x:feedback/@template"/> 3315 <xsl:with-param name="replace">"</xsl:with-param> 3316 <xsl:with-param name="by">\"</xsl:with-param> 3317 </xsl:call-template>"; 3318 3319 var id = node.getAttribute("id"); 3320 // better id available? 3321 var titlelinks = node.getElementsByTagName("a"); 3322 for (var i = 0; i < titlelinks.length; i++) { 3323 var tl = titlelinks.item(i); 3324 if (tl.getAttribute("id")) { 3325 id = tl.getAttribute("id"); 3326 } 3327 } 3328 3329 // ref 3330 var ref = window.location.toString(); 3331 var hash = ref.indexOf("#"); 3332 if (hash != -1) { 3333 ref = ref.substring(0, hash); 3334 } 3335 if (id != "") { 3336 ref += "#" + id; 3337 } 3338 3339 // docname 3340 var docname = "<xsl:value-of select="/rfc/@docName"/>"; 3341 3342 // section 3343 var section = node.textContent; 3344 3345 // build URI from template 3346 var uri = template.replace("{docname}", encodeURIComponent(docname)); 3347 uri = uri.replace("{section}", encodeURIComponent(section)); 3348 uri = uri.replace("{ref}", encodeURIComponent(ref)); 3349 3350 var button = document.createElement("a"); 3351 button.setAttribute("class", "fbbutton"); 3352 button.setAttribute("href", uri); 3353 button.appendChild(document.createTextNode("send feedback")); 3354 node.appendChild(button); 3355 } 3356 else { 3357 var buttons = node.getElementsByTagName("a"); 3358 for (var i = 0; i < buttons.length; i++) { 3359 var b = buttons.item(i); 3360 if (b.getAttribute("class") == "fbbutton") { 3361 node.removeChild(b); 3362 } 3363 } 3364 } 3365 }</script> 3366 </xsl:if> 3367 </xsl:template> 3273 3368 3274 3369 <!-- insert CSS style info --> … … 3677 3772 font-size: smaller; 3678 3773 font-weight: bold; 3774 }</xsl:if><xsl:if test="/rfc/x:feedback">.feedback { 3775 position: fixed; 3776 bottom: 1%; 3777 right: 1%; 3778 padding: 3px 5px; 3779 color: white; 3780 border-radius: 5px; 3781 background: #a00000; 3782 border: 1px solid silver; 3783 } 3784 .fbbutton { 3785 margin-left: 1em; 3786 color: #303030; 3787 font-size: small; 3788 font-weight: normal; 3789 background: #d0d000; 3790 padding: 1px 4px; 3791 border: 1px solid silver; 3792 border-radius: 5px; 3679 3793 }</xsl:if><xsl:if test="$xml2rfc-ext-justification='always'"> 3680 3681 3794 dd, li, p { 3682 3795 text-align: justify; … … 5034 5147 5035 5148 <xsl:template name="replace-substring"> 5036 5037 5149 <xsl:param name="string" /> 5038 5150 <xsl:param name="replace" /> … … 6414 6526 <xsl:text>http://greenbytes.de/tech/webdav/rfc2629.xslt, </xsl:text> 6415 6527 <!-- when RCS keyword substitution in place, add version info --> 6416 <xsl:if test="contains('$Revision: 1.56 1$',':')">6417 <xsl:value-of select="concat('Revision ',normalize-space(translate(substring-after('$Revision: 1.56 1$', 'Revision: '),'$','')),', ')" />6528 <xsl:if test="contains('$Revision: 1.564 $',':')"> 6529 <xsl:value-of select="concat('Revision ',normalize-space(translate(substring-after('$Revision: 1.564 $', 'Revision: '),'$','')),', ')" /> 6418 6530 </xsl:if> 6419 <xsl:if test="contains('$Date: 201 1-12-24 13:06:50$',':')">6420 <xsl:value-of select="concat(normalize-space(translate(substring-after('$Date: 201 1-12-24 13:06:50$', 'Date: '),'$','')),', ')" />6531 <xsl:if test="contains('$Date: 2012-01-28 14:56:56 $',':')"> 6532 <xsl:value-of select="concat(normalize-space(translate(substring-after('$Date: 2012-01-28 14:56:56 $', 'Date: '),'$','')),', ')" /> 6421 6533 </xsl:if> 6422 6534 <xsl:value-of select="concat('XSLT vendor: ',system-property('xsl:vendor'),' ',system-property('xsl:vendor-url'))" /> -
rfc2629xslt/rfc2629toXHTML.xslt
r1497 r1522 949 949 950 950 <xsl:template match="front"> 951 952 951 <xsl:if test="$xml2rfc-topblock!='no'"> 953 952 <!-- collect information for left column --> … … 1767 1766 <xsl:apply-templates select="front/title" mode="get-text-content"/> 1768 1767 </title> 1768 <xsl:call-template name="insertScript"/> 1769 1769 <xsl:call-template name="insertCss"/> 1770 1770 <!-- <link rel="alternate stylesheet" type="text/css" media="screen" title="Plain (typewriter)" href="rfc2629tty.css" /> --> … … 1879 1879 </head> 1880 1880 <body> 1881 <xsl:if test="/rfc/x:feedback"> 1882 <xsl:attribute name="onload">init();</xsl:attribute> 1883 </xsl:if> 1884 1881 1885 <!-- insert diagnostics --> 1882 1886 <xsl:call-template name="insert-diagnostics"/> … … 3139 3143 </xsl:template> 3140 3144 3145 <!-- optional scripts --> 3146 <xsl:template name="insertScript"> 3147 <xsl:if test="/rfc/x:feedback"> 3148 <script xmlns="http://www.w3.org/1999/xhtml"> 3149 var buttonsAdded = false; 3150 3151 function init() { 3152 var fb = document.createElement("div"); 3153 fb.setAttribute("class", "feedback"); 3154 fb.setAttribute("onclick", "feedback();"); 3155 fb.appendChild(document.createTextNode("feedback")); 3156 3157 var bodyl = document.getElementsByTagName("body"); 3158 bodyl.item(0).appendChild(fb); 3159 } 3160 3161 function feedback() { 3162 toggleButtonsToElementsByName("h1"); 3163 toggleButtonsToElementsByName("h2"); 3164 toggleButtonsToElementsByName("h3"); 3165 toggleButtonsToElementsByName("h4"); 3166 3167 buttonsAdded = !buttonsAdded; 3168 } 3169 3170 function toggleButtonsToElementsByName(name) { 3171 var list = document.getElementsByTagName(name); 3172 for (var i = 0; i < list.length; i++) { 3173 toggleButton(list.item(i)); 3174 } 3175 } 3176 3177 function toggleButton(node) { 3178 if (! buttonsAdded) { 3179 3180 // docname 3181 var template = "<xsl:call-template name="replace-substring"> 3182 <xsl:with-param name="string" select="/rfc/x:feedback/@template"/> 3183 <xsl:with-param name="replace">"</xsl:with-param> 3184 <xsl:with-param name="by">\"</xsl:with-param> 3185 </xsl:call-template>"; 3186 3187 var id = node.getAttribute("id"); 3188 // better id available? 3189 var titlelinks = node.getElementsByTagName("a"); 3190 for (var i = 0; i < titlelinks.length; i++) { 3191 var tl = titlelinks.item(i); 3192 if (tl.getAttribute("id")) { 3193 id = tl.getAttribute("id"); 3194 } 3195 } 3196 3197 // ref 3198 var ref = window.location.toString(); 3199 var hash = ref.indexOf("#"); 3200 if (hash != -1) { 3201 ref = ref.substring(0, hash); 3202 } 3203 if (id != "") { 3204 ref += "#" + id; 3205 } 3206 3207 // docname 3208 var docname = "<xsl:value-of select="/rfc/@docName"/>"; 3209 3210 // section 3211 var section = node.textContent; 3212 3213 // build URI from template 3214 var uri = template.replace("{docname}", encodeURIComponent(docname)); 3215 uri = uri.replace("{section}", encodeURIComponent(section)); 3216 uri = uri.replace("{ref}", encodeURIComponent(ref)); 3217 3218 var button = document.createElement("a"); 3219 button.setAttribute("class", "fbbutton"); 3220 button.setAttribute("href", uri); 3221 button.appendChild(document.createTextNode("send feedback")); 3222 node.appendChild(button); 3223 } 3224 else { 3225 var buttons = node.getElementsByTagName("a"); 3226 for (var i = 0; i < buttons.length; i++) { 3227 var b = buttons.item(i); 3228 if (b.getAttribute("class") == "fbbutton") { 3229 node.removeChild(b); 3230 } 3231 } 3232 } 3233 }</script> 3234 </xsl:if> 3235 </xsl:template> 3141 3236 3142 3237 <!-- insert CSS style info --> … … 3545 3640 font-size: smaller; 3546 3641 font-weight: bold; 3642 }</xsl:if><xsl:if test="/rfc/x:feedback">.feedback { 3643 position: fixed; 3644 bottom: 1%; 3645 right: 1%; 3646 padding: 3px 5px; 3647 color: white; 3648 border-radius: 5px; 3649 background: #a00000; 3650 border: 1px solid silver; 3651 } 3652 .fbbutton { 3653 margin-left: 1em; 3654 color: #303030; 3655 font-size: small; 3656 font-weight: normal; 3657 background: #d0d000; 3658 padding: 1px 4px; 3659 border: 1px solid silver; 3660 border-radius: 5px; 3547 3661 }</xsl:if><xsl:if test="$xml2rfc-ext-justification='always'"> 3548 3549 3662 dd, li, p { 3550 3663 text-align: justify; … … 4890 5003 4891 5004 <xsl:template name="replace-substring"> 4892 4893 5005 <xsl:param name="string"/> 4894 5006 <xsl:param name="replace"/> … … 6269 6381 <xsl:text>http://greenbytes.de/tech/webdav/rfc2629.xslt, </xsl:text> 6270 6382 <!-- when RCS keyword substitution in place, add version info --> 6271 <xsl:if test="contains('$Revision: 1.56 1$',':')">6272 <xsl:value-of select="concat('Revision ',normalize-space(translate(substring-after('$Revision: 1.56 1$', 'Revision: '),'$','')),', ')"/>6383 <xsl:if test="contains('$Revision: 1.564 $',':')"> 6384 <xsl:value-of select="concat('Revision ',normalize-space(translate(substring-after('$Revision: 1.564 $', 'Revision: '),'$','')),', ')"/> 6273 6385 </xsl:if> 6274 <xsl:if test="contains('$Date: 201 1-12-24 13:06:50$',':')">6275 <xsl:value-of select="concat(normalize-space(translate(substring-after('$Date: 201 1-12-24 13:06:50$', 'Date: '),'$','')),', ')"/>6386 <xsl:if test="contains('$Date: 2012-01-28 14:56:56 $',':')"> 6387 <xsl:value-of select="concat(normalize-space(translate(substring-after('$Date: 2012-01-28 14:56:56 $', 'Date: '),'$','')),', ')"/> 6276 6388 </xsl:if> 6277 6389 <xsl:value-of select="concat('XSLT vendor: ',system-property('xsl:vendor'),' ',system-property('xsl:vendor-url'))"/> -
rfc2629xslt/rfc2629xslt.html
r1497 r1522 382 382 } 383 383 } 384 </style><link rel="Contents" href="#rfc.toc"><link rel="Author" href="#rfc.authors"><link rel="Index" href="#rfc.index"><link rel="Chapter" title="1 Introduction" href="#rfc.section.1"><link rel="Chapter" title="2 Supported RFC2629 elements" href="#rfc.section.2"><link rel="Chapter" title="3 Processing Instructions" href="#rfc.section.3"><link rel="Chapter" title="4 Anchors" href="#rfc.section.4"><link rel="Chapter" title="5 Supported XSLT engines" href="#rfc.section.5"><link rel="Chapter" title="6 Transforming to HTML" href="#rfc.section.6"><link rel="Chapter" title="7 Transforming to XHTML" href="#rfc.section.7"><link rel="Chapter" title="8 Transforming to CHM (Microsoft Compiled Help)" href="#rfc.section.8"><link rel="Chapter" title="9 Transforming to PDF" href="#rfc.section.9"><link rel="Chapter" title="10 Transforming to ePub" href="#rfc.section.10"><link rel="Chapter" title="11 Generic Extensions" href="#rfc.section.11"><link rel="Chapter" title="12 Utilities" href="#rfc.section.12"><link rel="Chapter" href="#rfc.section.13" title="13 Informative References"><link rel="Appendix" title="A RELAX NG Compact Schema" href="#rfc.section.A"><link rel="Appendix" title="B Implementation Notes" href="#rfc.section.B"><link rel="Appendix" title="C Examples" href="#rfc.section.C"><link rel="Appendix" title="D Producing the IETF 'Boilerplate'" href="#rfc.section.D"><link rel="Appendix" title="E License" href="#rfc.section.E"><link rel="Appendix" title="F Change Logs" href="#rfc.section.F"><meta name="generator" content="http://greenbytes.de/tech/webdav/rfc2629.xslt, Revision 1.56 1, 2011-12-24 13:06:50, XSLT vendor: SAXON 6.5.5 from Michael Kay http://saxon.sf.net/"><meta name="keywords" content="RFC2629, xml2rfc, XSLT, hCard, XSL-FO, PDF, GRDDL, epub, Dublin Core"><link rel="schema.dct" href="http://purl.org/dc/terms/"><meta name="dct.creator" content="Reschke, J. F."></head><body><table class="header"><tbody><tr><td class="left">RFC2629 through XSLT</td><td class="right">J. Reschke</td></tr><tr><td class="left"></td><td class="right">greenbytes</td></tr><tr><td class="left"></td><td class="right">November 2011</td></tr></tbody></table><p class="title">Transforming RFC2629-formatted XML through XSLT</p><hr class="noprint"><h1 class="np" id="rfc.toc"><a href="#rfc.toc">Table of Contents</a></h1><ul class="toc"><li>1. <a href="#rfc.section.1">Introduction</a></li><li>2. <a href="#supported.elements">Supported RFC2629 elements</a><ul><li>2.1 <a href="#rfc.section.2.1">Extension elements</a></li></ul></li><li>3. <a href="#processing.instructions">Processing Instructions</a><ul><li>3.1 <a href="#rfc.section.3.1">Supported xml2rfc-compatible PIs</a></li><li>3.2 <a href="#rfc.section.3.2">Unsupported xml2rfc-compatible PIs</a></li><li>3.3 <a href="#rfc.section.3.3">Extension PIs</a></li></ul></li><li>4. <a href="#anchors">Anchors</a></li><li>5. <a href="#xslt.engines">Supported XSLT engines</a><ul><li>5.1 <a href="#rfc.section.5.1">Standalone Engines</a></li><li>5.2 <a href="#xslt.engines.browser">In-Browser Engines</a></li></ul></li><li>6. <a href="#output.html">Transforming to HTML</a><ul><li>6.1 <a href="#rfc.section.6.1">HTML compliance</a></li><li>6.2 <a href="#html.link">Standard HTML LINK elements</a></li><li>6.3 <a href="#rfc.section.6.3">Standard HTML metadata</a></li><li>6.4 <a href="#rfc2731.properties">Dublin Core (RFC2731) metadata</a></li><li>6.5 <a href="#hcard">Experimental hCard support</a></li></ul></li><li>7. <a href="#output.xhtml">Transforming to XHTML</a></li><li>8. <a href="#output.chm">Transforming to CHM (Microsoft Compiled Help)</a></li><li>9. <a href="#output.pdf">Transforming to PDF</a><ul><li>9.1 <a href="#output.pdf.fop">Via XSL-FO</a><ul><li>9.1.1 <a href="#rfc.section.9.1.1">Extension feature matrix</a></li><li>9.1.2 <a href="#rfc.section.9.1.2">Example: producing output for Apache FOP</a></li></ul></li><li>9.2 <a href="#output.pdf.html">Via X(HTML)</a></li></ul></li><li>10. <a href="#output.epub">Transforming to ePub</a></li><li>11. <a href="#extensions">Generic Extensions</a><ul><li>11.1 <a href="#ext.element.abnf-char-sequence"><abnf-char-sequence> element</a></li><li>11.2 <a href="#ext.element.anchor-alias"><anchor-alias> element</a></li><li>11.3 <a href="#ext.element.bcp14"><bcp14> element</a></li><li>11.4 <a href="#ext.element.bb"><bb> element</a></li><li>11.5 <a href="#ext.element.bc"><bc> element</a></li><li>11.6 <a href="#ext.element.blockquote"><blockquote> element</a></li><li>11.7 <a href="#ext.element.boilerplate"><boilerplate> element</a></li><li>11.8 <a href="#ext.element.bt"><bt> element</a></li><li>11.9 <a href="#ext.element.dfn"><dfn> element</a></li><li>11.10 <a href="#ext.element.h"><h> element</a></li><li>11.11 <a href="#ext.element.highlight"><highlight> element</a></li><li>11.12 <a href="#ext.element.length-of"><length-of> element</a></li><li>11.13 <a href="#ext.element.link"><link> element</a></li><li>11.14 <a href="#ext.element.lt"><lt> element</a></li><li>11.15 <a href="#ext.element.note"><note> element</a></li><li>11.16 <a href="#ext.element.parse-xml"><parse-xml> element</a></li><li>11.17 <a href="#ext.element.prose"><prose> element</a></li><li>11.18 <a href="#ext.element.q"><q> element</a></li><li>11.19 <a href="#ext.element.ref"><ref> element</a></li><li>11.20 <a href="#ext.element.source"><source> element</a></li><li>11.21 <a href="#ext.element.sup"><sup> element</a></li><li>11.22 <a href="#ext-rfc2629.artwork">Extensions to Xml2rfc <artwork> element</a></li><li>11.23 <a href="#ext-rfc2629.iref">Extensions to Xml2rfc <iref> element</a></li><li>11.24 <a href="#ext-rfc2629.list">Extensions to Xml2rfc <list> element</a></li><li>11.25 <a href="#ext-rfc2629.rfc">Extensions to Xml2rfc <rfc> element</a></li><li>11.26 <a href="#ext-rfc2629.section">Extensions to Xml2rfc <section> element</a></li><li>11.27 <a href="#ext-rfc2629.xref">Extensions to Xml2rfc <xref> element</a></li></ul></li><li>12. <a href="#utilities">Utilities</a><ul><li>12.1 <a href="#checking-references">Checking References</a></li><li>12.2 <a href="#rfc.section.12.2">Generating Graphs from References</a></li><li>12.3 <a href="#rfc.section.12.3">Producing reference entries for books</a></li><li>12.4 <a href="#clean-for-dtd">Down-converting to RFC2629bis DTD</a></li><li>12.5 <a href="#extract-artwork">Extracting artwork</a></li><li>12.6 <a href="#grddl">GRRDL</a></li></ul></li><li>13. <a href="#rfc.references">Informative References</a></li><li><a href="#rfc.authors">Author's Address</a></li><li>A. <a href="#grammar">RELAX NG Compact Schema</a></li><li>B. <a href="#rfc.section.B">Implementation Notes</a><ul><li>B.1 <a href="#rfc.section.B.1">Recognized type attributes for <artwork> element</a></li></ul></li><li>C. <a href="#examples">Examples</a><ul><li>C.1 <a href="#examples.internalsubset">Using the 'Internal Subset'</a></li><li>C.2 <a href="#examples.customizing">Customization</a></li></ul></li><li>D. <a href="#boilerplate">Producing the IETF 'Boilerplate'</a><ul><li>D.1 <a href="#attribute-ipr">The /rfc/@ipr Attribute</a><ul><li>D.1.1 <a href="#attribute-ipr-current">Current Values: '*trust200902'</a><ul><li>D.1.1.1 <a href="#attribute-ipr-trust200902">trust200902</a></li><li>D.1.1.2 <a href="#attribute-ipr-noModificationTrust200902">noModificationTrust200902</a></li><li>D.1.1.3 <a href="#attribute-ipr-noDerivativesTrust200902">noDerivativesTrust200902</a></li><li>D.1.1.4 <a href="#attribute-ipr-pre5378Trust200902">pre5378Trust200902</a></li></ul></li><li>D.1.2 <a href="#attribute-ipr-historic">Historic Values</a><ul><li>D.1.2.1 <a href="#attribute-ipr-200811">Historic Values: '*trust200811'</a></li><li>D.1.2.2 <a href="#attribute-ipr-3978">Historic Values: '*3978'</a></li><li>D.1.2.3 <a href="#attribute-ipr-3667">Historic Values: '*3667'</a></li><li>D.1.2.4 <a href="#attribute-ipr-2026">Historic Values: '*2026'</a></li></ul></li></ul></li><li>D.2 <a href="#attribute-category">The /rfc/@category Attribute</a></li><li>D.3 <a href="#attribute-submissiontype">The /rfc/@submissionType Attribute</a></li><li>D.4 <a href="#attribute-consensus">The /rfc/@consensus Attribute</a></li><li>D.5 <a href="#attribute-number">The /rfc/@number Attribute</a></li><li>D.6 <a href="#attribute-docname">The /rfc/@docName Attribute</a></li><li>D.7 <a href="#attribute-obsoletes">The /rfc/@obsoletes Attribute</a></li><li>D.8 <a href="#attribute-updates">The /rfc/@updates Attribute</a></li></ul></li><li>E. <a href="#license">License</a></li><li>F. <a href="#rfc.section.F">Change Logs</a><ul><li>F.1 <a href="#rfc.section.F.1">Package</a></li><li>F.2 <a href="#rfc.section.F.2">amazon-asin.xslt</a></li><li>F.3 <a href="#rfc.section.F.3">check-references.xslt</a></li><li>F.4 <a href="#rfc.section.F.4">gen-reference-graph.xslt</a></li><li>F.5 <a href="#rfc.section.F.5">rfc2629.xslt</a></li><li>F.6 <a href="#rfc.section.F.6">rfc2629toFO.xslt</a></li><li>F.7 <a href="#rfc.section.F.7">xsl11toAn.xslt</a></li><li>F.8 <a href="#rfc.section.F.8">xsl11toFop.xslt</a></li><li>F.9 <a href="#rfc.section.F.9">xsl11toXep.xslt</a></li></ul></li><li><a href="#rfc.index">Index</a></li></ul><hr class="noprint"><h1 id="rfc.section.1" class="np"><a href="#rfc.section.1">1.</a> Introduction</h1><p id="rfc.section.1.p.1">This document describes a set of XSLT transformations that can be used to transform RFC2629-compliant XML (see <a href="#RFC2629" id="rfc.xref.RFC2629.1"><cite title="Writing I-Ds and RFCs using XML">[RFC2629]</cite></a>) to various output formats, such as HTML and PDF. The main topics are </p><ul><li>compliance to the xml2rfc XML element set (<a href="#supported.elements" title="Supported RFC2629 elements">Section 2</a>),</li><li>support for xml2rfc processing instructions (<a href="#processing.instructions" title="Processing Instructions">Section 3</a>),</li><li>the names of anchor elements generated in HTML and PDF output (<a href="#anchors" title="Anchors">Section 4</a>),</li><li>various XSLT engines that can be used (<a href="#xslt.engines" title="Supported XSLT engines">Section 5</a>),</li><li>outputting HTML (<a href="#output.html" title="Transforming to HTML">Section 6</a>) and XHTML (<a href="#output.xhtml" title="Transforming to XHTML">Section 7</a>),</li><li>outputting CHM (Compiled Microsoft Help, <a href="#output.chm" title="Transforming to CHM (Microsoft Compiled Help)">Section 8</a>),</li><li>outputting PDF (<a href="#output.pdf" title="Transforming to PDF">Section 9</a>),</li><li>outputting ePub (<a href="#output.epub" title="Transforming to ePub">Section 10</a>),</li><li>extensions to the xml2rfc vocabulary (<a href="#extensions" title="Generic Extensions">Section 11</a>).</li><li>various utilities (<a href="#utilities" title="Utilities">Section 12</a>).</li></ul><p id="rfc.section.1.p.2">The full distribution is available at <<a href="http://greenbytes.de/tech/webdav/rfc2629xslt.zip">http://greenbytes.de/tech/webdav/rfc2629xslt.zip</a>>.</p><hr class="noprint"><h1 id="rfc.section.2" class="np"><a href="#rfc.section.2">2.</a> <a id="supported.elements" href="#supported.elements">Supported RFC2629 elements</a></h1><p id="rfc.section.2.p.1"> <samp>rfc2629.xslt</samp> supports both all RFC2629 grammar elements and the extensions implemented in xml2rfc 1.36.</p><h2 id="rfc.section.2.1"><a href="#rfc.section.2.1">2.1</a> Extension elements</h2><p id="rfc.section.2.1.p.1"> <samp>rfc2629.xslt</samp> supports two kind of extension elements, using different XML namespaces.</p><p id="rfc.section.2.1.p.2">The first set contains (hopefully) generally useful extensions, see <a href="#extensions" title="Generic Extensions">Section 11</a>.</p><p id="rfc.section.2.1.p.3">The second set is used for change and issue tracking and currently is not documented here. Please email the author in case you're interested in using these extensions.</p><hr class="noprint"><h1 id="rfc.section.3" class="np"><a href="#rfc.section.3">3.</a> <a id="processing.instructions" href="#processing.instructions">Processing Instructions</a></h1><p id="rfc.section.3.p.1">All PIs can be set as XSLT parameter as well, overriding any value that is found in the source file to be transformed.</p><div id="rfc.figure.u.1"></div> <p>Using processing instructions:</p> <pre class="text"><?rfc toc="yes"?>384 </style><link rel="Contents" href="#rfc.toc"><link rel="Author" href="#rfc.authors"><link rel="Index" href="#rfc.index"><link rel="Chapter" title="1 Introduction" href="#rfc.section.1"><link rel="Chapter" title="2 Supported RFC2629 elements" href="#rfc.section.2"><link rel="Chapter" title="3 Processing Instructions" href="#rfc.section.3"><link rel="Chapter" title="4 Anchors" href="#rfc.section.4"><link rel="Chapter" title="5 Supported XSLT engines" href="#rfc.section.5"><link rel="Chapter" title="6 Transforming to HTML" href="#rfc.section.6"><link rel="Chapter" title="7 Transforming to XHTML" href="#rfc.section.7"><link rel="Chapter" title="8 Transforming to CHM (Microsoft Compiled Help)" href="#rfc.section.8"><link rel="Chapter" title="9 Transforming to PDF" href="#rfc.section.9"><link rel="Chapter" title="10 Transforming to ePub" href="#rfc.section.10"><link rel="Chapter" title="11 Generic Extensions" href="#rfc.section.11"><link rel="Chapter" title="12 Utilities" href="#rfc.section.12"><link rel="Chapter" href="#rfc.section.13" title="13 Informative References"><link rel="Appendix" title="A RELAX NG Compact Schema" href="#rfc.section.A"><link rel="Appendix" title="B Implementation Notes" href="#rfc.section.B"><link rel="Appendix" title="C Examples" href="#rfc.section.C"><link rel="Appendix" title="D Producing the IETF 'Boilerplate'" href="#rfc.section.D"><link rel="Appendix" title="E License" href="#rfc.section.E"><link rel="Appendix" title="F Change Logs" href="#rfc.section.F"><meta name="generator" content="http://greenbytes.de/tech/webdav/rfc2629.xslt, Revision 1.564, 2012-01-28 14:56:56, XSLT vendor: SAXON 6.5.5 from Michael Kay http://saxon.sf.net/"><meta name="keywords" content="RFC2629, xml2rfc, XSLT, hCard, XSL-FO, PDF, GRDDL, epub, Dublin Core"><link rel="schema.dct" href="http://purl.org/dc/terms/"><meta name="dct.creator" content="Reschke, J. F."></head><body><table class="header"><tbody><tr><td class="left">RFC2629 through XSLT</td><td class="right">J. Reschke</td></tr><tr><td class="left"></td><td class="right">greenbytes</td></tr><tr><td class="left"></td><td class="right">November 2011</td></tr></tbody></table><p class="title">Transforming RFC2629-formatted XML through XSLT</p><hr class="noprint"><h1 class="np" id="rfc.toc"><a href="#rfc.toc">Table of Contents</a></h1><ul class="toc"><li>1. <a href="#rfc.section.1">Introduction</a></li><li>2. <a href="#supported.elements">Supported RFC2629 elements</a><ul><li>2.1 <a href="#rfc.section.2.1">Extension elements</a></li></ul></li><li>3. <a href="#processing.instructions">Processing Instructions</a><ul><li>3.1 <a href="#rfc.section.3.1">Supported xml2rfc-compatible PIs</a></li><li>3.2 <a href="#rfc.section.3.2">Unsupported xml2rfc-compatible PIs</a></li><li>3.3 <a href="#rfc.section.3.3">Extension PIs</a></li></ul></li><li>4. <a href="#anchors">Anchors</a></li><li>5. <a href="#xslt.engines">Supported XSLT engines</a><ul><li>5.1 <a href="#rfc.section.5.1">Standalone Engines</a></li><li>5.2 <a href="#xslt.engines.browser">In-Browser Engines</a></li></ul></li><li>6. <a href="#output.html">Transforming to HTML</a><ul><li>6.1 <a href="#rfc.section.6.1">HTML compliance</a></li><li>6.2 <a href="#html.link">Standard HTML LINK elements</a></li><li>6.3 <a href="#rfc.section.6.3">Standard HTML metadata</a></li><li>6.4 <a href="#rfc2731.properties">Dublin Core (RFC2731) metadata</a></li><li>6.5 <a href="#hcard">Experimental hCard support</a></li></ul></li><li>7. <a href="#output.xhtml">Transforming to XHTML</a></li><li>8. <a href="#output.chm">Transforming to CHM (Microsoft Compiled Help)</a></li><li>9. <a href="#output.pdf">Transforming to PDF</a><ul><li>9.1 <a href="#output.pdf.fop">Via XSL-FO</a><ul><li>9.1.1 <a href="#rfc.section.9.1.1">Extension feature matrix</a></li><li>9.1.2 <a href="#rfc.section.9.1.2">Example: producing output for Apache FOP</a></li></ul></li><li>9.2 <a href="#output.pdf.html">Via X(HTML)</a></li></ul></li><li>10. <a href="#output.epub">Transforming to ePub</a></li><li>11. <a href="#extensions">Generic Extensions</a><ul><li>11.1 <a href="#ext.element.abnf-char-sequence"><abnf-char-sequence> element</a></li><li>11.2 <a href="#ext.element.anchor-alias"><anchor-alias> element</a></li><li>11.3 <a href="#ext.element.bcp14"><bcp14> element</a></li><li>11.4 <a href="#ext.element.bb"><bb> element</a></li><li>11.5 <a href="#ext.element.bc"><bc> element</a></li><li>11.6 <a href="#ext.element.blockquote"><blockquote> element</a></li><li>11.7 <a href="#ext.element.boilerplate"><boilerplate> element</a></li><li>11.8 <a href="#ext.element.bt"><bt> element</a></li><li>11.9 <a href="#ext.element.dfn"><dfn> element</a></li><li>11.10 <a href="#ext.element.h"><h> element</a></li><li>11.11 <a href="#ext.element.highlight"><highlight> element</a></li><li>11.12 <a href="#ext.element.length-of"><length-of> element</a></li><li>11.13 <a href="#ext.element.link"><link> element</a></li><li>11.14 <a href="#ext.element.lt"><lt> element</a></li><li>11.15 <a href="#ext.element.note"><note> element</a></li><li>11.16 <a href="#ext.element.parse-xml"><parse-xml> element</a></li><li>11.17 <a href="#ext.element.prose"><prose> element</a></li><li>11.18 <a href="#ext.element.q"><q> element</a></li><li>11.19 <a href="#ext.element.ref"><ref> element</a></li><li>11.20 <a href="#ext.element.source"><source> element</a></li><li>11.21 <a href="#ext.element.sup"><sup> element</a></li><li>11.22 <a href="#ext-rfc2629.artwork">Extensions to Xml2rfc <artwork> element</a></li><li>11.23 <a href="#ext-rfc2629.iref">Extensions to Xml2rfc <iref> element</a></li><li>11.24 <a href="#ext-rfc2629.list">Extensions to Xml2rfc <list> element</a></li><li>11.25 <a href="#ext-rfc2629.rfc">Extensions to Xml2rfc <rfc> element</a></li><li>11.26 <a href="#ext-rfc2629.section">Extensions to Xml2rfc <section> element</a></li><li>11.27 <a href="#ext-rfc2629.xref">Extensions to Xml2rfc <xref> element</a></li></ul></li><li>12. <a href="#utilities">Utilities</a><ul><li>12.1 <a href="#checking-references">Checking References</a></li><li>12.2 <a href="#rfc.section.12.2">Generating Graphs from References</a></li><li>12.3 <a href="#rfc.section.12.3">Producing reference entries for books</a></li><li>12.4 <a href="#clean-for-dtd">Down-converting to RFC2629bis DTD</a></li><li>12.5 <a href="#extract-artwork">Extracting artwork</a></li><li>12.6 <a href="#grddl">GRRDL</a></li></ul></li><li>13. <a href="#rfc.references">Informative References</a></li><li><a href="#rfc.authors">Author's Address</a></li><li>A. <a href="#grammar">RELAX NG Compact Schema</a></li><li>B. <a href="#rfc.section.B">Implementation Notes</a><ul><li>B.1 <a href="#rfc.section.B.1">Recognized type attributes for <artwork> element</a></li></ul></li><li>C. <a href="#examples">Examples</a><ul><li>C.1 <a href="#examples.internalsubset">Using the 'Internal Subset'</a></li><li>C.2 <a href="#examples.customizing">Customization</a></li></ul></li><li>D. <a href="#boilerplate">Producing the IETF 'Boilerplate'</a><ul><li>D.1 <a href="#attribute-ipr">The /rfc/@ipr Attribute</a><ul><li>D.1.1 <a href="#attribute-ipr-current">Current Values: '*trust200902'</a><ul><li>D.1.1.1 <a href="#attribute-ipr-trust200902">trust200902</a></li><li>D.1.1.2 <a href="#attribute-ipr-noModificationTrust200902">noModificationTrust200902</a></li><li>D.1.1.3 <a href="#attribute-ipr-noDerivativesTrust200902">noDerivativesTrust200902</a></li><li>D.1.1.4 <a href="#attribute-ipr-pre5378Trust200902">pre5378Trust200902</a></li></ul></li><li>D.1.2 <a href="#attribute-ipr-historic">Historic Values</a><ul><li>D.1.2.1 <a href="#attribute-ipr-200811">Historic Values: '*trust200811'</a></li><li>D.1.2.2 <a href="#attribute-ipr-3978">Historic Values: '*3978'</a></li><li>D.1.2.3 <a href="#attribute-ipr-3667">Historic Values: '*3667'</a></li><li>D.1.2.4 <a href="#attribute-ipr-2026">Historic Values: '*2026'</a></li></ul></li></ul></li><li>D.2 <a href="#attribute-category">The /rfc/@category Attribute</a></li><li>D.3 <a href="#attribute-submissiontype">The /rfc/@submissionType Attribute</a></li><li>D.4 <a href="#attribute-consensus">The /rfc/@consensus Attribute</a></li><li>D.5 <a href="#attribute-number">The /rfc/@number Attribute</a></li><li>D.6 <a href="#attribute-docname">The /rfc/@docName Attribute</a></li><li>D.7 <a href="#attribute-obsoletes">The /rfc/@obsoletes Attribute</a></li><li>D.8 <a href="#attribute-updates">The /rfc/@updates Attribute</a></li></ul></li><li>E. <a href="#license">License</a></li><li>F. <a href="#rfc.section.F">Change Logs</a><ul><li>F.1 <a href="#rfc.section.F.1">Package</a></li><li>F.2 <a href="#rfc.section.F.2">amazon-asin.xslt</a></li><li>F.3 <a href="#rfc.section.F.3">check-references.xslt</a></li><li>F.4 <a href="#rfc.section.F.4">gen-reference-graph.xslt</a></li><li>F.5 <a href="#rfc.section.F.5">rfc2629.xslt</a></li><li>F.6 <a href="#rfc.section.F.6">rfc2629toFO.xslt</a></li><li>F.7 <a href="#rfc.section.F.7">xsl11toAn.xslt</a></li><li>F.8 <a href="#rfc.section.F.8">xsl11toFop.xslt</a></li><li>F.9 <a href="#rfc.section.F.9">xsl11toXep.xslt</a></li></ul></li><li><a href="#rfc.index">Index</a></li></ul><hr class="noprint"><h1 id="rfc.section.1" class="np"><a href="#rfc.section.1">1.</a> Introduction</h1><p id="rfc.section.1.p.1">This document describes a set of XSLT transformations that can be used to transform RFC2629-compliant XML (see <a href="#RFC2629" id="rfc.xref.RFC2629.1"><cite title="Writing I-Ds and RFCs using XML">[RFC2629]</cite></a>) to various output formats, such as HTML and PDF. The main topics are </p><ul><li>compliance to the xml2rfc XML element set (<a href="#supported.elements" title="Supported RFC2629 elements">Section 2</a>),</li><li>support for xml2rfc processing instructions (<a href="#processing.instructions" title="Processing Instructions">Section 3</a>),</li><li>the names of anchor elements generated in HTML and PDF output (<a href="#anchors" title="Anchors">Section 4</a>),</li><li>various XSLT engines that can be used (<a href="#xslt.engines" title="Supported XSLT engines">Section 5</a>),</li><li>outputting HTML (<a href="#output.html" title="Transforming to HTML">Section 6</a>) and XHTML (<a href="#output.xhtml" title="Transforming to XHTML">Section 7</a>),</li><li>outputting CHM (Compiled Microsoft Help, <a href="#output.chm" title="Transforming to CHM (Microsoft Compiled Help)">Section 8</a>),</li><li>outputting PDF (<a href="#output.pdf" title="Transforming to PDF">Section 9</a>),</li><li>outputting ePub (<a href="#output.epub" title="Transforming to ePub">Section 10</a>),</li><li>extensions to the xml2rfc vocabulary (<a href="#extensions" title="Generic Extensions">Section 11</a>).</li><li>various utilities (<a href="#utilities" title="Utilities">Section 12</a>).</li></ul><p id="rfc.section.1.p.2">The full distribution is available at <<a href="http://greenbytes.de/tech/webdav/rfc2629xslt.zip">http://greenbytes.de/tech/webdav/rfc2629xslt.zip</a>>.</p><hr class="noprint"><h1 id="rfc.section.2" class="np"><a href="#rfc.section.2">2.</a> <a id="supported.elements" href="#supported.elements">Supported RFC2629 elements</a></h1><p id="rfc.section.2.p.1"> <samp>rfc2629.xslt</samp> supports both all RFC2629 grammar elements and the extensions implemented in xml2rfc 1.36.</p><h2 id="rfc.section.2.1"><a href="#rfc.section.2.1">2.1</a> Extension elements</h2><p id="rfc.section.2.1.p.1"> <samp>rfc2629.xslt</samp> supports two kind of extension elements, using different XML namespaces.</p><p id="rfc.section.2.1.p.2">The first set contains (hopefully) generally useful extensions, see <a href="#extensions" title="Generic Extensions">Section 11</a>.</p><p id="rfc.section.2.1.p.3">The second set is used for change and issue tracking and currently is not documented here. Please email the author in case you're interested in using these extensions.</p><hr class="noprint"><h1 id="rfc.section.3" class="np"><a href="#rfc.section.3">3.</a> <a id="processing.instructions" href="#processing.instructions">Processing Instructions</a></h1><p id="rfc.section.3.p.1">All PIs can be set as XSLT parameter as well, overriding any value that is found in the source file to be transformed.</p><div id="rfc.figure.u.1"></div> <p>Using processing instructions:</p> <pre class="text"><?rfc toc="yes"?> 385 385 <?rfc-ext support-rfc2731="no"?> 386 386 </pre> <div id="rfc.figure.u.2"></div> <p>Using XSLT parameters (Saxon):</p> <pre class="text">java -cp saxon.jar com.icl.saxon.StyleSheet source.xml rfc2629.xslt \ -
rfc2629xslt/samples/rfc2629.xslt
r1497 r1522 2 2 XSLT transformation from RFC2629 XML format to HTML 3 3 4 Copyright (c) 2006-201 1, Julian Reschke (julian.reschke@greenbytes.de)4 Copyright (c) 2006-2012, Julian Reschke (julian.reschke@greenbytes.de) 5 5 All rights reserved. 6 6 … … 1081 1081 1082 1082 <xsl:template match="front"> 1083 1084 1083 <xsl:if test="$xml2rfc-topblock!='no'"> 1085 1084 <!-- collect information for left column --> … … 1899 1898 <xsl:apply-templates select="front/title" mode="get-text-content" /> 1900 1899 </title> 1900 <xsl:call-template name="insertScript" /> 1901 1901 <xsl:call-template name="insertCss" /> 1902 1902 <!-- <link rel="alternate stylesheet" type="text/css" media="screen" title="Plain (typewriter)" href="rfc2629tty.css" /> --> … … 2011 2011 </head> 2012 2012 <body> 2013 <xsl:if test="/rfc/x:feedback"> 2014 <xsl:attribute name="onload">init();</xsl:attribute> 2015 </xsl:if> 2016 2013 2017 <!-- insert diagnostics --> 2014 2018 <xsl:call-template name="insert-diagnostics"/> … … 3271 3275 </xsl:template> 3272 3276 3277 <!-- optional scripts --> 3278 <xsl:template name="insertScript"> 3279 <xsl:if test="/rfc/x:feedback"> 3280 <script> 3281 var buttonsAdded = false; 3282 3283 function init() { 3284 var fb = document.createElement("div"); 3285 fb.setAttribute("class", "feedback"); 3286 fb.setAttribute("onclick", "feedback();"); 3287 fb.appendChild(document.createTextNode("feedback")); 3288 3289 var bodyl = document.getElementsByTagName("body"); 3290 bodyl.item(0).appendChild(fb); 3291 } 3292 3293 function feedback() { 3294 toggleButtonsToElementsByName("h1"); 3295 toggleButtonsToElementsByName("h2"); 3296 toggleButtonsToElementsByName("h3"); 3297 toggleButtonsToElementsByName("h4"); 3298 3299 buttonsAdded = !buttonsAdded; 3300 } 3301 3302 function toggleButtonsToElementsByName(name) { 3303 var list = document.getElementsByTagName(name); 3304 for (var i = 0; i < list.length; i++) { 3305 toggleButton(list.item(i)); 3306 } 3307 } 3308 3309 function toggleButton(node) { 3310 if (! buttonsAdded) { 3311 3312 // docname 3313 var template = "<xsl:call-template name="replace-substring"> 3314 <xsl:with-param name="string" select="/rfc/x:feedback/@template"/> 3315 <xsl:with-param name="replace">"</xsl:with-param> 3316 <xsl:with-param name="by">\"</xsl:with-param> 3317 </xsl:call-template>"; 3318 3319 var id = node.getAttribute("id"); 3320 // better id available? 3321 var titlelinks = node.getElementsByTagName("a"); 3322 for (var i = 0; i < titlelinks.length; i++) { 3323 var tl = titlelinks.item(i); 3324 if (tl.getAttribute("id")) { 3325 id = tl.getAttribute("id"); 3326 } 3327 } 3328 3329 // ref 3330 var ref = window.location.toString(); 3331 var hash = ref.indexOf("#"); 3332 if (hash != -1) { 3333 ref = ref.substring(0, hash); 3334 } 3335 if (id != "") { 3336 ref += "#" + id; 3337 } 3338 3339 // docname 3340 var docname = "<xsl:value-of select="/rfc/@docName"/>"; 3341 3342 // section 3343 var section = node.textContent; 3344 3345 // build URI from template 3346 var uri = template.replace("{docname}", encodeURIComponent(docname)); 3347 uri = uri.replace("{section}", encodeURIComponent(section)); 3348 uri = uri.replace("{ref}", encodeURIComponent(ref)); 3349 3350 var button = document.createElement("a"); 3351 button.setAttribute("class", "fbbutton"); 3352 button.setAttribute("href", uri); 3353 button.appendChild(document.createTextNode("send feedback")); 3354 node.appendChild(button); 3355 } 3356 else { 3357 var buttons = node.getElementsByTagName("a"); 3358 for (var i = 0; i < buttons.length; i++) { 3359 var b = buttons.item(i); 3360 if (b.getAttribute("class") == "fbbutton") { 3361 node.removeChild(b); 3362 } 3363 } 3364 } 3365 }</script> 3366 </xsl:if> 3367 </xsl:template> 3273 3368 3274 3369 <!-- insert CSS style info --> … … 3677 3772 font-size: smaller; 3678 3773 font-weight: bold; 3774 }</xsl:if><xsl:if test="/rfc/x:feedback">.feedback { 3775 position: fixed; 3776 bottom: 1%; 3777 right: 1%; 3778 padding: 3px 5px; 3779 color: white; 3780 border-radius: 5px; 3781 background: #a00000; 3782 border: 1px solid silver; 3783 } 3784 .fbbutton { 3785 margin-left: 1em; 3786 color: #303030; 3787 font-size: small; 3788 font-weight: normal; 3789 background: #d0d000; 3790 padding: 1px 4px; 3791 border: 1px solid silver; 3792 border-radius: 5px; 3679 3793 }</xsl:if><xsl:if test="$xml2rfc-ext-justification='always'"> 3680 3681 3794 dd, li, p { 3682 3795 text-align: justify; … … 5034 5147 5035 5148 <xsl:template name="replace-substring"> 5036 5037 5149 <xsl:param name="string" /> 5038 5150 <xsl:param name="replace" /> … … 6414 6526 <xsl:text>http://greenbytes.de/tech/webdav/rfc2629.xslt, </xsl:text> 6415 6527 <!-- when RCS keyword substitution in place, add version info --> 6416 <xsl:if test="contains('$Revision: 1.56 1$',':')">6417 <xsl:value-of select="concat('Revision ',normalize-space(translate(substring-after('$Revision: 1.56 1$', 'Revision: '),'$','')),', ')" />6528 <xsl:if test="contains('$Revision: 1.564 $',':')"> 6529 <xsl:value-of select="concat('Revision ',normalize-space(translate(substring-after('$Revision: 1.564 $', 'Revision: '),'$','')),', ')" /> 6418 6530 </xsl:if> 6419 <xsl:if test="contains('$Date: 201 1-12-24 13:06:50$',':')">6420 <xsl:value-of select="concat(normalize-space(translate(substring-after('$Date: 201 1-12-24 13:06:50$', 'Date: '),'$','')),', ')" />6531 <xsl:if test="contains('$Date: 2012-01-28 14:56:56 $',':')"> 6532 <xsl:value-of select="concat(normalize-space(translate(substring-after('$Date: 2012-01-28 14:56:56 $', 'Date: '),'$','')),', ')" /> 6421 6533 </xsl:if> 6422 6534 <xsl:value-of select="concat('XSLT vendor: ',system-property('xsl:vendor'),' ',system-property('xsl:vendor-url'))" /> -
rfc2629xslt/testcase.html
r1497 r1522 395 395 } 396 396 } 397 </style><link rel="Contents" href="#rfc.toc"><link rel="Author" href="#rfc.authors"><link rel="Index" href="#rfc.index"><link rel="Chapter" title="1 Lists" href="#rfc.section.1"><link rel="Chapter" title="2 spanx" href="#rfc.section.2"><link rel="Chapter" title="3 Tables" href="#rfc.section.3"><link rel="Chapter" title="4 Figures" href="#rfc.section.4"><link rel="Chapter" title="5 References" href="#rfc.section.5"><link rel="Chapter" title="6 Paragraph formatting" href="#rfc.section.6"><link rel="Chapter" title="7 Sections" href="#rfc.section.7"><link rel="Chapter" title="8 Comments" href="#rfc.section.8"><link rel="Chapter" title="9 Artwork Width" href="#rfc.section.9"><link rel="Chapter" title="10 Extensions" href="#rfc.section.10"><link rel="Chapter" title="11 Blank Lines" href="#rfc.section.11"><link rel="Chapter" title="12 Other" href="#rfc.section.12"><link rel="Chapter" href="#rfc.section.13" title="13 References"><meta name="generator" content="http://greenbytes.de/tech/webdav/rfc2629.xslt, Revision 1.56 1, 2011-12-24 13:06:50, XSLT vendor: SAXON 6.5.5 from Michael Kay http://saxon.sf.net/"><meta name="keywords" content="RFC2629, test case, xml2rfc"><link rel="schema.dct" href="http://purl.org/dc/terms/"><meta name="dct.creator" content="Reschke, J. F."></head><body><table class="header"><tbody><tr><td class="left">RFC2629 test cases</td><td class="right">J. Reschke</td></tr><tr><td class="left"></td><td class="right">greenbytes</td></tr><tr><td class="left"></td><td class="right">January 2011</td></tr></tbody></table><p class="title">Test cases for RFC2629 formatting</p><hr class="noprint"><h1 class="np" id="rfc.toc"><a href="#rfc.toc">Table of Contents</a></h1><ul class="toc"><li>1. <a href="#lists">Lists</a><ul><li>1.1 <a href="#rfc.section.1.1">hanging list</a></li><li>1.2 <a href="#rfc.section.1.2">numbered list</a></li><li>1.3 <a href="#ordered.list.letters">ordered list (letters)</a></li><li>1.4 <a href="#rfc.section.1.4">no explicit counters</a></li><li>1.5 <a href="#rfc.section.1.5">with explicit counters</a></li><li>1.6 <a href="#rfc.section.1.6">Nested list</a></li><li>1.7 <a href="#rfc.section.1.7">list without style</a></li><li>1.8 <a href="#rfc.section.1.8">list with multiple paragraphs in a single list item</a></li></ul></li><li>2. <a href="#rfc.section.2">spanx</a></li><li>3. <a href="#rfc.section.3">Tables</a><ul><li>3.1 <a href="#rfc.section.3.1">no borders</a></li><li>3.2 <a href="#rfc.section.3.2">borders around headers</a></li><li>3.3 <a href="#rfc.section.3.3">example from xml2rc README</a></li><li>3.4 <a href="#rfc.section.3.4">no column titles</a></li><li>3.5 <a href="#rfc.section.3.5">referencing tables</a></li><li>3.6 <a href="#rfc.section.3.6">table captions</a></li><li>3.7 <a href="#rfc.section.3.7">single column</a></li><li>3.8 <a href="#rfc.section.3.8">table alignment</a></li></ul></li><li>4. <a href="#rfc.section.4">Figures</a><ul><li>4.1 <a href="#rfc.section.4.1">with preamble, no title...</a></li><li>4.2 <a href="#rfc.section.4.2">with postamble and title...</a></li><li>4.3 <a href="#rfc.section.4.3">Whitespace handling</a></li><li>4.4 <a href="#rfc.section.4.4">Whitespace around figures</a></li><li>4.5 <a href="#rfc.section.4.5">SVG</a></li><li>4.6 <a href="#code.components">Code Components</a></li></ul></li><li>5. <a href="#refs">References</a><ul><li>5.1 <a href="#xref.with.no.content">xref with no content</a></li><li>5.2 <a href="#rfc.section.5.2">xref to named <t> element</a></li><li>5.3 <a href="#rfc.section.5.3">xref to named <spanx> element</a></li><li>5.4 <a href="#rfc.section.5.4">xref to named <t> element inside list</a></li><li>5.5 <a href="#rfc.section.5.5">xref to named <cref> element</a></li><li>5.6 <a href="#rfc.section.5.6">xref to named <t> element inside list</a></li><li>5.7 <a href="#rfc.section.5.7">xref with no auto-formatting</a></li><li>5.8 <a href="#rfc.section.5.8">xref with content and auto-formatting</a></li><li>5.9 <a href="#rfc.section.5.9">xref with content and no formatting</a></li><li>5.10 <a href="#formatting.none">xref with content and 'none' formatting</a></li><li>5.11 <a href="#rfc.section.5.11">xref with no content and anchor formatting</a></li><li>5.12 <a href="#rfc.section.5.12">eref with no content</a></li><li>5.13 <a href="#rfc.section.5.13">eref with content</a></li><li>5.14 <a href="#rfc.section.5.14">iref inside paragraph</a></li></ul></li><li>6. <a href="#rfc.section.6">Paragraph formatting</a></li><li>7. <a href="#rfc.section.7">Sections</a><ul><li>7.1 <a href="#rfc.section.7.1">Subsection with TOC entry</a></li><li class="excluded"><ul><li>7.2.1 <a href="#rfc.section.7.2.1">Sub-subsection with TOC entry</a></li></ul></li></ul></li><li>8. <a href="#rfc.section.8">Comments</a></li><li>9. <a href="#rfc.section.9">Artwork Width</a></li><li>10. <a href="#extensions">Extensions</a><ul><li>10.1 <a href="#rfc.section.10.1">Markup in figure/artwork</a></li><li>10.2 <a href="#rfc.section.10.2">Measuring Lengths</a></li><li>10.3 <a href="#rfc.section.10.3">Quotations</a></li><li>10.4 <a href="#rfc.section.10.4">Subsections</a></li><li>10.5 <a href="#rfc.section.10.5">Box Drawing</a></li><li>10.6 <a href="#computed.reference.targets">Computed Reference Targets</a></li><li>10.7 <a href="#abnf.support">ABNF Support</a></li></ul></li><li>11. <a href="#rfc.section.11">Blank Lines</a></li><li>12. <a href="#rfc.section.12">Other</a><ul><li>12.1 <a href="#rfc.section.12.1">Comments in Text</a></li><li>12.2 <a href="#rfc.section.12.2">Special Characters</a><ul><li>12.2.1 <a href="#nbsp">Non-Breaking Space</a></li><li>12.2.2 <a href="#nbhy">Non-Breaking Hyphen</a></li><li>12.2.3 <a href="#dashes">Dashes</a></li></ul></li></ul></li><li>13. <a href="#rfc.references">References</a></li><li><a href="#rfc.comments">Editorial Comments</a></li><li><a href="#rfc.authors">Author's Address</a></li><li><a href="#rfc.index">Index</a></li></ul><ul><li><a href="#rfc.figure.1">Figure 1: another figure</a></li></ul><hr class="noprint"><h1 id="rfc.section.1" class="np"><a href="#rfc.section.1">1.</a> <a id="lists" href="#lists">Lists</a></h1><h2 id="rfc.section.1.1"><a href="#rfc.section.1.1">1.1</a> hanging list</h2><dl><dt>Name:</dt><dd>timeout</dd><dt>Namespace:</dt><dd>DAV:</dd><dt>Purpose:</dt><dd>The timeout associated with a lock</dd><dt>Value:</dt><dd>TimeType ;Defined in section 9.8</dd></dl><h2 id="rfc.section.1.2"><a href="#rfc.section.1.2">1.2</a> numbered list</h2><p id="rfc.section.1.2.p.1">A numbered list: </p><ol><li>one</li><li>two</li><li>three</li></ol><h2 id="rfc.section.1.3"><a href="#rfc.section.1.3">1.3</a> <a id="ordered.list.letters" href="#ordered.list.letters">ordered list (letters)</a></h2><p id="rfc.section.1.3.p.1">An ordered list using letters: </p><ol class="la"><li>one</li><li>two</li><li>three</li><li>one</li><li>two</li><li>three</li><li>one</li><li>two</li><li>three</li><li>one</li><li>two</li><li>three</li><li>one</li><li>two</li><li>three</li><li>one</li><li>two</li><li>three</li><li>one</li><li>two</li><li>three</li><li>one</li><li>two</li><li>three</li><li>one</li><li>two</li><li>three</li><li>one</li><li>two</li><li id="ordered.list.letters.last">three</li></ol><h2 id="rfc.section.1.4"><a href="#rfc.section.1.4">1.4</a> no explicit counters</h2><p id="rfc.section.1.4.p.1">Example for numbered list with user-defined-format: </p><dl><dt>R1:</dt><dd>R1</dd><dt>R2:</dt><dd>R2</dd></dl><p id="rfc.section.1.4.p.2">Another list: </p><dl><dt>S1:</dt><dd>S1</dd><dt>S2:</dt><dd>S2</dd></dl><p id="rfc.section.1.4.p.3">Next list should continue counting R's: </p><dl><dt>R3:</dt><dd>R3</dd><dt>R4:</dt><dd>R4</dd></dl><p id="rfc.section.1.4.p.4">Same with character-based numbering: </p><dl><dt>c-a:</dt><dd>c-a</dd><dt>c-b:</dt><dd>c-b</dd></dl><h2 id="rfc.section.1.5"><a href="#rfc.section.1.5">1.5</a> with explicit counters</h2><p id="rfc.section.1.5.p.1">A few requirements: </p><dl><dt>R1:</dt><dd>req R1</dd><dt>R2:</dt><dd>req R2</dd></dl><p id="rfc.section.1.5.p.2">More requirements: </p><dl><dt>R3:</dt><dd>req R3</dd><dt>R4:</dt><dd>req R4</dd></dl><p id="rfc.section.1.5.p.3">A few rules: </p><dl><dt>R1:</dt><dd>rule R1</dd><dt>R2:</dt><dd>rule R2</dd><dt>R3:</dt><dd>rule R3</dd></dl><p id="rfc.section.1.5.p.4">Explicit counter with name matching it's format string: </p><dl><dt>c-c:</dt><dd>c-c</dd><dt>c-d:</dt><dd>c-d</dd></dl><p id="rfc.section.1.5.p.5">Same, without counter: </p><dl><dt>c-e:</dt><dd>c-e</dd><dt>c-f:</dt><dd>c-f</dd></dl><h2 id="rfc.section.1.6"><a href="#rfc.section.1.6">1.6</a> Nested list</h2><p id="rfc.section.1.6.p.1"> </p><ol><li>One</li><li>Two <ol class="ua"><li>17</li><li>42</li></ol> </li><li>Three</li></ol><h2 id="rfc.section.1.7"><a href="#rfc.section.1.7">1.7</a> list without style</h2><ul class="empty"><li>One</li><li>Two</li><li>Three</li></ul><h2 id="rfc.section.1.8"><a href="#rfc.section.1.8">1.8</a> list with multiple paragraphs in a single list item</h2><ol><li><p>Simple list item.</p></li><li><p>This one has two paragraphs. This is the first one.</p><p>This one has two paragraphs. This is the second one.</p></li><li><p>Another simple list item.</p></li></ol><hr class="noprint"><h1 id="rfc.section.2" class="np"><a href="#rfc.section.2">2.</a> spanx</h1><p id="rfc.section.2.p.1">This is <em>default</em>.</p><p id="rfc.section.2.p.2">This is <em>emph(asized)</em>.</p><p id="rfc.section.2.p.3">This is <strong>strong</strong>.</p><p id="rfc.section.2.p.4">This is <samp>verb(atim)</samp>.</p><p id="rfc.section.2.p.5">Here is <samp>a carriage return inside</samp> a spanx element.</p><hr class="noprint"><h1 id="rfc.section.3" class="np"><a href="#rfc.section.3">3.</a> Tables</h1><div id="rfc.table.u.1"><p>The list of valid keywords are:</p><table class="tt full center" cellpadding="3" cellspacing="0"><thead><tr><th class="right" style="width: 20%;">keyword</th><th class="center" style="width: 20%;">default</th><th class="left">meaning</th><th class="left">not aligned</th></tr></thead><tbody><tr><td class="right">strict</td><td class="center">no</td><td class="left">try to enforce the ID-nits conventions and DTD validity</td><td class="left">a</td></tr><tr><td class="right">iprnotified</td><td class="center">no</td><td class="left">include boilerplate from Section 10.4(d) of <a href="#RFC2026" id="rfc.xref.RFC2026.1"><cite title="The Internet Standards Process -- Revision 3">[RFC2026]</cite></a></td><td class="left">bb bb</td></tr><tr><td class="right">compact</td><td class="center">no</td><td class="left">when producing a txt/nroff file, try to conserve vertical whitespace</td><td class="left">ccc ccc ccc</td></tr><tr><td class="right">subcompact</td><td class="center">compact</td><td class="left">if compact is "yes", then setting this to "no" will make things a little less compact</td><td class="left">dddd dddd dddd dddd</td></tr><tr><td class="right">needLines</td><td class="center">n/a</td><td class="left">an integer hint indicating how many contiguous lines are needed at this point in the output</td><td class="left">eeeee eeeee eeeee eeeee eeeee</td></tr><tr><td class="right">here come empty cells</td><td class="center"></td><td class="left"></td><td class="left"></td></tr></tbody></table><p>Remember, that as with everything else in XML, keywords and values are case-sensitive.</p></div><h2 id="rfc.section.3.1"><a href="#rfc.section.3.1">3.1</a> no borders</h2><div id="rfc.table.1"><div id="tablenoborder"></div><p>The table below should appear with no borders.</p><table class="tt none center" cellpadding="3" cellspacing="0"><caption>Table 1: a table with no borders</caption><thead><tr><th class="left">C1</th><th class="left">C2</th></tr></thead><tbody><tr><td class="left">11</td><td class="left">12</td></tr><tr><td class="left">21</td><td class="left">22</td></tr></tbody></table></div><h2 id="rfc.section.3.2"><a href="#rfc.section.3.2">3.2</a> borders around headers</h2><div id="rfc.table.u.2"><p>The table below should appear with borders just around the headers.</p><table class="tt headers center" cellpadding="3" cellspacing="0"><thead><tr><th class="left">C1</th><th class="left">C2</th></tr></thead><tbody><tr><td class="left">11</td><td class="left">12</td></tr><tr><td class="left">21</td><td class="left">22</td></tr></tbody></table></div><h2 id="rfc.section.3.3"><a href="#rfc.section.3.3">3.3</a> example from xml2rc README</h2><div id="rfc.table.2"><div id="table_example"></div><p>So, putting it all together, we have, e.g.,</p><table class="tt full center" cellpadding="3" cellspacing="0"><caption>Table 2</caption><thead><tr><th class="center">ttcol #1</th><th class="center">ttcol #2</th></tr></thead><tbody><tr><td class="center">c #1</td><td class="center">c #2</td></tr><tr><td class="center">c #3</td><td class="center">c #4</td></tr><tr><td class="center">c #5</td><td class="center">c #6</td></tr></tbody></table><p>which is a very simple example.</p></div><h2 id="rfc.section.3.4"><a href="#rfc.section.3.4">3.4</a> no column titles</h2><div id="rfc.table.3"><div id="tablenotitles"></div><p>The table below should appear with no titles.</p><table class="tt full center" cellpadding="3" cellspacing="0"><caption>Table 3: a table with no column titles</caption><tbody><tr><td class="left">11</td><td class="left">12</td></tr><tr><td class="left">21</td><td class="left">22</td></tr></tbody></table></div><div id="rfc.table.4"><div id="tableonetitle"></div><p>The table below should appear with column titles (one being non-empty).</p><table class="tt full center" cellpadding="3" cellspacing="0"><caption>Table 4: a table with a single column title</caption><thead><tr><th class="left">FOO</th><th class="left"></th></tr></thead><tbody><tr><td class="left">11</td><td class="left">12</td></tr><tr><td class="left">21</td><td class="left">22</td></tr></tbody></table></div><h2 id="rfc.section.3.5"><a href="#rfc.section.3.5">3.5</a> referencing tables</h2><p id="rfc.section.3.5.p.1"> <a href="#tablenoborder">Table 1</a> shows a table with no borders.</p><p id="rfc.section.3.5.p.2"> <a href="#tablenoborder">The table above</a> shows a table with no borders.</p><h2 id="rfc.section.3.6"><a href="#rfc.section.3.6">3.6</a> table captions</h2><div id="rfc.table.u.3"><p>No anchor, no title</p><table class="tt full center" cellpadding="3" cellspacing="0"><thead><tr><th class="left">Anchor</th><th class="left">Title</th></tr></thead><tbody><tr><td class="left">-</td><td class="left">-</td></tr></tbody></table></div><div id="rfc.table.5"><div id="texttable1"></div><p>Anchor (not being referenced), no title</p><table class="tt full center" cellpadding="3" cellspacing="0"><caption>Table 5</caption><thead><tr><th class="left">Anchor</th><th class="left">Title</th></tr></thead><tbody><tr><td class="left">yes</td><td class="left">-</td></tr></tbody></table></div><div id="rfc.table.6"><p>No anchor, with title</p><table class="tt full center" cellpadding="3" cellspacing="0"><caption>Table 6: title</caption><thead><tr><th class="left">Anchor</th><th class="left">Title</th></tr></thead><tbody><tr><td class="left">-</td><td class="left">"title"</td></tr></tbody></table></div><div id="rfc.table.7"><div id="texttable2"></div><p>Both anchor and title</p><table class="tt full center" cellpadding="3" cellspacing="0"><caption>Table 7: title</caption><thead><tr><th class="left">Anchor</th><th class="left">Title</th></tr></thead><tbody><tr><td class="left">yes</td><td class="left">"title"</td></tr></tbody></table></div><h2 id="rfc.section.3.7"><a href="#rfc.section.3.7">3.7</a> single column</h2><div id="rfc.table.u.4"><table class="tt full center" cellpadding="3" cellspacing="0"><thead><tr><th class="left">title</th></tr></thead><tbody><tr><td class="left">1</td></tr><tr><td class="left">2</td></tr></tbody></table></div><h2 id="rfc.section.3.8"><a href="#rfc.section.3.8">3.8</a> table alignment</h2><div id="rfc.table.u.5"><table class="tt full left" cellpadding="3" cellspacing="0"><thead><tr><th class="left">left</th></tr></thead><tbody><tr><td class="left">1</td></tr></tbody></table></div><div id="rfc.table.u.6"><table class="tt full center" cellpadding="3" cellspacing="0"><thead><tr><th class="left">center</th></tr></thead><tbody><tr><td class="left">1</td></tr></tbody></table></div><div id="rfc.table.u.7"><table class="tt full right" cellpadding="3" cellspacing="0"><thead><tr><th class="left">right</th></tr></thead><tbody><tr><td class="left">1</td></tr></tbody></table></div><div id="rfc.table.u.8"><table class="tt full center" cellpadding="3" cellspacing="0"><thead><tr><th class="left">default</th></tr></thead><tbody><tr><td class="left">1</td></tr></tbody></table></div><hr class="noprint"><h1 id="rfc.section.4" class="np"><a href="#rfc.section.4">4.</a> Figures</h1><h2 id="rfc.section.4.1"><a href="#rfc.section.4.1">4.1</a> with preamble, no title...</h2><div id="rfc.figure.u.1"></div> <p>with preamble, no title...</p> <pre> +--+397 </style><link rel="Contents" href="#rfc.toc"><link rel="Author" href="#rfc.authors"><link rel="Index" href="#rfc.index"><link rel="Chapter" title="1 Lists" href="#rfc.section.1"><link rel="Chapter" title="2 spanx" href="#rfc.section.2"><link rel="Chapter" title="3 Tables" href="#rfc.section.3"><link rel="Chapter" title="4 Figures" href="#rfc.section.4"><link rel="Chapter" title="5 References" href="#rfc.section.5"><link rel="Chapter" title="6 Paragraph formatting" href="#rfc.section.6"><link rel="Chapter" title="7 Sections" href="#rfc.section.7"><link rel="Chapter" title="8 Comments" href="#rfc.section.8"><link rel="Chapter" title="9 Artwork Width" href="#rfc.section.9"><link rel="Chapter" title="10 Extensions" href="#rfc.section.10"><link rel="Chapter" title="11 Blank Lines" href="#rfc.section.11"><link rel="Chapter" title="12 Other" href="#rfc.section.12"><link rel="Chapter" href="#rfc.section.13" title="13 References"><meta name="generator" content="http://greenbytes.de/tech/webdav/rfc2629.xslt, Revision 1.564, 2012-01-28 14:56:56, XSLT vendor: SAXON 6.5.5 from Michael Kay http://saxon.sf.net/"><meta name="keywords" content="RFC2629, test case, xml2rfc"><link rel="schema.dct" href="http://purl.org/dc/terms/"><meta name="dct.creator" content="Reschke, J. F."></head><body><table class="header"><tbody><tr><td class="left">RFC2629 test cases</td><td class="right">J. Reschke</td></tr><tr><td class="left"></td><td class="right">greenbytes</td></tr><tr><td class="left"></td><td class="right">January 2011</td></tr></tbody></table><p class="title">Test cases for RFC2629 formatting</p><hr class="noprint"><h1 class="np" id="rfc.toc"><a href="#rfc.toc">Table of Contents</a></h1><ul class="toc"><li>1. <a href="#lists">Lists</a><ul><li>1.1 <a href="#rfc.section.1.1">hanging list</a></li><li>1.2 <a href="#rfc.section.1.2">numbered list</a></li><li>1.3 <a href="#ordered.list.letters">ordered list (letters)</a></li><li>1.4 <a href="#rfc.section.1.4">no explicit counters</a></li><li>1.5 <a href="#rfc.section.1.5">with explicit counters</a></li><li>1.6 <a href="#rfc.section.1.6">Nested list</a></li><li>1.7 <a href="#rfc.section.1.7">list without style</a></li><li>1.8 <a href="#rfc.section.1.8">list with multiple paragraphs in a single list item</a></li></ul></li><li>2. <a href="#rfc.section.2">spanx</a></li><li>3. <a href="#rfc.section.3">Tables</a><ul><li>3.1 <a href="#rfc.section.3.1">no borders</a></li><li>3.2 <a href="#rfc.section.3.2">borders around headers</a></li><li>3.3 <a href="#rfc.section.3.3">example from xml2rc README</a></li><li>3.4 <a href="#rfc.section.3.4">no column titles</a></li><li>3.5 <a href="#rfc.section.3.5">referencing tables</a></li><li>3.6 <a href="#rfc.section.3.6">table captions</a></li><li>3.7 <a href="#rfc.section.3.7">single column</a></li><li>3.8 <a href="#rfc.section.3.8">table alignment</a></li></ul></li><li>4. <a href="#rfc.section.4">Figures</a><ul><li>4.1 <a href="#rfc.section.4.1">with preamble, no title...</a></li><li>4.2 <a href="#rfc.section.4.2">with postamble and title...</a></li><li>4.3 <a href="#rfc.section.4.3">Whitespace handling</a></li><li>4.4 <a href="#rfc.section.4.4">Whitespace around figures</a></li><li>4.5 <a href="#rfc.section.4.5">SVG</a></li><li>4.6 <a href="#code.components">Code Components</a></li></ul></li><li>5. <a href="#refs">References</a><ul><li>5.1 <a href="#xref.with.no.content">xref with no content</a></li><li>5.2 <a href="#rfc.section.5.2">xref to named <t> element</a></li><li>5.3 <a href="#rfc.section.5.3">xref to named <spanx> element</a></li><li>5.4 <a href="#rfc.section.5.4">xref to named <t> element inside list</a></li><li>5.5 <a href="#rfc.section.5.5">xref to named <cref> element</a></li><li>5.6 <a href="#rfc.section.5.6">xref to named <t> element inside list</a></li><li>5.7 <a href="#rfc.section.5.7">xref with no auto-formatting</a></li><li>5.8 <a href="#rfc.section.5.8">xref with content and auto-formatting</a></li><li>5.9 <a href="#rfc.section.5.9">xref with content and no formatting</a></li><li>5.10 <a href="#formatting.none">xref with content and 'none' formatting</a></li><li>5.11 <a href="#rfc.section.5.11">xref with no content and anchor formatting</a></li><li>5.12 <a href="#rfc.section.5.12">eref with no content</a></li><li>5.13 <a href="#rfc.section.5.13">eref with content</a></li><li>5.14 <a href="#rfc.section.5.14">iref inside paragraph</a></li></ul></li><li>6. <a href="#rfc.section.6">Paragraph formatting</a></li><li>7. <a href="#rfc.section.7">Sections</a><ul><li>7.1 <a href="#rfc.section.7.1">Subsection with TOC entry</a></li><li class="excluded"><ul><li>7.2.1 <a href="#rfc.section.7.2.1">Sub-subsection with TOC entry</a></li></ul></li></ul></li><li>8. <a href="#rfc.section.8">Comments</a></li><li>9. <a href="#rfc.section.9">Artwork Width</a></li><li>10. <a href="#extensions">Extensions</a><ul><li>10.1 <a href="#rfc.section.10.1">Markup in figure/artwork</a></li><li>10.2 <a href="#rfc.section.10.2">Measuring Lengths</a></li><li>10.3 <a href="#rfc.section.10.3">Quotations</a></li><li>10.4 <a href="#rfc.section.10.4">Subsections</a></li><li>10.5 <a href="#rfc.section.10.5">Box Drawing</a></li><li>10.6 <a href="#computed.reference.targets">Computed Reference Targets</a></li><li>10.7 <a href="#abnf.support">ABNF Support</a></li></ul></li><li>11. <a href="#rfc.section.11">Blank Lines</a></li><li>12. <a href="#rfc.section.12">Other</a><ul><li>12.1 <a href="#rfc.section.12.1">Comments in Text</a></li><li>12.2 <a href="#rfc.section.12.2">Special Characters</a><ul><li>12.2.1 <a href="#nbsp">Non-Breaking Space</a></li><li>12.2.2 <a href="#nbhy">Non-Breaking Hyphen</a></li><li>12.2.3 <a href="#dashes">Dashes</a></li></ul></li></ul></li><li>13. <a href="#rfc.references">References</a></li><li><a href="#rfc.comments">Editorial Comments</a></li><li><a href="#rfc.authors">Author's Address</a></li><li><a href="#rfc.index">Index</a></li></ul><ul><li><a href="#rfc.figure.1">Figure 1: another figure</a></li></ul><hr class="noprint"><h1 id="rfc.section.1" class="np"><a href="#rfc.section.1">1.</a> <a id="lists" href="#lists">Lists</a></h1><h2 id="rfc.section.1.1"><a href="#rfc.section.1.1">1.1</a> hanging list</h2><dl><dt>Name:</dt><dd>timeout</dd><dt>Namespace:</dt><dd>DAV:</dd><dt>Purpose:</dt><dd>The timeout associated with a lock</dd><dt>Value:</dt><dd>TimeType ;Defined in section 9.8</dd></dl><h2 id="rfc.section.1.2"><a href="#rfc.section.1.2">1.2</a> numbered list</h2><p id="rfc.section.1.2.p.1">A numbered list: </p><ol><li>one</li><li>two</li><li>three</li></ol><h2 id="rfc.section.1.3"><a href="#rfc.section.1.3">1.3</a> <a id="ordered.list.letters" href="#ordered.list.letters">ordered list (letters)</a></h2><p id="rfc.section.1.3.p.1">An ordered list using letters: </p><ol class="la"><li>one</li><li>two</li><li>three</li><li>one</li><li>two</li><li>three</li><li>one</li><li>two</li><li>three</li><li>one</li><li>two</li><li>three</li><li>one</li><li>two</li><li>three</li><li>one</li><li>two</li><li>three</li><li>one</li><li>two</li><li>three</li><li>one</li><li>two</li><li>three</li><li>one</li><li>two</li><li>three</li><li>one</li><li>two</li><li id="ordered.list.letters.last">three</li></ol><h2 id="rfc.section.1.4"><a href="#rfc.section.1.4">1.4</a> no explicit counters</h2><p id="rfc.section.1.4.p.1">Example for numbered list with user-defined-format: </p><dl><dt>R1:</dt><dd>R1</dd><dt>R2:</dt><dd>R2</dd></dl><p id="rfc.section.1.4.p.2">Another list: </p><dl><dt>S1:</dt><dd>S1</dd><dt>S2:</dt><dd>S2</dd></dl><p id="rfc.section.1.4.p.3">Next list should continue counting R's: </p><dl><dt>R3:</dt><dd>R3</dd><dt>R4:</dt><dd>R4</dd></dl><p id="rfc.section.1.4.p.4">Same with character-based numbering: </p><dl><dt>c-a:</dt><dd>c-a</dd><dt>c-b:</dt><dd>c-b</dd></dl><h2 id="rfc.section.1.5"><a href="#rfc.section.1.5">1.5</a> with explicit counters</h2><p id="rfc.section.1.5.p.1">A few requirements: </p><dl><dt>R1:</dt><dd>req R1</dd><dt>R2:</dt><dd>req R2</dd></dl><p id="rfc.section.1.5.p.2">More requirements: </p><dl><dt>R3:</dt><dd>req R3</dd><dt>R4:</dt><dd>req R4</dd></dl><p id="rfc.section.1.5.p.3">A few rules: </p><dl><dt>R1:</dt><dd>rule R1</dd><dt>R2:</dt><dd>rule R2</dd><dt>R3:</dt><dd>rule R3</dd></dl><p id="rfc.section.1.5.p.4">Explicit counter with name matching it's format string: </p><dl><dt>c-c:</dt><dd>c-c</dd><dt>c-d:</dt><dd>c-d</dd></dl><p id="rfc.section.1.5.p.5">Same, without counter: </p><dl><dt>c-e:</dt><dd>c-e</dd><dt>c-f:</dt><dd>c-f</dd></dl><h2 id="rfc.section.1.6"><a href="#rfc.section.1.6">1.6</a> Nested list</h2><p id="rfc.section.1.6.p.1"> </p><ol><li>One</li><li>Two <ol class="ua"><li>17</li><li>42</li></ol> </li><li>Three</li></ol><h2 id="rfc.section.1.7"><a href="#rfc.section.1.7">1.7</a> list without style</h2><ul class="empty"><li>One</li><li>Two</li><li>Three</li></ul><h2 id="rfc.section.1.8"><a href="#rfc.section.1.8">1.8</a> list with multiple paragraphs in a single list item</h2><ol><li><p>Simple list item.</p></li><li><p>This one has two paragraphs. This is the first one.</p><p>This one has two paragraphs. This is the second one.</p></li><li><p>Another simple list item.</p></li></ol><hr class="noprint"><h1 id="rfc.section.2" class="np"><a href="#rfc.section.2">2.</a> spanx</h1><p id="rfc.section.2.p.1">This is <em>default</em>.</p><p id="rfc.section.2.p.2">This is <em>emph(asized)</em>.</p><p id="rfc.section.2.p.3">This is <strong>strong</strong>.</p><p id="rfc.section.2.p.4">This is <samp>verb(atim)</samp>.</p><p id="rfc.section.2.p.5">Here is <samp>a carriage return inside</samp> a spanx element.</p><hr class="noprint"><h1 id="rfc.section.3" class="np"><a href="#rfc.section.3">3.</a> Tables</h1><div id="rfc.table.u.1"><p>The list of valid keywords are:</p><table class="tt full center" cellpadding="3" cellspacing="0"><thead><tr><th class="right" style="width: 20%;">keyword</th><th class="center" style="width: 20%;">default</th><th class="left">meaning</th><th class="left">not aligned</th></tr></thead><tbody><tr><td class="right">strict</td><td class="center">no</td><td class="left">try to enforce the ID-nits conventions and DTD validity</td><td class="left">a</td></tr><tr><td class="right">iprnotified</td><td class="center">no</td><td class="left">include boilerplate from Section 10.4(d) of <a href="#RFC2026" id="rfc.xref.RFC2026.1"><cite title="The Internet Standards Process -- Revision 3">[RFC2026]</cite></a></td><td class="left">bb bb</td></tr><tr><td class="right">compact</td><td class="center">no</td><td class="left">when producing a txt/nroff file, try to conserve vertical whitespace</td><td class="left">ccc ccc ccc</td></tr><tr><td class="right">subcompact</td><td class="center">compact</td><td class="left">if compact is "yes", then setting this to "no" will make things a little less compact</td><td class="left">dddd dddd dddd dddd</td></tr><tr><td class="right">needLines</td><td class="center">n/a</td><td class="left">an integer hint indicating how many contiguous lines are needed at this point in the output</td><td class="left">eeeee eeeee eeeee eeeee eeeee</td></tr><tr><td class="right">here come empty cells</td><td class="center"></td><td class="left"></td><td class="left"></td></tr></tbody></table><p>Remember, that as with everything else in XML, keywords and values are case-sensitive.</p></div><h2 id="rfc.section.3.1"><a href="#rfc.section.3.1">3.1</a> no borders</h2><div id="rfc.table.1"><div id="tablenoborder"></div><p>The table below should appear with no borders.</p><table class="tt none center" cellpadding="3" cellspacing="0"><caption>Table 1: a table with no borders</caption><thead><tr><th class="left">C1</th><th class="left">C2</th></tr></thead><tbody><tr><td class="left">11</td><td class="left">12</td></tr><tr><td class="left">21</td><td class="left">22</td></tr></tbody></table></div><h2 id="rfc.section.3.2"><a href="#rfc.section.3.2">3.2</a> borders around headers</h2><div id="rfc.table.u.2"><p>The table below should appear with borders just around the headers.</p><table class="tt headers center" cellpadding="3" cellspacing="0"><thead><tr><th class="left">C1</th><th class="left">C2</th></tr></thead><tbody><tr><td class="left">11</td><td class="left">12</td></tr><tr><td class="left">21</td><td class="left">22</td></tr></tbody></table></div><h2 id="rfc.section.3.3"><a href="#rfc.section.3.3">3.3</a> example from xml2rc README</h2><div id="rfc.table.2"><div id="table_example"></div><p>So, putting it all together, we have, e.g.,</p><table class="tt full center" cellpadding="3" cellspacing="0"><caption>Table 2</caption><thead><tr><th class="center">ttcol #1</th><th class="center">ttcol #2</th></tr></thead><tbody><tr><td class="center">c #1</td><td class="center">c #2</td></tr><tr><td class="center">c #3</td><td class="center">c #4</td></tr><tr><td class="center">c #5</td><td class="center">c #6</td></tr></tbody></table><p>which is a very simple example.</p></div><h2 id="rfc.section.3.4"><a href="#rfc.section.3.4">3.4</a> no column titles</h2><div id="rfc.table.3"><div id="tablenotitles"></div><p>The table below should appear with no titles.</p><table class="tt full center" cellpadding="3" cellspacing="0"><caption>Table 3: a table with no column titles</caption><tbody><tr><td class="left">11</td><td class="left">12</td></tr><tr><td class="left">21</td><td class="left">22</td></tr></tbody></table></div><div id="rfc.table.4"><div id="tableonetitle"></div><p>The table below should appear with column titles (one being non-empty).</p><table class="tt full center" cellpadding="3" cellspacing="0"><caption>Table 4: a table with a single column title</caption><thead><tr><th class="left">FOO</th><th class="left"></th></tr></thead><tbody><tr><td class="left">11</td><td class="left">12</td></tr><tr><td class="left">21</td><td class="left">22</td></tr></tbody></table></div><h2 id="rfc.section.3.5"><a href="#rfc.section.3.5">3.5</a> referencing tables</h2><p id="rfc.section.3.5.p.1"> <a href="#tablenoborder">Table 1</a> shows a table with no borders.</p><p id="rfc.section.3.5.p.2"> <a href="#tablenoborder">The table above</a> shows a table with no borders.</p><h2 id="rfc.section.3.6"><a href="#rfc.section.3.6">3.6</a> table captions</h2><div id="rfc.table.u.3"><p>No anchor, no title</p><table class="tt full center" cellpadding="3" cellspacing="0"><thead><tr><th class="left">Anchor</th><th class="left">Title</th></tr></thead><tbody><tr><td class="left">-</td><td class="left">-</td></tr></tbody></table></div><div id="rfc.table.5"><div id="texttable1"></div><p>Anchor (not being referenced), no title</p><table class="tt full center" cellpadding="3" cellspacing="0"><caption>Table 5</caption><thead><tr><th class="left">Anchor</th><th class="left">Title</th></tr></thead><tbody><tr><td class="left">yes</td><td class="left">-</td></tr></tbody></table></div><div id="rfc.table.6"><p>No anchor, with title</p><table class="tt full center" cellpadding="3" cellspacing="0"><caption>Table 6: title</caption><thead><tr><th class="left">Anchor</th><th class="left">Title</th></tr></thead><tbody><tr><td class="left">-</td><td class="left">"title"</td></tr></tbody></table></div><div id="rfc.table.7"><div id="texttable2"></div><p>Both anchor and title</p><table class="tt full center" cellpadding="3" cellspacing="0"><caption>Table 7: title</caption><thead><tr><th class="left">Anchor</th><th class="left">Title</th></tr></thead><tbody><tr><td class="left">yes</td><td class="left">"title"</td></tr></tbody></table></div><h2 id="rfc.section.3.7"><a href="#rfc.section.3.7">3.7</a> single column</h2><div id="rfc.table.u.4"><table class="tt full center" cellpadding="3" cellspacing="0"><thead><tr><th class="left">title</th></tr></thead><tbody><tr><td class="left">1</td></tr><tr><td class="left">2</td></tr></tbody></table></div><h2 id="rfc.section.3.8"><a href="#rfc.section.3.8">3.8</a> table alignment</h2><div id="rfc.table.u.5"><table class="tt full left" cellpadding="3" cellspacing="0"><thead><tr><th class="left">left</th></tr></thead><tbody><tr><td class="left">1</td></tr></tbody></table></div><div id="rfc.table.u.6"><table class="tt full center" cellpadding="3" cellspacing="0"><thead><tr><th class="left">center</th></tr></thead><tbody><tr><td class="left">1</td></tr></tbody></table></div><div id="rfc.table.u.7"><table class="tt full right" cellpadding="3" cellspacing="0"><thead><tr><th class="left">right</th></tr></thead><tbody><tr><td class="left">1</td></tr></tbody></table></div><div id="rfc.table.u.8"><table class="tt full center" cellpadding="3" cellspacing="0"><thead><tr><th class="left">default</th></tr></thead><tbody><tr><td class="left">1</td></tr></tbody></table></div><hr class="noprint"><h1 id="rfc.section.4" class="np"><a href="#rfc.section.4">4.</a> Figures</h1><h2 id="rfc.section.4.1"><a href="#rfc.section.4.1">4.1</a> with preamble, no title...</h2><div id="rfc.figure.u.1"></div> <p>with preamble, no title...</p> <pre> +--+ 398 398 | | 399 399 +--+
Note: See TracChangeset
for help on using the changeset viewer.