Changeset 569
- Timestamp:
- 01/04/09 15:51:50 (13 years ago)
- Location:
- rfc2629xslt
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
rfc2629xslt/rfc2629.xslt
r566 r569 4420 4420 <xsl:choose> 4421 4421 <xsl:when test="$c='-'">2D</xsl:when> 4422 <xsl:when test="$c='/'">2F</xsl:when> 4422 4423 <xsl:when test="$c='0'">30</xsl:when> 4423 4424 <xsl:when test="$c='1'">31</xsl:when> … … 5323 5324 <xsl:text>http://greenbytes.de/tech/webdav/rfc2629.xslt, </xsl:text> 5324 5325 <!-- when RCS keyword substitution in place, add version info --> 5325 <xsl:if test="contains('$Revision: 1.4 29$',':')">5326 <xsl:value-of select="concat('Revision ',normalize-space(translate(substring-after('$Revision: 1.4 29$', 'Revision: '),'$','')),', ')" />5326 <xsl:if test="contains('$Revision: 1.430 $',':')"> 5327 <xsl:value-of select="concat('Revision ',normalize-space(translate(substring-after('$Revision: 1.430 $', 'Revision: '),'$','')),', ')" /> 5327 5328 </xsl:if> 5328 <xsl:if test="contains('$Date: 2009-0 3-27 16:37:40$',':')">5329 <xsl:value-of select="concat(normalize-space(translate(substring-after('$Date: 2009-0 3-27 16:37:40$', 'Date: '),'$','')),', ')" />5329 <xsl:if test="contains('$Date: 2009-04-01 15:50:01 $',':')"> 5330 <xsl:value-of select="concat(normalize-space(translate(substring-after('$Date: 2009-04-01 15:50:01 $', 'Date: '),'$','')),', ')" /> 5330 5331 </xsl:if> 5331 5332 <xsl:value-of select="concat('XSLT vendor: ',system-property('xsl:vendor'),' ',system-property('xsl:vendor-url'))" /> -
rfc2629xslt/rfc2629toHhk.xslt
r566 r569 24 24 <html> 25 25 <head> 26 <meta name="generator" content="rfc2629toHhk.xslt $Id: rfc2629toHhk.xslt,v 1.6 2003 /11/16 14:52:40 jre Exp $" />26 <meta name="generator" content="rfc2629toHhk.xslt $Id: rfc2629toHhk.xslt,v 1.6 2003-11-16 14:52:40 jre Exp $" /> 27 27 </head> 28 28 <body> -
rfc2629xslt/rfc2629toXHTML.xslt
r566 r569 4209 4209 <xsl:choose> 4210 4210 <xsl:when test="$c='-'">2D</xsl:when> 4211 <xsl:when test="$c='/'">2F</xsl:when> 4211 4212 <xsl:when test="$c='0'">30</xsl:when> 4212 4213 <xsl:when test="$c='1'">31</xsl:when> … … 5111 5112 <xsl:text>http://greenbytes.de/tech/webdav/rfc2629.xslt, </xsl:text> 5112 5113 <!-- when RCS keyword substitution in place, add version info --> 5113 <xsl:if test="contains('$Revision: 1.4 29$',':')">5114 <xsl:value-of select="concat('Revision ',normalize-space(translate(substring-after('$Revision: 1.4 29$', 'Revision: '),'$','')),', ')"/>5114 <xsl:if test="contains('$Revision: 1.430 $',':')"> 5115 <xsl:value-of select="concat('Revision ',normalize-space(translate(substring-after('$Revision: 1.430 $', 'Revision: '),'$','')),', ')"/> 5115 5116 </xsl:if> 5116 <xsl:if test="contains('$Date: 2009-0 3-27 16:37:40$',':')">5117 <xsl:value-of select="concat(normalize-space(translate(substring-after('$Date: 2009-0 3-27 16:37:40$', 'Date: '),'$','')),', ')"/>5117 <xsl:if test="contains('$Date: 2009-04-01 15:50:01 $',':')"> 5118 <xsl:value-of select="concat(normalize-space(translate(substring-after('$Date: 2009-04-01 15:50:01 $', 'Date: '),'$','')),', ')"/> 5118 5119 </xsl:if> 5119 5120 <xsl:value-of select="concat('XSLT vendor: ',system-property('xsl:vendor'),' ',system-property('xsl:vendor-url'))"/> -
rfc2629xslt/rfc2629xslt.html
r566 r569 350 350 } 351 351 } 352 </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 Generic Extensions" href="#rfc.section.10"><link rel="Chapter" title="11 Utilities" href="#rfc.section.11"><link rel="Chapter" href="#rfc.section.12" title="12 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 License" href="#rfc.section.C"><link rel="Appendix" title="D Change Logs" href="#rfc.section.D"><meta name="generator" content="http://greenbytes.de/tech/webdav/rfc2629.xslt, Revision 1.4 29, 2009-03-27 16:37:40, 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, Dublin Core"><link rel="schema.DC" href="http://purl.org/dc/elements/1.1/"><meta name="DC.Creator" content="Reschke, J. F."></head><body><table summary="header information" class="header" border="0" cellpadding="1" cellspacing="1"><tr><td class="header left">RFC2629 through XSLT</td><td class="header right">J. F. Reschke</td></tr><tr><td class="header left"></td><td class="header right">greenbytes</td></tr><tr><td class="header left"></td><td class="header right">March 2009</td></tr></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 class="tocline0">1. <a href="#rfc.section.1">Introduction</a></li><li class="tocline0">2. <a href="#supported.elements">Supported RFC2629 elements</a><ul class="toc"><li class="tocline1">2.1 <a href="#rfc.section.2.1">Extension elements</a></li></ul></li><li class="tocline0">3. <a href="#processing.instructions">Processing Instructions</a><ul class="toc"><li class="tocline1">3.1 <a href="#rfc.section.3.1">Supported xml2rfc-compatible PIs</a></li><li class="tocline1">3.2 <a href="#rfc.section.3.2">Unsupported xml2rfc-compatible PIs</a></li><li class="tocline1">3.3 <a href="#rfc.section.3.3">Extension PIs</a></li></ul></li><li class="tocline0">4. <a href="#anchors">Anchors</a></li><li class="tocline0">5. <a href="#xslt.engines">Supported XSLT engines</a><ul class="toc"><li class="tocline1">5.1 <a href="#rfc.section.5.1">Standalone Engines</a></li><li class="tocline1">5.2 <a href="#rfc.section.5.2">In-Browser Engines</a></li></ul></li><li class="tocline0">6. <a href="#output.html">Transforming to HTML</a><ul class="toc"><li class="tocline1">6.1 <a href="#rfc.section.6.1">HTML compliance</a></li><li class="tocline1">6.2 <a href="#html.link">Standard HTML LINK elements</a></li><li class="tocline1">6.3 <a href="#rfc.section.6.3">Standard HTML metadata</a></li><li class="tocline1">6.4 <a href="#rfc2731.properties">Dublin Core (RFC2731) metadata</a></li><li class="tocline1">6.5 <a href="#hcard">Experimental hCard support</a></li></ul></li><li class="tocline0">7. <a href="#output.xhtml">Transforming to XHTML</a></li><li class="tocline0">8. <a href="#output.chm">Transforming to CHM (Microsoft Compiled Help)</a></li><li class="tocline0">9. <a href="#output.pdf">Transforming to PDF</a><ul class="toc"><li class="tocline1">9.1 <a href="#output.pdf.fop">Via XSL-FO</a><ul class="toc"><li class="tocline1">9.1.1 <a href="#rfc.section.9.1.1">Extension feature matrix</a></li><li class="tocline1">9.1.2 <a href="#rfc.section.9.1.2">Example: producing output for Apache FOP</a></li></ul></li><li class="tocline1">9.2 <a href="#output.pdf.html">Via X(HTML)</a></li></ul></li><li class="tocline0">10. <a href="#extensions">Generic Extensions</a><ul class="toc"><li class="tocline1">10.1 <a href="#ext.element.abnf-char-sequence"><abnf-char-sequence> element</a></li><li class="tocline1">10.2 <a href="#ext.element.anchor-alias"><anchor-alias> element</a></li><li class="tocline1">10.3 <a href="#ext.element.bcp14"><bcp14> element</a></li><li class="tocline1">10.4 <a href="#ext.element.bb"><bb> element</a></li><li class="tocline1">10.5 <a href="#ext.element.bc"><bc> element</a></li><li class="tocline1">10.6 <a href="#ext.element.blockquote"><blockquote> element</a></li><li class="tocline1">10.7 <a href="#ext.element.boilerplate"><boilerplate> element</a></li><li class="tocline1">10.8 <a href="#ext.element.bt"><bt> element</a></li><li class="tocline1">10.9 <a href="#ext.element.dfn"><dfn> element</a></li><li class="tocline1">10.10 <a href="#ext.element.h"><h> element</a></li><li class="tocline1">10.11 <a href="#ext.element.highlight"><highlight> element</a></li><li class="tocline1">10.12 <a href="#ext.element.length-of"><length-of> element</a></li><li class="tocline1">10.13 <a href="#ext.element.link"><link> element</a></li><li class="tocline1">10.14 <a href="#ext.element.lt"><lt> element</a></li><li class="tocline1">10.15 <a href="#ext.element.note"><note> element</a></li><li class="tocline1">10.16 <a href="#ext.element.parse-xml"><parse-xml> element</a></li><li class="tocline1">10.17 <a href="#ext.element.q"><q> element</a></li><li class="tocline1">10.18 <a href="#ext.element.ref"><ref> element</a></li><li class="tocline1">10.19 <a href="#ext.element.source"><source> element</a></li><li class="tocline1">10.20 <a href="#ext.element.sup"><sup> element</a></li><li class="tocline1">10.21 <a href="#ext-rfc2629.artwork">Extensions to Xml2rfc <artwork> element</a></li><li class="tocline1">10.22 <a href="#ext-rfc2629.iref">Extensions to Xml2rfc <iref> element</a></li><li class="tocline1">10.23 <a href="#ext-rfc2629.list">Extensions to Xml2rfc <list> element</a></li><li class="tocline1">10.24 <a href="#ext-rfc2629.rfc">Extensions to Xml2rfc <rfc> element</a></li><li class="tocline1">10.25 <a href="#ext-rfc2629.section">Extensions to Xml2rfc <section> element</a></li><li class="tocline1">10.26 <a href="#ext-rfc2629.xref">Extensions to Xml2rfc <xref> element</a></li></ul></li><li class="tocline0">11. <a href="#utilities">Utilities</a><ul class="toc"><li class="tocline1">11.1 <a href="#checking-references">Checking References</a></li><li class="tocline1">11.2 <a href="#rfc.section.11.2">Generating Graphs from References</a></li><li class="tocline1">11.3 <a href="#rfc.section.11.3">Producing reference entries for books</a></li><li class="tocline1">11.4 <a href="#clean-for-dtd">Down-converting to RFC2629bis DTD</a></li><li class="tocline1">11.5 <a href="#extract-artwork">Extracting artwork</a></li><li class="tocline1">11.6 <a href="#grddl">GRRDL</a></li></ul></li><li class="tocline0">12. <a href="#rfc.references">Informative References</a></li><li class="tocline0"><a href="#rfc.authors">Author's Address</a></li><li class="tocline0">A. <a href="#grammar">RELAX NG Compact Schema</a></li><li class="tocline0">B. <a href="#rfc.section.B">Implementation Notes</a><ul class="toc"><li class="tocline1">B.1 <a href="#rfc.section.B.1">Recognized type attributes for <artwork> element</a></li></ul></li><li class="tocline0">C. <a href="#license">License</a></li><li class="tocline0">D. <a href="#rfc.section.D">Change Logs</a><ul class="toc"><li class="tocline1">D.1 <a href="#rfc.section.D.1">Package</a></li><li class="tocline1">D.2 <a href="#rfc.section.D.2">amazon-asin.xslt</a></li><li class="tocline1">D.3 <a href="#rfc.section.D.3">check-references.xslt</a></li><li class="tocline1">D.4 <a href="#rfc.section.D.4">gen-reference-graph.xslt</a></li><li class="tocline1">D.5 <a href="#rfc.section.D.5">rfc2629.xslt</a></li><li class="tocline1">D.6 <a href="#rfc.section.D.6">rfc2629toFO.xslt</a></li><li class="tocline1">D.7 <a href="#rfc.section.D.7">xsl11toAn.xslt</a></li><li class="tocline1">D.8 <a href="#rfc.section.D.8">xsl11toFop.xslt</a></li><li class="tocline1">D.9 <a href="#rfc.section.D.9">xsl11toFop-0.93.xslt</a></li><li class="tocline1">D.10 <a href="#rfc.section.D.10">xsl11toXep.xslt</a></li></ul></li><li class="tocline0"><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>extensions to the xml2rfc vocabulary (<a href="#extensions" title="Generic Extensions">Section 10</a>).</li><li>various utilities (<a href="#utilities" title="Utilities">Section 11</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.21.</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 10</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"?>352 </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 Generic Extensions" href="#rfc.section.10"><link rel="Chapter" title="11 Utilities" href="#rfc.section.11"><link rel="Chapter" href="#rfc.section.12" title="12 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 License" href="#rfc.section.C"><link rel="Appendix" title="D Change Logs" href="#rfc.section.D"><meta name="generator" content="http://greenbytes.de/tech/webdav/rfc2629.xslt, Revision 1.430, 2009-04-01 15:50:01, 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, Dublin Core"><link rel="schema.DC" href="http://purl.org/dc/elements/1.1/"><meta name="DC.Creator" content="Reschke, J. F."></head><body><table summary="header information" class="header" border="0" cellpadding="1" cellspacing="1"><tr><td class="header left">RFC2629 through XSLT</td><td class="header right">J. F. Reschke</td></tr><tr><td class="header left"></td><td class="header right">greenbytes</td></tr><tr><td class="header left"></td><td class="header right">March 2009</td></tr></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 class="tocline0">1. <a href="#rfc.section.1">Introduction</a></li><li class="tocline0">2. <a href="#supported.elements">Supported RFC2629 elements</a><ul class="toc"><li class="tocline1">2.1 <a href="#rfc.section.2.1">Extension elements</a></li></ul></li><li class="tocline0">3. <a href="#processing.instructions">Processing Instructions</a><ul class="toc"><li class="tocline1">3.1 <a href="#rfc.section.3.1">Supported xml2rfc-compatible PIs</a></li><li class="tocline1">3.2 <a href="#rfc.section.3.2">Unsupported xml2rfc-compatible PIs</a></li><li class="tocline1">3.3 <a href="#rfc.section.3.3">Extension PIs</a></li></ul></li><li class="tocline0">4. <a href="#anchors">Anchors</a></li><li class="tocline0">5. <a href="#xslt.engines">Supported XSLT engines</a><ul class="toc"><li class="tocline1">5.1 <a href="#rfc.section.5.1">Standalone Engines</a></li><li class="tocline1">5.2 <a href="#rfc.section.5.2">In-Browser Engines</a></li></ul></li><li class="tocline0">6. <a href="#output.html">Transforming to HTML</a><ul class="toc"><li class="tocline1">6.1 <a href="#rfc.section.6.1">HTML compliance</a></li><li class="tocline1">6.2 <a href="#html.link">Standard HTML LINK elements</a></li><li class="tocline1">6.3 <a href="#rfc.section.6.3">Standard HTML metadata</a></li><li class="tocline1">6.4 <a href="#rfc2731.properties">Dublin Core (RFC2731) metadata</a></li><li class="tocline1">6.5 <a href="#hcard">Experimental hCard support</a></li></ul></li><li class="tocline0">7. <a href="#output.xhtml">Transforming to XHTML</a></li><li class="tocline0">8. <a href="#output.chm">Transforming to CHM (Microsoft Compiled Help)</a></li><li class="tocline0">9. <a href="#output.pdf">Transforming to PDF</a><ul class="toc"><li class="tocline1">9.1 <a href="#output.pdf.fop">Via XSL-FO</a><ul class="toc"><li class="tocline1">9.1.1 <a href="#rfc.section.9.1.1">Extension feature matrix</a></li><li class="tocline1">9.1.2 <a href="#rfc.section.9.1.2">Example: producing output for Apache FOP</a></li></ul></li><li class="tocline1">9.2 <a href="#output.pdf.html">Via X(HTML)</a></li></ul></li><li class="tocline0">10. <a href="#extensions">Generic Extensions</a><ul class="toc"><li class="tocline1">10.1 <a href="#ext.element.abnf-char-sequence"><abnf-char-sequence> element</a></li><li class="tocline1">10.2 <a href="#ext.element.anchor-alias"><anchor-alias> element</a></li><li class="tocline1">10.3 <a href="#ext.element.bcp14"><bcp14> element</a></li><li class="tocline1">10.4 <a href="#ext.element.bb"><bb> element</a></li><li class="tocline1">10.5 <a href="#ext.element.bc"><bc> element</a></li><li class="tocline1">10.6 <a href="#ext.element.blockquote"><blockquote> element</a></li><li class="tocline1">10.7 <a href="#ext.element.boilerplate"><boilerplate> element</a></li><li class="tocline1">10.8 <a href="#ext.element.bt"><bt> element</a></li><li class="tocline1">10.9 <a href="#ext.element.dfn"><dfn> element</a></li><li class="tocline1">10.10 <a href="#ext.element.h"><h> element</a></li><li class="tocline1">10.11 <a href="#ext.element.highlight"><highlight> element</a></li><li class="tocline1">10.12 <a href="#ext.element.length-of"><length-of> element</a></li><li class="tocline1">10.13 <a href="#ext.element.link"><link> element</a></li><li class="tocline1">10.14 <a href="#ext.element.lt"><lt> element</a></li><li class="tocline1">10.15 <a href="#ext.element.note"><note> element</a></li><li class="tocline1">10.16 <a href="#ext.element.parse-xml"><parse-xml> element</a></li><li class="tocline1">10.17 <a href="#ext.element.q"><q> element</a></li><li class="tocline1">10.18 <a href="#ext.element.ref"><ref> element</a></li><li class="tocline1">10.19 <a href="#ext.element.source"><source> element</a></li><li class="tocline1">10.20 <a href="#ext.element.sup"><sup> element</a></li><li class="tocline1">10.21 <a href="#ext-rfc2629.artwork">Extensions to Xml2rfc <artwork> element</a></li><li class="tocline1">10.22 <a href="#ext-rfc2629.iref">Extensions to Xml2rfc <iref> element</a></li><li class="tocline1">10.23 <a href="#ext-rfc2629.list">Extensions to Xml2rfc <list> element</a></li><li class="tocline1">10.24 <a href="#ext-rfc2629.rfc">Extensions to Xml2rfc <rfc> element</a></li><li class="tocline1">10.25 <a href="#ext-rfc2629.section">Extensions to Xml2rfc <section> element</a></li><li class="tocline1">10.26 <a href="#ext-rfc2629.xref">Extensions to Xml2rfc <xref> element</a></li></ul></li><li class="tocline0">11. <a href="#utilities">Utilities</a><ul class="toc"><li class="tocline1">11.1 <a href="#checking-references">Checking References</a></li><li class="tocline1">11.2 <a href="#rfc.section.11.2">Generating Graphs from References</a></li><li class="tocline1">11.3 <a href="#rfc.section.11.3">Producing reference entries for books</a></li><li class="tocline1">11.4 <a href="#clean-for-dtd">Down-converting to RFC2629bis DTD</a></li><li class="tocline1">11.5 <a href="#extract-artwork">Extracting artwork</a></li><li class="tocline1">11.6 <a href="#grddl">GRRDL</a></li></ul></li><li class="tocline0">12. <a href="#rfc.references">Informative References</a></li><li class="tocline0"><a href="#rfc.authors">Author's Address</a></li><li class="tocline0">A. <a href="#grammar">RELAX NG Compact Schema</a></li><li class="tocline0">B. <a href="#rfc.section.B">Implementation Notes</a><ul class="toc"><li class="tocline1">B.1 <a href="#rfc.section.B.1">Recognized type attributes for <artwork> element</a></li></ul></li><li class="tocline0">C. <a href="#license">License</a></li><li class="tocline0">D. <a href="#rfc.section.D">Change Logs</a><ul class="toc"><li class="tocline1">D.1 <a href="#rfc.section.D.1">Package</a></li><li class="tocline1">D.2 <a href="#rfc.section.D.2">amazon-asin.xslt</a></li><li class="tocline1">D.3 <a href="#rfc.section.D.3">check-references.xslt</a></li><li class="tocline1">D.4 <a href="#rfc.section.D.4">gen-reference-graph.xslt</a></li><li class="tocline1">D.5 <a href="#rfc.section.D.5">rfc2629.xslt</a></li><li class="tocline1">D.6 <a href="#rfc.section.D.6">rfc2629toFO.xslt</a></li><li class="tocline1">D.7 <a href="#rfc.section.D.7">xsl11toAn.xslt</a></li><li class="tocline1">D.8 <a href="#rfc.section.D.8">xsl11toFop.xslt</a></li><li class="tocline1">D.9 <a href="#rfc.section.D.9">xsl11toFop-0.93.xslt</a></li><li class="tocline1">D.10 <a href="#rfc.section.D.10">xsl11toXep.xslt</a></li></ul></li><li class="tocline0"><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>extensions to the xml2rfc vocabulary (<a href="#extensions" title="Generic Extensions">Section 10</a>).</li><li>various utilities (<a href="#utilities" title="Utilities">Section 11</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.21.</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 10</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"?> 353 353 <?rfc-ext support-rfc2731="no"?> 354 354 </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/rfc2629xslt.txt
r566 r569 4 4 RFC2629 through XSLT J. Reschke 5 5 greenbytes 6 March 27,20096 March 2009 7 7 8 8 -
rfc2629xslt/testcase.html
r566 r569 360 360 } 361 361 } 362 </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.4 29, 2009-03-27 16:37:40, XSLT vendor: SAXON 6.5.5 from Michael Kay http://saxon.sf.net/"><meta name="keywords" content="RFC2629, test case, xml2rfc"><link rel="schema.DC" href="http://purl.org/dc/elements/1.1/"><meta name="DC.Creator" content="Reschke, J. F."></head><body><table summary="header information" class="header" border="0" cellpadding="1" cellspacing="1"><tr><td class="header left">RFC2629 test cases</td><td class="header right">J. F. Reschke</td></tr><tr><td class="header left"></td><td class="header right">greenbytes</td></tr><tr><td class="header left"></td><td class="header right">October 2008</td></tr></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 class="tocline0">1. <a href="#lists">Lists</a><ul class="toc"><li class="tocline1">1.1 <a href="#rfc.section.1.1">hanging list</a></li><li class="tocline1">1.2 <a href="#rfc.section.1.2">numbered list</a></li><li class="tocline1">1.3 <a href="#ordered.list.letters">ordered list (letters)</a></li><li class="tocline1">1.4 <a href="#rfc.section.1.4">no explicit counters</a></li><li class="tocline1">1.5 <a href="#rfc.section.1.5">with explicit counters</a></li><li class="tocline1">1.6 <a href="#rfc.section.1.6">Nested list</a></li><li class="tocline1">1.7 <a href="#rfc.section.1.7">list without style</a></li><li class="tocline1">1.8 <a href="#rfc.section.1.8">list with multiple paragraphs in a single list item</a></li></ul></li><li class="tocline0">2. <a href="#rfc.section.2">spanx</a></li><li class="tocline0">3. <a href="#rfc.section.3">Tables</a><ul class="toc"><li class="tocline1">3.1 <a href="#rfc.section.3.1">no borders</a></li><li class="tocline1">3.2 <a href="#rfc.section.3.2">borders around headers</a></li><li class="tocline1">3.3 <a href="#rfc.section.3.3">example from xml2rc README</a></li><li class="tocline1">3.4 <a href="#rfc.section.3.4">no column titles</a></li><li class="tocline1">3.5 <a href="#rfc.section.3.5">referencing tables</a></li><li class="tocline1">3.6 <a href="#rfc.section.3.6">table captions</a></li></ul></li><li class="tocline0">4. <a href="#rfc.section.4">Figures</a><ul class="toc"><li class="tocline1">4.1 <a href="#rfc.section.4.1">with preamble, no title...</a></li><li class="tocline1">4.2 <a href="#rfc.section.4.2">with postamble and title...</a></li><li class="tocline1">4.3 <a href="#rfc.section.4.3">Whitespace handling</a></li><li class="tocline1">4.4 <a href="#rfc.section.4.4">Whitespace around figures</a></li><li class="tocline1">4.5 <a href="#rfc.section.4.5">SVG</a></li></ul></li><li class="tocline0">5. <a href="#refs">References</a><ul class="toc"><li class="tocline1">5.1 <a href="#rfc.section.5.1">xref with no content</a></li><li class="tocline1">5.2 <a href="#xref.with.no.content">xref with no content</a></li><li class="tocline1">5.3 <a href="#rfc.section.5.3">xref to named <t> element</a></li><li class="tocline1">5.4 <a href="#rfc.section.5.4">xref to named <t> element inside list</a></li><li class="tocline1">5.5 <a href="#rfc.section.5.5">xref with no auto-formatting</a></li><li class="tocline1">5.6 <a href="#rfc.section.5.6">xref with content and auto-formatting</a></li><li class="tocline1">5.7 <a href="#rfc.section.5.7">xref with content and no formatting</a></li><li class="tocline1">5.8 <a href="#rfc.section.5.8">xref with content and 'none' formatting</a></li><li class="tocline1">5.9 <a href="#rfc.section.5.9">xref with no content and anchor formatting</a></li><li class="tocline1">5.10 <a href="#rfc.section.5.10">eref with no content</a></li><li class="tocline1">5.11 <a href="#rfc.section.5.11">eref with content</a></li><li class="tocline1">5.12 <a href="#rfc.section.5.12">iref inside paragraph</a></li></ul></li><li class="tocline0">6. <a href="#rfc.section.6">Paragraph formatting</a></li><li class="tocline0">7. <a href="#rfc.section.7">Sections</a><ul class="toc"><li class="tocline1">7.1 <a href="#rfc.section.7.1">Subsection with TOC entry</a></li><li class="tocline2"><ul class="toc"><li class="tocline1">7.2.1 <a href="#rfc.section.7.2.1">Sub-subsection with TOC entry</a></li></ul></li></ul></li><li class="tocline0">8. <a href="#rfc.section.8">Comments</a></li><li class="tocline0">9. <a href="#rfc.section.9">Artwork width</a></li><li class="tocline0">10. <a href="#extensions">Extensions</a><ul class="toc"><li class="tocline1">10.1 <a href="#rfc.section.10.1">Markup in figure/artwork</a></li><li class="tocline1">10.2 <a href="#rfc.section.10.2">Measuring Lengths</a></li><li class="tocline1">10.3 <a href="#rfc.section.10.3">Quotations</a></li><li class="tocline1">10.4 <a href="#rfc.section.10.4">Subsections</a></li><li class="tocline1">10.5 <a href="#rfc.section.10.5">Box Drawing</a></li><li class="tocline1">10.6 <a href="#computed.reference.targets">Computed Reference Targets</a></li><li class="tocline1">10.7 <a href="#abnf.support">ABNF Support</a></li></ul></li><li class="tocline0">11. <a href="#rfc.section.11">Blank Lines</a></li><li class="tocline0">12. <a href="#rfc.section.12">Other</a><ul class="toc"><li class="tocline1">12.1 <a href="#rfc.section.12.1">Comments in Text</a></li></ul></li><li class="tocline0">13. <a href="#rfc.references">References</a></li><li class="tocline0"><a href="#rfc.comments">Editorial Comments</a></li><li class="tocline0"><a href="#rfc.authors">Author's Address</a></li><li class="tocline0"><a href="#rfc.index">Index</a></li></ul><ul class="toc"><li class="tocline0"><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 style="list-style-type: lower-alpha"><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 style="list-style-type: upper-alpha"><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><dl class="empty"><dd>One</dd><dd>Two</dd><dd>Three</dd></dl><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 summary="The list of valid keywords are:" class="tt full" 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>try to enforce the ID-nits conventions and DTD validity</td><td>a</td></tr><tr><td class="right">iprnotified</td><td class="center">no</td><td>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>bb bb</td></tr><tr><td class="right">compact</td><td class="center">no</td><td>when producing a txt/nroff file, try to conserve vertical whitespace</td><td>ccc ccc ccc</td></tr><tr><td class="right">subcompact</td><td class="center">compact</td><td>if compact is "yes", then setting this to "no" will make things a little less compact</td><td>dddd dddd dddd dddd</td></tr><tr><td class="right">needLines</td><td class="center">n/a</td><td>an integer hint indicating how many contiguous lines are needed at this point in the output</td><td>eeeee eeeee eeeee eeeee eeeee</td></tr><tr><td class="right">here come empty cells</td><td class="center"></td><td></td><td></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 summary="The table below should appear with no borders." class="tt none" 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>11</td><td>12</td></tr><tr><td>21</td><td>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 summary="The table below should appear with borders just around the headers." class="tt headers" cellpadding="3" cellspacing="0"><thead><tr><th class="left">C1</th><th class="left">C2</th></tr></thead><tbody><tr><td>11</td><td>12</td></tr><tr><td>21</td><td>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 summary="So,
 putting it all together, we have, e.g.," class="tt full" 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 summary="The table below should appear with no titles." class="tt full" cellpadding="3" cellspacing="0"><caption>Table 3: a table with no column titles</caption><tbody><tr><td>11</td><td>12</td></tr><tr><td>21</td><td>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 summary="The table below should appear with column titles (one being non-empty)." class="tt full" 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>11</td><td>12</td></tr><tr><td>21</td><td>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 summary="No anchor, no title" class="tt full" cellpadding="3" cellspacing="0"><thead><tr><th class="left">Anchor</th><th class="left">Title</th></tr></thead><tbody><tr><td>-</td><td>-</td></tr></tbody></table></div><div id="rfc.table.5"><div id="texttable1"></div><p>Anchor (not being referenced), no title</p><table summary="Anchor (not being referenced), no title" class="tt full" 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>yes</td><td>-</td></tr></tbody></table></div><div id="rfc.table.6"><p>No anchor, with title</p><table summary="No anchor, with title" class="tt full" 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>-</td><td>"title"</td></tr></tbody></table></div><div id="rfc.table.7"><div id="texttable2"></div><p>Both anchor and title</p><table summary="Both anchor and title" class="tt full" 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>yes</td><td>"title"</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> +--+362 </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.430, 2009-04-01 15:50:01, XSLT vendor: SAXON 6.5.5 from Michael Kay http://saxon.sf.net/"><meta name="keywords" content="RFC2629, test case, xml2rfc"><link rel="schema.DC" href="http://purl.org/dc/elements/1.1/"><meta name="DC.Creator" content="Reschke, J. F."></head><body><table summary="header information" class="header" border="0" cellpadding="1" cellspacing="1"><tr><td class="header left">RFC2629 test cases</td><td class="header right">J. F. Reschke</td></tr><tr><td class="header left"></td><td class="header right">greenbytes</td></tr><tr><td class="header left"></td><td class="header right">October 2008</td></tr></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 class="tocline0">1. <a href="#lists">Lists</a><ul class="toc"><li class="tocline1">1.1 <a href="#rfc.section.1.1">hanging list</a></li><li class="tocline1">1.2 <a href="#rfc.section.1.2">numbered list</a></li><li class="tocline1">1.3 <a href="#ordered.list.letters">ordered list (letters)</a></li><li class="tocline1">1.4 <a href="#rfc.section.1.4">no explicit counters</a></li><li class="tocline1">1.5 <a href="#rfc.section.1.5">with explicit counters</a></li><li class="tocline1">1.6 <a href="#rfc.section.1.6">Nested list</a></li><li class="tocline1">1.7 <a href="#rfc.section.1.7">list without style</a></li><li class="tocline1">1.8 <a href="#rfc.section.1.8">list with multiple paragraphs in a single list item</a></li></ul></li><li class="tocline0">2. <a href="#rfc.section.2">spanx</a></li><li class="tocline0">3. <a href="#rfc.section.3">Tables</a><ul class="toc"><li class="tocline1">3.1 <a href="#rfc.section.3.1">no borders</a></li><li class="tocline1">3.2 <a href="#rfc.section.3.2">borders around headers</a></li><li class="tocline1">3.3 <a href="#rfc.section.3.3">example from xml2rc README</a></li><li class="tocline1">3.4 <a href="#rfc.section.3.4">no column titles</a></li><li class="tocline1">3.5 <a href="#rfc.section.3.5">referencing tables</a></li><li class="tocline1">3.6 <a href="#rfc.section.3.6">table captions</a></li></ul></li><li class="tocline0">4. <a href="#rfc.section.4">Figures</a><ul class="toc"><li class="tocline1">4.1 <a href="#rfc.section.4.1">with preamble, no title...</a></li><li class="tocline1">4.2 <a href="#rfc.section.4.2">with postamble and title...</a></li><li class="tocline1">4.3 <a href="#rfc.section.4.3">Whitespace handling</a></li><li class="tocline1">4.4 <a href="#rfc.section.4.4">Whitespace around figures</a></li><li class="tocline1">4.5 <a href="#rfc.section.4.5">SVG</a></li></ul></li><li class="tocline0">5. <a href="#refs">References</a><ul class="toc"><li class="tocline1">5.1 <a href="#rfc.section.5.1">xref with no content</a></li><li class="tocline1">5.2 <a href="#xref.with.no.content">xref with no content</a></li><li class="tocline1">5.3 <a href="#rfc.section.5.3">xref to named <t> element</a></li><li class="tocline1">5.4 <a href="#rfc.section.5.4">xref to named <t> element inside list</a></li><li class="tocline1">5.5 <a href="#rfc.section.5.5">xref with no auto-formatting</a></li><li class="tocline1">5.6 <a href="#rfc.section.5.6">xref with content and auto-formatting</a></li><li class="tocline1">5.7 <a href="#rfc.section.5.7">xref with content and no formatting</a></li><li class="tocline1">5.8 <a href="#rfc.section.5.8">xref with content and 'none' formatting</a></li><li class="tocline1">5.9 <a href="#rfc.section.5.9">xref with no content and anchor formatting</a></li><li class="tocline1">5.10 <a href="#rfc.section.5.10">eref with no content</a></li><li class="tocline1">5.11 <a href="#rfc.section.5.11">eref with content</a></li><li class="tocline1">5.12 <a href="#rfc.section.5.12">iref inside paragraph</a></li></ul></li><li class="tocline0">6. <a href="#rfc.section.6">Paragraph formatting</a></li><li class="tocline0">7. <a href="#rfc.section.7">Sections</a><ul class="toc"><li class="tocline1">7.1 <a href="#rfc.section.7.1">Subsection with TOC entry</a></li><li class="tocline2"><ul class="toc"><li class="tocline1">7.2.1 <a href="#rfc.section.7.2.1">Sub-subsection with TOC entry</a></li></ul></li></ul></li><li class="tocline0">8. <a href="#rfc.section.8">Comments</a></li><li class="tocline0">9. <a href="#rfc.section.9">Artwork width</a></li><li class="tocline0">10. <a href="#extensions">Extensions</a><ul class="toc"><li class="tocline1">10.1 <a href="#rfc.section.10.1">Markup in figure/artwork</a></li><li class="tocline1">10.2 <a href="#rfc.section.10.2">Measuring Lengths</a></li><li class="tocline1">10.3 <a href="#rfc.section.10.3">Quotations</a></li><li class="tocline1">10.4 <a href="#rfc.section.10.4">Subsections</a></li><li class="tocline1">10.5 <a href="#rfc.section.10.5">Box Drawing</a></li><li class="tocline1">10.6 <a href="#computed.reference.targets">Computed Reference Targets</a></li><li class="tocline1">10.7 <a href="#abnf.support">ABNF Support</a></li></ul></li><li class="tocline0">11. <a href="#rfc.section.11">Blank Lines</a></li><li class="tocline0">12. <a href="#rfc.section.12">Other</a><ul class="toc"><li class="tocline1">12.1 <a href="#rfc.section.12.1">Comments in Text</a></li></ul></li><li class="tocline0">13. <a href="#rfc.references">References</a></li><li class="tocline0"><a href="#rfc.comments">Editorial Comments</a></li><li class="tocline0"><a href="#rfc.authors">Author's Address</a></li><li class="tocline0"><a href="#rfc.index">Index</a></li></ul><ul class="toc"><li class="tocline0"><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 style="list-style-type: lower-alpha"><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 style="list-style-type: upper-alpha"><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><dl class="empty"><dd>One</dd><dd>Two</dd><dd>Three</dd></dl><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 summary="The list of valid keywords are:" class="tt full" 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>try to enforce the ID-nits conventions and DTD validity</td><td>a</td></tr><tr><td class="right">iprnotified</td><td class="center">no</td><td>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>bb bb</td></tr><tr><td class="right">compact</td><td class="center">no</td><td>when producing a txt/nroff file, try to conserve vertical whitespace</td><td>ccc ccc ccc</td></tr><tr><td class="right">subcompact</td><td class="center">compact</td><td>if compact is "yes", then setting this to "no" will make things a little less compact</td><td>dddd dddd dddd dddd</td></tr><tr><td class="right">needLines</td><td class="center">n/a</td><td>an integer hint indicating how many contiguous lines are needed at this point in the output</td><td>eeeee eeeee eeeee eeeee eeeee</td></tr><tr><td class="right">here come empty cells</td><td class="center"></td><td></td><td></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 summary="The table below should appear with no borders." class="tt none" 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>11</td><td>12</td></tr><tr><td>21</td><td>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 summary="The table below should appear with borders just around the headers." class="tt headers" cellpadding="3" cellspacing="0"><thead><tr><th class="left">C1</th><th class="left">C2</th></tr></thead><tbody><tr><td>11</td><td>12</td></tr><tr><td>21</td><td>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 summary="So,
 putting it all together, we have, e.g.," class="tt full" 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 summary="The table below should appear with no titles." class="tt full" cellpadding="3" cellspacing="0"><caption>Table 3: a table with no column titles</caption><tbody><tr><td>11</td><td>12</td></tr><tr><td>21</td><td>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 summary="The table below should appear with column titles (one being non-empty)." class="tt full" 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>11</td><td>12</td></tr><tr><td>21</td><td>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 summary="No anchor, no title" class="tt full" cellpadding="3" cellspacing="0"><thead><tr><th class="left">Anchor</th><th class="left">Title</th></tr></thead><tbody><tr><td>-</td><td>-</td></tr></tbody></table></div><div id="rfc.table.5"><div id="texttable1"></div><p>Anchor (not being referenced), no title</p><table summary="Anchor (not being referenced), no title" class="tt full" 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>yes</td><td>-</td></tr></tbody></table></div><div id="rfc.table.6"><p>No anchor, with title</p><table summary="No anchor, with title" class="tt full" 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>-</td><td>"title"</td></tr></tbody></table></div><div id="rfc.table.7"><div id="texttable2"></div><p>Both anchor and title</p><table summary="Both anchor and title" class="tt full" 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>yes</td><td>"title"</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> +--+ 363 363 | | 364 364 +--+
Note: See TracChangeset
for help on using the changeset viewer.