Changeset 2027 for rfc2629xslt


Ignore:
Timestamp:
Dec 1, 2012, 1:54:37 AM (7 years ago)
Author:
julian.reschke@…
Message:

bump up document dates, update to latest version of rfc2629.xslt

Location:
rfc2629xslt
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • rfc2629xslt/rfc2629-ext.rnc

    r1661 r2027  
    193193# Allow x:indent-with attribute on <artwork>
    194194attlist.artwork &=
    195   attribute x:indent-with { ATEXT }?
     195  attribute x:indent-with { ATEXT }?,
     196  attribute x:isCodeComponent { "no" | "yes" }?
    196197
    197198# Allow anchor and x:annotation attributes on <author>
  • rfc2629xslt/rfc2629.xslt

    r1845 r2027  
    16291629  <xsl:variable name="target">
    16301630    <xsl:choose>
    1631       <xsl:when test="@target"><xsl:value-of select="@target" /></xsl:when>
     1631      <xsl:when test="@target">
     1632        <xsl:if test="string-length(normalize-space(@target)) = 0">
     1633          <xsl:call-template name="warning">
     1634            <xsl:with-param name="msg">invalid (empty) target attribute in reference '<xsl:value-of select="@anchor"/>'</xsl:with-param>
     1635          </xsl:call-template>
     1636        </xsl:if>
     1637        <xsl:value-of select="normalize-space(@target)" />
     1638      </xsl:when>
    16321639      <xsl:otherwise>
    16331640        <xsl:call-template name="computed-auto-target">
     
    17871794      </xsl:if>
    17881795     
    1789       <xsl:if test="@target">
     1796      <xsl:if test="string-length(normalize-space(@target)) &gt; 0">
    17901797        <xsl:text>, &lt;</xsl:text>
    1791         <a href="{@target}"><xsl:value-of select="@target"/></a>
     1798        <a href="{normalize-space(@target)}"><xsl:value-of select="normalize-space(@target)"/></a>
    17921799        <xsl:text>&gt;</xsl:text>
    17931800      </xsl:if>
  • rfc2629xslt/rfc2629toXHTML.xslt

    r1845 r2027  
    14971497  <xsl:variable name="target">
    14981498    <xsl:choose>
    1499       <xsl:when test="@target"><xsl:value-of select="@target"/></xsl:when>
     1499      <xsl:when test="@target">
     1500        <xsl:if test="string-length(normalize-space(@target)) = 0">
     1501          <xsl:call-template name="warning">
     1502            <xsl:with-param name="msg">invalid (empty) target attribute in reference '<xsl:value-of select="@anchor"/>'</xsl:with-param>
     1503          </xsl:call-template>
     1504        </xsl:if>
     1505        <xsl:value-of select="normalize-space(@target)"/>
     1506      </xsl:when>
    15001507      <xsl:otherwise>
    15011508        <xsl:call-template name="computed-auto-target">
     
    16551662      </xsl:if>
    16561663     
    1657       <xsl:if test="@target">
     1664      <xsl:if test="string-length(normalize-space(@target)) &gt; 0">
    16581665        <xsl:text>, &lt;</xsl:text>
    1659         <a href="{@target}"><xsl:value-of select="@target"/></a>
     1666        <a href="{normalize-space(@target)}"><xsl:value-of select="normalize-space(@target)"/></a>
    16601667        <xsl:text>&gt;</xsl:text>
    16611668      </xsl:if>
  • rfc2629xslt/rfc2629xslt.html

    r1845 r2027  
    345345  }
    346346  @top-right {
    347        content: "June 2012";
     347       content: "November 2012";
    348348  }
    349349  @top-center {
     
    372372    }
    373373}
    374 </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.588, 2012-08-25 12:28:24, 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">June 2012</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><a href="#rfc.section.1">1.</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.1">Introduction</a></li><li><a href="#rfc.section.2">2.</a>&nbsp;&nbsp;&nbsp;<a href="#supported.elements">Supported RFC2629 elements</a><ul><li><a href="#rfc.section.2.1">2.1</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.2.1">Extension elements</a></li></ul></li><li><a href="#rfc.section.3">3.</a>&nbsp;&nbsp;&nbsp;<a href="#processing.instructions">Processing Instructions</a><ul><li><a href="#rfc.section.3.1">3.1</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.3.1">Supported xml2rfc-compatible PIs</a></li><li><a href="#rfc.section.3.2">3.2</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.3.2">Unsupported xml2rfc-compatible PIs</a></li><li><a href="#rfc.section.3.3">3.3</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.3.3">Extension PIs</a></li></ul></li><li><a href="#rfc.section.4">4.</a>&nbsp;&nbsp;&nbsp;<a href="#anchors">Anchors</a></li><li><a href="#rfc.section.5">5.</a>&nbsp;&nbsp;&nbsp;<a href="#xslt.engines">Supported XSLT engines</a><ul><li><a href="#rfc.section.5.1">5.1</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.5.1">Standalone Engines</a></li><li><a href="#rfc.section.5.2">5.2</a>&nbsp;&nbsp;&nbsp;<a href="#xslt.engines.browser">In-Browser Engines</a></li></ul></li><li><a href="#rfc.section.6">6.</a>&nbsp;&nbsp;&nbsp;<a href="#output.html">Transforming to HTML</a><ul><li><a href="#rfc.section.6.1">6.1</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.6.1">HTML compliance</a></li><li><a href="#rfc.section.6.2">6.2</a>&nbsp;&nbsp;&nbsp;<a href="#html.link">Standard HTML LINK elements</a></li><li><a href="#rfc.section.6.3">6.3</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.6.3">Standard HTML metadata</a></li><li><a href="#rfc.section.6.4">6.4</a>&nbsp;&nbsp;&nbsp;<a href="#rfc2731.properties">Dublin Core (RFC2731) metadata</a></li><li><a href="#rfc.section.6.5">6.5</a>&nbsp;&nbsp;&nbsp;<a href="#hcard">Experimental hCard support</a></li></ul></li><li><a href="#rfc.section.7">7.</a>&nbsp;&nbsp;&nbsp;<a href="#output.xhtml">Transforming to XHTML</a></li><li><a href="#rfc.section.8">8.</a>&nbsp;&nbsp;&nbsp;<a href="#output.chm">Transforming to CHM (Microsoft Compiled Help)</a></li><li><a href="#rfc.section.9">9.</a>&nbsp;&nbsp;&nbsp;<a href="#output.pdf">Transforming to PDF</a><ul><li><a href="#rfc.section.9.1">9.1</a>&nbsp;&nbsp;&nbsp;<a href="#output.pdf.fop">Via XSL-FO</a><ul><li><a href="#rfc.section.9.1.1">9.1.1</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.9.1.1">Extension feature matrix</a></li><li><a href="#rfc.section.9.1.2">9.1.2</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.9.1.2">Example: producing output for Apache FOP</a></li></ul></li><li><a href="#rfc.section.9.2">9.2</a>&nbsp;&nbsp;&nbsp;<a href="#output.pdf.html">Via X(HTML)</a></li></ul></li><li><a href="#rfc.section.10">10.</a>&nbsp;&nbsp;&nbsp;<a href="#output.epub">Transforming to ePub</a></li><li><a href="#rfc.section.11">11.</a>&nbsp;&nbsp;&nbsp;<a href="#extensions">Generic Extensions</a><ul><li><a href="#rfc.section.11.1">11.1</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.abnf-char-sequence">&lt;abnf-char-sequence&gt; element</a></li><li><a href="#rfc.section.11.2">11.2</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.anchor-alias">&lt;anchor-alias&gt; element</a></li><li><a href="#rfc.section.11.3">11.3</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.bcp14">&lt;bcp14&gt; element</a></li><li><a href="#rfc.section.11.4">11.4</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.bb">&lt;bb&gt; element</a></li><li><a href="#rfc.section.11.5">11.5</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.bc">&lt;bc&gt; element</a></li><li><a href="#rfc.section.11.6">11.6</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.blockquote">&lt;blockquote&gt; element</a></li><li><a href="#rfc.section.11.7">11.7</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.boilerplate">&lt;boilerplate&gt; element</a></li><li><a href="#rfc.section.11.8">11.8</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.bt">&lt;bt&gt; element</a></li><li><a href="#rfc.section.11.9">11.9</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.dfn">&lt;dfn&gt; element</a></li><li><a href="#rfc.section.11.10">11.10</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.feedback">&lt;feedback&gt; element</a></li><li><a href="#rfc.section.11.11">11.11</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.h">&lt;h&gt; element</a></li><li><a href="#rfc.section.11.12">11.12</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.highlight">&lt;highlight&gt; element</a></li><li><a href="#rfc.section.11.13">11.13</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.length-of">&lt;length-of&gt; element</a></li><li><a href="#rfc.section.11.14">11.14</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.link">&lt;link&gt; element</a></li><li><a href="#rfc.section.11.15">11.15</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.lt">&lt;lt&gt; element</a></li><li><a href="#rfc.section.11.16">11.16</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.note">&lt;note&gt; element</a></li><li><a href="#rfc.section.11.17">11.17</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.parse-xml">&lt;parse-xml&gt; element</a></li><li><a href="#rfc.section.11.18">11.18</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.prose">&lt;prose&gt; element</a></li><li><a href="#rfc.section.11.19">11.19</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.q">&lt;q&gt; element</a></li><li><a href="#rfc.section.11.20">11.20</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.ref">&lt;ref&gt; element</a></li><li><a href="#rfc.section.11.21">11.21</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.source">&lt;source&gt; element</a></li><li><a href="#rfc.section.11.22">11.22</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.sup">&lt;sup&gt; element</a></li><li><a href="#rfc.section.11.23">11.23</a>&nbsp;&nbsp;&nbsp;<a href="#ext-rfc2629.artwork">Extensions to Xml2rfc &lt;artwork&gt; element</a></li><li><a href="#rfc.section.11.24">11.24</a>&nbsp;&nbsp;&nbsp;<a href="#ext-rfc2629.iref">Extensions to Xml2rfc &lt;iref&gt; element</a></li><li><a href="#rfc.section.11.25">11.25</a>&nbsp;&nbsp;&nbsp;<a href="#ext-rfc2629.list">Extensions to Xml2rfc &lt;list&gt; element</a></li><li><a href="#rfc.section.11.26">11.26</a>&nbsp;&nbsp;&nbsp;<a href="#ext-rfc2629.rfc">Extensions to Xml2rfc &lt;rfc&gt; element</a></li><li><a href="#rfc.section.11.27">11.27</a>&nbsp;&nbsp;&nbsp;<a href="#ext-rfc2629.section">Extensions to Xml2rfc &lt;section&gt; element</a></li><li><a href="#rfc.section.11.28">11.28</a>&nbsp;&nbsp;&nbsp;<a href="#ext-rfc2629.xref">Extensions to Xml2rfc &lt;xref&gt; element</a></li></ul></li><li><a href="#rfc.section.12">12.</a>&nbsp;&nbsp;&nbsp;<a href="#utilities">Utilities</a><ul><li><a href="#rfc.section.12.1">12.1</a>&nbsp;&nbsp;&nbsp;<a href="#checking-references">Checking References</a></li><li><a href="#rfc.section.12.2">12.2</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.12.2">Generating Graphs from References</a></li><li><a href="#rfc.section.12.3">12.3</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.12.3">Producing reference entries for books</a></li><li><a href="#rfc.section.12.4">12.4</a>&nbsp;&nbsp;&nbsp;<a href="#clean-for-dtd">Down-converting to RFC2629bis DTD</a></li><li><a href="#rfc.section.12.5">12.5</a>&nbsp;&nbsp;&nbsp;<a href="#extract-artwork">Extracting artwork</a></li><li><a href="#rfc.section.12.6">12.6</a>&nbsp;&nbsp;&nbsp;<a href="#grddl">GRRDL</a></li></ul></li><li><a href="#rfc.section.13">13.</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.references">Informative References</a></li><li><a href="#rfc.authors">Author's Address</a></li><li><a href="#rfc.section.A">A.</a>&nbsp;&nbsp;&nbsp;<a href="#grammar">RELAX NG Compact Schema</a></li><li><a href="#rfc.section.B">B.</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.B">Implementation Notes</a><ul><li><a href="#rfc.section.B.1">B.1</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.B.1">Recognized type attributes for &lt;artwork&gt; element</a></li></ul></li><li><a href="#rfc.section.C">C.</a>&nbsp;&nbsp;&nbsp;<a href="#examples">Examples</a><ul><li><a href="#rfc.section.C.1">C.1</a>&nbsp;&nbsp;&nbsp;<a href="#examples.internalsubset">Using the 'Internal Subset'</a></li><li><a href="#rfc.section.C.2">C.2</a>&nbsp;&nbsp;&nbsp;<a href="#examples.customizing">Customization</a></li></ul></li><li><a href="#rfc.section.D">D.</a>&nbsp;&nbsp;&nbsp;<a href="#boilerplate">Producing the IETF 'Boilerplate'</a><ul><li><a href="#rfc.section.D.1">D.1</a>&nbsp;&nbsp;&nbsp;<a href="#attribute-ipr">The /rfc/@ipr Attribute</a><ul><li><a href="#rfc.section.D.1.1">D.1.1</a>&nbsp;&nbsp;&nbsp;<a href="#attribute-ipr-current">Current Values: '*trust200902'</a><ul><li><a href="#rfc.section.D.1.1.1">D.1.1.1</a>&nbsp;&nbsp;&nbsp;<a href="#attribute-ipr-trust200902">trust200902</a></li><li><a href="#rfc.section.D.1.1.2">D.1.1.2</a>&nbsp;&nbsp;&nbsp;<a href="#attribute-ipr-noModificationTrust200902">noModificationTrust200902</a></li><li><a href="#rfc.section.D.1.1.3">D.1.1.3</a>&nbsp;&nbsp;&nbsp;<a href="#attribute-ipr-noDerivativesTrust200902">noDerivativesTrust200902</a></li><li><a href="#rfc.section.D.1.1.4">D.1.1.4</a>&nbsp;&nbsp;&nbsp;<a href="#attribute-ipr-pre5378Trust200902">pre5378Trust200902</a></li></ul></li><li><a href="#rfc.section.D.1.2">D.1.2</a>&nbsp;&nbsp;&nbsp;<a href="#attribute-ipr-historic">Historic Values</a><ul><li><a href="#rfc.section.D.1.2.1">D.1.2.1</a>&nbsp;&nbsp;&nbsp;<a href="#attribute-ipr-200811">Historic Values: '*trust200811'</a></li><li><a href="#rfc.section.D.1.2.2">D.1.2.2</a>&nbsp;&nbsp;&nbsp;<a href="#attribute-ipr-3978">Historic Values: '*3978'</a></li><li><a href="#rfc.section.D.1.2.3">D.1.2.3</a>&nbsp;&nbsp;&nbsp;<a href="#attribute-ipr-3667">Historic Values: '*3667'</a></li><li><a href="#rfc.section.D.1.2.4">D.1.2.4</a>&nbsp;&nbsp;&nbsp;<a href="#attribute-ipr-2026">Historic Values: '*2026'</a></li></ul></li></ul></li><li><a href="#rfc.section.D.2">D.2</a>&nbsp;&nbsp;&nbsp;<a href="#attribute-category">The /rfc/@category Attribute</a></li><li><a href="#rfc.section.D.3">D.3</a>&nbsp;&nbsp;&nbsp;<a href="#attribute-submissiontype">The /rfc/@submissionType Attribute</a></li><li><a href="#rfc.section.D.4">D.4</a>&nbsp;&nbsp;&nbsp;<a href="#attribute-consensus">The /rfc/@consensus Attribute</a></li><li><a href="#rfc.section.D.5">D.5</a>&nbsp;&nbsp;&nbsp;<a href="#attribute-number">The /rfc/@number Attribute</a></li><li><a href="#rfc.section.D.6">D.6</a>&nbsp;&nbsp;&nbsp;<a href="#attribute-docname">The /rfc/@docName Attribute</a></li><li><a href="#rfc.section.D.7">D.7</a>&nbsp;&nbsp;&nbsp;<a href="#attribute-obsoletes">The /rfc/@obsoletes Attribute</a></li><li><a href="#rfc.section.D.8">D.8</a>&nbsp;&nbsp;&nbsp;<a href="#attribute-updates">The /rfc/@updates Attribute</a></li></ul></li><li><a href="#rfc.section.E">E.</a>&nbsp;&nbsp;&nbsp;<a href="#license">License</a></li><li><a href="#rfc.section.F">F.</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.F">Change Logs</a><ul><li><a href="#rfc.section.F.1">F.1</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.F.1">Package</a></li><li><a href="#rfc.section.F.2">F.2</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.F.2">amazon-asin.xslt</a></li><li><a href="#rfc.section.F.3">F.3</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.F.3">check-references.xslt</a></li><li><a href="#rfc.section.F.4">F.4</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.F.4">gen-reference-graph.xslt</a></li><li><a href="#rfc.section.F.5">F.5</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.F.5">rfc2629.xslt</a></li><li><a href="#rfc.section.F.6">F.6</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.F.6">rfc2629toFO.xslt</a></li><li><a href="#rfc.section.F.7">F.7</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.F.7">xsl11toAn.xslt</a></li><li><a href="#rfc.section.F.8">F.8</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.F.8">xsl11toFop.xslt</a></li><li><a href="#rfc.section.F.9">F.9</a>&nbsp;&nbsp;&nbsp;<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>&nbsp;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&nbsp;2</a>),</li><li>support for xml2rfc processing instructions (<a href="#processing.instructions" title="Processing Instructions">Section&nbsp;3</a>),</li><li>the names of anchor elements generated in HTML and PDF output (<a href="#anchors" title="Anchors">Section&nbsp;4</a>),</li><li>various XSLT engines that can be used (<a href="#xslt.engines" title="Supported XSLT engines">Section&nbsp;5</a>),</li><li>outputting HTML (<a href="#output.html" title="Transforming to HTML">Section&nbsp;6</a>) and XHTML (<a href="#output.xhtml" title="Transforming to XHTML">Section&nbsp;7</a>),</li><li>outputting CHM (Compiled Microsoft Help, <a href="#output.chm" title="Transforming to CHM (Microsoft Compiled Help)">Section&nbsp;8</a>),</li><li>outputting PDF (<a href="#output.pdf" title="Transforming to PDF">Section&nbsp;9</a>),</li><li>outputting ePub (<a href="#output.epub" title="Transforming to ePub">Section&nbsp;10</a>),</li><li>extensions to the xml2rfc vocabulary (<a href="#extensions" title="Generic Extensions">Section&nbsp;11</a>).</li><li>various utilities (<a href="#utilities" title="Utilities">Section&nbsp;12</a>).</li></ul><p id="rfc.section.1.p.2">The full distribution is available at &lt;<a href="http://greenbytes.de/tech/webdav/rfc2629xslt.zip">http://greenbytes.de/tech/webdav/rfc2629xslt.zip</a>&gt;.</p><hr class="noprint"><h1 id="rfc.section.2" class="np"><a href="#rfc.section.2">2.</a>&nbsp;<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>&nbsp;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&nbsp;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>&nbsp;<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">&lt;?rfc toc="yes"?&gt;
     374</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.588, 2012-08-25 12:28:24, 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 2012</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><a href="#rfc.section.1">1.</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.1">Introduction</a></li><li><a href="#rfc.section.2">2.</a>&nbsp;&nbsp;&nbsp;<a href="#supported.elements">Supported RFC2629 elements</a><ul><li><a href="#rfc.section.2.1">2.1</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.2.1">Extension elements</a></li></ul></li><li><a href="#rfc.section.3">3.</a>&nbsp;&nbsp;&nbsp;<a href="#processing.instructions">Processing Instructions</a><ul><li><a href="#rfc.section.3.1">3.1</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.3.1">Supported xml2rfc-compatible PIs</a></li><li><a href="#rfc.section.3.2">3.2</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.3.2">Unsupported xml2rfc-compatible PIs</a></li><li><a href="#rfc.section.3.3">3.3</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.3.3">Extension PIs</a></li></ul></li><li><a href="#rfc.section.4">4.</a>&nbsp;&nbsp;&nbsp;<a href="#anchors">Anchors</a></li><li><a href="#rfc.section.5">5.</a>&nbsp;&nbsp;&nbsp;<a href="#xslt.engines">Supported XSLT engines</a><ul><li><a href="#rfc.section.5.1">5.1</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.5.1">Standalone Engines</a></li><li><a href="#rfc.section.5.2">5.2</a>&nbsp;&nbsp;&nbsp;<a href="#xslt.engines.browser">In-Browser Engines</a></li></ul></li><li><a href="#rfc.section.6">6.</a>&nbsp;&nbsp;&nbsp;<a href="#output.html">Transforming to HTML</a><ul><li><a href="#rfc.section.6.1">6.1</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.6.1">HTML compliance</a></li><li><a href="#rfc.section.6.2">6.2</a>&nbsp;&nbsp;&nbsp;<a href="#html.link">Standard HTML LINK elements</a></li><li><a href="#rfc.section.6.3">6.3</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.6.3">Standard HTML metadata</a></li><li><a href="#rfc.section.6.4">6.4</a>&nbsp;&nbsp;&nbsp;<a href="#rfc2731.properties">Dublin Core (RFC2731) metadata</a></li><li><a href="#rfc.section.6.5">6.5</a>&nbsp;&nbsp;&nbsp;<a href="#hcard">Experimental hCard support</a></li></ul></li><li><a href="#rfc.section.7">7.</a>&nbsp;&nbsp;&nbsp;<a href="#output.xhtml">Transforming to XHTML</a></li><li><a href="#rfc.section.8">8.</a>&nbsp;&nbsp;&nbsp;<a href="#output.chm">Transforming to CHM (Microsoft Compiled Help)</a></li><li><a href="#rfc.section.9">9.</a>&nbsp;&nbsp;&nbsp;<a href="#output.pdf">Transforming to PDF</a><ul><li><a href="#rfc.section.9.1">9.1</a>&nbsp;&nbsp;&nbsp;<a href="#output.pdf.fop">Via XSL-FO</a><ul><li><a href="#rfc.section.9.1.1">9.1.1</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.9.1.1">Extension feature matrix</a></li><li><a href="#rfc.section.9.1.2">9.1.2</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.9.1.2">Example: producing output for Apache FOP</a></li></ul></li><li><a href="#rfc.section.9.2">9.2</a>&nbsp;&nbsp;&nbsp;<a href="#output.pdf.html">Via X(HTML)</a></li></ul></li><li><a href="#rfc.section.10">10.</a>&nbsp;&nbsp;&nbsp;<a href="#output.epub">Transforming to ePub</a></li><li><a href="#rfc.section.11">11.</a>&nbsp;&nbsp;&nbsp;<a href="#extensions">Generic Extensions</a><ul><li><a href="#rfc.section.11.1">11.1</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.abnf-char-sequence">&lt;abnf-char-sequence&gt; element</a></li><li><a href="#rfc.section.11.2">11.2</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.anchor-alias">&lt;anchor-alias&gt; element</a></li><li><a href="#rfc.section.11.3">11.3</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.bcp14">&lt;bcp14&gt; element</a></li><li><a href="#rfc.section.11.4">11.4</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.bb">&lt;bb&gt; element</a></li><li><a href="#rfc.section.11.5">11.5</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.bc">&lt;bc&gt; element</a></li><li><a href="#rfc.section.11.6">11.6</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.blockquote">&lt;blockquote&gt; element</a></li><li><a href="#rfc.section.11.7">11.7</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.boilerplate">&lt;boilerplate&gt; element</a></li><li><a href="#rfc.section.11.8">11.8</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.bt">&lt;bt&gt; element</a></li><li><a href="#rfc.section.11.9">11.9</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.dfn">&lt;dfn&gt; element</a></li><li><a href="#rfc.section.11.10">11.10</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.feedback">&lt;feedback&gt; element</a></li><li><a href="#rfc.section.11.11">11.11</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.h">&lt;h&gt; element</a></li><li><a href="#rfc.section.11.12">11.12</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.highlight">&lt;highlight&gt; element</a></li><li><a href="#rfc.section.11.13">11.13</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.length-of">&lt;length-of&gt; element</a></li><li><a href="#rfc.section.11.14">11.14</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.link">&lt;link&gt; element</a></li><li><a href="#rfc.section.11.15">11.15</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.lt">&lt;lt&gt; element</a></li><li><a href="#rfc.section.11.16">11.16</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.note">&lt;note&gt; element</a></li><li><a href="#rfc.section.11.17">11.17</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.parse-xml">&lt;parse-xml&gt; element</a></li><li><a href="#rfc.section.11.18">11.18</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.prose">&lt;prose&gt; element</a></li><li><a href="#rfc.section.11.19">11.19</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.q">&lt;q&gt; element</a></li><li><a href="#rfc.section.11.20">11.20</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.ref">&lt;ref&gt; element</a></li><li><a href="#rfc.section.11.21">11.21</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.source">&lt;source&gt; element</a></li><li><a href="#rfc.section.11.22">11.22</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.sup">&lt;sup&gt; element</a></li><li><a href="#rfc.section.11.23">11.23</a>&nbsp;&nbsp;&nbsp;<a href="#ext-rfc2629.artwork">Extensions to Xml2rfc &lt;artwork&gt; element</a></li><li><a href="#rfc.section.11.24">11.24</a>&nbsp;&nbsp;&nbsp;<a href="#ext-rfc2629.iref">Extensions to Xml2rfc &lt;iref&gt; element</a></li><li><a href="#rfc.section.11.25">11.25</a>&nbsp;&nbsp;&nbsp;<a href="#ext-rfc2629.list">Extensions to Xml2rfc &lt;list&gt; element</a></li><li><a href="#rfc.section.11.26">11.26</a>&nbsp;&nbsp;&nbsp;<a href="#ext-rfc2629.rfc">Extensions to Xml2rfc &lt;rfc&gt; element</a></li><li><a href="#rfc.section.11.27">11.27</a>&nbsp;&nbsp;&nbsp;<a href="#ext-rfc2629.section">Extensions to Xml2rfc &lt;section&gt; element</a></li><li><a href="#rfc.section.11.28">11.28</a>&nbsp;&nbsp;&nbsp;<a href="#ext-rfc2629.xref">Extensions to Xml2rfc &lt;xref&gt; element</a></li></ul></li><li><a href="#rfc.section.12">12.</a>&nbsp;&nbsp;&nbsp;<a href="#utilities">Utilities</a><ul><li><a href="#rfc.section.12.1">12.1</a>&nbsp;&nbsp;&nbsp;<a href="#checking-references">Checking References</a></li><li><a href="#rfc.section.12.2">12.2</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.12.2">Generating Graphs from References</a></li><li><a href="#rfc.section.12.3">12.3</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.12.3">Producing reference entries for books</a></li><li><a href="#rfc.section.12.4">12.4</a>&nbsp;&nbsp;&nbsp;<a href="#clean-for-dtd">Down-converting to RFC2629bis DTD</a></li><li><a href="#rfc.section.12.5">12.5</a>&nbsp;&nbsp;&nbsp;<a href="#extract-artwork">Extracting artwork</a></li><li><a href="#rfc.section.12.6">12.6</a>&nbsp;&nbsp;&nbsp;<a href="#grddl">GRRDL</a></li></ul></li><li><a href="#rfc.section.13">13.</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.references">Informative References</a></li><li><a href="#rfc.authors">Author's Address</a></li><li><a href="#rfc.section.A">A.</a>&nbsp;&nbsp;&nbsp;<a href="#grammar">RELAX NG Compact Schema</a></li><li><a href="#rfc.section.B">B.</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.B">Implementation Notes</a><ul><li><a href="#rfc.section.B.1">B.1</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.B.1">Recognized type attributes for &lt;artwork&gt; element</a></li></ul></li><li><a href="#rfc.section.C">C.</a>&nbsp;&nbsp;&nbsp;<a href="#examples">Examples</a><ul><li><a href="#rfc.section.C.1">C.1</a>&nbsp;&nbsp;&nbsp;<a href="#examples.internalsubset">Using the 'Internal Subset'</a></li><li><a href="#rfc.section.C.2">C.2</a>&nbsp;&nbsp;&nbsp;<a href="#examples.customizing">Customization</a></li></ul></li><li><a href="#rfc.section.D">D.</a>&nbsp;&nbsp;&nbsp;<a href="#boilerplate">Producing the IETF 'Boilerplate'</a><ul><li><a href="#rfc.section.D.1">D.1</a>&nbsp;&nbsp;&nbsp;<a href="#attribute-ipr">The /rfc/@ipr Attribute</a><ul><li><a href="#rfc.section.D.1.1">D.1.1</a>&nbsp;&nbsp;&nbsp;<a href="#attribute-ipr-current">Current Values: '*trust200902'</a><ul><li><a href="#rfc.section.D.1.1.1">D.1.1.1</a>&nbsp;&nbsp;&nbsp;<a href="#attribute-ipr-trust200902">trust200902</a></li><li><a href="#rfc.section.D.1.1.2">D.1.1.2</a>&nbsp;&nbsp;&nbsp;<a href="#attribute-ipr-noModificationTrust200902">noModificationTrust200902</a></li><li><a href="#rfc.section.D.1.1.3">D.1.1.3</a>&nbsp;&nbsp;&nbsp;<a href="#attribute-ipr-noDerivativesTrust200902">noDerivativesTrust200902</a></li><li><a href="#rfc.section.D.1.1.4">D.1.1.4</a>&nbsp;&nbsp;&nbsp;<a href="#attribute-ipr-pre5378Trust200902">pre5378Trust200902</a></li></ul></li><li><a href="#rfc.section.D.1.2">D.1.2</a>&nbsp;&nbsp;&nbsp;<a href="#attribute-ipr-historic">Historic Values</a><ul><li><a href="#rfc.section.D.1.2.1">D.1.2.1</a>&nbsp;&nbsp;&nbsp;<a href="#attribute-ipr-200811">Historic Values: '*trust200811'</a></li><li><a href="#rfc.section.D.1.2.2">D.1.2.2</a>&nbsp;&nbsp;&nbsp;<a href="#attribute-ipr-3978">Historic Values: '*3978'</a></li><li><a href="#rfc.section.D.1.2.3">D.1.2.3</a>&nbsp;&nbsp;&nbsp;<a href="#attribute-ipr-3667">Historic Values: '*3667'</a></li><li><a href="#rfc.section.D.1.2.4">D.1.2.4</a>&nbsp;&nbsp;&nbsp;<a href="#attribute-ipr-2026">Historic Values: '*2026'</a></li></ul></li></ul></li><li><a href="#rfc.section.D.2">D.2</a>&nbsp;&nbsp;&nbsp;<a href="#attribute-category">The /rfc/@category Attribute</a></li><li><a href="#rfc.section.D.3">D.3</a>&nbsp;&nbsp;&nbsp;<a href="#attribute-submissiontype">The /rfc/@submissionType Attribute</a></li><li><a href="#rfc.section.D.4">D.4</a>&nbsp;&nbsp;&nbsp;<a href="#attribute-consensus">The /rfc/@consensus Attribute</a></li><li><a href="#rfc.section.D.5">D.5</a>&nbsp;&nbsp;&nbsp;<a href="#attribute-number">The /rfc/@number Attribute</a></li><li><a href="#rfc.section.D.6">D.6</a>&nbsp;&nbsp;&nbsp;<a href="#attribute-docname">The /rfc/@docName Attribute</a></li><li><a href="#rfc.section.D.7">D.7</a>&nbsp;&nbsp;&nbsp;<a href="#attribute-obsoletes">The /rfc/@obsoletes Attribute</a></li><li><a href="#rfc.section.D.8">D.8</a>&nbsp;&nbsp;&nbsp;<a href="#attribute-updates">The /rfc/@updates Attribute</a></li></ul></li><li><a href="#rfc.section.E">E.</a>&nbsp;&nbsp;&nbsp;<a href="#license">License</a></li><li><a href="#rfc.section.F">F.</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.F">Change Logs</a><ul><li><a href="#rfc.section.F.1">F.1</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.F.1">Package</a></li><li><a href="#rfc.section.F.2">F.2</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.F.2">amazon-asin.xslt</a></li><li><a href="#rfc.section.F.3">F.3</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.F.3">check-references.xslt</a></li><li><a href="#rfc.section.F.4">F.4</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.F.4">gen-reference-graph.xslt</a></li><li><a href="#rfc.section.F.5">F.5</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.F.5">rfc2629.xslt</a></li><li><a href="#rfc.section.F.6">F.6</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.F.6">rfc2629toFO.xslt</a></li><li><a href="#rfc.section.F.7">F.7</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.F.7">xsl11toAn.xslt</a></li><li><a href="#rfc.section.F.8">F.8</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.F.8">xsl11toFop.xslt</a></li><li><a href="#rfc.section.F.9">F.9</a>&nbsp;&nbsp;&nbsp;<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>&nbsp;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&nbsp;2</a>),</li><li>support for xml2rfc processing instructions (<a href="#processing.instructions" title="Processing Instructions">Section&nbsp;3</a>),</li><li>the names of anchor elements generated in HTML and PDF output (<a href="#anchors" title="Anchors">Section&nbsp;4</a>),</li><li>various XSLT engines that can be used (<a href="#xslt.engines" title="Supported XSLT engines">Section&nbsp;5</a>),</li><li>outputting HTML (<a href="#output.html" title="Transforming to HTML">Section&nbsp;6</a>) and XHTML (<a href="#output.xhtml" title="Transforming to XHTML">Section&nbsp;7</a>),</li><li>outputting CHM (Compiled Microsoft Help, <a href="#output.chm" title="Transforming to CHM (Microsoft Compiled Help)">Section&nbsp;8</a>),</li><li>outputting PDF (<a href="#output.pdf" title="Transforming to PDF">Section&nbsp;9</a>),</li><li>outputting ePub (<a href="#output.epub" title="Transforming to ePub">Section&nbsp;10</a>),</li><li>extensions to the xml2rfc vocabulary (<a href="#extensions" title="Generic Extensions">Section&nbsp;11</a>).</li><li>various utilities (<a href="#utilities" title="Utilities">Section&nbsp;12</a>).</li></ul><p id="rfc.section.1.p.2">The full distribution is available at &lt;<a href="http://greenbytes.de/tech/webdav/rfc2629xslt.zip">http://greenbytes.de/tech/webdav/rfc2629xslt.zip</a>&gt;.</p><hr class="noprint"><h1 id="rfc.section.2" class="np"><a href="#rfc.section.2">2.</a>&nbsp;<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>&nbsp;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&nbsp;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>&nbsp;<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">&lt;?rfc toc="yes"?&gt;
    375375&lt;?rfc-ext support-rfc2731="no"?&gt;
    376376</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 \
     
    686686<em># Allow x:indent-with attribute on &lt;artwork&gt;</em>
    687687attlist.artwork &amp;=
    688   attribute x:indent-with { ATEXT }?
     688  attribute x:indent-with { ATEXT }?,
     689  attribute x:isCodeComponent { "no" | "yes" }?
    689690
    690691<em># Allow anchor and x:annotation attributes on &lt;author&gt;</em>
  • rfc2629xslt/rfc2629xslt.txt

    r1825 r2027  
    44RFC2629 through XSLT                                          J. Reschke
    55                                                              greenbytes
    6                                                                June 2012
     6                                                       November 30, 2012
    77
    88
     
    5656
    5757
    58 Documentation             RFC2629 through XSLT                 June 2012
     58Documentation             RFC2629 through XSLT             November 2012
    5959
    6060
     
    113113
    114114
    115 Documentation             RFC2629 through XSLT                 June 2012
     115Documentation             RFC2629 through XSLT             November 2012
    116116
    117117
     
    170170
    171171
    172 Documentation             RFC2629 through XSLT                 June 2012
     172Documentation             RFC2629 through XSLT             November 2012
    173173
    174174
     
    227227
    228228
    229 Documentation             RFC2629 through XSLT                 June 2012
     229Documentation             RFC2629 through XSLT             November 2012
    230230
    231231
     
    284284
    285285
    286 Documentation             RFC2629 through XSLT                 June 2012
     286Documentation             RFC2629 through XSLT             November 2012
    287287
    288288
     
    341341
    342342
    343 Documentation             RFC2629 through XSLT                 June 2012
     343Documentation             RFC2629 through XSLT             November 2012
    344344
    345345
     
    398398
    399399
    400 Documentation             RFC2629 through XSLT                 June 2012
     400Documentation             RFC2629 through XSLT             November 2012
    401401
    402402
     
    455455
    456456
    457 Documentation             RFC2629 through XSLT                 June 2012
     457Documentation             RFC2629 through XSLT             November 2012
    458458
    459459
     
    512512
    513513
    514 Documentation             RFC2629 through XSLT                 June 2012
     514Documentation             RFC2629 through XSLT             November 2012
    515515
    516516
     
    569569
    570570
    571 Documentation             RFC2629 through XSLT                 June 2012
     571Documentation             RFC2629 through XSLT             November 2012
    572572
    573573
     
    626626
    627627
    628 Documentation             RFC2629 through XSLT                 June 2012
     628Documentation             RFC2629 through XSLT             November 2012
    629629
    630630
     
    683683
    684684
    685 Documentation             RFC2629 through XSLT                 June 2012
     685Documentation             RFC2629 through XSLT             November 2012
    686686
    687687
     
    740740
    741741
    742 Documentation             RFC2629 through XSLT                 June 2012
     742Documentation             RFC2629 through XSLT             November 2012
    743743
    744744
     
    797797
    798798
    799 Documentation             RFC2629 through XSLT                 June 2012
     799Documentation             RFC2629 through XSLT             November 2012
    800800
    801801
     
    854854
    855855
    856 Documentation             RFC2629 through XSLT                 June 2012
     856Documentation             RFC2629 through XSLT             November 2012
    857857
    858858
     
    911911
    912912
    913 Documentation             RFC2629 through XSLT                 June 2012
     913Documentation             RFC2629 through XSLT             November 2012
    914914
    915915
     
    968968
    969969
    970 Documentation             RFC2629 through XSLT                 June 2012
     970Documentation             RFC2629 through XSLT             November 2012
    971971
    972972
     
    10251025
    10261026
    1027 Documentation             RFC2629 through XSLT                 June 2012
     1027Documentation             RFC2629 through XSLT             November 2012
    10281028
    10291029
     
    10821082
    10831083
    1084 Documentation             RFC2629 through XSLT                 June 2012
     1084Documentation             RFC2629 through XSLT             November 2012
    10851085
    10861086
     
    11391139
    11401140
    1141 Documentation             RFC2629 through XSLT                 June 2012
     1141Documentation             RFC2629 through XSLT             November 2012
    11421142
    11431143
     
    11961196
    11971197
    1198 Documentation             RFC2629 through XSLT                 June 2012
     1198Documentation             RFC2629 through XSLT             November 2012
    11991199
    12001200
     
    12531253
    12541254
    1255 Documentation             RFC2629 through XSLT                 June 2012
     1255Documentation             RFC2629 through XSLT             November 2012
    12561256
    12571257
     
    13101310
    13111311
    1312 Documentation             RFC2629 through XSLT                 June 2012
     1312Documentation             RFC2629 through XSLT             November 2012
    13131313
    13141314
     
    13671367
    13681368
    1369 Documentation             RFC2629 through XSLT                 June 2012
     1369Documentation             RFC2629 through XSLT             November 2012
    13701370
    13711371
     
    14241424
    14251425
    1426 Documentation             RFC2629 through XSLT                 June 2012
     1426Documentation             RFC2629 through XSLT             November 2012
    14271427
    14281428
     
    14811481
    14821482
    1483 Documentation             RFC2629 through XSLT                 June 2012
     1483Documentation             RFC2629 through XSLT             November 2012
    14841484
    14851485
     
    15381538
    15391539
    1540 Documentation             RFC2629 through XSLT                 June 2012
     1540Documentation             RFC2629 through XSLT             November 2012
    15411541
    15421542
     
    15951595
    15961596
    1597 Documentation             RFC2629 through XSLT                 June 2012
     1597Documentation             RFC2629 through XSLT             November 2012
    15981598
    15991599
     
    16521652
    16531653
    1654 Documentation             RFC2629 through XSLT                 June 2012
     1654Documentation             RFC2629 through XSLT             November 2012
    16551655
    16561656
     
    17091709
    17101710
    1711 Documentation             RFC2629 through XSLT                 June 2012
     1711Documentation             RFC2629 through XSLT             November 2012
    17121712
    17131713
     
    17661766
    17671767
    1768 Documentation             RFC2629 through XSLT                 June 2012
     1768Documentation             RFC2629 through XSLT             November 2012
    17691769
    17701770
     
    18231823
    18241824
    1825 Documentation             RFC2629 through XSLT                 June 2012
     1825Documentation             RFC2629 through XSLT             November 2012
    18261826
    18271827
     
    18801880
    18811881
    1882 Documentation             RFC2629 through XSLT                 June 2012
     1882Documentation             RFC2629 through XSLT             November 2012
    18831883
    18841884
     
    19371937
    19381938
    1939 Documentation             RFC2629 through XSLT                 June 2012
     1939Documentation             RFC2629 through XSLT             November 2012
    19401940
    19411941
     
    19941994
    19951995
    1996 Documentation             RFC2629 through XSLT                 June 2012
     1996Documentation             RFC2629 through XSLT             November 2012
    19971997
    19981998
     
    20512051
    20522052
    2053 Documentation             RFC2629 through XSLT                 June 2012
     2053Documentation             RFC2629 through XSLT             November 2012
    20542054
    20552055
     
    21082108
    21092109
    2110 Documentation             RFC2629 through XSLT                 June 2012
     2110Documentation             RFC2629 through XSLT             November 2012
    21112111
    21122112
     
    21652165
    21662166
    2167 Documentation             RFC2629 through XSLT                 June 2012
     2167Documentation             RFC2629 through XSLT             November 2012
    21682168
    21692169
     
    22222222
    22232223
    2224 Documentation             RFC2629 through XSLT                 June 2012
     2224Documentation             RFC2629 through XSLT             November 2012
    22252225
    22262226
     
    22792279
    22802280
    2281 Documentation             RFC2629 through XSLT                 June 2012
     2281Documentation             RFC2629 through XSLT             November 2012
    22822282
    22832283
     
    23362336
    23372337
    2338 Documentation             RFC2629 through XSLT                 June 2012
     2338Documentation             RFC2629 through XSLT             November 2012
    23392339
    23402340
     
    23932393
    23942394
    2395 Documentation             RFC2629 through XSLT                 June 2012
     2395Documentation             RFC2629 through XSLT             November 2012
    23962396
    23972397
     
    24032403  # Allow x:indent-with attribute on <artwork>
    24042404  attlist.artwork &=
    2405     attribute x:indent-with { ATEXT }?
     2405    attribute x:indent-with { ATEXT }?,
     2406    attribute x:isCodeComponent { "no" | "yes" }?
    24062407
    24072408  # Allow anchor and x:annotation attributes on <author>
     
    24432444    attribute x:quotes { "true" | "false" }?
    24442445
     2446
     2447
     2448
     2449Reschke                                                        [Page 43]
     2450
     2451
     2452Documentation             RFC2629 through XSLT             November 2012
     2453
     2454
    24452455  # Allow annotation attribute on <uri>
    2446 
    2447 
    2448 
    2449 Reschke                                                        [Page 43]
    2450 
    2451 
    2452 Documentation             RFC2629 through XSLT                 June 2012
    2453 
    2454 
    24552456  attlist.uri &=
    24562457    attribute x:annotation { ATEXT }?
     
    25002501
    25012502  # Bottom line of box drawing (see Section 11.4)
     2503
     2504
     2505
     2506Reschke                                                        [Page 44]
     2507
     2508
     2509Documentation             RFC2629 through XSLT             November 2012
     2510
     2511
    25022512  x_bb =
    2503 
    2504 
    2505 
    2506 Reschke                                                        [Page 44]
    2507 
    2508 
    2509 Documentation             RFC2629 through XSLT                 June 2012
    2510 
    2511 
    25122513    element x:bb {
    25132514      (TEXT
     
    25572558
    25582559  # Boilerplate (see Section 11.6)
     2560
     2561
     2562
     2563Reschke                                                        [Page 45]
     2564
     2565
     2566Documentation             RFC2629 through XSLT             November 2012
     2567
     2568
    25592569  x_boilerplate =
    2560 
    2561 
    2562 
    2563 Reschke                                                        [Page 45]
    2564 
    2565 
    2566 Documentation             RFC2629 through XSLT                 June 2012
    2567 
    2568 
    25692570    element x:boilerplate {
    25702571      section+
     
    26142615  x_link =
    26152616    element x:link {
     2617
     2618
     2619
     2620Reschke                                                        [Page 46]
     2621
     2622
     2623Documentation             RFC2629 through XSLT             November 2012
     2624
     2625
    26162626      attribute basename { URI }?,
    2617 
    2618 
    2619 
    2620 Reschke                                                        [Page 46]
    2621 
    2622 
    2623 Documentation             RFC2629 through XSLT                 June 2012
    2624 
    2625 
    26262627      attribute href { URI }?,
    26272628      attribute title { TEXT }?,
     
    26712672
    26722673  # source information (see Section 11.21)
     2674
     2675
     2676
     2677Reschke                                                        [Page 47]
     2678
     2679
     2680Documentation             RFC2629 through XSLT             November 2012
     2681
     2682
    26732683  x_source =
    2674 
    2675 
    2676 
    2677 Reschke                                                        [Page 47]
    2678 
    2679 
    2680 Documentation             RFC2629 through XSLT                 June 2012
    2681 
    2682 
    26832684    element x:source {
    26842685      attribute basename { ATEXT }?,
     
    27312732
    27322733
    2733 
    27342734Reschke                                                        [Page 48]
    27352735
    27362736
    2737 Documentation             RFC2629 through XSLT                 June 2012
     2737Documentation             RFC2629 through XSLT             November 2012
    27382738
    27392739
     
    27922792
    27932793
    2794 Documentation             RFC2629 through XSLT                 June 2012
     2794Documentation             RFC2629 through XSLT             November 2012
    27952795
    27962796
     
    28492849
    28502850
    2851 Documentation             RFC2629 through XSLT                 June 2012
     2851Documentation             RFC2629 through XSLT             November 2012
    28522852
    28532853
     
    29062906
    29072907
    2908 Documentation             RFC2629 through XSLT                 June 2012
     2908Documentation             RFC2629 through XSLT             November 2012
    29092909
    29102910
     
    29632963
    29642964
    2965 Documentation             RFC2629 through XSLT                 June 2012
     2965Documentation             RFC2629 through XSLT             November 2012
    29662966
    29672967
     
    30203020
    30213021
    3022 Documentation             RFC2629 through XSLT                 June 2012
     3022Documentation             RFC2629 through XSLT             November 2012
    30233023
    30243024
     
    30773077
    30783078
    3079 Documentation             RFC2629 through XSLT                 June 2012
     3079Documentation             RFC2629 through XSLT             November 2012
    30803080
    30813081
     
    31343134
    31353135
    3136 Documentation             RFC2629 through XSLT                 June 2012
     3136Documentation             RFC2629 through XSLT             November 2012
    31373137
    31383138
     
    31913191
    31923192
    3193 Documentation             RFC2629 through XSLT                 June 2012
     3193Documentation             RFC2629 through XSLT             November 2012
    31943194
    31953195
     
    32483248
    32493249
    3250 Documentation             RFC2629 through XSLT                 June 2012
     3250Documentation             RFC2629 through XSLT             November 2012
    32513251
    32523252
     
    33053305
    33063306
    3307 Documentation             RFC2629 through XSLT                 June 2012
     3307Documentation             RFC2629 through XSLT             November 2012
    33083308
    33093309
     
    33623362
    33633363
    3364 Documentation             RFC2629 through XSLT                 June 2012
     3364Documentation             RFC2629 through XSLT             November 2012
    33653365
    33663366
     
    34193419
    34203420
    3421 Documentation             RFC2629 through XSLT                 June 2012
     3421Documentation             RFC2629 through XSLT             November 2012
    34223422
    34233423
     
    34763476
    34773477
    3478 Documentation             RFC2629 through XSLT                 June 2012
     3478Documentation             RFC2629 through XSLT             November 2012
    34793479
    34803480
     
    35333533
    35343534
    3535 Documentation             RFC2629 through XSLT                 June 2012
     3535Documentation             RFC2629 through XSLT             November 2012
    35363536
    35373537
     
    35903590
    35913591
    3592 Documentation             RFC2629 through XSLT                 June 2012
     3592Documentation             RFC2629 through XSLT             November 2012
    35933593
    35943594
     
    36473647
    36483648
    3649 Documentation             RFC2629 through XSLT                 June 2012
     3649Documentation             RFC2629 through XSLT             November 2012
    36503650
    36513651
     
    37043704
    37053705
    3706 Documentation             RFC2629 through XSLT                 June 2012
     3706Documentation             RFC2629 through XSLT             November 2012
    37073707
    37083708
     
    37613761
    37623762
    3763 Documentation             RFC2629 through XSLT                 June 2012
     3763Documentation             RFC2629 through XSLT             November 2012
    37643764
    37653765
     
    38183818
    38193819
    3820 Documentation             RFC2629 through XSLT                 June 2012
     3820Documentation             RFC2629 through XSLT             November 2012
    38213821
    38223822
     
    38753875
    38763876
    3877 Documentation             RFC2629 through XSLT                 June 2012
     3877Documentation             RFC2629 through XSLT             November 2012
    38783878
    38793879
     
    39323932
    39333933
    3934 Documentation             RFC2629 through XSLT                 June 2012
     3934Documentation             RFC2629 through XSLT             November 2012
    39353935
    39363936
     
    39893989
    39903990
    3991 Documentation             RFC2629 through XSLT                 June 2012
     3991Documentation             RFC2629 through XSLT             November 2012
    39923992
    39933993
     
    40464046
    40474047
    4048 Documentation             RFC2629 through XSLT                 June 2012
     4048Documentation             RFC2629 through XSLT             November 2012
    40494049
    40504050
     
    41034103
    41044104
    4105 Documentation             RFC2629 through XSLT                 June 2012
     4105Documentation             RFC2629 through XSLT             November 2012
    41064106
    41074107
     
    41604160
    41614161
    4162 Documentation             RFC2629 through XSLT                 June 2012
     4162Documentation             RFC2629 through XSLT             November 2012
    41634163
    41644164
     
    42174217
    42184218
    4219 Documentation             RFC2629 through XSLT                 June 2012
     4219Documentation             RFC2629 through XSLT             November 2012
    42204220
    42214221
     
    42744274
    42754275
    4276 Documentation             RFC2629 through XSLT                 June 2012
     4276Documentation             RFC2629 through XSLT             November 2012
    42774277
    42784278
     
    43314331
    43324332
    4333 Documentation             RFC2629 through XSLT                 June 2012
     4333Documentation             RFC2629 through XSLT             November 2012
    43344334
    43354335
     
    43884388
    43894389
    4390 Documentation             RFC2629 through XSLT                 June 2012
     4390Documentation             RFC2629 through XSLT             November 2012
    43914391
    43924392
     
    44454445
    44464446
    4447 Documentation             RFC2629 through XSLT                 June 2012
     4447Documentation             RFC2629 through XSLT             November 2012
    44484448
    44494449
     
    45024502
    45034503
    4504 Documentation             RFC2629 through XSLT                 June 2012
     4504Documentation             RFC2629 through XSLT             November 2012
    45054505
    45064506
     
    45594559
    45604560
    4561 Documentation             RFC2629 through XSLT                 June 2012
     4561Documentation             RFC2629 through XSLT             November 2012
    45624562
    45634563
     
    46164616
    46174617
    4618 Documentation             RFC2629 through XSLT                 June 2012
     4618Documentation             RFC2629 through XSLT             November 2012
    46194619
    46204620
  • rfc2629xslt/rfc2629xslt.xml

    r1699 r2027  
    3030        </author>
    3131     
    32     <date month="June" year="2012"/>
     32    <date month="November" year="2012"/>
    3333
    3434    <keyword>RFC2629</keyword>
     
    20872087<spanx># Allow x:indent-with attribute on &lt;artwork></spanx>
    20882088attlist.artwork &amp;=
    2089   attribute x:indent-with { ATEXT }?
     2089  attribute x:indent-with { ATEXT }?,
     2090  attribute x:isCodeComponent { "no" | "yes" }?
    20902091
    20912092<spanx># Allow anchor and x:annotation attributes on &lt;author></spanx>
  • rfc2629xslt/samples/rfc2629.xslt

    r1845 r2027  
    16291629  <xsl:variable name="target">
    16301630    <xsl:choose>
    1631       <xsl:when test="@target"><xsl:value-of select="@target" /></xsl:when>
     1631      <xsl:when test="@target">
     1632        <xsl:if test="string-length(normalize-space(@target)) = 0">
     1633          <xsl:call-template name="warning">
     1634            <xsl:with-param name="msg">invalid (empty) target attribute in reference '<xsl:value-of select="@anchor"/>'</xsl:with-param>
     1635          </xsl:call-template>
     1636        </xsl:if>
     1637        <xsl:value-of select="normalize-space(@target)" />
     1638      </xsl:when>
    16321639      <xsl:otherwise>
    16331640        <xsl:call-template name="computed-auto-target">
     
    17871794      </xsl:if>
    17881795     
    1789       <xsl:if test="@target">
     1796      <xsl:if test="string-length(normalize-space(@target)) &gt; 0">
    17901797        <xsl:text>, &lt;</xsl:text>
    1791         <a href="{@target}"><xsl:value-of select="@target"/></a>
     1798        <a href="{normalize-space(@target)}"><xsl:value-of select="normalize-space(@target)"/></a>
    17921799        <xsl:text>&gt;</xsl:text>
    17931800      </xsl:if>
Note: See TracChangeset for help on using the changeset viewer.