<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>

<?rfc header="Documentation"?>
<?rfc private="RFC 7749 through XSLT"?>
<?rfc toc="yes"?>
<!-- <?rfc topblock="no"?>  -->
<?rfc strict="no"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc-ext allow-markup-in-artwork="yes" ?>
<?rfc-ext html-pretty-print="prettyprint https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js"?>
<?rfc-ext include-references-in-index="yes" ?>
<!--<?rfc-ext refresh-from="rfc2629xslt.xml"?>-->

<rfc xmlns:x="http://purl.org/net/xml2rfc/ext">
	<front>
  	<title abbrev="RFC7749 through XSLT">Transforming RFC7749-formatted XML through XSLT</title>

  	<author initials="J. F." surname="Reschke" fullname="Julian F. Reschke">
  		<organization abbrev="greenbytes">greenbytes GmbH</organization>
      <address>
      	<postal>
        	<street>Hafenweg 16</street>
          <city>Muenster</city><region>NW</region><code>48155</code>
         	<country>Germany</country>
       	</postal>
  		  <email>julian.reschke@greenbytes.de</email>	
  		  <uri>https://greenbytes.de/tech/webdav/</uri>	
  		</address>
  	</author>
     
    <date/>

    <keyword>RFC2629</keyword>
    <keyword>RFC7749</keyword>
    <keyword>xml2rfc</keyword>
    <keyword>XSLT</keyword>
    <keyword>XSL-FO</keyword>
    <keyword>PDF</keyword>
    <keyword>GRDDL</keyword>
    <keyword>epub</keyword>
    <keyword>Dublin Core</keyword>
	</front>

	<middle>

<section title="Introduction" anchor="introduction">
<t>
  This document describes a set of XSLT transformations that can be used to 
  transform "XML2RFC" XML (<xref target="RFC7749"/>, updating <xref target="RFC2629"/>) to various
  output formats, such as HTML and PDF. The main topics are  
  <list style="symbols">
    <t>compliance to the xml2rfc XML element set (<xref target="supported.elements"/>),</t>
    <t>support for xml2rfc processing instructions (<xref target="processing.instructions"/>),</t>
    <t>the names of anchor elements generated in HTML and PDF output (<xref target="anchors"/>),</t>
    <t>various XSLT engines that can be used (<xref target="xslt.engines"/>),</t>
    <t>outputting HTML (<xref target="output.html"/>) and XHTML (<xref target="output.xhtml"/>),</t>
    <t>outputting CHM (Compiled Microsoft Help, <xref target="output.chm"/>),</t>
    <t>outputting PDF (<xref target="output.pdf"/>),</t>
    <t>outputting ePub (<xref target="output.epub"/>),</t>
    <t>extensions to the xml2rfc vocabulary (<xref target="extensions"/>),</t>
    <t>selected extensions from the proposed xml2rfc V3 vocabulary (<xref target="v3"/>),</t>
    <t>various utilities (<xref target="utilities"/>).</t>
  </list>
</t>
<t>
  The full distribution is available at <eref target="https://greenbytes.de/tech/webdav/rfc2629xslt.zip"/>.
  A mirror of the non-public source repository can be found at <eref target="https://github.com/reschke/xml2rfc"/>;
  this is also a good place for reporting issues.
</t>
<aside>
  <t>
    <em>Note:</em> RFC 2629 was the initial specification of the XML vocabulary; that's why the "2629" 
    lives on in various parts, such as filenames.
  </t>
</aside>
</section>

<section title="Supported RFC7749 elements" anchor="supported.elements">
<t>
  <tt>rfc2629.xslt</tt> supports both all grammar elements defined in
  <xref target="RFC7749"/>, plus a subset of the new elements defined
  in <xref target="RFC7991bis"/>.
</t>
<section title="Extension elements">
<t>
  <tt>rfc2629.xslt</tt> supports two kind of extension 
  elements, using different XML namespaces.
</t>
<t>
  The first set contains (hopefully) generally useful extensions, see
  <xref target="extensions"/>.
</t>
<t>
  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.
</t>
</section>
</section>

<section title="Processing Instructions" anchor="processing.instructions">
<t>
  All PIs can be set as XSLT parameter as well, overriding any value that
  is found in the source file to be transformed.
</t>
<figure>
<preamble>Using processing instructions:</preamble>
<artwork type="example" x:lang="">
&lt;?rfc toc="yes"?>
&lt;?rfc-ext support-rfc2731="no"?>
</artwork>
</figure>
<figure>
<preamble>Using XSLT parameters (Saxon):</preamble>
<artwork type="example">
java -cp saxon.jar com.icl.saxon.StyleSheet source.xml rfc2629.xslt \
  xml2rfc-toc=yes xml2rfc-ext-support-rfc2731=no > result.html 
</artwork></figure>
<figure>
<preamble>Using XSLT parameters (xsltproc):</preamble>
<artwork type="example">
xsltproc --param xml2rfc-toc '"yes"' \
   --param xml2rfc-ext-support-rfc2731 '"no"' \
   rfc2629.xslt source.xml > result.html 
</artwork>
<postamble>(note the required quoting of string parameters)<iref item="xsltproc" subitem="passing parameters"/></postamble>
</figure>

<section title="Supported xml2rfc-compatible PIs" anchor="supported.pis">
<texttable>
  <ttcol>PI target</ttcol>
  <ttcol>PI pseudo-attribute</ttcol>
  <ttcol>XSLT parameter name</ttcol>
  <ttcol>default</ttcol>
  <ttcol>comment</ttcol>

  <c>rfc</c>
  <c>authorship<iref item="authorship PI pseudo-attribute"/><iref item="Processing Instruction pseudo attributes" subitem="authorship"/></c>
  <c>xml2rfc-authorship<iref item="xml2rfc-authorship parameter"/> <iref item="Parameters" subitem="xml2rfc-authorship"/></c>
  <c>"yes"</c>
  <c>when set to "no", the "Authors" section is suppressed</c>

  <c>rfc</c>
  <c>background<iref item="background PI pseudo-attribute"/><iref item="Processing Instruction pseudo attributes" subitem="background"/></c>
  <c>xml2rfc-background<iref item="xml2rfc-background parameter"/> <iref item="Parameters" subitem="xml2rfc-background"/></c>
  <c>(not set)</c>
  <c/>
  
  <c>rfc</c>
  <c>compact<iref item="compact PI pseudo-attribute"/><iref item="Processing Instruction pseudo attributes" subitem="compact"/></c>
  <c>xml2rfc-compact<iref item="xml2rfc-editing parameter"/> <iref item="Parameters" subitem="xml2rfc-compact"/></c>
  <c>"no"</c>
  <c>only applies to HTML output method when printing</c>

  <c>rfc</c>
  <c>comments<iref item="comments PI pseudo-attribute"/><iref item="Processing Instruction pseudo attributes" subitem="comments"/></c>
  <c>xml2rfc-comments<iref item="xml2rfc-comments parameter"/> <iref item="Parameters" subitem="xml2rfc-comments"/></c>
  <c>"no" ("yes" for v3 documents)</c>
  <c/>

  <c>rfc</c>
  <c>docmapping<iref item="docmapping PI pseudo-attribute"/><iref item="Processing Instruction pseudo attributes" subitem="docmapping"/></c>
  <c/>
  <c>"yes"</c>
  <c>This is the default for rfc2629.xslt anyway, and it can not be changed</c>

  <c>rfc</c>
  <c>editing<iref item="editing PI pseudo-attribute"/><iref item="Processing Instruction pseudo attributes" subitem="editing"/></c>
  <c>xml2rfc-editing<iref item="xml2rfc-editing parameter"/> <iref item="Parameters" subitem="xml2rfc-editing"/></c>
  <c>"no"</c>
  <c/>
  
  <c>rfc</c>
  <c>footer<iref item="footer PI pseudo-attribute"/><iref item="Processing Instruction pseudo attributes" subitem="footer"/></c>
  <c>xml2rfc-footer<iref item="xml2rfc-footer parameter"/> <iref item="Parameters" subitem="xml2rfc-footer"/></c>
  <c>(not set)</c>
  <c/>
  
  <c>rfc</c>
  <c>header<iref item="header PI pseudo-attribute"/><iref item="Processing Instruction pseudo attributes" subitem="header"/></c>
  <c>xml2rfc-header<iref item="xml2rfc-header parameter"/> <iref item="Parameters" subitem="xml2rfc-header"/></c>
  <c>(not set)</c>
  <c/>

  <c>rfc</c>
  <c>include<iref item="include PI pseudo-attribute"/><iref item="Processing Instruction pseudo attributes" subitem="include"/></c>
  <c/>
  <c/>
  <c>only partly supported, use external entities instead (see <xref target="examples.internalsubset"/>) or other tools (<xref target="refreshing.inclusions"/>) instead</c>

  <c>rfc</c>
  <c>inline<iref item="inline PI pseudo-attribute"/><iref item="Processing Instruction pseudo attributes" subitem="inline"/></c>
  <c>xml2rfc-inline<iref item="xml2rfc-inline parameter"/> <iref item="Parameters" subitem="xml2rfc-inline"/></c>
  <c>"no" ("yes" for v3 documents)</c>
  <c/>

  <c>rfc</c>
  <c>iprnotified<iref item="iprnotified PI pseudo-attribute"/><iref item="Processing Instruction pseudo attributes" subitem="iprnotified"/></c>
  <c>xml2rfc-iprnotified<iref item="xml2rfc-iprnotified parameter"/> <iref item="Parameters" subitem="xml2rfc-iprnotified"/></c>
  <c>"no"</c>
  <c/>

  <c>rfc</c>
  <c>linkmailto<iref item="linkmailto PI pseudo-attribute"/><iref item="Processing Instruction pseudo attributes" subitem="linkmailto"/></c>
  <c>xml2rfc-linkmailto<iref item="xml2rfc-linkmailto parameter"/> <iref item="Parameters" subitem="xml2rfc-linkmailto"/></c>
  <c>"yes"</c>
  <c/>
  
  <c>rfc</c>
  <c>multiple-initials<iref item="multiple-initials PI pseudo-attribute"/><iref item="Processing Instruction pseudo attributes" subitem="multiple-initials"/></c>
  <c>xml2rfc-multiple-initials<iref item="xml2rfc-multiple-initials parameter"/> <iref item="Parameters" subitem="xml2rfc-multiple-initials"/></c>
  <c>"no"</c>
  <c>determines whether the processor will attempt to truncate multiple initials to a single one; can be set globally (affecting the front page) but also as child element of &lt;reference&gt;</c>

  <c>rfc</c>
  <c>private<iref item="private PI pseudo-attribute"/><iref item="Processing Instruction pseudo attributes" subitem="private"/></c>
  <c>xml2rfc-private<iref item="xml2rfc-private parameter"/> <iref item="Parameters" subitem="xml2rfc-private"/></c>
  <c>(not set)</c>
  <c/>
  
  <c>rfc</c>
  <c>refparent<iref item="refparent PI pseudo-attribute"/><iref item="Processing Instruction pseudo attributes" subitem="refparent"/></c>
  <c>xml2rfc-private<iref item="xml2rfc-refparent parameter"/> <iref item="Parameters" subitem="xml2rfc-refparent"/></c>
  <c>"References"</c>
  <c>Title for References sections when automatically inserted</c>

  <c>rfc</c>
  <c>rfcedstyle<iref item="rfcedstyle PI pseudo-attribute"/><iref item="Processing Instruction pseudo attributes" subitem="rfcedstyle"/></c>
  <c>xml2rfc-rfcedstyle<iref item="xml2rfc-rfcedstyle parameter"/> <iref item="Parameters" subitem="xml2rfc-rfcedstyle"/></c>
  <c>(not set)</c>
  <c>(limited support)</c>

  <c>rfc</c>
  <c>sortrefs<iref item="sortrefs PI pseudo-attribute"/><iref item="Processing Instruction pseudo attributes" subitem="sortrefs"/></c>
  <c>xml2rfc-sortrefs<iref item="xml2rfc-sortrefs parameter"/> <iref item="Parameters" subitem="xml2rfc-sortrefs"/></c>
  <c>"no"</c>
  <c/>
  
  <c>rfc</c>
  <c>symrefs<iref item="symrefs PI pseudo-attribute"/><iref item="Processing Instruction pseudo attributes" subitem="symrefs"/></c>
  <c>xml2rfc-symrefs<iref item="xml2rfc-symrefs parameter"/> <iref item="Parameters" subitem="xml2rfc-symrefs"/></c>
  <c>"yes"</c>
  <c>The default has changed from "no" to "yes" as of June 6, 2007 and xml2rfc 1.33pre4.</c>
  
  <c>rfc</c>
  <c>toc<iref item="toc PI pseudo-attribute"/><iref item="Processing Instruction pseudo attributes" subitem="toc"/></c>
  <c>xml2rfc-toc<iref item="xml2rfc-toc parameter"/> <iref item="Parameters" subitem="xml2rfc-toc"/></c>
  <c>"no" ("yes" for documents specifying "3" as vocabulary version)</c>
  <c/>
  
  <c>rfc</c>
  <c>tocdepth<iref item="tocdepth PI pseudo-attribute"/><iref item="Processing Instruction pseudo attributes" subitem="tocdepth"/></c>
  <c>xml2rfc-tocdepth<iref item="xml2rfc-tocdepth parameter"/> <iref item="Parameters" subitem="xml2rfc-tocdepth"/></c>
  <c>99</c>
  <c/>

  <c>rfc</c>
  <c>topblock<iref item="topblock PI pseudo-attribute"/><iref item="Processing Instruction pseudo attributes" subitem="topblock"/></c>
  <c>xml2rfc-topblock<iref item="xml2rfc-topblock parameter"/> <iref item="Parameters" subitem="xml2rfc-topblock"/></c>
  <c>"yes"</c>
  <c/>

</texttable>
</section>

<section title="Unsupported xml2rfc-compatible PIs" anchor="unsupported.pis">
<texttable>
  <ttcol>PI target</ttcol>
  <ttcol>PI pseudo-attribute</ttcol>
  <ttcol>comment</ttcol>

  <c>rfc</c>
  <c>needLines<iref item="needLines PI pseudo-attribute"/><iref item="Processing Instruction pseudo attributes" subitem="needLines"/></c>
  <c/>

  <c>rfc</c>
  <c>slides<iref item="slides PI pseudo-attribute"/><iref item="Processing Instruction pseudo attributes" subitem="slides"/></c>
  <c/>

  <c>rfc</c>
  <c>strict<iref item="strict PI pseudo-attribute"/><iref item="Processing Instruction pseudo attributes" subitem="strict"/></c>
  <c/>

  <c>rfc</c>
  <c>subcompact<iref item="subcompact PI pseudo-attribute"/><iref item="Processing Instruction pseudo attributes" subitem="subcompact"/></c>
  <c/>

  <c>rfc</c>
  <c>tocindent<iref item="tocindent PI pseudo-attribute"/><iref item="Processing Instruction pseudo attributes" subitem="tocindent"/></c>
  <c>(defaults to "yes")</c>

 <c>rfc</c>
  <c>tocompact<iref item="tocompact PI pseudo-attribute"/><iref item="Processing Instruction pseudo attributes" subitem="tocompact"/></c>
  <c/>

</texttable>
</section>

<section title="Extension PIs" anchor="extension.pis">
  <section title="abort-on - Log Level" anchor="xml2rfc-ext-abort-on">
    <iref item="abort-on PI pseudo-attribute"/><iref item="Processing Instruction pseudo attributes" subitem="abort-on"/>
    <iref item="xml2rfc-ext-abort-on parameter"/> <iref item="Parameters" subitem="xml2rfc-ext-abort-on"/>

    <dl newline="true">
      <dt>PI target</dt>
      <dd>rfc-ext</dd>
      <dt>PI pseudo-attribute</dt>
      <dd>abort-on</dd>
      <dt>XSLT parameter name</dt>
      <dd>xml2rfc-ext-abort-on</dd>
      <dt>default</dt>
      <dd>"OFF"</dd>
    </dl>
    <t>
      Controls at which log level a message causes the XSLT to be aborted (one of "OFF", "FATAL", "ERROR", "WARNING", "INFO", "DEBUG", "TRACE").
    </t>
  </section>

  <section title="allow-markup-in-artwork - Allow certain XML elements inside &lt;artwork> and &lt;sourcecode>" anchor="xml2rfc-ext-allow-markup-in-artwork">
    <iref item="allow-markup-in-artwork PI pseudo-attribute"/><iref item="Processing Instruction pseudo attributes" subitem="allow-markup-in-artwork"/>
    <iref item="xml2rfc-ext-allow-markup-in-artwork parameter"/> <iref item="Parameters" subitem="xml2rfc-ext-allow-markup-in-artwork"/>

    <dl newline="true">
      <dt>PI target</dt>
      <dd>rfc-ext</dd>
      <dt>PI pseudo-attribute</dt>
      <dd>allow-markup-in-artwork</dd>
      <dt>XSLT parameter name</dt>
      <dd>xml2rfc-ext-allow-markup-in-artwork</dd>
      <dt>default</dt>
      <dd>"no"</dd>
    </dl>
    <t>
      Enables support for specific elements inside &lt;artwork> and &lt;sourcecode> elements (using this extension
      makes the document incompatible to the RFC7749 grammar; see description of
      conversion XSLT in <xref target="clean-for-dtd"/>).
    </t>
  </section>

  <section title="authors-section - Placement of 'Authors' Section" anchor="xml2rfc-ext-authors-section">
    <iref item="authors-section PI pseudo-attribute"/><iref item="Processing Instruction pseudo attributes" subitem="authors-section"/>
    <iref item="xml2rfc-ext-authors-section parameter"/> <iref item="Parameters" subitem="xml2rfc-ext-authors-section"/>

    <dl newline="true">
      <dt>PI target</dt>
      <dd>rfc-ext</dd>
      <dt>PI pseudo-attribute</dt>
      <dd>authors-section</dd>
      <dt>XSLT parameter name</dt>
      <dd>xml2rfc-ext-authors-section</dd>
      <dt>default</dt>
      <dd>"end"</dd>
    </dl>
    <t>
      When "before-appendices", place the authors section between references
      and appendices (this ordering was used a long time ago).
    </t>
  </section>

  <section title="css-contents - CSS Contents" anchor="xml2rfc-ext-css-contents">
    <iref item="css-contents PI pseudo-attribute"/><iref item="Processing Instruction pseudo attributes" subitem="css-contents"/>
    <iref item="xml2rfc-ext-css-contents parameter"/> <iref item="Parameters" subitem="xml2rfc-ext-css-contents"/>

    <dl newline="true">
      <dt>PI target</dt>
      <dd>rfc-ext</dd>
      <dt>PI pseudo-attribute</dt>
      <dd>css-contents</dd>
      <dt>XSLT parameter name</dt>
      <dd>xml2rfc-ext-css-contents</dd>
      <dt>default</dt>
      <dd>none</dd>
    </dl>
    <t>
      CSS content to use instead of the built-in (experimental).
    </t>
  </section>

  <section title="css-resource - Custom CSS Resource" anchor="xml2rfc-ext-css-resource">
    <iref item="css-resource PI pseudo-attribute"/><iref item="Processing Instruction pseudo attributes" subitem="css-resource"/>
    <iref item="xml2rfc-ext-css-resource parameter"/> <iref item="Parameters" subitem="xml2rfc-ext-css-resource"/>

    <dl newline="true">
      <dt>PI target</dt>
      <dd>rfc-ext</dd>
      <dt>PI pseudo-attribute</dt>
      <dd>css-resource</dd>
      <dt>XSLT parameter name</dt>
      <dd>xml2rfc-ext-css-resource</dd>
      <dt>default</dt>
      <dd>none</dd>
    </dl>
    <t>
      Name of CSS resource (URI or relate reference) to use instead of the built-in (experimental).
    </t>
  </section>

  <section title="dark-mode - Switch for Disabling 'Dark Mode' Support" anchor="xml2rfc-ext-dark-mode">
    <iref item="dark-mode PI pseudo-attribute"/><iref item="Processing Instruction pseudo attributes" subitem="dark-mode"/>
    <iref item="xml2rfc-ext-dark-mode parameter"/> <iref item="Parameters" subitem="xml2rfc-ext-dark-mode"/>

    <dl newline="true">
      <dt>PI target</dt>
      <dd>rfc-ext</dd>
      <dt>PI pseudo-attribute</dt>
      <dd>dark-mode</dd>
      <dt>XSLT parameter name</dt>
      <dd>xml2rfc-ext-dark-mode</dd>
      <dt>default</dt>
      <dd>"auto"</dd>
    </dl>
    <t>
      Set to 'no' to disable "dark mode" CSS support.
    </t>
  </section>

  <section title="diff-uri - URI Template for Internet Draft Diff Links" anchor="xml2rfc-ext-diff-uri">
    <iref item="diff-uri PI pseudo-attribute"/><iref item="Processing Instruction pseudo attributes" subitem="diff-uri"/>
    <iref item="xml2rfc-ext-diff-uri parameter"/> <iref item="Parameters" subitem="xml2rfc-ext-diff-uri"/>

    <dl newline="true">
      <dt>PI target</dt>
      <dd>rfc-ext</dd>
      <dt>PI pseudo-attribute</dt>
      <dd>diff-uri</dd>
      <dt>XSLT parameter name</dt>
      <dd>xml2rfc-ext-diff-uri</dd>
      <dt>default</dt>
      <dd>"https://www.ietf.org/rfcdiff?url2={internet-draft}"</dd>
    </dl>
    <t>
      URI template for Internet Draft Diff links.
    </t>
  </section>

  <section title="doi-uri - URI Template for DOI Links" anchor="xml2rfc-ext-doi-uri">
    <iref item="doi-uri PI pseudo-attribute"/><iref item="Processing Instruction pseudo attributes" subitem="doi-uri"/>
    <iref item="xml2rfc-ext-doi-uri parameter"/> <iref item="Parameters" subitem="xml2rfc-ext-doi-uri"/>

    <dl newline="true">
      <dt>PI target</dt>
      <dd>rfc-ext</dd>
      <dt>PI pseudo-attribute</dt>
      <dd>doi-uri</dd>
      <dt>XSLT parameter name</dt>
      <dd>xml2rfc-ext-doi-uri</dd>
      <dt>default</dt>
      <dd>"https://dx.doi.org/{doi}"</dd>
    </dl>
    <t>
      URI template for DOIs links.
    </t>
  </section>

  <section title="duplex - Support Duplex Printing" anchor="xml2rfc-ext-duplex">
    <iref item="duplex PI pseudo-attribute"/><iref item="Processing Instruction pseudo attributes" subitem="duplex"/>
    <iref item="xml2rfc-ext-duplex parameter"/> <iref item="Parameters" subitem="xml2rfc-ext-duplex"/>

    <dl newline="true">
      <dt>PI target</dt>
      <dd>rfc-ext</dd>
      <dt>PI pseudo-attribute</dt>
      <dd>duplex</dd>
      <dt>XSLT parameter name</dt>
      <dd>xml2rfc-ext-duplex</dd>
      <dt>default</dt>
      <dd>"no"</dd>
    </dl>
    <t>
      When set to "yes", format printed output for doublesided printing.
    </t>
  </section>

  <section title="errata - Embed Errata Information" anchor="xml2rfc-ext-errata">
    <iref item="errata PI pseudo-attribute"/><iref item="Processing Instruction pseudo attributes" subitem="errata"/>
    <iref item="xml2rfc-ext-errata parameter"/> <iref item="Parameters" subitem="xml2rfc-ext-errata"/>

    <dl newline="true">
      <dt>PI target</dt>
      <dd>rfc-ext</dd>
      <dt>PI pseudo-attribute</dt>
      <dd>errata</dd>
      <dt>XSLT parameter name</dt>
      <dd>xml2rfc-ext-errata</dd>
      <dt>default</dt>
      <dd>none</dd>
    </dl>
    <t>
      Can be used to specify an errata file; output will link to individual errata when possible. See <xref target="rfc-editor.errata"/>.
    </t>
  </section>

  <section title="html-pretty-print - Switch for Enabling Pretty Printing of Code" anchor="xml2rfc-ext-html-pretty-print">
    <iref item="html-pretty-print PI pseudo-attribute"/><iref item="Processing Instruction pseudo attributes" subitem="html-pretty-print"/>
    <iref item="xml2rfc-ext-html-pretty-print parameter"/> <iref item="Parameters" subitem="xml2rfc-ext-html-pretty-print"/>

    <dl newline="true">
      <dt>PI target</dt>
      <dd>rfc-ext</dd>
      <dt>PI pseudo-attribute</dt>
      <dd>html-pretty-print</dd>
      <dt>XSLT parameter name</dt>
      <dd>xml2rfc-ext-html-pretty-print</dd>
      <dt>default</dt>
      <dd>none</dd>
    </dl>
    <t>
      Used to specify a JS-based code pretty-printer; the value is the CSS class name to insert, followed by a blank space, followed by the URI of the JS library. For instance:
      "prettyprint https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js"
    </t>
  </section>

  <section title="include-generator - Switch for Disabling Generator Information in Output" anchor="xml2rfc-ext-include-generator">
    <iref item="include-generator PI pseudo-attribute"/><iref item="Processing Instruction pseudo attributes" subitem="include-generator"/>
    <iref item="xml2rfc-ext-include-generator parameter"/> <iref item="Parameters" subitem="xml2rfc-ext-include-generator"/>

    <dl newline="true">
      <dt>PI target</dt>
      <dd>rfc-ext</dd>
      <dt>PI pseudo-attribute</dt>
      <dd>include-generator</dd>
      <dt>XSLT parameter name</dt>
      <dd>xml2rfc-ext-include-generator</dd>
      <dt>default</dt>
      <dd>"yes"</dd>
    </dl>
    <t>
      Set to 'no' in order to disable inclusion of generator version information.
    </t>
  </section>

  <section title="include-index - Switch for Disabling Index Generation" anchor="xml2rfc-ext-include-index">
    <iref item="include-index PI pseudo-attribute"/><iref item="Processing Instruction pseudo attributes" subitem="include-index"/>
    <iref item="xml2rfc-ext-include-index parameter"/> <iref item="Parameters" subitem="xml2rfc-ext-include-index"/>

    <dl newline="true">
      <dt>PI target</dt>
      <dd>rfc-ext</dd>
      <dt>PI pseudo-attribute</dt>
      <dd>include-index</dd>
      <dt>XSLT parameter name</dt>
      <dd>xml2rfc-ext-include-index</dd>
      <dt>default</dt>
      <dd>"yes"</dd>
    </dl>
    <t>
      When set to "no", no index will be generated.
    </t>
  </section>

  <section title="include-references-in-index - Generate Index Entries for References" anchor="xml2rfc-ext-include-references-in-index">
    <iref item="include-references-in-index PI pseudo-attribute"/><iref item="Processing Instruction pseudo attributes" subitem="include-references-in-index"/>
    <iref item="xml2rfc-ext-include-references-in-index parameter"/> <iref item="Parameters" subitem="xml2rfc-ext-include-references-in-index"/>

    <dl newline="true">
      <dt>PI target</dt>
      <dd>rfc-ext</dd>
      <dt>PI pseudo-attribute</dt>
      <dd>include-references-in-index</dd>
      <dt>XSLT parameter name</dt>
      <dd>xml2rfc-ext-include-references-in-index</dd>
      <dt>default</dt>
      <dd>"no"</dd>
    </dl>
    <t>
      When set to "yes", index entries are generated for all references.
    </t>
  </section>

  <section title="insert-metadata - Dynamic Metadata Insertion in HTML" anchor="xml2rfc-ext-insert-metadata">
    <iref item="insert-metadata PI pseudo-attribute"/><iref item="Processing Instruction pseudo attributes" subitem="insert-metadata"/>
    <iref item="xml2rfc-ext-insert-metadata parameter"/><iref item="Parameters" subitem="xml2rfc-ext-insert-metadata"/>

    <dl newline="true">
      <dt>PI target</dt>
      <dd>rfc-ext</dd>
      <dt>PI pseudo-attribute</dt>
      <dd>insert-metadata</dd>
      <dt>XSLT parameter name</dt>
      <dd>xml2rfc-ext-insert-metadata</dd>
      <dt>default</dt>
      <dd>"yes"</dd>
    </dl>
    <t>
      When set to "yes", include JS code that fetches current RFC/Internet-Draft metadata and
      inserts it into the front page (standards track, obsoletion, updates, errata, freshness of draft...).
    </t>
  </section>

  <section title="internet-draft-base-uri - base URI for RFC reference files" anchor="xml2rfc-ext-internet-draft-reference-base-uri">
    <iref item="internet-draft-reference-base-uri PI pseudo-attribute"/><iref item="Processing Instruction pseudo attributes" subitem="internet-draft-reference-base-uri"/>
    <iref item="xml2rfc-ext-rfc-reference-base-uri"/> <iref item="Parameters" subitem="xml2rfc-ext-rfc-reference-base-uri"/>

    <dl newline="true">
      <dt>PI target</dt>
      <dd>rfc-ext</dd>
      <dt>PI pseudo-attribute</dt>
      <dd>internet-draft-reference-base-uri</dd>
      <dt>XSLT parameter name</dt>
      <dd>xml2rfc-ext-internet-draft-reference-base-uri</dd>
      <dt>default</dt>
      <dd>"https://bib.ietf.org/public/rfc/bibxml-ids/"</dd>
    </dl>
    <t>
      Base URI for Internet-Draft referennces included using the "include" processing instruction.
    </t>
  </section>

  <section title="internet-draft-uri - URI Template for Interned Drafts" anchor="xml2rfc-ext-internet-draft-uri">
    <iref item="internet-draft-uri PI pseudo-attribute"/><iref item="Processing Instruction pseudo attributes" subitem="internet-draft-uri"/>
    <iref item="xml2rfc-ext-internet-draft-uri parameter"/> <iref item="Parameters" subitem="xml2rfc-ext-internet-draft-uri"/>

    <dl newline="true">
      <dt>PI target</dt>
      <dd>rfc-ext</dd>
      <dt>PI pseudo-attribute</dt>
      <dd>internet-draft-uri</dd>
      <dt>XSLT parameter name</dt>
      <dd>xml2rfc-ext-internet-draft-uri</dd>
      <dt>default</dt>
      <dd>"https://datatracker.ietf.org/doc/html/{internet-draft}"</dd>
    </dl>
    <t>
      URI template for Internet-Draft links (can be set locally inside the &lt;reference> element as well to override the default).
    </t>
  </section>

  <section title="justification - Text Justification" anchor="xml2rfc-ext-justification">
    <iref item="justification PI pseudo-attribute"/><iref item="Processing Instruction pseudo attributes" subitem="justification"/>
    <iref item="xml2rfc-ext-justification parameter"/> <iref item="Parameters" subitem="xml2rfc-ext-justification"/>

    <dl newline="true">
      <dt>PI target</dt>
      <dd>rfc-ext</dd>
      <dt>PI pseudo-attribute</dt>
      <dd>justification</dd>
      <dt>XSLT parameter name</dt>
      <dd>xml2rfc-ext-justification</dd>
      <dt>default</dt>
      <dd>"never"</dd>
    </dl>
    <t>
      "never": never emit justified text, "always": always emit justified text, "print": only emit justified text for print media.
    </t>
  </section>

  <section title="isbn-uri - URI Template for ISBNs" anchor="xml2rfc-ext-isbn-uri">
    <iref item="isbn-uri PI pseudo-attribute"/><iref item="Processing Instruction pseudo attributes" subitem="isbn-uri"/>
    <iref item="xml2rfc-ext-isbn-uri parameter"/> <iref item="Parameters" subitem="xml2rfc-ext-isbn-uri"/>

    <dl newline="true">
      <dt>PI target</dt>
      <dd>rfc-ext</dd>
      <dt>PI pseudo-attribute</dt>
      <dd>isbn-uri</dd>
      <dt>XSLT parameter name</dt>
      <dd>xml2rfc-ext-isbn-uri</dd>
      <dt>default</dt>
      <dd>"https://www.worldcat.org/search?q=isbn:{isbn}"</dd>
    </dl>
    <t>
      URI template for ISBN lookup.
    </t>
  </section>

  <section title="log-level - Log Level" anchor="xml2rfc-ext-log-level">
    <iref item="log-level PI pseudo-attribute"/><iref item="Processing Instruction pseudo attributes" subitem="log-level"/>
    <iref item="xml2rfc-ext-log-level parameter"/> <iref item="Parameters" subitem="xml2rfc-ext-log-level"/>

    <dl newline="true">
      <dt>PI target</dt>
      <dd>rfc-ext</dd>
      <dt>PI pseudo-attribute</dt>
      <dd>log-level</dd>
      <dt>XSLT parameter name</dt>
      <dd>xml2rfc-ext-log-level</dd>
      <dt>default</dt>
      <dd>"WARNING"</dd>
    </dl>
    <t>
      Logging level, one of "OFF", "FATAL", "ERROR", "WARNING", "INFO", "DEBUG", "TRACE".
    </t>
  </section>

  <section title="maxwidth - Maximal Text Width in HTML" anchor="xml2rfc-ext-maxwidth">
    <iref item="maxwidth PI pseudo-attribute"/><iref item="Processing Instruction pseudo attributes" subitem="maxwidth"/>
    <iref item="xml2rfc-ext-maxwidth parameter"/> <iref item="Parameters" subitem="xml2rfc-ext-maxwidth"/>

    <dl newline="true">
      <dt>PI target</dt>
      <dd>rfc-ext</dd>
      <dt>PI pseudo-attribute</dt>
      <dd>maxwidth</dd>
      <dt>XSLT parameter name</dt>
      <dd>xml2rfc-ext-maxwidth</dd>
      <dt>default</dt>
      <dd>1000</dd>
    </dl>
    <t>
      For HTML output: maximal text width in CSS pixels.
    </t>
  </section>

  <section title="parse-xml-in-artwork - Parse and Check XML in artwork" anchor="xml2rfc-ext-parse-xml-in-artwork">
    <iref item="parse-xml-in-artwork PI pseudo-attribute"/><iref item="Processing Instruction pseudo attributes" subitem="parse-xml-in-artwork"/>
    <iref item="xml2rfc-ext-parse-xml-in-artwork parameter"/> <iref item="Parameters" subitem="xml2rfc-ext-parse-xml-in-artwork"/>

    <dl newline="true">
      <dt>PI target</dt>
      <dd>rfc-ext</dd>
      <dt>PI pseudo-attribute</dt>
      <dd>parse-xml-in-artwork</dd>
      <dt>XSLT parameter name</dt>
      <dd>xml2rfc-ext-parse-xml-in-artwork</dd>
      <dt>default</dt>
      <dd>"no"</dd>
    </dl>
    <t>
      May be used to enable parsing of XML content in figures (MSXML only).
    </t>
  </section>

  <section title="rfc-errata-uri - URI Template for RFC Errata" anchor="xml2rfc-ext-rfc-errata-uri">
    <iref item="rfc-errata-uri PI pseudo-attribute"/><iref item="Processing Instruction pseudo attributes" subitem="rfc-errata-uri"/>
    <iref item="xml2rfc-ext-rfc-errata-uri parameter"/> <iref item="Parameters" subitem="xml2rfc-ext-rfc-erratam-uri"/>

    <dl newline="true">
      <dt>PI target</dt>
      <dd>rfc-ext</dd>
      <dt>PI pseudo-attribute</dt>
      <dd>rfc-errata-uri</dd>
      <dt>XSLT parameter name</dt>
      <dd>xml2rfc-ext-rfc-errata-uri</dd>
      <dt>default</dt>
      <dd>"https://www.rfc-editor.org/errata/rfc{rfc}"</dd>
    </dl>
    <t>
      URI template for all RFC Errata for a given RFC ("rfc" is the RFC number).
    </t>
  </section>

  <section title="rfc-erratum-uri - URI Template for a specific RFC Erratum" anchor="xml2rfc-ext-rfc-erratum-uri">
    <iref item="rfc-erratum-uri PI pseudo-attribute"/><iref item="Processing Instruction pseudo attributes" subitem="rfc-erratum-uri"/>
    <iref item="xml2rfc-ext-rfc-erratum-uri parameter"/> <iref item="Parameters" subitem="xml2rfc-ext-rfc-erratum-uri"/>

    <dl newline="true">
      <dt>PI target</dt>
      <dd>rfc-ext</dd>
      <dt>PI pseudo-attribute</dt>
      <dd>rfc-erratum-uri</dd>
      <dt>XSLT parameter name</dt>
      <dd>xml2rfc-ext-rfc-erratum-uri</dd>
      <dt>default</dt>
      <dd>"https://www.rfc-editor.org/errata/eid{eid}"</dd>
    </dl>
    <t>
      URI template for a specific RFC erratum ("eid" is the "errata id").
    </t>
  </section>

  <section title="rfc-reference--base-uri - base URI for RFC reference files" anchor="xml2rfc-ext-rfc-reference-base-uri">
    <iref item="rfc-reference-base-uri PI pseudo-attribute"/><iref item="Processing Instruction pseudo attributes" subitem="rfc-reference-base-uri"/>
    <iref item="xml2rfc-ext-rfc-reference-base-uri"/> <iref item="Parameters" subitem="xml2rfc-ext-rfc-reference-base-uri"/>

    <dl newline="true">
      <dt>PI target</dt>
      <dd>rfc-ext</dd>
      <dt>PI pseudo-attribute</dt>
      <dd>rfc-reference-base-uri</dd>
      <dt>XSLT parameter name</dt>
      <dd>xml2rfc-ext-rfc-reference-base-uri</dd>
      <dt>default</dt>
      <dd>"https://bib.ietf.org/public/rfc/bibxml/"</dd>
    </dl>
    <t>
      Base URI for RFC referennces included using the "include" processing instruction.
    </t>
  </section>

  <section title="rfc-uri - URI Template for HTML Version of RFCs" anchor="xml2rfc-ext-rfc-uri">
    <iref item="rfc-uri PI pseudo-attribute"/><iref item="Processing Instruction pseudo attributes" subitem="rfc-uri"/>
    <iref item="xml2rfc-ext-rfc-uri parameter"/> <iref item="Parameters" subitem="xml2rfc-ext-rfc-uri"/>

    <dl newline="true">
      <dt>PI target</dt>
      <dd>rfc-ext</dd>
      <dt>PI pseudo-attribute</dt>
      <dd>rfc-uri</dd>
      <dt>XSLT parameter name</dt>
      <dd>xml2rfc-ext-rfc-uri</dd>
      <dt>default</dt>
      <dd>"https://www.rfc-editor.org/rfc/rfc{rfc}.html" (previously "https://tools.ietf.org/html/rfc{rfc}")</dd>
    </dl>
    <t>
      URI Template for HTML Version of RFCs.
    </t>
  </section>

  <section title="sec-no-trailing-dots - Disable Trailing Dots in Section Numbers" anchor="xml2rfc-ext-sec-no-trailing-dots">
    <iref item="sec-no-trailing-dots PI pseudo-attribute"/><iref item="Processing Instruction pseudo attributes" subitem="sec-no-trailing-dots"/>
    <iref item="xml2rfc-ext-sec-no-trailing-dots parameter"/> <iref item="Parameters" subitem="xml2rfc-ext-sec-no-trailing-dots"/>

    <dl newline="true">
      <dt>PI target</dt>
      <dd>rfc-ext</dd>
      <dt>PI pseudo-attribute</dt>
      <dd>sec-no-trailing-dots</dd>
      <dt>XSLT parameter name</dt>
      <dd>xml2rfc-ext-sec-no-trailing-dots</dd>
      <dt>default</dt>
      <dd>none</dd>
    </dl>
    <t>
      When set to "no", do not add trailing dots to section numbers (this was the preference in the distant past).
    </t>
  </section>

  <section title="std-uri - URI Template for IETF Standards" anchor="xml2rfc-ext-std-uri">
    <iref item="std-uri PI pseudo-attribute"/><iref item="Processing Instruction pseudo attributes" subitem="std-uri"/>
    <iref item="xml2rfc-ext-std-uri parameter"/> <iref item="Parameters" subitem="xml2rfc-ext-std-uri"/>

    <dl newline="true">
      <dt>PI target</dt>
      <dd>rfc-ext</dd>
      <dt>PI pseudo-attribute</dt>
      <dd>std-uri</dd>
      <dt>XSLT parameter name</dt>
      <dd>xml2rfc-ext-std-uri</dd>
      <dt>default</dt>
      <dd>"https://www.rfc-editor.org/info/std{std}"</dd>
    </dl>
    <t>
      URI Template for IETF Standards.
    </t>
  </section>

  <section title="support-highwire-press-tags - Support 'Highwire Press' Metadata" anchor="xml2rfc-ext-support-highwire-press-tags">
    <iref item="support-highwire-press-tags PI pseudo-attribute"/><iref item="Processing Instruction pseudo attributes" subitem="support-highwire-press-tags"/>
    <iref item="xml2rfc-ext-support-highwire-press-tags parameter"/> <iref item="Parameters" subitem="xml2rfc-ext-support-highwire-press-tags"/>

    <dl newline="true">
      <dt>PI target</dt>
      <dd>rfc-ext</dd>
      <dt>PI pseudo-attribute</dt>
      <dd>support-highwire-press-tags</dd>
      <dt>XSLT parameter name</dt>
      <dd>xml2rfc-ext-support-highwire-press-tags</dd>
      <dt>default</dt>
      <dd>"yes"</dd>
    </dl>
    <t>
      Decides whether the HTML transformation should generate 'Highwire Press' META tags, as used by Google Scholar.
    </t>
  </section>

  <section title="support-open-graph-tags - Support 'Highwire Press' Metadata" anchor="xml2rfc-ext-support-open-graph-tags">
    <iref item="support-open-graph-tags PI pseudo-attribute"/><iref item="Processing Instruction pseudo attributes" subitem="support-open-graph-tags"/>
    <iref item="xml2rfc-ext-support-open-graph-tags parameter"/> <iref item="Parameters" subitem="xml2rfc-ext-support-open-graph-tags"/>

    <dl newline="true">
      <dt>PI target</dt>
      <dd>rfc-ext</dd>
      <dt>PI pseudo-attribute</dt>
      <dd>support-open-graph-tags</dd>
      <dt>XSLT parameter name</dt>
      <dd>xml2rfc-ext-support-open-graph-tags</dd>
      <dt>default</dt>
      <dd>"yes"</dd>
    </dl>
    <t>
      Decides whether the HTML transformation should generate 'Open Graph' META tags, as used by Twitter.
    </t>
  </section>

  <section title="support-rfc2731 - Support RFC 2731 Metadata" anchor="xml2rfc-ext-support-rfc2731">
    <iref item="support-rfc2731 PI pseudo-attribute"/><iref item="Processing Instruction pseudo attributes" subitem="support-rfc2731"/>
    <iref item="xml2rfc-ext-support-rfc2731 parameter"/> <iref item="Parameters" subitem="xml2rfc-ext-support-rfc2731"/>

    <dl newline="true">
      <dt>PI target</dt>
      <dd>rfc-ext</dd>
      <dt>PI pseudo-attribute</dt>
      <dd>support-rfc2731</dd>
      <dt>XSLT parameter name</dt>
      <dd>xml2rfc-ext-support-rfc2731</dd>
      <dt>default</dt>
      <dd>"yes"</dd>
    </dl>
    <t>
      Decides whether the HTML transformation should generate META tags according <xref target="rfc2731.properties"/>.
    </t>
  </section>

  <section title="ucd-file - Filename of Unicode Database" anchor="xml2rfc-ext-ucd-file">
    <iref item="ucd-file PI pseudo-attribute"/><iref item="Processing Instruction pseudo attributes" subitem="ucd-file"/>
    <iref item="xml2rfc-ext-ucd-file parameter"/> <iref item="Parameters" subitem="xml2rfc-ext-ucd-file"/>

    <dl newline="true">
      <dt>PI target</dt>
      <dd>rfc-ext</dd>
      <dt>PI pseudo-attribute</dt>
      <dd>ucd-file</dd>
      <dt>XSLT parameter name</dt>
      <dd>xml2rfc-ext-ucd-file</dd>
      <dt>default</dt>
      <dd>none</dd>
    </dl>
    <t>
      Specifies an external resource containing Unicode character database information, as described in <xref target="ext.element.u-map"/>.
    </t>
  </section>

  <section title="xml2rfc-backend - Select xml2rfc Target Version" anchor="xml2rfc-ext-xml2rfc-backend">
    <iref item="xml2rfc-backend PI pseudo-attribute"/><iref item="Processing Instruction pseudo attributes" subitem="xml2rfc-backend"/>
    <iref item="xml2rfc-ext-xml2rfc-backend parameter"/><iref item="Parameters" subitem="xml2rfc-ext-xml2rfc-backend"/>
    
    <dl newline="true">
      <dt>PI target</dt>
      <dd>rfc-ext</dd>
      <dt>PI pseudo-attribute</dt>
      <dd>xml2rfc-backend</dd>
      <dt>XSLT parameter name</dt>
      <dd>xml2rfc-ext-xml2rfc-backend</dd>
      <dt>default</dt>
      <dd>based on document date</dd>
    </dl>
    <t>Used in <tt>clean-for-DTD.xslt</tt> (see <xref target="clean-for-dtd"/>).</t>
  </section>

  <section title="xref-with-text-generate - Default Handling of &lt;xref> with Text Content" anchor="xml2rfc-ext-xref-with-text-generate">
    <iref item="xref-with-text-generate PI pseudo-attribute"/><iref item="Processing Instruction pseudo attributes" subitem="xref-with-text-generate"/>
    <iref item="xml2rfc-ext-xref-with-text-generate parameter"/> <iref item="Parameters" subitem="xml2rfc-ext-xref-with-text-generate"/>

    <dl newline="true">
      <dt>PI target</dt>
      <dd>rfc-ext</dd>
      <dt>PI pseudo-attribute</dt>
      <dd>xref-with-text-generate</dd>
      <dt>XSLT parameter name</dt>
      <dd>xml2rfc-ext-xref-with-text-generate</dd>
      <dt>default</dt>
      <dd>"text"</dd>
    </dl>
    <t>
      Determines whether &lt;xref> with text content generates additional text as in traditional text output ("text"), or just generates a link around the text ("nothing"). Note that the default might change in the future in order to achieve compatibility with other formatters.
    </t>
  </section>

</section>

</section>

<section title="Anchors" anchor="anchors">
<t>
  The transformation automatically generates anchors that are supposed to
  be stable and predictable and that can be used to identify specific
  parts of the document. Anchors are generated both in HTML and XSL-FO
  content (but the latter will only be used for PDF output when the XSL-FO
  engine supports producing PDF anchors).
</t>
<texttable>
<preamble>The following anchors get auto-generated:</preamble>
<ttcol>Anchor name</ttcol><ttcol>Description</ttcol>

  <c>rfc.abstract <iref item="rfc.abstract anchor"/><iref item="Anchors" subitem="rfc.abstract"/></c><c>Abstract</c>
  <c>rfc.authors <iref item="rfc.authors anchor"/><iref item="Anchors" subitem="rfc.authors"/></c><c>Authors section</c>
  <c>rfc.copyright <iref item="rfc.copyright anchor"/><iref item="Anchors" subitem="rfc.copyright"/></c><c>Copyright section</c>
  <c>rfc.copyrightnotice <iref item="rfc.copyrightnotice anchor"/><iref item="Anchors" subitem="rfc.copyrightnotice"/></c><c>Copyright notice</c>
  <c>rfc.figure.<em>n</em> <iref item="rfc.figure.n anchor"/><iref item="Anchors" subitem="rfc.figure.n"/></c><c>Figures (titled)</c>
  <c>rfc.figure.u.<em>n</em> <iref item="rfc.figure.u.n anchor"/><iref item="Anchors" subitem="rfc.figure.u.n"/></c><c>Figures (untitled)</c>
  <c>rfc.index <iref item="rfc.index anchor"/><iref item="Anchors" subitem="rfc.index"/></c><c>Index</c>
  <c>rfc.ipr <iref item="rfc.ipr anchor"/><iref item="Anchors" subitem="rfc.ipr"/></c><c>Intellectual Property</c>
  <c>rfc.iref.<em>n</em> <iref item="rfc.iref.n anchor"/><iref item="Anchors" subitem="rfc.iref.n"/></c><c>Internal references</c>
  <c>rfc.note.<em>n</em> <iref item="rfc.note.n anchor"/><iref item="Anchors" subitem="rfc.note.n"/></c><c>Notes (from front section)</c>
  <c>rfc.references <iref item="rfc.references anchor"/><iref item="Anchors" subitem="rfc.references"/></c><c>References</c>
  <c>rfc.references.<em>n</em> <iref item="rfc.references.n anchor"/><iref item="Anchors" subitem="rfc.references"/></c><c>Additional references</c>
  <c>rfc.section.<em>n</em> <iref item="rfc.section.n anchor"/><iref item="Anchors" subitem="rfc.section.n"/></c><c>Section <em>n</em></c>
  <c>rfc.section.<em>n</em>.p.<em>m</em> <iref item="rfc.section.n.p.m anchor"/><iref item="Anchors" subitem="rfc.section.n.p.m"/></c><c>Section <em>n</em>, paragraph <em>m</em></c>
  <c>rfc.status <iref item="rfc.status anchor"/><iref item="Anchors" subitem="rfc.status"/></c><c>Status of memo</c>
  <c>rfc.table.<em>n</em> <iref item="rfc.figure.n anchor"/><iref item="Anchors" subitem="rfc.figure.n"/></c><c>Tables (titled)</c>
  <c>rfc.table.u.<em>n</em> <iref item="rfc.figure.u.n anchor"/><iref item="Anchors" subitem="rfc.figure.u.n"/></c><c>Tables (untitled)</c>
  <c>rfc.toc <iref item="rfc.toc anchor"/><iref item="Anchors" subitem="rfc.toc"/></c><c>Table of contents</c>
  <c>rfc.xref.<em>name</em>.<em>n</em> <iref item="rfc.xref.name.n anchor"/><iref item="Anchors" subitem="rfc.xref.name.n"/></c><c>References to reference <em>n</em> to <em>name</em></c>

</texttable>
</section>

<section title="Supported XSLT engines" anchor="xslt.engines">
<t>
  The transformation requires a non-standard extension function (see <eref target="http://www.exslt.org/exsl/functions/node-set/index.html">
  exsl:node-set</eref>)
  which is however widely available. XSLT processors that do not support this
  extension (or a functional equivalent, such as msxsl:node-set) currently are not supported.
</t>
<t anchor="exsl-date-time">
  Input documents do not always specify the date completely. In this case, the
  transformation attempts to let the XSLT engine to compute the system date,
  using either scripting in Microsoft's XSLT engine, or
  the  <eref target="http://www.exslt.org/date/functions/date-time/">
  exsl:date-time</eref> extension function.
</t>
<section title="Standalone Engines">
<t>
  The following XSLT engines are believed to work well:
  <list style="symbols">
    <t>Windows: <iref item="MSXML3"/><iref item="MSXML4"/>MSXML3 and MSXML4 (<eref target="http://msdn.microsoft.com/xml"/>;
      command line processor "msxsl" is available from <eref target="http://www.microsoft.com/downloads/details.aspx?FamilyID=2FB55371-C94E-4373-B0E9-DB4816552E41">Microsoft Download Center</eref>)</t>
    <t>Java: <iref item="Saxon"/>Saxon (<eref target="http://saxon.sourceforge.net/"/>)</t>
    <t>Java: <iref item="Xalan"/>Xalan (<eref target="http://xml.apache.org/xalan-j/"/>)</t>
    <t>C/C++: <iref item="xsltproc"/>xsltproc (libxslt) (<eref target="http://xmlsoft.org/XSLT/"/>, make sure that you
    have a current version, also: does not support inclusion of "https" resources -- <eref target="https://bugzilla.gnome.org/show_bug.cgi?id=791491"/>)</t>
  </list>
</t>
</section>

<section title="In-Browser Engines" anchor="xslt.engines.browser">
<t>
  The following browsers seem to work fine:
  <list style="symbols">
    <x:lt>
      <t><iref item="Internet Explorer 6"/><iref item="Internet Explorer 7"/><iref item="Internet Explorer 8"/><iref item="Internet Explorer 9"/>Internet Explorer 6 and newer</t>
    </x:lt>
    <x:lt>
      <t anchor="firefox3"><iref item="Mozilla"/><iref item="Firefox" subitem="3.*"/>Firefox 3.0 and newer</t>
      <t>
        <list style="symbols">
          <t>Be aware that XSLT execution can be suppressed using <iref item="NoScript"/><eref target="https://addons.mozilla.org/de/firefox/addon/722">NoScript</eref></t>
          <t>There seems to be a new problem in Firefox 4 where it occasionally
          does the initial rendering with the wrong width (people who can reproduce
          this problem please comment on <eref target="https://bugzilla.mozilla.org/show_bug.cgi?id=640390"/>.
          </t>
          <t>Date computation is available in Firefox starting with Firefox 6 (see <eref target="https://bugzilla.mozilla.org/show_bug.cgi?id=603159"/>)</t>
        </list>
      </t>
    </x:lt>
    <x:lt>
      <t><iref item="Safari"/><iref item="Safari" subitem="3.*"/>Safari 3 (starting with version 3.0.4)</t>
      <t>
        <list style="symbols">
          <t>Date computation not available (see <eref target="https://bugs.webkit.org/show_bug.cgi?id=4079"/>)</t>
        </list>
      </t>
    </x:lt>
    <x:lt>
      <t><iref item="Google Chrome"/>Google Chrome</t>
      <t>
        <list style="symbols">
          <t>Date computation not available (see <eref target="https://bugs.chromium.org/p/chromium/issues/detail?id=1006210"/>)</t>
        </list>
      </t>
    </x:lt>
  </list>
</t>
<t>
  Note that browsers in general do not load external DTDs nor external entities (see, for instance,
  <eref target="https://bugzilla.mozilla.org/show_bug.cgi?id=22942">Mozilla Bug 22942</eref>) thus entities
  like &amp;nbsp; need to be declared in the internal subset (<xref target="examples.internalsubset"/>).
</t>
<t>
  The following browsers are known not to work properly:
  <list style="symbols">
    <x:lt>
      <t anchor="firefox12"><iref item="Mozilla"/><iref item="Firefox" subitem="1.*/2.*"/>Firefox 1.*/2.*: (missing extension function - see change request at Mozilla BugZilla
      <eref target="http://bugzilla.mozilla.org/show_bug.cgi?id=193678">193678</eref>)</t>
    </x:lt>
    <x:lt>
      <t anchor="opera"><iref item="Opera"/>Opera 9.21: execution fails, potentially
      to a somewhat complex XPath expression (reported to Opera as bug 245725).</t>
    </x:lt>
    <x:lt>
      <t>Opera 9.5 and 9.6:
      transformation appears to work, but CSS isn't getting applied (reported to Opera as bug 337388 on 2008-06-12).</t>
    </x:lt>
    <x:lt>
      <t anchor="safari"><iref item="Safari"/>Safari 2.* supports client-side XSLT as of MacOS X 10.4,
      but misses required extension functions. A problem 
      with stylesheets producing non-ASCII output (such as NBSP characters)
      has been fixed as of OSX 10.4.4. Both
      problems have been reported through Apple's bug tracking system, see
      <eref target="http://drakken.dbc.mtview.ca.us/pipermail/xml2rfc/2005-May/002073.html"/> and
      <eref target="http://bugs.webkit.org/show_bug.cgi?id=4079"/>.
      </t>
    </x:lt>
  </list>
</t>
</section>

</section>

<section title="Transforming to HTML" anchor="output.html">
<t>
  Transformation to HTML can be done inside the browser if it supports
  XSLT. To enable this, add the following processing instruction to
  the start of the source file:
</t>
<iref item="xml-stylesheet PI"/>
<figure><artwork type="example" x:lang="">
  &lt;?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
</artwork></figure>
<t>
  (and ensure that <tt>rfc2629.xslt</tt> is present).
</t>

<section title="HTML compliance">
<t>
  The transformation result is supposed to conform to HTML5 <xref target="HTML5"/>.
  This can be checked using the W3C's online
  validator at <eref target="http://validator.w3.org" /><iref item="HTML compliance"/>.
</t>
<t>
  XSLT 1.0 is not capable to directly emit the HTML doctype declaration, thus
  uses the SYSTEM ID "about:legacy-compat" instead
  (see <xref target="HTML5" x:sec="8.1.1" x:rel="syntax.html#the-doctype"/>).
</t>
<t>
  When not run in a browser, the doctype declaration can be adjusted using
  a small script, such as with:
</t>
<figure><artwork type="example">
saxon test.xml rfc2629.xslt | awk -f html5doctype.awk
</artwork></figure>
<t>
  with
</t>
<figure><artwork x:lang="" name="html5doctype.awk" type="code">
<?BEGINESCAPEDINC html5doctype.awk ?>
#!/usr/bin/awk -f

# waitfordoctype:
# 0: wait for line starting with DOCTYPE and eat empty lines
# 1: wait for line starting with &lt;html
# 2: afterwards

BEGIN {
  waitfordoctype = 0;
}

/&lt;!DOCTYPE .*/ {
  if (waitfordoctype == 0) {
    waitfordoctype = 1
  }
}

/&lt;html.*/ {
  if (waitfordoctype == 1) {
    waitfordoctype = 2
    printf("&lt;!DOCTYPE html>\n")
  }
  else {
    print
  }
}

{
  if (waitfordoctype == 0 &amp;&amp; $0 != "") {
    print
  }
  else if (waitfordoctype == 2) {
    print
  }
}
<?ENDESCAPEDINC html5doctype.awk ?>
</artwork></figure>
</section>

<section title="Standard HTML LINK elements" anchor="html.link">
<t>
  LINK elements exist since HTML 2.0. They can be used to embed content-independant
  links inside the document. Unfortunately, only few user agents 
  support this element. Firefox users may want to check the
  <eref target="https://addons.mozilla.org/firefox/2933/">Link Widgets</eref>
  extension.
</t>
<texttable>
<preamble>The following LINK elements are produced:</preamble>

  <ttcol>LINK type</ttcol>
  <ttcol>description</ttcol>
  
  <c>alternate<iref item="alternate HTML LINK element"/><iref item="HTML LINK elements" subitem="alternate"/></c><c>for RFCs, a link to the authorative ASCII version on the IETF web site</c>
  <c>appendic<iref item="appendix HTML LINK element"/><iref item="HTML LINK elements" subitem="appendix"/></c><c>pointer to all top-level appendics</c>
  <c>author<iref item="author HTML LINK element"/><iref item="HTML LINK elements" subitem="author"/></c><c>pointer to "authors" section</c>
  <c>chapter<iref item="chapter HTML LINK element"/><iref item="HTML LINK elements" subitem="chapter"/></c><c>pointer to all top-level sections</c>
  <c>contents<iref item="contents HTML LINK element"/><iref item="HTML LINK elements" subitem="contents"/></c><c>pointer to table of contents</c>
  <c>copyright<iref item="copyright HTML LINK element"/><iref item="HTML LINK elements" subitem="copyright"/></c><c>pointer to copyright statement</c>
  <c>index<iref item="index HTML LINK element"/><iref item="HTML LINK elements" subitem="index"/></c><c>pointer to index</c>

</texttable>
<figure>
<preamble>
The figure below shows how Mozilla Firefox 1.0 displays the Site Navigation Bar
for rfc2396.xml.
</preamble>
<artwork src="rfc2629xslt-fig1.png" height="235" width="509" type="image/png">
(LINK elements displayed in Mozilla Firefox for RFC2396.xml)
</artwork>
</figure>

</section>


<section title="Standard HTML metadata">
<texttable>
<preamble>The following standard HTML META elements are produced:</preamble>

  <ttcol>META name</ttcol>
  <ttcol>description</ttcol>
  
  <c>generator<iref item="generator HTML META element"/><iref item="HTML META elements" subitem="generator"/></c><c>from XSLT engine version and stylesheet version</c>
  <c>keywords<iref item="keywords HTML META element"/><iref item="HTML META elements" subitem="keywords"/></c><c>from keyword elements in front section</c>

</texttable>
</section>


<section title="Dublin Core (RFC2731) metadata" anchor="rfc2731.properties">
<t>
  Unless turned off using the "rfc-ext support-rfc2731" processing
  instruction, the transformation will generate metadata according to
  <xref target="RFC2731"/> and <xref target="DC-HTML"/>.
</t>
<texttable>
<preamble>The following DCMI properties are produced:</preamble>

  <ttcol>META name</ttcol>
  <ttcol>description</ttcol>
  
  <c>DC.Creator<iref item="Creator DCMI property"/><iref item="DCMI properties" subitem="Creator"/></c><c>from author information in front section</c>
  <c>DC.Date.Issued<iref item="Date.Issued DCMI property"/><iref item="DCMI properties" subitem="Date.Issued"/></c><c>from date information in front section</c>
  <c>DC.Description.Abstract<iref item="Description.Abstract DCMI property"/><iref item="DCMI properties" subitem="Description.Abstract"/></c><c>from abstract</c>
  <c>DC.Identifier<iref item="Identifier DCMI property"/><iref item="DCMI properties" subitem="Identifier"/></c><c>document URN <xref target="RFC2648" /> from "docName" attribute</c>
  <c>DC.isPartOf<iref item="isPartOf DCMI property"/><iref item="DCMI properties" subitem="isPartOf"/></c><c>RFC ISSN (for RFCs)</c>
  <c>DC.Relation.Replaces<iref item="Relation.Replaces DCMI property"/><iref item="DCMI properties" subitem="Relation.Replaces"/></c><c>from "obsoletes" attribute</c>

</texttable>
</section>

<section title="Insertion of Live RFC Meta Data" anchor="rfc-editor.meta-data">
  <iref item="insert-metadata PI pseudo-attribute"/><iref item="Processing Instruction pseudo attributes" subitem="insert-metadata"/>
  <iref item="xml2rfc-ext-insert-metadata parameter"/> <iref item="Parameters" subitem="xml2rfc-ext-insert-metadata"/>
<t>
  RFCs are immutable; once published, they do not change anymore. What
  <em>does</em> change though is their status, their relation to subsequent
  RFCs (such as when they are updated), and errata.
</t>
<t>
  <tt>rfc2629toXHTML.xslt</tt> by default inserts code that will pull the relevant
  information from <eref target="https://tools.ietf.org"/>. This can be disabled
  by specifying the parameter "xml2rfc-ext-insert-metadata=no" (or
  by inserting the equivalent processing instruction into the source code).
</t>
<t>
  An example for the generated information can be seen at <eref target="https://greenbytes.de/tech/webdav/rfc2616.html#rfc.meta"/>.
</t>
<aside>
  <t>
    <strong>Note:</strong> the status information really should be available from
    the RFC Editor, right now it only exists only in HTML form (such as
    in <eref target="https://www.rfc-editor.org/info/rfc2616"/>. Furthermore,
    the service provided by <eref target="https://tools.ietf.org"/> is
    considered experimental, so this feature might be changed or removed
    without prior notice.
  </t>
  <t>
    ...and no, we currently can't obtain the exact list of errata, just a flag
    indicating whether errata exist.  
  </t>
</aside>
</section>

<section title="Insertion of RFC Errata Links" anchor="rfc-editor.errata">
  <iref item="errata PI pseudo-attribute"/><iref item="Processing Instruction pseudo attributes" subitem="errata"/>
  <iref item="xml2rfc-ext-errata"/> <iref item="Parameters" subitem="xml2rfc-ext-errata"/>
<t>
  Unfortunately, the RFC Editor does not provide errata information in a 
  well-defined machine readable format. What's available is "regular"
  HTML (and that could be the worst currently in use in standards bodies...).
</t>
<t>
  <tt>parse-errata.xslt</tt> attempts to parse useful information out of these
  pages.
</t>
<t>
  It can be run like that (requires an XSLT2 processor):
</t>
<figure><artwork type="example">
# get the raw html and strip form feed characters
curl -s https://www.rfc-editor.org/errata_search.php?rfc=2616 \
  | tr -d '\f' > rfc2616.rawerrata
# regexps are your friend
saxon97he parse-errata.xslt parse-errata.xslt doc=2616 > rfc2616.errata
</artwork></figure>
<t>
  The code tries to make sense of the HTML, in particular it tries to
  detect what RFC sections each erratum applies to.
  The resulting XML format is work-in-progress and just contains the
  information that will be useful in subsequent formatting of the RFC. 
</t>
<t>
  When <em>formatting</em> the RFC for HTML output, the errata file can
  be passed as stylesheet parameter ("xml2rfc-ext-errata"). The output
  will include errata links at the beginnings of the section they apply
  to, or at the beginning of Section 1 when the location is unknown.
</t>
<t>
  For the sake of embedding, three types of errata are relevant; their
  type is indicated with a symbol:
</t>
<ul>
  <li>"held for update": reviewed and decided to be "held for document update" (these are mostly editorial); "scissors" symbol.</li>
  <li>"submitted": submitted, but not reviewed; "letter" symbol.</li>
  <li>"verified": reviewed and found to be correct; "checkmark" symbol.</li>
</ul>
<t>
  To recap: the errata information is passed into the transformation as 
  additional parameter. The errata information will <em>not</em> be 
  automatically retrieved from the RFC Editor web site. 
</t>
<t>
  Finally, here's an example for inserted errata links: <eref target="https://greenbytes.de/tech/webdav/rfc7230.html#transfer.codings"/>.
</t>
</section>
</section>

<section title="Transforming to XHTML" anchor="output.xhtml">
<t>
  Transforming to XHTML requires slightly different XSLT output options and
  is implemented by the derived transformation script <tt>rfc2629toXHTML.xslt</tt>.
</t>
</section>

<section title="Transforming to CHM (Microsoft Compiled Help)" anchor="output.chm">
<t>
  <iref item="CHM format"/>
  <iref item="Microsoft Help"/>
  To generate a CHM file using Microsoft's HTML Help Compiler (hhc), three
  files are required in addition to the HTML file.
  <list style="numbers">
    <t>hhc - table of contents file (HTML)</t>
    <t>hhk - index file (HTML)</t>
    <t>hhp - project file (plain text)</t>
  </list> 
</t>
<t>
  The three files are generated with three specific transformations, each
  requiring the additional XSLT parameter "basename" to specify the filename
  prefix.
</t>
<figure>
<preamble>Example:</preamble>
<artwork type="example">
saxon rfc2616.xml rfc2629toHhp.xslt basename=rfc2616  > rfc2616.hhp
saxon rfc2616.xml rfc2629toHhc.xslt basename=rfc2616  > rfc2616.hhc
saxon rfc2616.xml rfc2629toHhk.xslt basename=rfc2616  > rfc2616.hhk
hhc rfc2616.hhp
</artwork>
</figure>
</section>

<section title="Transforming to PDF" anchor="output.pdf">

<section title="Via XSL-FO" anchor="output.pdf.fop">
<t>
  Transformation to XSL-FO <xref target="XSL-FO"/> format is available through
  <tt>rfc2629toFO.xslt</tt> (which includes <tt>rfc2629.xslt</tt>, so keep both in the
  same folder).
</t>
<t>
  Compared to HTML user agents, XSL-FO engines unfortunately either come
  as open source (for instance, <iref item="Apache FOP"/>Apache FOP) or
  feature-complete (for instance, <iref item="AntennaHouse XSL Formatter"/>
  AntennaHouse XSL Formatter), but not both at the same time.
</t>
<t>
  As Apache FOP needs special workarounds (index generation), and
  some popular extensions aren't standardized yet, the translation produces
  a generic output (hopefully) conforming to <xref target="XSL-FO"/>.
  Specific backends (<tt>xsl11toFop.xslt</tt>,
  <tt>xsl11toXep.xslt</tt>, <tt>xsl11toAn.xslt</tt>)
  then provide post-processing for the individual processors.
</t>
<x:note>
  <t>
    <x:h>Note:</x:h>
    the output is currently targeted at Apache FOP 1.1.
  </t>
</x:note>

<!-- outdated <section title="Extension feature matrix">
<texttable>
  <ttcol/>
  <ttcol align="center" width="20%">PDF anchors</ttcol>
  <ttcol align="center" width="20%">PDF bookmarks</ttcol>
  <ttcol align="center" width="20%">PDF document information</ttcol>
  <ttcol align="center" width="20%">Index cleanup</ttcol>
  
  <c><eref target="http://www.w3.org/TR/2003/WD-xsl11-20031217/">XSL 1.1 WD</eref></c>
  <c>no, but can be auto-generated from "id" attributes</c>  
  <c><eref target="http://www.w3.org/TR/2003/WD-xsl11-20031217/#d0e12873">yes</eref></c>
  <c>no, but uses XEP output extensions</c>
  <c><eref target="http://www.w3.org/TR/2003/WD-xsl11-20031217/#d0e12534">yes</eref></c>

  <c><eref target="http://www.antennahouse.com/">Antenna House XSL formatter</eref></c>
  <c>no</c>
  <c><eref target="http://www.antennahouse.com/XSL20/axf-extension.htm">yes</eref> (from XSL 1.1 bookmarks)</c>
  <c><eref target="http://www.antennahouse.com/XSL20/axf-extension.htm">yes</eref> (from XEP document info)</c>
  <c><eref target="http://www.antennahouse.com/XSL20/axf-extension.htm">yes</eref> (just page duplicate elimination, from XSL 1.1 page index)</c>

  <c><eref target="http://xml.apache.org/fop/">Apache FOP</eref></c>
  <c><eref target="http://xml.apache.org/fop/extensions.html#named-destinations">yes</eref></c>
  <c><eref target="http://xml.apache.org/fop/extensions.html#bookmarks">yes</eref> (from XSL 1.1 bookmarks)</c>
  <c><eref target="http://xmlgraphics.apache.org/fop/0.95/metadata.html#xmp-in-fo">yes</eref></c>
  <c>no</c>

  <c><eref target="http://xep.xattic.com/">RenderX XEP</eref></c>
  <c>no</c>
  <c><eref target="http://xep.xattic.com/xep/spec.html">yes</eref> (from XSL 1.1 bookmarks)</c>
  <c><eref target="http://xep.xattic.com/xep/spec.html">yes</eref></c>
  <c><eref target="http://xep.xattic.com/xep/spec.html">yes</eref> (from XSL 1.1 page index)</c>

</texttable>
</section>-->

<section title="Example: producing output for Apache FOP">
<figure>
<preamble>Example:</preamble>
<artwork type="example">
saxon rfc2616.xml rfc2629toFo.xslt > tmp.fo
saxon tmp.fo xsl11toFop.xslt > rfc2629.fo
</artwork>
</figure>
</section>
</section>

<section title="Via HTML" anchor="output.pdf.html">
<t>
  PDF output can also be produced directly from (X)HTML. One simple approach
  is to rely on the browser's printing function, and to use a printer driver
  that produces PDF. Depending on the brower's CSS capabilities, the output
  will behave properly with respect to table breaks etc.
</t>
<t>
  Alternatives are tools which can produce PDF directly from (X)HTML input,
  based on the CSS printing information.
  For instance: "PrinceXML" (<eref target="http://www.princexml.com/"/>) and 
  "WeasyPrint" (<eref target="https://weasyprint.org/"/>).
</t>
<figure>
  <preamble>
    For instance, PDF output can be produced with:
  </preamble>
  <artwork type="example">
saxon input.xml rfc2629.xslt > output.html
weasyprint output.html output.pdf</artwork>
</figure>
</section>

</section>

<section title="Transforming to ePub" anchor="output.epub">
<t>
  Experimental transformation to ePub format is available through a set
  of stylesheets, and the Unix Shell script
  <tt>mkepub.sh</tt> (which requires that "zip" and either
  "saxon" or "xsltproc" are installed).
</t>
<figure>
  <preamble>
    For instance, an epub version of rfc2616.xml can be generated like this:
  </preamble>
  <artwork type="example">
mkepub.sh rfc2616.xml
</artwork>
</figure>
</section>

<section title="Generic Extensions" anchor="extensions">
<t>
  This section documents extensions implemented in 
  <tt>rfc2629.xslt</tt>, using the extension
  namespace "http://purl.org/net/xml2rfc/ext".
</t>

<section title="&lt;abnf-char-sequence> element" anchor="ext.element.abnf-char-sequence">
  <iref item="Extension Elements" subitem="abnf-char-sequence" primary="true"/>
  <iref item="abnf-char-sequence Extension Element" primary="true"/>
  <x:anchor-alias value="abnf-char-sequence"/>
  <t>
    Converts the contained quoted string into a hex-encoded character
    sequence, for use in case-sensitive ABNF productions.
  </t>
  <t>
    For instance, "&lt;x:abnf-char-sequence>"HTTP"&lt;/x:abnf-char-sequence>"
    gets converted to "<x:abnf-char-sequence>"HTTP"</x:abnf-char-sequence>".
  </t>
</section>

<section title="&lt;anchor-alias> element" anchor="ext.element.anchor-alias">
  <iref item="Extension Elements" subitem="anchor-alias" primary="true"/>
  <iref item="anchor-alias Extension Element" primary="true"/>
  <x:anchor-alias value="anchor-alias"/>
  <t>
    Using its "value" attribute, this element allows the definition of an
    internal link target alias for the enclosing element. This alias can
    then be used with the &lt;<x:ref>ref</x:ref>> element for intra-document
    references.
  </t>
  <t>
    Note that the anchor alias is not subject to the naming constraints that
    apply to anchor elements (which are <eref target="http://www.w3.org/TR/REC-xml/#NT-Name">XML
    names</eref>).
  </t>
</section>

<section title="&lt;bb> element" anchor="ext.element.bb">
  <iref item="Extension Elements" subitem="bb" primary="true"/>
  <iref item="bb Extension Element" primary="true"/>
  <x:anchor-alias value="bb"/>
  <t>
    Marking up a string as &lt;bb> indicates that it represents the bottom 
    line of a box drawing, replacing the "+" and "-" characters accordingly.
  </t>
</section>

<section title="&lt;bc> element" anchor="ext.element.bc">
  <iref item="Extension Elements" subitem="bc" primary="true"/>
  <iref item="bc Extension Element" primary="true"/>
  <x:anchor-alias value="bc"/>
  <t>
    Marking up a string as &lt;bc> indicates that it represents a center
    line of a box drawing, replacing the "|" character accordingly.
  </t>
</section>

<section title="&lt;bcp14> element" anchor="ext.element.bcp14">
  <iref item="Extension Elements" subitem="bcp14" primary="true"/>
  <iref item="bcp14 Extension Element" primary="true"/>
  <x:anchor-alias value="bcp14"/>
  <t>
    This element marks the content as being one of the normative keywords
    defined in <xref target="RFC2119"/>.
  </t>
  <figure>
    <preamble>
      The DOCTYPE definition below allows using these keywords using XML
      entity expansion: such as in "...server &amp;MUST; accept...".
    </preamble>
    <artwork type="example" x:lang="">
&lt;!DOCTYPE rfc [
 &lt;!ENTITY MAY "&lt;bcp14 xmlns='http://purl.org/net/xml2rfc/ext'
   >MAY&lt;/bcp14>">
 &lt;!ENTITY MUST "&lt;bcp14 xmlns='http://purl.org/net/xml2rfc/ext'
   >MUST&lt;/bcp14>">
 &lt;!ENTITY MUST-NOT "&lt;bcp14 xmlns='http://purl.org/net/xml2rfc/ext'
   >MUST NOT&lt;/bcp14>">
 &lt;!ENTITY OPTIONAL "&lt;bcp14 xmlns='http://purl.org/net/xml2rfc/ext'
   >OPTIONAL&lt;/bcp14>">
 &lt;!ENTITY RECOMMENDED "&lt;bcp14 xmlns='http://purl.org/net/xml2rfc/ext'
   >RECOMMENDED&lt;/bcp14>">
 &lt;!ENTITY REQUIRED "&lt;bcp14 xmlns='http://purl.org/net/xml2rfc/ext'
   >REQUIRED&lt;/bcp14>">
 &lt;!ENTITY SHALL "&lt;bcp14 xmlns='http://purl.org/net/xml2rfc/ext'
   >SHALL&lt;/bcp14>">
 &lt;!ENTITY SHALL-NOT "&lt;bcp14 xmlns='http://purl.org/net/xml2rfc/ext'
   >SHALL NOT&lt;/bcp14>">
 &lt;!ENTITY SHOULD "&lt;bcp14 xmlns='http://purl.org/net/xml2rfc/ext'
   >SHOULD&lt;/bcp14>">
 &lt;!ENTITY SHOULD-NOT "&lt;bcp14 xmlns='http://purl.org/net/xml2rfc/ext'
   >SHOULD NOT&lt;/bcp14>">]></artwork>
  </figure>
</section>

<section title="&lt;blockquote> element" anchor="ext.element.blockquote">
  <iref item="Extension Elements" subitem="blockquote" primary="true"/>
  <iref item="blockquote Extension Element" primary="true"/>
  <x:anchor-alias value="blockquote"/>
  <t>
    This element is like the &lt;blockquote&gt; element defined in <xref target="HTML5" x:sec="4.4.4" x:rel="grouping-content.html#the-blockquote-element"/> 
    (note this is a block-level element!). It should contain one or more
    &lt;t> child elements.
  </t>
</section>

<section title="&lt;bt> element" anchor="ext.element.bt">
  <iref item="Extension Elements" subitem="bt" primary="true"/>
  <iref item="bt Extension Element" primary="true"/>
  <x:anchor-alias value="bt"/>
  <t>
    Marking up a string as &lt;bt> indicates that it represents the top 
    line of a box drawing, replacing the "+" and "-" characters accordingly.
  </t>
</section>

<section title="&lt;c> element" anchor="ext.element.c">
  <iref item="Extension Elements" subitem="c" primary="true"/>
  <iref item="c Extension Element" primary="true"/>
  <x:anchor-alias value="c"/>
  <t>
    Contains mapping information for a single Unicode code points.
    Attributes are "c" (the actual character), "n" (the code point), and
    "d" (the name/description).
  </t>
  <t>
    For instance:
  </t>
<figure>
    <artwork type="example" x:lang="">
&lt;x:u-map>
  &lt;x:c n="8364" c="&amp;#8364;" d="EURO SIGN"/>
&lt;x:u-map>
</artwork></figure>
  <t>
    (The format is deliberately terse so that the size of a mapping file
    containing the whole Unicode character database is minimized).
  </t>
</section>

<section title="&lt;contributor> element" anchor="ext.element.contributor">
  <iref item="Extension Elements" subitem="contributor" primary="true"/>
  <iref item="contributor Extension Element" primary="true"/>
  <x:anchor-alias value="contributor"/>
  <t>
    This element can be used to include a contributor's contact information in
    place where a paragraph (&lt;t>) would be allowed otherwise.
  </t>
  <t>
    See <xref target="v3.contact"/> for a standard alternative.
  </t>
</section>

<section title="&lt;dfn> element" anchor="ext.element.dfn">
  <iref item="Extension Elements" subitem="dfn" primary="true"/>
  <iref item="dfn Extension Element" primary="true"/>
  <x:anchor-alias value="dfn"/>
  <t>
    This element is like the &lt;dfn&gt; element defined in <xref target="HTML5" x:sec="4.5.8" x:rel="text-level-semantics.html#the-dfn-element"/>.
  </t>
</section>

<section title="&lt;feedback> element" anchor="ext.element.feedback">
  <iref item="Extension Elements" subitem="feedback" primary="true"/>
  <iref item="feedback Extension Element" primary="true"/>
  <x:anchor-alias value="feedback"/>
  <t>
    This elements allows declaring a feedback link for document reviewers.
    The template string takes the form of a URI template, such as:
  </t>
  <figure>
    <artwork type="example" x:lang="">
&lt;x:feedback template="mailto:ietf-http-wg@w3.org?subject={docname},%20%22{section}%22&amp;amp;body=&amp;lt;{ref}&amp;gt;:"/>
</artwork></figure>
  <t>
    where "docname" is substituted by the document name, "section" is substituted
    by section title (number and name), and "ref" is substituted by a URI pointing
    to the section being referenced.
  </t>
</section>

<section title="&lt;h> element" anchor="ext.element.h">
  <iref item="Extension Elements" subitem="h" primary="true"/>
  <iref item="h Extension Element" primary="true"/>
  <x:anchor-alias value="h"/>
  <t>
    This element is like the "<eref target="http://www.w3.org/TR/2006/WD-xhtml2-20060726/mod-structural.html#edef_structural_h">h</eref>" element in <xref target="XHTML2"/>.
  </t>
</section>

<section title="&lt;highlight> element" anchor="ext.element.highlight">
  <iref item="Extension Elements" subitem="highlight" primary="true"/>
  <iref item="highlight Extension Element" primary="true"/>
  <x:anchor-alias value="highlight"/>
  <t>
    Used to highlight text passages, currently only allowed in &lt;artwork>.
  </t>
  <t>
    <x:h>Note:</x:h> this is stripped when generating input for xml2rfc,
    so please use with care.
  </t>
</section>

<section title="&lt;length-of> element" anchor="ext.element.length-of">
  <iref item="Extension Elements" subitem="length-of" primary="true"/>
  <iref item="length-of Extension Element" primary="true"/>
  <x:anchor-alias value="length-of"/>
  <t>
    This element can be used to insert the length of another formatted
    section (in decimal).
  </t>
  <figure>
    <preamble>Example: computing the Content-Length header value</preamble>
    <artwork type="example" x:lang="">
&lt;artwork>
...
Content-Length: &lt;x:length-of target="req"/>
  
&lt;x:span anchor="req">123456789
&lt;x:span>&lt;artwork/>
</artwork>
  </figure>
  <t>
    The lenght computation counts line ends as two characters (CRLF).
  </t>
  <t>
    Note that indentation characters in artwork <em>will</em> be
    counted. The "indented" attribute allows to specify the amount of
    indentation to be substracted from the computed length.
  </t>
</section>

<section title="&lt;link> element" anchor="ext.element.link">
  <iref item="Extension Elements" subitem="link" primary="true"/>
  <iref item="link Extension Element" primary="true"/>
  <x:anchor-alias value="link"/>
  <t>
    This element can be added as a top-level child element below
    &lt;rfc> to indicate additional link information. It's currently
    used only when generating HTML output, in which case an HTML
    <eref target="http://www.w3.org/TR/html4/struct/links.html#edef-LINK">&lt;link></eref> element with identical attributes gets generated.
  </t>
  <figure>
    <preamble>Example: generating HTML link element</preamble>
    <artwork type="example" x:lang="">
&lt;x:link xmlns:x="http://purl.org/net/xml2rfc/ext"
    rel="Bookmark"
    title="IETF WEBDAV Working Group"
    href="http://ftp.ics.uci.edu/pub/ietf/webdav/"/></artwork>
  </figure>
  <t>
    If the attribute "basename" is present, it is used to compute the 
    target href based on the output format being generated (this is handy
    for "next"/"prev" links in a series of documents. In this case, the href
    attribute is not required.
  </t>
  <figure>
    <preamble>For instance:</preamble>
    <artwork type="example" x:lang="">
&lt;x:link xmlns:x="http://purl.org/net/xml2rfc/ext"
    rel="next"
    title="Part2"
    basename="draft-foobar-protocol-p2-latest"/></artwork>
  </figure>
</section>

<section title="&lt;lt> element" anchor="ext.element.lt">
  <iref item="Extension Elements" subitem="lt" primary="true"/>
  <iref item="lt Extension Element" primary="true"/>
  <x:anchor-alias value="lt"/>
  <t>
    Used for grouping multiple &lt;t&gt; elements into a single list item.
  </t>
</section>

<section title="&lt;note> element" anchor="ext.element.note">
  <iref item="Extension Elements" subitem="note" primary="true"/>
  <iref item="note Extension Element" primary="true"/>
  <x:anchor-alias value="note"/>
  <t>
    Can be used to add a note, usually indented by a few characters.
    It should contain one or more &lt;t> child elements.
  </t>
</section>

<section title="&lt;parse-xml> element" anchor="ext.element.parse-xml">
  <iref item="Extension Elements" subitem="parse-xml" primary="true"/>
  <iref item="parse-xml Extension Element" primary="true"/>
  <x:anchor-alias value="parse-xml"/>
  <t>
    This element instructs the processor to parse the contents as XML and 
    to warn when there's a problem (requires either MSXML or Saxon8 or newer).
  </t>
</section>

<section title="&lt;prose> element" anchor="ext.element.prose">
  <iref item="Extension Elements" subitem="prose" primary="true"/>
  <iref item="prose Extension Element" primary="true"/>
  <x:anchor-alias value="prose"/>
  <t>
    This element can be used inside &lt;reference> to add plain text (before
    the date, when present). 
  </t>
  <t>
    <em>See also &lt;refcontent&gt; (<xref target="v3.refcontent"/>).</em>
  </t>
</section>

<section title="&lt;q> element" anchor="ext.element.q">
  <iref item="Extension Elements" subitem="q" primary="true"/>
  <iref item="q Extension Element" primary="true"/>
  <x:anchor-alias value="q"/>
  <t>
    This element is like the &lt;q&gt; element defined in <xref target="HTML5" x:sec="4.5.7" x:rel="text-level-semantics.html#the-q-element"/>.
  </t>
</section>

<section title="&lt;ref> element" anchor="ext.element.ref">
  <iref item="Extension Elements" subitem="ref" primary="true"/>
  <iref item="ref Extension Element" primary="true"/>
  <x:anchor-alias value="ref"/>
  <t>
    This element is a simplified variant of the &lt;xref> element, in that
    no "target" attribute needs to be specified, instead the text contents
    acts as identifier.  That in itself wouldn't be terribly useful,
    but together with the &lt;<x:ref>anchor-alias</x:ref>>, it allows
    referring to other parts of the document with minimal additional markup.
  </t>
  <t>
    For instance, given an alias definition such as
  </t>
  <figure>
    <artwork type="example" x:lang="">
&lt;section title="Test" anchor="test">
  &lt;x:anchor-alias value="alias1"/>
  &lt;x:anchor-alias value="alias 2"/>
  ...
&lt;/section></artwork>
  </figure>
  <t>
    the following simple references
  </t>
  <figure>
    <artwork type="example" x:lang="">
&lt;x:ref>test&lt;/x:ref>
&lt;x:ref>alias1&lt;/x:ref>
&lt;x:ref>alias 2&lt;/x:ref></artwork>
  </figure>
  <t>
    are equivalent to...:
  </t>
  <figure>
    <artwork type="example" x:lang="">
&lt;xref target="test" format="none">test&lt;/xref>
&lt;xref target="test" format="none">alias1&lt;/xref>
&lt;xref target="test" format="none">alias 2&lt;/xref></artwork>
  </figure>
</section>

<section title="&lt;source> element" anchor="ext.element.source">
  <iref item="Extension Elements" subitem="source" primary="true"/>
  <iref item="source Extension Element" primary="true"/>
  <x:anchor-alias value="source"/>
  <t>
    Can be used to enhance a &lt;reference> with information about the
    location for the XML source. This can be used by the &lt;xref>
    processing code to automatically extract the target section number
    (see <xref target="ext-rfc2629.xref"/>).
  </t>
  <figure>
    <preamble>
      For example:
    </preamble>
    <artwork type="example">
...
&lt;xref target="RFC2616" x:fmt="of" x:rel="#PUT" />
...

&lt;reference target="RFC2616"/>
  ...
  &lt;x:source href="rfc2616.xml"/>
  ...
    </artwork>
  </figure>
</section>

<section title="&lt;sup> element" anchor="ext.element.sup">
  <iref item="Extension Elements" subitem="sup" primary="true"/>
  <iref item="sup Extension Element" primary="true"/>
  <x:anchor-alias value="sup"/>
  <t>
    This element is like the &lt;sup&gt; element in <xref target="HTML5" x:sec="4.5.16" x:rel="text-level-semantics.html#the-sub-and-sup-elements"/>.
  </t>
  <t>
    Note: the down conversion to RFC7749 format replaces
    "x<x:sup>y</x:sup>" by "x^y".
  </t>
  <t>
    <em>See also &lt;sup&gt; (<xref target="v3.sup"/>).</em>
  </t>
</section>

<section title="&lt;u-map> element" anchor="ext.element.u-map">
  <iref item="Extension Elements" subitem="u-map" primary="true"/>
  <iref item="u-map Extension Element" primary="true"/>
  <x:anchor-alias value="u-map"/>
  <t>
    Needed for the lookup of Unicode character database information; this
    element can either appear in-band in the source document, or off-band
    as specified using the xml2rfc-ext-ucd-file parameter/PI.
  </t>
  <t>
    Contains multiple &lt;x:c> elements (see <xref target="ext.element.c"/>).
  </t>
  <t>
    The utility XSLT <tt>convert-ucd.xslt</tt> can be used to create
    a mapping file based on the Unicode XML database format, as available
    from <eref target="https://unicode.org/ucd/#UCDinXML"/>. 
  </t>
</section>

<section title="Extensions to &lt;artwork&gt; element" anchor="ext-rfc2629.artwork">
<t>
  Sometimes, artwork occurs inside lists. To get it indent properly in xml2rfc's
  text output, it needs to be indented in the source. This is sub-optimal, as
  this whitespace will also appear in the HTML output, where it's already
  indented due to HTML's semantics.
  As a workaround, a "x:indent-with" attribute can be specified, containing
  a string that will be prepended to each line when <tt>clean-for-DTD.xslt</tt>
  is run (see <xref target="clean-for-dtd"/>).
</t>
<t>
  Furthermore, documents can contain code that might need to be marked as "code
  component" (<eref target="http://www.ietf.org/iesg/statement/copyright.html"/>).
  This can be done using "x:is-code-component".
</t>
<t>
  Finally, when allowing pretty-printing of code (see "html-pretty-print" in
  <xref target="extension.pis"/>, the "x:lang" attribute can used to explicitly
  opt into pretty-printing. If the pretty printer can figure out the code
  type without assistance, an empty value will be sufficient. Otherwise,
  the language can be specified in the attribute (such as "html"), which 
  will in turn be coded into the CSS class as "lang-" concatenated with the
  language name.
</t>
</section>

<section title="Extensions to &lt;date&gt; element" anchor="ext-rfc2629.date">
<t>
  The attribute "x:include-day" ("true", "false") can be used to control whether the day-of-month
  should be included in the output. This can be used to adjust the rendering
  of dates for April-1st-RFCs to the desired special format, including the "1".
</t>
<t>
  In particular: on the front page, the attribute defaults to "true", <em>unless</em>
  when generating RFCs. The output format also varies depending on RFC-ness: it's
  "day month year" for RFCs, but "month day, year" otherwise. In references, the
  attribute defaults to "false", and when set to true, the day is just inserted
  in front of the month.
</t>
<t>
  Furthermore, this implementation supports the extension discussed in
  in <xref target="V3IMPNOTES" x:fmt="of" x:sec="4.1.3.2"/>: in absence
  of any attributes, a "vague" date can be given as text content (this also
  applies to the case where &lt;date&gt; appears below a &lt;reference&gt;
  element).
</t>
</section>

<section title="Extensions to &lt;eref&gt; element" anchor="ext-rfc2629.eref">
<t>
  For v3 documents, angle brackets will only be produced if the attribute
  "brackets" is set to "angle".
</t>
</section>

<section title="Extensions to &lt;iref&gt; element" anchor="ext-rfc2629.iref">
<t>
  The extension attribute below is allowed on the standard &lt;iref&gt; element:
  <list style="symbols">
    <t>x:for-anchor specifies that the &lt;iref&gt; will also be automatically
    inserted whenever the specified anchor is cross-referenced -- this may
    save entering lots of &lt;iref&gt; instances. As a special case, a value of
    "" (empty string) refers to the anchor attribute of the closest ancestor.</t>
  </list>
</t>
</section>

<section title="Extensions to &lt;list&gt; element" anchor="ext-rfc2629.list">
<t>
  The extension attribute below is allowed on the standard &lt;list&gt; element:
  <list style="symbols">
    <t>x:indent specifies the amount of indentation for list items in hanging
    lists. This can be useful when the output format, such as XSL-FO, does not
    support automatical formatting. The value takes an XSL-FO width, such as "5em".
    The default is <em>length of longest label in characters</em> times
    <em>0.8em</em>.</t>
  </list>
</t>
<t>
  Also, the &lt;list&gt; element can take &lt;x:<x:ref>lt</x:ref>&gt; child elements instead of
  &lt;t&gt;, allowing to insert multiple paragraphs into a single list item.
</t>
</section>

<section title="Extensions to &lt;rfc&gt; element" anchor="ext-rfc2629.rfc">
<t>
  The extension attributes below are allowed on the standard &lt;rfc&gt; element:
  <list style="symbols">
    <t>grddl:transformation can be used to reference a GRDDL transform.</t>
    <t>x:maturity-level can be used to specify the IETF Standards Track
    Maturity Level of "proposed", "draft" or "internet" (see <xref target="RFC2026" x:fmt="of" x:sec="4.1"/>).</t>
  </list>
</t>
</section>

<section title="Extensions to &lt;section&gt; element" anchor="ext-rfc2629.section">
<t>
  The extension attribute below is allowed on the standard &lt;list&gt; element:
  <list style="symbols">
    <t>x:fixed-section-number can be used to specify a fixed section number.
    This can be useful when formatting historic documents that used a different
    numbering style.</t>
  </list>
</t>
</section>

<section title="Extensions to &lt;xref&gt; element" anchor="ext-rfc2629.xref">
<t>
  Four extension attributes are allowed on the standard &lt;xref&gt; element:
  <list style="numbers">
    <t>x:sec can be specified to point to a specific section of the referenced document,</t>
    <t>x:rel may specify a relative reference to use when linking into the referenced document (if linking by section number is not available),</t>
    <t>x:fmt defines the text format to be used,</t>
    <t>x:title provided a title for the link (to be used in the HTML title attribute).</t>
  </list>
</t>
<t>
  The following formats are defined for the x:fmt attribute:
</t>
<dl>
  <dt>
    <tt>,</tt> (Comma)
  </dt>
  <dd>
      [<em>reference</em>], Section <em>sec</em>
  </dd>
  <dt>
    <tt>()</tt>
  </dt>
  <dd>
    [<em>reference</em>] (Section <em>sec</em>)
  </dd>
  <dt>
    <tt>of</tt>
  </dt>
  <dd>
    Section <em>sec</em> of [<em>reference</em>]
  </dd>
  <dt>
    <tt>number</tt>
  </dt>
  <dd>
    <em>sec</em>
  </dd>
  <dt>
    <tt>none</tt>
  </dt>
  <dd>
    No output (can be used to have xrefs to references without
    having them rendered as such)
  </dd>
  <dt>
    <tt>sec</tt>
  </dt>
  <dd>
    Section <em>sec</em>
  </dd>
</dl>
<t>
  These extensions are currently only supported for &lt;xref&gt; elements without
  child nodes.
</t>
<t>
  If the processor knows how to reference the target section, it will generate
  a link directly to the target section, such as in <xref target="RFC2119" x:fmt="," x:sec="5"/>.
</t>
</section>

</section>

<section title="Experimental Support for RFC7991bis Vocabulary" anchor="v3">
<t>
  <tt>rfc2629.xslt</tt> experimentally supports some 
  elements from the "V3" vocabulary, defined in 
  <xref target="RFC7991bis"/>. <em>This support is experimental, as
  the "v3" vocabulary is still being developed.</em>
</t>

<section title="artset Element" anchor="v3.artset">
  <iref item="V3 Extension Elements" subitem="artset" primary="true"/>
  <iref item="artset V3 Extension Element" primary="true"/>
<t>
  See <xref target="V3IMPNOTES" x:fmt="of" x:sec="3.1.1"/>.
</t>
</section>

<section title="aside Element" anchor="v3.aside">
  <iref item="V3 Extension Elements" subitem="aside" primary="true"/>
  <iref item="aside V3 Extension Element" primary="true"/>
<t>
  See <xref target="RFC7991bis" x:fmt="of" x:rel="#element.aside"/>.
</t>
</section>

<section title="bcp14 Element" anchor="v3.bcp14">
  <iref item="V3 Extension Elements" subitem="bcp14" primary="true"/>
  <iref item="bcp14 V3 Extension Element" primary="true"/>
<t>
  See <xref target="RFC7991bis" x:fmt="of" x:rel="#element.bcp14"/>.
</t>
</section>

<section title="blockquote Element" anchor="v3.blockquote">
  <iref item="V3 Extension Elements" subitem="blockquote" primary="true"/>
  <iref item="blockquote V3 Extension Element" primary="true"/>
<t>
  See <xref target="RFC7991bis" x:fmt="of" x:rel="#element.blockquote"/>.
</t>
</section>

<section title="boilerplate Element" anchor="v3.boilerplate">
  <iref item="V3 Extension Elements" subitem="boilerplate" primary="true"/>
  <iref item="boilerplate V3 Extension Element" primary="true"/>
<t>
  See <xref target="RFC7991bis" x:fmt="of" x:rel="#element.blockquote"/>.
</t>
</section>

<section title="br Element" anchor="v3.br">
  <iref item="V3 Extension Elements" subitem="br" primary="true"/>
  <iref item="br V3 Extension Element" primary="true"/>
<t>
  <cref>TBD.</cref>
</t>
</section>

<section title="cityarea Element" anchor="v3.cityarea">
  <iref item="V3 Extension Elements" subitem="cityarea" primary="true"/>
  <iref item="cityarea V3 Extension Element" primary="true"/>
<t>
  See <xref target="V3IMPNOTES" x:fmt="of" x:sec="4.2.7"/>.
</t>
</section>

<section title="contact Element" anchor="v3.contact">
  <iref item="V3 Extension Elements" subitem="contact" primary="true"/>
  <iref item="contact V3 Extension Element" primary="true"/>
<t>
  Can be used to embed contact information in a layout <em>similar</em>
  to the one used for authors; mainly for use in a "Contributors" section.
</t>
<t>
  When used in phrase content, only the name or the organization (absent a name)
  will be displayed.
</t>
</section>

<section title="displayreference Element" anchor="v3.displayreference">
  <iref item="V3 Extension Elements" subitem="displayreference" primary="true"/>
  <iref item="displayreference V3 Extension Element" primary="true"/>
<t>
  See <xref target="RFC7991bis" x:fmt="of" x:rel="#element.displayreference"/>.
</t>
</section>

<section title="dd Element" anchor="v3.dd">
  <iref item="V3 Extension Elements" subitem="dd" primary="true"/>
  <iref item="dd V3 Extension Element" primary="true"/>
<t>
  See <xref target="RFC7991bis" x:fmt="of" x:rel="#element.dd"/>.
</t>
</section>

<section title="dl Element" anchor="v3.dl">
  <iref item="V3 Extension Elements" subitem="dl" primary="true"/>
  <iref item="dl V3 Extension Element" primary="true"/>
<t>
  See <xref target="RFC7991bis" x:fmt="of" x:rel="#element.dl"/>.
</t>
</section>

<section title="dt Element" anchor="v3.dt">
  <iref item="V3 Extension Elements" subitem="dt" primary="true"/>
  <iref item="dt V3 Extension Element" primary="true"/>
<t>
  See <xref target="RFC7991bis" x:fmt="of" x:rel="#element.dt"/>.
</t>
</section>

<section title="em Element" anchor="v3.em">
  <iref item="V3 Extension Elements" subitem="em" primary="true"/>
  <iref item="em V3 Extension Element" primary="true"/>
<t>
  See <xref target="RFC7991bis" x:fmt="of" x:rel="#element.em"/>.
</t>
</section>

<section title="extaddr Element" anchor="v3.extaddr">
  <iref item="V3 Extension Elements" subitem="extaddr" primary="true"/>
  <iref item="extaddr V3 Extension Element" primary="true"/>
<t>
  See <xref target="V3IMPNOTES" x:fmt="of" x:sec="4.2.7"/>.
</t>
</section>

<section title="li Element" anchor="v3.li">
  <iref item="V3 Extension Elements" subitem="li" primary="true"/>
  <iref item="li V3 Extension Element" primary="true"/>
<t>
  See <xref target="RFC7991bis" x:fmt="of" x:rel="#element.li"/>.
</t>
</section>

<section title="link Element" anchor="v3.link">
  <iref item="V3 Extension Elements" subitem="link" primary="true"/>
  <iref item="link V3 Extension Element" primary="true"/>
<t>
  See <xref target="RFC7991bis" x:fmt="of" x:rel="#element.link"/>.
</t>
</section>

<section title="name Element" anchor="v3.name">
  <iref item="V3 Extension Elements" subitem="name" primary="true"/>
  <iref item="name V3 Extension Element" primary="true"/>
<t>
  See <xref target="RFC7991bis" x:fmt="of" x:rel="#element.name"/>.
  <em>Currently only supported inside &lt;references&gt; and &lt;section&gt;</em>.
</t>
</section>

<section title="ol Element" anchor="v3.ol">
  <iref item="V3 Extension Elements" subitem="ol" primary="true"/>
  <iref item="ol V3 Extension Element" primary="true"/>
<t>
  See <xref target="RFC7991bis" x:fmt="of" x:rel="#element.ol"/>.
</t>
</section>

<section title="pobox Element" anchor="v3.pobox">
  <iref item="V3 Extension Elements" subitem="pobox" primary="true"/>
  <iref item="pobox V3 Extension Element" primary="true"/>
<t>
  See <xref target="V3IMPNOTES" x:fmt="of" x:sec="4.2.7"/>.
</t>
</section>

<section title="postalLine Element" anchor="v3.postalLine">
  <iref item="V3 Extension Elements" subitem="postalLine" primary="true"/>
  <iref item="postalLine V3 Extension Element" primary="true"/>
<t>
  See <xref target="RFC7991bis" x:fmt="of" x:rel="#element.postalLine"/>.
</t>
</section>

<section title="refcontent Element" anchor="v3.refcontent">
  <iref item="V3 Extension Elements" subitem="refcontent" primary="true"/>
  <iref item="refcontent V3 Extension Element" primary="true"/>
<t>
  See <xref target="RFC7991bis" x:fmt="of" x:rel="#element.refcontent"/>.
</t>
</section>

<section title="Extensions to reference Element" anchor="v3.reference">
  <iref item="V3 Extension Elements" subitem="reference" primary="true"/>
  <iref item="reference V3 Extension Element" primary="true"/>
<t>
  See <xref target="RFC7991bis" x:fmt="of" x:rel="#element.reference"/>.
</t>

<section title="quoteTitle attribute" anchor="v3.reference.quoteTitle">
<t>
  See <xref target="RFC7991bis-01" x:fmt="of" x:rel="#element.reference.attribute.quoteTitle"/>.
</t>
</section>
</section>

<section title="referencegroup Element" anchor="v3.referencegroup">
  <iref item="V3 Extension Elements" subitem="referencegroup" primary="true"/>
  <iref item="referencegroup V3 Extension Element" primary="true"/>
<t>
  See <xref target="RFC7991bis" x:fmt="of" x:rel="#element.referencegroup"/>.
</t>
</section>

<section title="relref Element" anchor="v3.relref">
  <iref item="V3 Extension Elements" subitem="relref" primary="true"/>
  <iref item="relref V3 Extension Element" primary="true"/>
<t>
  See <xref target="RFC7991bis" x:fmt="of" x:rel="#element.relref"/>.
</t>
<t>
  <em>EXPERIMENTAL, might be removed again - see <eref target="https://github.com/rfc-format/draft-iab-xml2rfc-v3-bis/issues/26"/>.</em>
</t>
</section>

<section title="Extensions to section Element" anchor="v3.section">
  <iref item="V3 Extension Elements" subitem="section" primary="true"/>
  <iref item="section V3 Extension Element" primary="true"/>
<t>
  See <xref target="RFC7991bis" x:fmt="of" x:rel="#element.section"/>.
</t>

<section title="numbered attribute" anchor="v3.section.numbered">
<t>
  See <xref target="RFC7991bis" x:fmt="of" x:rel="#element.section.attribute.numbered"/>.
</t>
</section>

<section title="removeInRFC attribute" anchor="v3.section.removeInRFC">
<t>
  See <xref target="RFC7991bis" x:fmt="of" x:rel="#element.section.attribute.removeInRFC"/>.
</t>
</section>
</section>

<section title="sortingcode Element" anchor="v3.sortingcode">
  <iref item="V3 Extension Elements" subitem="sortingcode" primary="true"/>
  <iref item="sortingcode V3 Extension Element" primary="true"/>
<t>
  See <xref target="V3IMPNOTES" x:fmt="of" x:sec="4.2.7"/>.
</t>
</section>

<section title="sourcecode Element" anchor="v3.sourcecode">
  <iref item="V3 Extension Elements" subitem="sourcecode" primary="true"/>
  <iref item="sourcecode V3 Extension Element" primary="true"/>
<t>
  See <xref target="RFC7991bis" x:fmt="of" x:rel="#element.sourcecode"/>.
</t>
</section>

<section title="strong Element" anchor="v3.strong">
  <iref item="V3 Extension Elements" subitem="strong" primary="true"/>
  <iref item="strong V3 Extension Element" primary="true"/>
<t>
  See <xref target="RFC7991bis" x:fmt="of" x:rel="#element.strong"/>.
</t>
</section>

<section title="sub Element" anchor="v3.sub">
  <iref item="V3 Extension Elements" subitem="sub" primary="true"/>
  <iref item="sub V3 Extension Element" primary="true"/>
<t>
  See <xref target="RFC7991bis" x:fmt="of" x:rel="#element.sub"/>.
</t>
</section>

<section title="sup Element" anchor="v3.sup">
  <iref item="V3 Extension Elements" subitem="sup" primary="true"/>
  <iref item="sup V3 Extension Element" primary="true"/>
<t>
  See <xref target="RFC7991bis" x:fmt="of" x:rel="#element.sup"/>.
</t>
</section>

<section title="svg Element" anchor="v3.svg">
  <iref item="V3 Extension Elements" subitem="svg" primary="true"/>
  <iref item="svg V3 Extension Element" primary="true"/>
<t>
  See <xref target="RFC7991bis" x:fmt="of" x:rel="#element.svg"/>.
</t>
</section>

<section title="table Element" anchor="v3.table">
  <iref item="V3 Extension Elements" subitem="table" primary="true"/>
  <iref item="table V3 Extension Element" primary="true"/>
<t>
  See <xref target="RFC7991bis" x:fmt="of" x:rel="#element.table"/>.
</t>
</section>

<section title="tbody Element" anchor="v3.tbody">
  <iref item="V3 Extension Elements" subitem="tbody" primary="true"/>
  <iref item="tbody V3 Extension Element" primary="true"/>
<t>
  See <xref target="RFC7991bis" x:fmt="of" x:rel="#element.tbody"/>.
</t>
</section>

<section title="td Element" anchor="v3.td">
  <iref item="V3 Extension Elements" subitem="td" primary="true"/>
  <iref item="td V3 Extension Element" primary="true"/>
<t>
  See <xref target="RFC7991bis" x:fmt="of" x:rel="#element.td"/>.
</t>
</section>

<section title="tfoot Element" anchor="v3.tfoot">
  <iref item="V3 Extension Elements" subitem="tfoot" primary="true"/>
  <iref item="tfoot V3 Extension Element" primary="true"/>
<t>
  See <xref target="RFC7991bis" x:fmt="of" x:rel="#element.tfoot"/>.
</t>
</section>

<section title="th Element" anchor="v3.th">
  <iref item="V3 Extension Elements" subitem="th" primary="true"/>
  <iref item="th V3 Extension Element" primary="true"/>
<t>
  See <xref target="RFC7991bis" x:fmt="of" x:rel="#element.th"/>.
</t>
</section>

<section title="thead Element" anchor="v3.thead">
  <iref item="V3 Extension Elements" subitem="thead" primary="true"/>
  <iref item="thead V3 Extension Element" primary="true"/>
<t>
  See <xref target="RFC7991bis" x:fmt="of" x:rel="#element.thead"/>.
</t>
</section>

<section title="tr Element" anchor="v3.tr">
  <iref item="V3 Extension Elements" subitem="tr" primary="true"/>
  <iref item="tr V3 Extension Element" primary="true"/>
<t>
  See <xref target="RFC7991bis" x:fmt="of" x:rel="#element.tr"/>.
</t>
</section>

<section title="tt Element" anchor="v3.tt">
  <iref item="V3 Extension Elements" subitem="tt" primary="true"/>
  <iref item="tt V3 Extension Element" primary="true"/>
<t>
  See <xref target="RFC7991bis" x:fmt="of" x:rel="#element.tt"/>.
</t>
</section>

<section title="u Element" anchor="v3.u">
  <iref item="V3 Extension Elements" subitem="u" primary="true"/>
  <iref item="u V3 Extension Element" primary="true"/>
<t>
  See <xref target="V3IMPNOTES" x:fmt="of" x:sec="A.1"/>.
</t>
<t>
  Note that in this implementation, this element needs mapping information
  in two cases:
</t>
<ol>
  <li>When in XSLT 1.0: to compute the Unicode code point of a given character
  (when non-ASCII),</li>
  <li>In any case: to lookup the Unicode name of a character.</li>
</ol>
<t>
  The mapping information can be supplied inline using the &lt;x:u-map>
  element, or in an external file. See <xref target="ext.element.u-map"/>
  for details.
</t>
</section>

<section title="ul Element" anchor="v3.ul">
  <iref item="V3 Extension Elements" subitem="ul" primary="true"/>
  <iref item="ul V3 Extension Element" primary="true"/>
<t>
  See <xref target="RFC7991bis" x:fmt="of" x:rel="#element.ul"/>.
</t>
</section>

<section title="Extensions to xref Element" anchor="v3.xref">
  <iref item="V3 Extension Elements" subitem="xref" primary="true"/>
  <iref item="xref V3 Extension Element" primary="true"/>

<section title="relative attribute" anchor="v3.xref.relative">
<t>
  See <xref target="ext-rfc2629.xref"/>, "x:rel" attribute.
</t>
</section>

<section title="section attribute" anchor="v3.xref.section">
<t>
  See <xref target="ext-rfc2629.xref"/>, "x:sec" attribute.
</t>
</section>

<section title="sectionFormat attribute" anchor="v3.xref.sectionFormat">
<t>
  See <xref target="ext-rfc2629.xref"/>, "x:fmt" attribute, where
  "bare" maps to "sec", "comma" maps to ",", "of" maps to "of", and "parens"
  maps to "()".
</t>
</section>
</section>

<section title="xi:include Element" anchor="v3.xi-include">
  <iref item="V3 Extension Elements" subitem="xi:include" primary="true"/>
  <iref item="xi:include V3 Extension Element" primary="true"/>
<t>
  See <xref target="RFC7991bis" x:fmt="of" x:rel="#includingexternal"/>.
</t>
<t>
  <em>EXPERIMENTAL and INCOMPLETE - only supported as a child element of &lt;references>, and only supporting parse type "XML".</em>
</t>
</section>

</section>

<section title="Utilities" anchor="utilities">

<section title="Checking References" anchor="checking-references">
<t>
  <tt>check-references.xslt</tt> can be used to check
  all references to RFC- and ID-series IETF publications and to W3C publications (note
  this script requires local copies of
  <eref target="ftp://ftp.isi.edu/in-notes/rfc-index.xml"/> and
  <eref target="http://www.w3.org/2002/01/tr-automation/tr.rdf"/> and
  will use the XML status information provided at <eref target="http://tools.ietf.org/"/>).
</t>
<t>
  If the document is supposed to be published on the IETF standards track,
  the desired level can be specified using the parameter <tt>intended-level</tt>
  as 'proposed', 'draft' or 'internet'. Alternatively, it can be specified
  inside the document using the attribute x:maturity-level on the &lt;rfc> element
  (see <xref target="ext-rfc2629.rfc"/>).
</t>
<t>
  <x:h>Note:</x:h> Downward references should be
  annotated using the &lt;annotate> element, containing an &lt;xref> to
  <xref target="BCP97"/>.
</t>
<t>
  When an XSLT 2.0 processor is used, links in the document can be checked as well
  using the <tt>link-check</tt> parameter ('yes' or 'no').
  Note that this only works for http links to documents of type text/*.
</t>
<figure>
<preamble>
For instance, as of 2008-07-12, the script produces for <eref target="https://greenbytes.de/tech/webdav/rfc2518.xml"/>:
</preamble>
<artwork type="example">
> saxon rfc2518.xml check-references.xslt intended-status=PROPOSED \
  link-check=yes

Normative References:
ISO-11578: not checked
ISO-639: not checked
ISO-8601: not checked
REC-xml-19980210: [FirstEdition] obsoleted by REC-xml-20001006
REC-xml-names-19990114: [FirstEdition] obsoleted by
 REC-xml-names-20060816
RFC1766: [PROPOSED STANDARD] obsoleted by RFC3066 RFC3282
RFC2068: [PROPOSED STANDARD] obsoleted by RFC2616
RFC2069: [PROPOSED STANDARD] obsoleted by RFC2617
RFC2119: [BEST CURRENT PRACTICE] (-> BCP0014) ok
RFC2141: [PROPOSED STANDARD] ok
RFC2277: [BEST CURRENT PRACTICE] (-> BCP0018) ok
RFC2396: [DRAFT STANDARD] obsoleted by RFC3986
RFC2279: [DRAFT STANDARD] obsoleted by RFC3629

Informational References:
REC-PICS-labels-961031: [REC] ok
RFC1807: [INFORMATIONAL] ok
RFC2026: [BEST CURRENT PRACTICE] (-> BCP0009) ok
RFC2291: [INFORMATIONAL] ok
RFC2376: [INFORMATIONAL] obsoleted by RFC3023
RFC2413: [INFORMATIONAL] obsoleted by RFC5013
USMARC: not checked
WF: not checked

Link Targets
&lt;http://www.w3.org/TR/1998/REC-xml-19980210>: ok
&lt;http://www.w3.org/TR/1999/REC-xml-names-19990114>: ok
&lt;http://www.dlib.org/dlib/july96/lagoze/07lagoze.html>: ok
&lt;http://www.w3.org/pub/WWW/TR/REC-PICS-labels-961031.html>: ok
</artwork></figure>
<t>
  Recognized formats in the &lt;seriesInfo> element are:
  <list style="symbols">
    <t>for RFCs, the name attribute must be "RFC", and the value attribute must
    be the number of the RFC,</t>
    <t>for Internet Drafs, the name attribute must be "ID" or "Internet-Draft", and the value attribute must
    be the file name of the draft (including the two-digit running number, but excluding a file extension),</t>
    <t>for W3C documents, the name attribute must be "W3C", must start with "W3C&#160;", or
    must start with "World Wide Web Consortium&#160;", and the value attribute
    must be the "shorthand" name of the specification, such as "REC-xml-19980210".</t>
  </list>
</t>
<x:note>
<t>
  <x:h>Note:</x:h> this stylesheet will need network access to check links and
  status of Internet Drafts. When running a Java-based XSLT engine, you may have
  to supply Java system properties specifying the HTTP proxy to be used, such
  as "-Dhttp.proxyHost=hostname -Dhttp.proxyPort=80".
</t>
</x:note>

</section>

<section title="Generating Graphs from References">
<t>
  <tt>gen-reference-graph.xslt</tt> generates a graph
  of RFC dependencies, using the same base data as in <tt>check-references.xslt</tt>
  (see <xref target="checking-references"/>). Its output is a "dot" file,
  to be processed by GraphViz (see <eref target="http://www.graphviz.org/"/>).
</t>
<figure>
<preamble>
The picture below shows the RFC dependencies in RFC2629.
</preamble>
<artwork src="rfc2629xslt-fig2.png" type="image/png">
(PNG output obtained from GraphViz)
</artwork>
</figure>
</section>

<section title="Producing reference entries for books">
<t>
  <tt>amazon-asin.xslt</tt> uses the Amazon web services
  to generate a &lt;reference> element for a given ASIN (ISBN).
</t>
<figure>
<preamble>For instance:</preamble>
<artwork type="example" x:lang="">
&lt;?xml version="1.0" encoding="utf-8"?>
&lt;references>
 &lt;reference target="urn:isbn:0134516591">
   &lt;front>
     &lt;title>Simple Book, The: An Introduction to Internet Management,
               Revised Second Edition&lt;/title>
     &lt;author surname="Rose"
                fullname="Marshall T. Rose" initials="M. T. ">
       &lt;organization/>
     &lt;/author>
     &lt;author surname="Marshall"
                fullname="Rose T. Marshall" initials="R. T.">
       &lt;organization/>
     &lt;/author>
     &lt;date year="1996" month="March"/>
   &lt;/front>
   &lt;seriesInfo name="Prentice Hall" value=""/>
 &lt;/reference>
&lt;/references>
</artwork></figure>
<t>
  Note that the resulting XML usually requires checking, in this case Amazon's
  database is playing tricks with Marshall's name...
</t>
</section>

<section title="Down-converting to RFC 7749 Grammar" anchor="clean-for-dtd">
<t>
  <tt>clean-for-DTD.xslt</tt> can be used to down-convert
  some extensions to a format that is supported by the existing xml2rfc
  formatters, mainly for the purpose of generating plain-text output.
  Note that these extensions are experimental (feedback
  appreciated).
</t>
<t>
  The following mappings are done:
  <list style="symbols">
    <t>
      &lt;iref> elements inside &lt;artwork> elements are moved in front
      of the enclosing &lt;figure> element.
    </t>
    <t>
      &lt;xref> elements inside &lt;artwork> are expanded just like in
      regular text (that is, the markup is stripped, but the element
      is replaced by the applicable replacement text).
    </t>
    <t>
      &lt;x:<x:ref>anchor-alias</x:ref>> elements get stripped. 
    </t>
    <t>
      &lt;x:<x:ref>bcp14</x:ref>> elements get stripped. 
    </t>
    <t>
      &lt;x:<x:ref>bb</x:ref>>, &lt;x:<x:ref>bc</x:ref>> and &lt;x:<x:ref>bt</x:ref>> elements get stripped. 
    </t>
    <t>
      &lt;x:<x:ref>blockquote</x:ref>> elements get converted to
      indented text (through a &lt;list> element).
    </t>
    <t>
      &lt;x:<x:ref>dfn</x:ref>> elements get stripped. 
    </t>
    <t>
      &lt;x:<x:ref>h</x:ref>> elements get stripped. 
    </t>
    <t>
      &lt;x:<x:ref>link</x:ref>> elements get stripped. 
    </t>
    <t>
      &lt;x:<x:ref>lt</x:ref>> elements get collapsed into a single &lt;lt>
      element with added &lt;vspace> added to simulate paragraph breaks. 
    </t>
    <t>
      &lt;x:<x:ref>note</x:ref>> elements get converted to
      indented text (through a &lt;list> element).
    </t>
    <t>
      &lt;x:<x:ref>q</x:ref>> elements get stripped, with apostrophes
      added around the text. 
    </t>
    <t>
      &lt;x:<x:ref>prose</x:ref>> elements are transformed into
      &lt;seriesInfo> elements (which is an abuse of the element and only
      a workaround until xml2rfc gets a matching extension).
    </t>
    <t>
      &lt;x:<x:ref>ref</x:ref>> elements get replaced by &lt;xref>
      elements, targetting either the anchor or another anchor with
      matching &lt;x:<x:ref>anchor-alias</x:ref>> child element.
    </t>
  </list>
</t>
<aside>
  <t>
    <strong>Note:</strong> the above list is known to be incomplete and needs work.
    For instance, most of the extensions described in <xref target="v3"/>
    get some mapping as well.
  </t>
</aside>
<t>
  As the output formatters evolve to support the V3 format (proposed in
  <xref target="RFC7991bis"/>), <tt>clean-for-DTD.xslt</tt> will start taking
  advantage of these changes. Right now, it supports three modes,
  one of which being used for the historic TCL processor, and the other ones being used with
  <tt>xml2rfc 2.5.2</tt> and <tt>xml2rfc 2.6.0</tt> (see <eref target="https://pypi.python.org/pypi/xml2rfc/">https://pypi.python.org/pypi/xml2rfc/</eref>).
</t>
<t>
  The modes can be selected using the <tt>xml2rfc-ext-xml2rfc-backend</tt>
  parameter or the <tt>rfc-ext/xml2rfc-backend</tt> processing instruction.
  The default mode is "201610" for documents with a publication date between January and May 2017,
  "201706" for documents newer than May 2017, and "201510" otherwise:
</t>
<dl>
  <dt><em>201510</em></dt>
  <dd>For <tt>xml2rfc.tcl</tt> and versions of the Python formatter before version 2.5.2.</dd>
  <dt><em>201610</em></dt>
  <dd>Maps the V3 extension for unnumbered section numbers to something the 2.5.2 version of the Python formatter understands (but note <eref target="https://trac.tools.ietf.org/tools/xml2rfc/trac/ticket/313">https://trac.tools.ietf.org/tools/xml2rfc/trac/ticket/313</eref>).</dd>
  <dt><em>201706</em></dt>
  <dd>Copies the V3 extension for unnumbered section numbers to the output.</dd>
</dl>
</section>

<section title="Extracting artwork" anchor="extract-artwork">
<t>
  With <tt>extract-artwork.xslt</tt>, artwork elements
  named through the "name" attribute can be extracted. This can be used
  to automatically check their syntax (for instance, when ABNFs appear
  within a figure element).
</t>
<figure><preamble>For instance:</preamble>
<artwork type="example">saxon rfc3986.xml extract-artwork.xslt name=uri.abnf
</artwork>
</figure>
<t>
  In addition, artwork of a specific type can be extracted, such as with:
</t>
<figure>
<artwork type="example">saxon rfc3986.xml extract-artwork.xslt type=abnf
</artwork>
</figure>
<t>
  When extracting by type, artwork elements with a specified name can be
  excluded; this can be handy when the document uses some kind of schema
  language, and an appendix contains the collected schema, repeating definitions
  from earlier on. Example:
</t>
<figure><artwork type="example">saxon rfc3986.xml extract-artwork.xslt type=abnf except-name=clschm
</artwork></figure>
</section>

<section title="GRRDL" anchor="grddl">
<t>
  <tt>rfc2629grddl.xslt</tt> extracts RDF
  information. This is experimental work-in-progress. See 
  <eref target="http://www.w3.org/TR/grddl/"/> for more information.
</t>
</section>

<section title="HTML Live Refresh" anchor="html.live.refresh">
<t>
  <em>Experimental</em>
</t>
<t>
  The "HTML Live Refresh" mode allows to run a text editor and a browser
  side-by-side, with the browser auto-updating every few seconds, displaying
  the updated HTML, and automatically navigating to the part of the page that
  changed last.
</t>
<t anchor="html.live.refresh.requirements">
  The requirements for this mode are:
</t>
<ol>
  <li>
    A browser that supports the <tt>DOMParser</tt>
    and <tt>XSLTProcessor</tt> APIs.
  </li>
  <li>
    The ability to reload the source code and the XSLT code from within
    Javascript; in some browsers this is forbidden for "file:" URIs due to
    perceived security problems.
  </li>
</ol>
<t>
  This feature is currently tested with:
</t>
<ol>
  <li>Mozilla Firefox (where, to be able to reload from the local filesystem, Firefox
  needs to be configured with <tt>security.fileuri.strict_origin_policy</tt> set to
  <tt>false</tt> in <tt>about:config</tt>, see
  <eref target="https://developer.mozilla.org/en-US/docs/Archive/Misc_top_level/Same-origin_policy_for_file:_URIs">Mozilla documentation</eref>), and</li>
  <li>Google Chome (where, to be able to reload from the local filesystem, Chrome
  needs to be started with the command line option <tt>--allow-file-access-from-files</tt>).</li>
</ol>  
<t>
  Use of this feature requires the inclusion of a processing instruction that 
  holds the name of the XML source, such as:
</t>
<figure><artwork type="example" x:lang="">
&lt;?rfc-ext refresh-from="draft-foo-bar-00.xml"?>
</artwork></figure>
<t>
  The optional parameters <tt>refresh-interval</tt>
  and <tt>refresh-xslt</tt> support changing the
  refresh interval (in seconds, defaulting to 10), and the name of the XSLT
  file to use (defaulting to "rfc2629.xslt").
</t>
<figure>
<preamble>
  To test this feature, start with a minimal source file like this:
</preamble>
<artwork type="example" x:lang="">
&lt;?xml-stylesheet type='text/xsl' href='rfc2629.xslt'?>
&lt;?rfc-ext refresh-from="draft-foo-bar-00.xml"?> 
&lt;rfc docName="draft-foo-bar-00" ipr="trust200902">
  &lt;front>
    &lt;title>Title Goes Here&lt;/title>
    &lt;abstract>
      &lt;t>Abstract&lt;/t>
    &lt;/abstract>
  &lt;/front>
&lt;/rfc></artwork>
<postamble>
...open it in both text editor and browser, start editing and of course
ocasionally save. And don't forget to put <tt>rfc2629.xslt</tt> into the same
folder.
</postamble>
</figure>
</section>

<section title="Refreshing included material in the XML source" anchor="refreshing.inclusions">
<t>
  There are many methods for automatic inclusion of material in the XML source,
  such as the "include" processing instruction<iref item="include PI pseudo-attribute"/><iref item="Processing Instruction pseudo attributes" subitem="include"/>
  (see <xref target="supported.pis"/>), external entities (<xref target="examples.internalsubset"/>), or XInclude.
  In general, those share a common problem: the XML source file isn't
  self-contained, which makes it harder to submit it as Internet Draft.
</t>
<t>
  The tool <tt>refresh-inclusions.sh</tt> does in-place replacement: it
  scans the source file for inclusion directives (expressed as XML
  processing instructions), and refreshes the included text with data
  from an external file. It will not modify the source file unless included
  material did actually change. When it does modify the source file, it
  will copy the original source to a backup file.
</t>
<t>
  <tt>refresh-inclusions.sh</tt> can include both plain text (<tt>BEGINESCAPEDINC</tt>/<tt>ENDESCAPEDINC</tt>) and 
  XML (<tt>BEGININC</tt>/<tt>ENDINC</tt>). The figure below was inserted
  using:
</t>
<figure><artwork type="example" x:lang="">
&lt;?BEGINESCAPEDINC refresh-inclusions.sh ?>
...
&lt;?ENDSCAPEDINC refresh-inclusions.sh ?>
</artwork>
<postamble>(note that the SP character at the end of the directive is significant)</postamble>
</figure>
<figure>
<preamble><tt>refresh-inclusions.sh</tt>:</preamble>
<artwork name="refresh-inclusions.sh" x:lang="">
<?BEGINESCAPEDINC refresh-inclusions.sh ?>
#!/bin/sh
# Refresh file inclusions based on XML processing instructions
#
# Copyright (c) 2006-2023, Julian Reschke (julian.reschke@greenbytes.de)
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
#   this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
#   this list of conditions and the following disclaimer in the documentation
#   and/or other materials provided with the distribution.
# * Neither the name of Julian Reschke nor the names of its contributors
#   may be used to endorse or promote products derived from this software
#   without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.

expand() {

  # remember whether we started with CRLF (assumes that we have dos2unix)
  CRLF=$(dos2unix -ic "$1" 2>/dev/null | tr -d ' ')

  cat "$1" | tr -d "\015" | awk '

  function filecontents(filename) {
    while (getline &lt; filename > 0) {
      fc[filename] = fc[filename] $0 "\n"
    }
    return fc[filename]
  }

  BEGIN {
    includefile = "";
    includeescapedfile = "";
  }

  # start include (verbatim mode)
  /&lt;\?BEGININC .* \?>$/ {
    print
    keyword = "&lt;?BEGININC "
    extract = match($0, /&lt;\?BEGININC .* \?>$/)
    includefile = substr($0, RSTART + length(keyword),
                    RLENGTH - 3 - length(keyword))
    output = filecontents(includefile)
    printf("%s", output)
  }

  # start include (escape-for-XML mode)
  /&lt;\?BEGINESCAPEDINC .* \?>$/ {
    print
    keyword = "&lt;?BEGINESCAPEDINC "
    extract = match($0, /&lt;\?BEGINESCAPEDINC .* \?>$/)
    includeescapedfile = substr($0, RSTART + length(keyword),
                           RLENGTH - 3 - length(keyword))
    output = filecontents(includeescapedfile)
    # escape ampersand, less-than, and greater-than
    # when part of a CDATA end marker
    gsub(/&amp;/, "\\&amp;amp;", output)
    gsub(/&lt;/, "\\&amp;lt;", output)
    gsub(/]]&gt;/, "]]\\&amp;gt;", output)
    printf("%s", output)
  }

  # end include (verbatim mode)
  /^&lt;\?ENDINC .* \?>/ {
    if ("" == includefile) {
      printf ("unexpected ENDINC, did not see BEGININC for %s\n",
        $2) >> "/dev/stderr"
    } else if ($2 != includefile) {
      printf ("unexpected ENDINC, got %s but expected %s\n", $2,
        includefile) >> "/dev/stderr"
    }
    includefile = "";
  }

  # end include (escape-for-XML mode)
  /^&lt;\?ENDESCAPEDINC .* \?>/ {
    if ("" == includeescapedfile) {
      printf ("unexpected ENDESCAPEDINC, did not see BEGINESCAPEDINC for %s\n",
        $2) >> "/dev/stderr"
    } else if ($2 != includeescapedfile) {
      printf ("unexpected ENDESCAPEDINC, got %s but expected %s\n", $2,
        includeescapedfile) >> "/dev/stderr"
    }
    includeescapedfile = "";
  }

  #default
  {
    if (includefile == "" &amp;&amp; includeescapedfile == "") {
      print
    }
  }

  END {
    if (includefile != "") {
      printf ("missing ENDINC for %s\n",
        includefile) >> "/dev/stderr"
    }
    if (includeescapedfile != "") {
      printf ("missing ENDESCAPEDINC for %s\n",
        includeescapedfile) >> "/dev/stderr"
    }
  }

  ' > $$

  # restore CRLF if needed
  if [ -n "$CRLF" ]; then
    FNN=$(echo "$1" | tr -d ' ')
    [ "$FNN" = "$CRLF" ] &amp;&amp; unix2dos -q $$
  fi

  # check for changes
  cmp -s "$1" $$ || (
    cp -v "$1" "$1".ri.bak
    cp $$ "$1"
    echo "$1" updated )

  rm -f $$
}

[ $# -ne 0 ] || ( echo "refresh-inclusions.sh file..." >&amp;2 ; exit 2 )

for i in $*
do
  expand $i
done
<?ENDESCAPEDINC refresh-inclusions.sh ?>
</artwork></figure>
</section>

</section>

  

</middle>

<back>
<references title="Informative References">

<reference anchor='RFC2026'>
  <front>
    <title abbrev='Internet Standards Process'>The Internet Standards Process -- Revision 3</title>
    <author initials='S.' surname='Bradner' fullname='Scott O. Bradner'>
      <organization>Harvard University</organization>
      <address>
        <email>sob@harvard.edu</email>
      </address>
    </author>
    <date year='1996' month='October' />
  </front>
  <seriesInfo name='BCP' value='9' />
  <seriesInfo name='RFC' value='2026' />
</reference>

<reference anchor="RFC2045">
  <front>
  <title abbrev="Internet Message Bodies">Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies</title>
  <author initials="N." surname="Freed" fullname="Ned Freed">
  <organization>Innosoft International, Inc.</organization>
  </author>
  <author initials="N.S." surname="Borenstein" fullname="Nathaniel S. Borenstein">
  <organization>First Virtual Holdings</organization>
  </author>
  <date month="November" year="1996"/>
  </front>
  <seriesInfo name="RFC" value="2045"/>
</reference>

<reference anchor="RFC2119">
  <front>
    <title abbrev="RFC Key Words">Key words for use in RFCs to Indicate Requirement Levels</title>
    <author initials="S." surname="Bradner" fullname="Scott Bradner">
      <organization>Harvard University</organization>
      <address>
        <email>sob@harvard.edu</email>
      </address>
    </author>
    <date month="March" year="1997"/>
  </front>
  <seriesInfo name="BCP" value="14"/>
  <seriesInfo name="RFC" value="2119"/>
</reference>

<reference anchor="RFC2616">
  <front>
  <title abbrev="HTTP/1.1">Hypertext Transfer Protocol -- HTTP/1.1</title>
  <author initials="R.T." surname="Fielding" fullname="Roy T. Fielding">
  <organization>University of California, Irvine, Information and Computer Science</organization>
  <address>
  <phone>+1 949 824 1715</phone>
  <email>fielding@ics.uci.edu</email></address></author>
  <author initials="J." surname="Gettys" fullname="James Gettys">
  <organization>World Wide Web Consortium, MIT Laboratory for Computer Science</organization>
  <address>
  <phone/>
  <facsimile>+1 617 258 8682</facsimile>
  <email>jg@w3.org</email></address></author>
  <author initials="J.C." surname="Mogul" fullname="Jeffrey C. Mogul">
  <organization>Compaq Computer Corporation, Western Research Laboratory</organization>
  <address>
  <phone/>
  <email>mogul@wrl.dec.com</email></address></author>
  <author initials="H.F." surname="Nielsen" fullname="Henrik Frystyk Nielsen">
  <organization>World Wide Web Consortium, MIT Laboratory for Computer Science</organization>
  <address>
  <phone/>
  <facsimile>+1 617 258 8682</facsimile>
  <email>frystyk@w3.org</email></address></author>
  <author initials="L." surname="Masinter" fullname="Larry Masinter">
  <organization>Xerox Corporation</organization>
  <address>
  <phone/>
  <email>masinter@parc.xerox.com</email></address></author>
  <author initials="P.J." surname="Leach" fullname="Paul J. Leach">
  <organization>Microsoft Corporation</organization>
  <address>
  <phone/>
  <email>paulle@microsoft.com</email></address></author>
  <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
  <organization>World Wide Web Consortium, MIT Laboratory for Computer Science</organization>
  <address>
  <phone>+1 617 258 8682</phone>
  <facsimile/>
  <email>timbl@w3.org</email></address></author>
  <date month="June" year="1999"/>
  </front>
  <seriesInfo name="RFC" value="2616"/>
</reference>

<reference anchor='RFC2629'>
  <front>
    <title>Writing I-Ds and RFCs using XML</title>
    <author initials='M.T.' surname='Rose' fullname='Marshall T. Rose'>
      <organization>Invisible Worlds, Inc.</organization>
      <address>
        <phone>+1 415 695 3975</phone>
        <email>mrose@not.invisible.net</email>
        <uri>http://invisible.net/</uri>
      </address>
    </author>
    <date month='June' year='1999' />
  </front>
  <seriesInfo name='RFC' value='2629' />
</reference>

<reference anchor='RFC2648'>
  <front>
    <title>A URN Namespace for IETF Documents</title>
    <author initials='R.' surname='Moats' fullname='Ryan Moats'>
      <organization>AT&amp;T</organization>
      <address>
      <email>jayhawk@att.com</email></address>
    </author>
    <date month='August' year='1999' />
  </front>
  <seriesInfo name='RFC' value='2648' />
</reference>

<reference anchor='RFC2731'>
  <front>
    <title>Encoding Dublin Core Metadata in HTML</title>
    <author initials='J.A.' surname='Kunze' fullname='John A. Kunze'>
      <organization>University of California, San Francisco,  Center for Knowledge Management</organization>
      <address>
        <facsimile>+1 415 476 4653</facsimile>
        <email>jak@ckm.ucsf.edu</email>
      </address>
    </author>
    <date month='December' year='1999' />
  </front>
  <seriesInfo name='RFC' value='2731' />
</reference>

<reference anchor='DC-HTML' target="http://dublincore.org/documents/2008/08/04/dc-html/">
  <front>
    <title>Expressing Dublin Core metadata using HTML/XHTML meta and link elements</title>
    <author initials='P.' surname='Johnston' fullname='Pete Johnston'>
      <organization>Eduserv Foundation</organization>
      <address>
        <email>pete.johnston@eduserv.org.uk</email>
      </address>
    </author>
    <author initials='A.' surname='Powell' fullname='Andy Powell'>
      <organization>Eduserv Foundation</organization>
      <address>
        <email>andy.powell@eduserv.org.uk</email>
      </address>
    </author>
    <date month='August' year='2008' />
  </front>
  <seriesInfo name='Dublin Core Metadata Initiative' value='' />
</reference>

<reference anchor="RFC5234">
  <front>
    <title abbrev="ABNF for Syntax Specifications">Augmented BNF for Syntax Specifications: ABNF</title>
    <author initials="D." surname="Crocker" fullname="Dave Crocker" role="editor">
      <organization>Brandenburg InternetWorking</organization>
      <address>
      <phone>+1.408.246.8253</phone>
      <email>dcrocker@bbiw.net</email></address>  
    </author>
    <author initials="P." surname="Overell" fullname="Paul Overell">
      <organization>THUS plc.</organization>
      <address>
      <email>paul.overell@thus.net</email></address>
    </author>
    <date month="January" year="2008"/>
  </front>
  <seriesInfo name="STD" value="68"/>
  <seriesInfo name="RFC" value="5234"/>
</reference>

<reference anchor='HTML5'
           target='http://www.w3.org/TR/2014/REC-html5-20141028/'>
  <front>
    <title>HTML5</title>
    <author fullname='Ian Hickson' surname='Hickson' initials='I.'/>
    <author fullname='Robin Berjon' surname='Berjon' initials='R.'/>
    <author fullname='Steve Faulkner' surname='Faulkner' initials='S.'/>
    <author fullname='Travis Leithead' surname='Leithead' initials='T.'/>
    <author fullname='Erika Doyle Navara' surname='Doyle Navara' initials='E.'/>
    <author fullname='Edward O&apos;Connor' surname='O&apos;Connor' initials='E.'/>
    <author fullname='Silvia Pfeiffer' surname='Pfeiffer' initials='S.'/>
    <date year='2014' month='October' day='28'/>
  </front>
  <seriesInfo name='W3C Recommendation' value='REC-html5-20141028'/>
  <annotation>
    Latest version available at
    <eref target='http://www.w3.org/TR/html5/'/>.
  </annotation>
</reference>

<reference anchor='XHTML2'
           target='http://www.w3.org/TR/2010/NOTE-xhtml2-20101216'>
  <front>
    <title>XHTML(tm) 2.0</title>
    <author fullname='Mark Birbeck' surname='Birbeck' initials='M.'/>
    <author fullname='Markus Gylling' surname='Gylling' initials='M.'/>
    <author fullname='Shane McCarron' surname='McCarron' initials='S.'/>
    <author fullname='Steven Pemberton' surname='Pemberton' initials='S.'/>
    <author fullname='Jonny Axelsson' surname='Axelsson' initials='J.'/>
    <author fullname='Micah Dubinko' surname='Dubinko' initials='M.'/>
    <author fullname='Beth Epperson' surname='Epperson' initials='B.'/>
    <author fullname='Masayasu Ishikawa' surname='Ishikawa' initials='M.'/>
    <author fullname='Ann Navarro' surname='Navarro' initials='A.'/>
    <date year='2010' month='December' day='16'/>
  </front>
  <seriesInfo name='W3C Group Note' value='NOTE-xhtml2-20101216'/>
  <annotation>
    Latest version available at
    <eref target='http://www.w3.org/TR/xhtml2'/>.
  </annotation>
</reference>

<reference anchor='XSL-FO'
           target='http://www.w3.org/TR/2006/REC-xsl11-20061205/'>
  <front>
    <title>Extensible Stylesheet Language (XSL) Version 1.1</title>
    <author fullname='Anders Berglund' surname='Berglund' initials='A.'/>
    <date year='2006' month='December' day='05'/>
  </front>
  <seriesInfo name='W3C Recommendation' value='REC-xsl11-20061205'/>
  <annotation>
    Latest version available at
    <eref target='http://www.w3.org/TR/xsl11/'/>.
  </annotation>
</reference>

<reference anchor="RNC" target="http://www.oasis-open.org/committees/relax-ng/compact-20021121.html">
  <front>
    <title>RELAX NG Compact Syntax</title>
    <author initials="J." surname="Clark" fullname="James Clark">
      <organization/>
      <address>
        <email>jjc@jclark.com</email>
      </address>
    </author>
    <date month="Nov" day="21" year="2002" />
  </front>
  <seriesInfo name="OASIS" value=""/>
</reference>

<reference anchor='BCP97'>
  <front>
    <title>Handling Normative References to Standards-Track Documents</title>
    <author initials='J.' surname='Klensin' fullname='J. Klensin'>
      <organization />
      <address>
        <email>klensin+ietf@jck.com</email>
      </address>
    </author>
    <author initials='S.' surname='Hartman' fullname='S. Hartman'>
      <organization>MIT</organization>
      <address>
        <email>hartmans-ietf@mit.edu</email>
      </address>
    </author>
    <date year='2007' month='June' />
  </front>
  <seriesInfo name='BCP' value='97' />
  <seriesInfo name='RFC' value='4897' />
</reference>

<reference anchor='XML'
           target='http://www.w3.org/TR/2008/REC-xml-20081126/'>
  <front>
    <title>Extensible Markup Language (XML) 1.0 (Fifth Edition)</title>
    <author fullname='Tim Bray' surname='Bray' initials='T.'/>
    <author fullname='Jean Paoli' surname='Paoli' initials='J.'/>
    <author fullname='Michael Sperberg-McQueen' surname='Sperberg-McQueen' initials='M.'/>
    <author fullname='Eve Maler' surname='Maler' initials='E.'/>
    <author fullname='Francois Yergeau' surname='Yergeau' initials='F.'/>
    <date year='2008' month='November' day='26'/>
  </front>
  <seriesInfo name='W3C Recommendation' value='REC-xml-20081126'/>
  <annotation>
    Latest version available at
    <eref target='http://www.w3.org/TR/xml'/>.
  </annotation>
</reference>

<reference anchor="RFC7230">
  <front>
    <title>Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing</title>
    <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
      <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
      <address><email>fielding@gbiv.com</email></address>
    </author>
    <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
      <organization abbrev="greenbytes">greenbytes GmbH</organization>
      <address><email>julian.reschke@greenbytes.de</email></address>
    </author>
    <date month="June" year="2014"/>
  </front>
  <seriesInfo name="RFC" value="7230"/>
</reference>

<reference anchor="RFC7749">
  <x:source href="rfc7749.xml" basename="rfc7749"/>
</reference>

<reference anchor="RFC7991bis-01">
  <x:source href="draft-iab-rfc7991bis-01.xml" basename="draft-iab-rfc7991bis-01"/>
</reference>

<reference anchor="RFC7991bis">
  <x:source href="draft-iab-rfc7991bis-03.xml" basename="draft-iab-rfc7991bis-03"/>
</reference>

<reference anchor='V3IMPNOTES'>
  <?rfc-ext internet-draft-uri="https://www.ietf.org/archive/id/{internet-draft}.html" ?>
  <front>
    <title>Implementation notes for RFC7991, "The 'xml2rfc' Version 3 Vocabulary"</title>
    <author initials='H' surname='Levkowetz' fullname='Henrik Levkowetz'/>
    <date month='December' day='15' year='2020' />
  </front>
  <seriesInfo name='Internet-Draft' value='draft-levkowetz-xml2rfc-v3-implementation-notes-12' />
</reference>

</references>

  <section title="RELAX NG Compact Schema" anchor="grammar">
  <iref item="Grammar" primary="true"/>
  <iref item="Schema" primary="true"/>
  <iref item="RELAX NG Compact Schema" primary="true"/>
  <t>
    The RelaxNG schema (<xref target="RNC"/>) below can be used to validate
    input documents (for instance, with <eref target="http://www.thaiopensource.com/relaxng/jing.html">Jing</eref>).
  </t>
  <t>
    <em>Note that this is work in progress, and doesn't yet cover all
    extensions completely.</em>
  </t>
  <figure>
    <artwork type="application/relax-ng-compact-syntax" name="rfc2629-ext.rnc" x:extraction-note="# Automatically extracted from rfc2629xslt.xml. DO NOT EDIT!&#10;">
<em># WORK IN PROGRESS! PLEASE REPORT PROBLEMS TO THE AUTHOR.</em>

<em># Define our extension namespace</em>
namespace x = "http://purl.org/net/xml2rfc/ext"

<em># Define GRDDL namespace</em>
namespace grddl = "http://www.w3.org/2003/g/data-view#"

<em># Define RDF namespace</em>
namespace rdf = "http://www.w3.org/1999/02/22-rdf-syntax-ns#"

<em># Define SVG namespace</em>
namespace svg = "http://www.w3.org/2000/svg"

<em># Define XInclude namespace</em>
namespace xi = "http://www.w3.org/2001/XInclude"

<em># Include rfc2629bis RNC grammar</em>
include "rfc2629.rnc" {
  
  <em># Redefine &lt;address> to allow multiple email addresses</em>
  address =
    element address {
      attlist.address,
      postal?,
      phone?,
      facsimile?,
      email*,
      uri?
  }

  <em># Redefine &lt;annotation> to allow more markup</em>
  annotation =
    element annotation {
      attlist.annotation,
      (TEXT
        | xref
        | eref
        | iref
        | cref
        | spanx
        <strong>| <x:ref>v3_tt</x:ref></strong>
        )*
    }

  <em># Redefine &lt;artwork> to allow markup</em>
  artwork =
    element artwork {
      attlist.artwork,
      attribute pn { text }?, # (see <xref target="RFC7991bis" x:rel="#anchorsandids"/>)
      ( <strong><x:ref>v3_svg</x:ref> |
        </strong>(TEXT
          <strong>| eref</strong> 
          <strong>| iref</strong> 
          <strong>| spanx</strong> 
          <strong>| xref</strong>
          <strong>| <x:ref>v3_em</x:ref></strong>
          <strong>| <x:ref>v3_strong</x:ref></strong>
          <strong>| <x:ref>x_abnf-char-sequence</x:ref></strong>
          <strong>| <x:ref>x_bb</x:ref></strong>
          <strong>| <x:ref>x_bc</x:ref></strong>
          <strong>| <x:ref>x_bcp14</x:ref></strong>
          <strong>| <x:ref>x_bt</x:ref></strong>
          <strong>| <x:ref>x_highlight</x:ref></strong>
          <strong>| <x:ref>x_length-of</x:ref></strong>
          <strong>| <x:ref>x_parse-xml</x:ref></strong>
          <strong>| <x:ref>x_ref</x:ref></strong>
          <strong>| <x:ref>x_span</x:ref></strong>
          <strong>| <x:ref>x_x</x:ref></strong>)*
        )
    }

  <em># Redefine &lt;back> to allow displayreference</em>
  back =
    element back {
      attlist.back,
      <strong><x:ref>v3_displayreference</x:ref>*</strong>,
      references*,
      section*
    }

  <em># Redefine &lt;c> to allow our extension elements</em>
  c =
    element c {
      attlist.c,
      (TEXT
        | xref
        | eref 
        | iref 
        | cref 
        | spanx 
        <strong>| <x:ref>v3_em</x:ref></strong>
        <strong>| <x:ref>v3_strong</x:ref></strong>
        <strong>| <x:ref>v3_tt</x:ref></strong>
        <strong>| <x:ref>x_ref</x:ref></strong>)*
    }

  <em># Redefine &lt;cref> to allow more child elements</em>
  cref =
    element cref {
      attlist.cref,
      (TEXT
        | eref
        | xref
        | <x:ref>x_ref</x:ref>)*
    }

  <em># Redefine &lt;date> to allow text content (see <xref target="ext-rfc2629.date"/>)</em>
  date =
    element date {
      attlist.date,
      TEXT?
    }

  <em># Redefine &lt;figure> to allow more child elements</em>
  figure =
    element figure {
      attlist.figure,
      attribute pn { text }?, # (see <xref target="RFC7991bis" x:rel="#anchorsandids"/>)
      <strong><x:ref>v3_name</x:ref>?</strong>,
      iref*,
      preamble?,
      (artwork 
        | <strong><x:ref>v3_sourcecode</x:ref></strong>
        | <strong><x:ref>v3_artset</x:ref></strong>
      ),
      postamble?
    }

  <em># Redefine &lt;front> to allow boilerplate</em>
  front =
    element front {
      attlist.front,
      title,
      <strong>seriesInfo</strong>*,
      author+,
      date?,
      area*,
      workgroup*,
      keyword*,
      abstract?,
      note*,
      <strong><x:ref>v3_boilerplate</x:ref>?</strong>
    }
  
  <em># Redefine &lt;list> element to allow &lt;x:<x:ref>lt</x:ref>> child elements</em>
  \list =
    element list {
      attlist.list,
      (t+ <strong>| <x:ref>x_lt</x:ref>+</strong>)
    }    
    
  <em># Redefine &lt;note> to allow &lt;name> and not require title attribute</em>
  note =
    element note {
      attlist.x_note,
      <x:ref>v3_name</x:ref>?,
      (<x:ref>v3_dl</x:ref>
        <strong>| <x:ref>v3_ol</x:ref></strong> 
        | t 
        <strong>| <x:ref>v3_ul</x:ref></strong>)+      
    }

  <em># Redefine &lt;preamble> to allow our extension elements</em>
  preamble =
    element preamble {
      attlist.preamble,
      (TEXT
        | xref
        | eref
        | iref
        | cref
        | spanx
        <strong>| <x:ref>v3_em</x:ref></strong>
        <strong>| <x:ref>v3_strong</x:ref></strong>
        <strong>| <x:ref>v3_tt</x:ref></strong>
        <strong>| <x:ref>x_anchor-alias</x:ref></strong>
        <strong>| <x:ref>x_bcp14</x:ref></strong>)*
  }

  <em># Redefine &lt;postal> to allow &lt;postalLine> and new detail elements</em>
  postal =
    element postal {
      (
        (city
          | code
          | country
          | <x:ref>v3_cityarea</x:ref>
          | <x:ref>v3_extaddr</x:ref>
          | <x:ref>v3_pobox</x:ref>
          | <x:ref>v3_sortingcode</x:ref>
          | region
          | street)*
          | (<x:ref>v3_postalLine</x:ref>+,
          country?
          ))
    }

  <em># Redefine &lt;postamble> to allow our extension elements</em>
  postamble =
    element postamble {
      attlist.postamble,
      (TEXT
        | xref
        | eref
        | iref
        | cref
        | spanx
        <strong>| <x:ref>v3_em</x:ref></strong>
        <strong>| <x:ref>v3_strong</x:ref></strong>
        <strong>| <x:ref>v3_tt</x:ref></strong>
        <strong>| <x:ref>x_bcp14</x:ref></strong>)*
    }

  <em># Redefine &lt;reference> to allow our extension elements</em>
  reference =
    element reference {
      attlist.reference,
      (
        (
          front,
          <strong><x:ref>v3_refcontent</x:ref>?</strong>,
          seriesInfo*,
          <strong><x:ref>x_prose</x:ref>?</strong>,
          <strong><x:ref>v3_refcontent</x:ref>?</strong>,
          format*,
          annotation*,
          <strong><x:ref>x_source</x:ref>?</strong>
        ) | (
          <strong><x:ref>v3_refcontent</x:ref>?</strong>,
          seriesInfo*,
          <strong><x:ref>x_prose</x:ref>?</strong>,
          <strong><x:ref>v3_refcontent</x:ref>?</strong>,
          format*,
          annotation*,
          <strong><x:ref>x_source</x:ref></strong>
        )
      )
    }

  <em># Redefine &lt;references> to allow extension elements and attributes</em>
  references =
    element references {
      attribute title { text }?,
      attribute anchor { xsd:ID }?,
      attribute pn { text }?, # (see <xref target="RFC7991bis" x:rel="#anchorsandids"/>)
      <strong><x:ref>v3_name</x:ref>?</strong>,
      (references+ # (see <xref target="V3IMPNOTES" x:sec="3.1.16"/>)
       | 
        (reference
         | <strong><x:ref>v3_referencegroup</x:ref></strong>
         | <x:ref>xi_include</x:ref>)+
       )
    }

  <em># Redefine &lt;rfc> to allow our extension elements</em>
  rfc =
    element rfc {
      attribute xml:lang { text }?,
      attribute grddl:transformation { ATEXT }?,
      attribute x:maturity-level { "proposed" | "draft" | "internet" }?,
      attribute category { "std" | "bcp" | "info" | "exp" | "historic" }?,
      attribute consensus { "false" | "true" | "no" | "yes" }?,
      attribute docName { text }?,
      attribute indexInclude { "true" | "false" }?, # (see <xref target="RFC7991bis" x:rel="#element.rfc.attribute.indexInclude"/>)
      attribute ipr {
        "full2026"
        | "noDerivativeWorks2026"
        | "none"
        | "full3667"
        | "noModification3667"
        | "noDerivatives3667"
        | "full3978"
        | "noModification3978"
        | "noDerivatives3978"
        | "trust200811"
        | "noModificationTrust200811"
        | "noDerivativesTrust200811"
        | "trust200902"
        | "noModificationTrust200902"
        | "noDerivativesTrust200902"
        | "pre5378Trust200902"
      }?,
      attribute iprExtract { xsd:IDREF }?,
      attribute number { text }?,
      attribute obsoletes { text }?,
      attribute tocDepth { text }?, # (see <xref target="RFC7991bis" x:rel="#element.rfc.attribute.tocDepth"/>)
      attribute tocInclude { "true" | "false" }?, # (see <xref target="RFC7991bis" x:rel="#element.rfc.attribute.tocInclude"/>)
      attribute scripts { text }?, # (see <xref target="RFC7991bis" x:rel="#prepatts"/>)
      attribute seriesNo { text }?,
      attribute sortRefs { "true" | "false" }?, # (see <xref target="RFC7991bis" x:rel="#element.rfc.attribute.sortRefs"/>)
      attribute submissionType { "IETF" | "IAB" | "IRTF" | "independent" }?,
      attribute symRefs { "true" | "false" }?, # (see <xref target="RFC7991bis" x:rel="#element.rfc.attribute.symRefs"/>)
      attribute updates { text }?,
      attribute version { text }?, # (see <xref target="RFC7991bis" x:rel="#element.rfc.attribute.symRefs"/>)
      <strong><x:ref>v3_link</x:ref>*,</strong>
      <strong><x:ref>x_link</x:ref>*,</strong>
      <strong><x:ref>x_feedback</x:ref>?,</strong>
      <strong><x:ref>x_assign-section-number</x:ref>*,</strong>
      front,
      middle,
      back?
    }

  <em># Redefine &lt;section> to allow new elements</em>
  section =
    element section {
      attlist.x_section,
      (t
       | artwork
       | figure
       | texttable
       | iref
       | section
       <strong>| <x:ref>v3_artset</x:ref></strong>
       <strong>| <x:ref>v3_aside</x:ref></strong>
       <strong>| <x:ref>v3_blockquote</x:ref></strong>
       <strong>| <x:ref>v3_contact</x:ref></strong>
       <strong>| <x:ref>v3_dl</x:ref></strong>
       <strong>| <x:ref>v3_name</x:ref></strong>
       <strong>| <x:ref>v3_ol</x:ref></strong>
       <strong>| <x:ref>v3_sourcecode</x:ref></strong>
       <strong>| <x:ref>v3_table</x:ref></strong>
       <strong>| <x:ref>v3_ul</x:ref></strong>
       <strong>| <x:ref>x_anchor-alias</x:ref></strong>
       <strong>| <x:ref>x_blockquote</x:ref></strong>
       <strong>| <x:ref>x_contributor</x:ref></strong>
       <strong>| <x:ref>x_include-author</x:ref></strong>
       <strong>| <x:ref>x_note</x:ref></strong>
       <strong>| <x:ref>x_u-map</x:ref></strong>
       <strong>| <x:ref>rdf_Description</x:ref></strong>)*
    }

  <em># Redefine &lt;spanx> to allow some markup</em>
  spanx =
    element spanx {
      attlist.spanx,
      (TEXT
        <strong>| iref</strong>
        <strong>| xref</strong>
        <strong>| <x:ref>x_ref</x:ref></strong>)*
    }

  <em># Redefine &lt;t> to allow our extension elements</em>
  t =
    element t {
      attlist.t,
      (TEXT
       | \list
       | figure
       | xref
       | eref
       | iref
       | cref
       | spanx
       | vspace
       <strong>| <x:ref>v3_bcp14</x:ref></strong>
       <strong>| <x:ref>v3_br</x:ref></strong>
       <strong>| <x:ref>v3_contact</x:ref></strong>
       <strong>| <x:ref>v3_em</x:ref></strong>
       <strong>| <x:ref>v3_relref</x:ref></strong>
       <strong>| <x:ref>v3_strong</x:ref></strong>
       <strong>| <x:ref>v3_sub</x:ref></strong>
       <strong>| <x:ref>v3_sup</x:ref></strong>
       <strong>| <x:ref>v3_tt</x:ref></strong>
       <strong>| <x:ref>v3_u</x:ref></strong>
       <strong>| <x:ref>x_abnf-char-sequence</x:ref></strong>
       <strong>| <x:ref>x_anchor-alias</x:ref></strong>
       <strong>| <x:ref>x_bcp14</x:ref></strong>
       <strong>| <x:ref>x_dfn</x:ref></strong>
       <strong>| <x:ref>x_h</x:ref></strong>
       <strong>| <x:ref>x_q</x:ref></strong>
       <strong>| <x:ref>x_ref</x:ref></strong>
       <strong>| <x:ref>x_span</x:ref></strong>
       <strong>| <x:ref>x_sup</x:ref></strong>)*
    }

  <em># Redefine &lt;title> to allow &lt;br></em>
  title =
    element title {
      attlist.title,
      (TEXT
        <strong>| <x:ref>v3_br</x:ref></strong>)*
    }

  <em># Redefine &lt;xref> to allow some markup</em>
  xref =
    element xref {
      attlist.xref,
      (TEXT
        <strong>| <x:ref>v3_em</x:ref></strong>
        <strong>| <x:ref>v3_strong</x:ref></strong>
        <strong>| <x:ref>v3_sub</x:ref></strong>
        <strong>| <x:ref>v3_sup</x:ref></strong>
        <strong>| <x:ref>v3_tt</x:ref></strong>)*
    }
}

<em># Extend attribute set for &lt;abstract></em>
attlist.abstract &amp;=
  attribute anchor { xsd:ID }?, # (see <xref target="RFC7991bis" x:rel="#element.abstract.attribute.anchor"/>)
  attribute pn { text }? # (see <xref target="RFC7991bis" x:rel="#anchorsandids"/>)

<em># Allow extension attributes on &lt;artwork> (<xref target="ext-rfc2629.artwork"/>)</em>
attlist.artwork &amp;=
  attribute anchor { xsd:ID }?,
  attribute originalSrc { text }?, # (see <xref target="RFC7991bis" x:rel="#prepatts"/>)
  attribute x:indent-with { ATEXT }?,
  attribute x:lang { "" }?,
  attribute x:is-code-component { "no" | "yes" }?

<em># Allow anchor and x:annotation attributes on &lt;author></em>
attlist.author &amp;=
  attribute asciiFullname { ATEXT }?,
  attribute asciiInitials { ATEXT }?,
  attribute asciiSurname { ATEXT }?,
  attribute anchor { xsd:ID }?,
  attribute x:annotation { ATEXT }?
  
<em># Extend attribute set for &lt;c></em>
attlist.c &amp;=
  attribute anchor { xsd:ID }?

<em># Extend attribute set for &lt;city></em>
attlist.city &amp;=
  attribute ascii { ATEXT }?

<em># Extend attribute set for &lt;code></em>
attlist.code &amp;=
  attribute ascii { ATEXT }?

<em># Extend attribute set for &lt;country></em>
attlist.country &amp;=
  attribute ascii { ATEXT }?

<em># Extend attribute set for &lt;cref> (see <xref target="RFC7991bis" x:fmt="of" x:rel="#element.cref.attribute.display"/>)</em>
attlist.cref &amp;=
  attribute display { "false" | "true" }?

<em># Extend attribute set for &lt;date> (see <xref target="ext-rfc2629.date"/>)</em>
attlist.date &amp;=
  attribute x:include-day { "false" | "true" }?

<em># Extend attribute set for &lt;eref> (see <xref target="ext-rfc2629.eref"/>)</em>
attlist.eref &amp;=
  attribute brackets { "none" | "angle" }?

<em># Extend attribute set for &lt;iref> (see <xref target="ext-rfc2629.iref"/>)</em>
attlist.iref &amp;=
  attribute x:for-anchor { ATEXT }?

<em># Extend attribute set for &lt;list> (see <xref target="ext-rfc2629.list"/>)</em>
attlist.list &amp;=
  attribute x:indent { ATEXT }?

<em># Extend/Relax attribute set for &lt;note></em>
attlist.x_note &amp;=
  attribute anchor { xsd:ID }?,
  attribute title { ATEXT }?,
  attribute pn { text }?, # (see <xref target="RFC7991bis" x:rel="#anchorsandids"/>)
  attribute removeInRFC { "false" | "true" }? # see <xref target="v3.section.removeInRFC"/>

<em># Extend attribute set for &lt;preamble></em>
attlist.preamble &amp;=
  attribute anchor { xsd:ID }?

<em># Extend attribute set for &lt;organization></em>
attlist.organization &amp;=
  attribute ascii { ATEXT }?,
  attribute showOnFrontPage { "false" | "true" }?

<em># Extend attribute set for &lt;reference></em>
attlist.reference &amp;=
  attribute quoteTitle { "false" | "true" }?, # (see <xref target="v3.reference.quoteTitle"/>)
  attribute xml:base { text }? # (see <xref target="RFC7991bis" x:rel="#elements"/>)

<em># Extend attribute set for &lt;references></em>
attlist.references &amp;=
  attribute pn { text }? # (see <xref target="RFC7991bis" x:rel="#anchorsandids"/>)

<em># Extend attribute set for &lt;region></em>
attlist.region &amp;=
  attribute ascii { ATEXT }?

<em># Extend/Relax attribute set for &lt;section> (see <xref target="ext-rfc2629.section"/>)</em>
attlist.x_section &amp;=
  attribute anchor { xsd:ID }?,
  attribute title { ATEXT }?,
  attribute toc { "include" | "exclude" | "default" }?,
  attribute numbered { "false" | "true" }?, # see <xref target="v3.section.numbered"/>
  attribute removeInRFC { "false" | "true" }?, # see <xref target="v3.section.removeInRFC"/>
  attribute pn { text }?, # (see <xref target="RFC7991bis" x:rel="#anchorsandids"/>)
  attribute x:fixed-section-number { ATEXT }?

<em># Allow anchor attribute on &lt;spanx></em>
attlist.spanx &amp;=
  attribute anchor { xsd:ID }?

<em># Extend attribute set for &lt;street></em>
attlist.street &amp;=
  attribute ascii { ATEXT }?

<em># Extend attribute set for &lt;c> (see <xref target="ext-rfc2629.iref"/>)</em>
attlist.t &amp;=
  attribute indent { text }?,
  attribute keepWithNext { text }?,
  attribute keepWithPrevious { text }?,
  attribute pn { text }? # (see <xref target="RFC7991bis" x:rel="#anchorsandids"/>)

<em># Extend attribute set for &lt;texttable></em>
attlist.texttable &amp;=
  attribute x:caption-side { ATEXT }?

<em># Extend attribute set for &lt;title></em>
attlist.title &amp;=
  attribute ascii { ATEXT }?,
  attribute x:quotes { "true" | "false" }? # (deprecated, see <xref target="v3.reference.quoteTitle"/>)

<em># Allow annotation attribute on &lt;uri></em>
attlist.uri &amp;=
  attribute x:annotation { ATEXT }?

<em># Extend attribute set for &lt;xref> (see <xref target="ext-rfc2629.xref"/>)</em>
attlist.xref &amp;=
  attribute derivedContent { text }?, # (see <xref target="RFC7991bis" x:rel="#prepatts"/>)
  attribute x:fmt  { "()" | "," | "of" | "number" | "sec" |
                     "none" }?,
  attribute x:rel  { ATEXT }?,
  attribute x:sec  { ATEXT }?,
  attribute x:title  { ATEXT }?,
  attribute relative  { ATEXT }?,
  attribute section  { ATEXT }?,
  attribute sectionFormat  { "bare" | "comma" | "of" | "parens" }?
  

<em anchor="v3_artset"><iref item="artset V3 Extension Element"/><iref item="V3 Extension Elements" subitem="artset"
/># Set of artwork (see <xref target="v3.artset"/>)</em>
<x:ref>v3_artset</x:ref> =
  element artset {
    attribute anchor { xsd:ID }?,
    attribute pn { text }?, # (see <xref target="RFC7991bis" x:rel="#anchorsandids"/>)
    artwork+
  }

<em anchor="v3_aside"><iref item="aside V3 Extension Element"/><iref item="V3 Extension Elements" subitem="aside"
/># Side Note (see <xref target="v3.aside"/>)</em>
<x:ref>v3_aside</x:ref> =
  element aside {
    attribute anchor { xsd:ID }?,
    attribute pn { text }?, # (see <xref target="RFC7991bis" x:rel="#anchorsandids"/>)
    (artwork
      | figure
      | iref
      | t
      | <x:ref>v3_blockquote</x:ref>
      | <x:ref>v3_dl</x:ref>
      | <x:ref>v3_ol</x:ref>
      | <x:ref>v3_table</x:ref>
      | <x:ref>v3_ul</x:ref>)*
  }

<em anchor="v3_bcp14"><iref item="bcp14 V3 Extension Element"/><iref item="V3 Extension Elements" subitem="bcp14"
/># BCP14/RFC2119 keywords (see <xref target="v3.bcp14"/>)</em>
<x:ref>v3_bcp14</x:ref> =
  element bcp14 {
    TEXT
  }

<em anchor="v3_blockquote"><iref item="blockquote V3 Extension Element"/><iref item="V3 Extension Elements" subitem="blockquote"
/># Blockquote (see <xref target="v3.blockquote"/>)</em>
<x:ref>v3_blockquote</x:ref> =
  element blockquote {
    attribute anchor { xsd:ID }?,
    attribute cite { URI }?,
    attribute pn { text }?, # (see <xref target="RFC7991bis" x:rel="#anchorsandids"/>)
    attribute quotedFrom { ATEXT }?,
    (
      (artwork 
        | v3_dl
        | figure
        | v3_ol
        | v3_sourcecode
        | t
        | v3_ul)+
    |
      (TEXT
        | v3_bcp14
        | cref
        | v3_em
        | eref
        | iref
        | v3_strong
        | v3_sub
        | v3_sup
        | v3_tt
        | xref)+
    )
  }

<em anchor="v3_boilerplate"><iref item="boilerplate V3 Extension Element"/><iref item="V3 Extension Elements" subitem="boilerplate"
/># Boilerplate (see <xref target="v3.blockquote"/>)</em>
<x:ref>v3_boilerplate</x:ref> =
  element boilerplate {
    attribute pn { text }?, # (see <xref target="RFC7991bis" x:rel="#anchorsandids"/>)
    section+
  }

<em anchor="v3_br"><iref item="em V3 Extension Element"/><iref item="V3 Extension Elements" subitem="br"
/># Forced Line Break (see <xref target="v3.br"/>)</em>
<x:ref>v3_br</x:ref> =
  element br {
    empty
  }

<em anchor="v3_cityarea"><iref item="cityarea V3 Extension Element"/><iref item="V3 Extension Elements" subitem="cityarea"
/># (see <xref target="v3.cityarea"/>)</em>
<x:ref>v3_cityarea</x:ref> =
  element cityarea {
    attribute ascii { ATEXT }?,
    TEXT
  }

<em anchor="v3_contact"><iref item="contact V3 Extension Element"/><iref item="V3 Extension Elements" subitem="contact"
/># (see <xref target="v3.contact"/>)</em>
<x:ref>v3_contact</x:ref> =
  element contact {
    attribute initials { text }?,
    attribute asciiInitials { text }?,
    attribute surname { text }?,
    attribute asciiSurname { text }?,
    attribute fullname { text }?,
    attribute asciiFullname { text }?,
    organization?,
    address?
  }

<em anchor="v3_displayreference"><iref item="displayreference V3 Extension Element"/><iref item="V3 Extension Elements" subitem="displayreference"
/># Mapping of reference names to display names (see <xref target="v3.displayreference"/>)</em>
<x:ref>v3_displayreference</x:ref> =
  element displayreference {
    attribute target { xsd:IDREF },
    attribute to { ATEXT }
  }

<em anchor="v3_dd"><iref item="dd V3 Extension Element"/><iref item="V3 Extension Elements" subitem="dd"
/># Definition List Description Element (see <xref target="v3.dd"/>)</em>
<x:ref>v3_dd</x:ref> =
  element dd {
    attribute anchor { xsd:ID }?,
    attribute pn { text }?, # (see <xref target="RFC7991bis" x:rel="#anchorsandids"/>)
    ((<x:ref>v3_artset</x:ref>
      | artwork
      | figure
      | t
      | <x:ref>v3_aside</x:ref> 
      | <x:ref>v3_dl</x:ref> 
      | <x:ref>v3_ol</x:ref> 
      | <x:ref>v3_table</x:ref> 
      | <x:ref>v3_sourcecode</x:ref> 
      | <x:ref>v3_ul</x:ref>)+ | 
    (TEXT
      | cref
      | eref
      | iref
      | xref
      | <x:ref>v3_bcp14</x:ref> 
      | <x:ref>v3_br</x:ref> 
      | <x:ref>v3_em</x:ref>
      | <x:ref>v3_sub</x:ref>
      | <x:ref>v3_sup</x:ref>
      | <x:ref>v3_tt</x:ref>
      | <x:ref>v3_strong</x:ref>
      | <x:ref>v3_u</x:ref>
      | <x:ref>x_ref</x:ref>)* 
    )
  }

<em anchor="v3_dl"><iref item="dl V3 Extension Element"/><iref item="V3 Extension Elements" subitem="dl"
/># Definition List (see <xref target="v3.dl"/>)</em>
<x:ref>v3_dl</x:ref> =
  element dl {
    attribute anchor { xsd:ID }?, # (see <xref target="RFC7991bis" x:rel="#element.dl.attribute.anchor"/>)
    attribute indent { text }?,
    attribute newline { "false" | "true" }?,
    attribute pn { text }?, # (see <xref target="RFC7991bis" x:rel="#anchorsandids"/>)
    attribute spacing { "normal" | "compact" }?,
    (<x:ref>v3_dt</x:ref>, <x:ref>v3_dd</x:ref>)+
  }

<em anchor="v3_dt"><iref item="dt V3 Extension Element"/><iref item="V3 Extension Elements" subitem="dt"
/># Definition List Description Term (see <xref target="v3.dt"/>)</em>
<x:ref>v3_dt</x:ref> =
  element dt {
    attribute anchor { xsd:ID }?,
    attribute pn { text }?, # (see <xref target="RFC7991bis" x:rel="#anchorsandids"/>)
    (TEXT
      | cref
      | eref
      | iref
      | xref
      | <x:ref>v3_em</x:ref>
      | <x:ref>v3_tt</x:ref>
      | <x:ref>v3_strong</x:ref>)*
  }

<em anchor="v3_em"><iref item="em V3 Extension Element"/><iref item="V3 Extension Elements" subitem="em"
/># Emphasized Text (see <xref target="v3.em"/>)</em>
<x:ref>v3_em</x:ref> =
  element em {
    attribute anchor { xsd:ID }?,
    (TEXT
      | eref
      | iref
      | xref
      | <x:ref>v3_strong</x:ref>
      | <x:ref>x_ref</x:ref>)*
  }

<em anchor="v3_extaddr"><iref item="extaddr V3 Extension Element"/><iref item="V3 Extension Elements" subitem="extaddr"
/># Extended Postal Address (see <xref target="v3.extaddr"/>)</em>
<x:ref>v3_extaddr</x:ref> =
  element extaddr {
    attribute ascii { ATEXT }?,
    TEXT
  }

<em anchor="v3_li"><iref item="li V3 Extension Element"/><iref item="V3 Extension Elements" subitem="li"
/># Definition List (see <xref target="v3.li"/>)</em>
<x:ref>v3_li</x:ref> =
  element li {
    attribute anchor { xsd:ID }?,
    attribute pn { text }?, # (see <xref target="RFC7991bis" x:rel="#anchorsandids"/>)
    ((<x:ref>v3_artset</x:ref>
      | artwork
      | figure
      | <x:ref>v3_blockquote</x:ref>
      | <x:ref>v3_dl</x:ref>
      | <x:ref>v3_ol</x:ref>
      | t
      | <x:ref>v3_table</x:ref>
      | <x:ref>v3_sourcecode</x:ref>
      | <x:ref>v3_ul</x:ref>
    )+ 
      | 
    (TEXT
      | cref
      | eref
      | iref
      | xref
      | <x:ref>v3_bcp14</x:ref>
      | <x:ref>v3_em</x:ref>
      | <x:ref>v3_strong</x:ref>
      | <x:ref>v3_sub</x:ref>
      | <x:ref>v3_sup</x:ref>
      | <x:ref>v3_tt</x:ref>
      | <x:ref>v3_u</x:ref>
      | <x:ref>x_dfn</x:ref>
      | <x:ref>x_ref</x:ref>)*
    )
  }

<em anchor="v3_link"><iref item="link V3 Extension Element"/><iref item="V3 Extension Elements" subitem="link"
/># Container for additional links (see <xref target="v3.link"/>)</em>
<x:ref>v3_link</x:ref> =
  element link {
    attribute href { text },
    attribute rel { text }?
  }

<em anchor="v3_name"><iref item="name V3 Extension Element"/><iref item="V3 Extension Elements" subitem="name"
/># Section/Figure/Table Name (see <xref target="v3.name"/>)</em>
<x:ref>v3_name</x:ref> =
  element name {
    attribute slugifiedName { text }?, # (see <xref target="RFC7991bis" x:rel="#anchorsandids"/>)
    (TEXT
      | cref
      | <x:ref>v3_br</x:ref>
      | <x:ref>v3_em</x:ref>
      | <x:ref>v3_sup</x:ref>
      | <x:ref>v3_tt</x:ref>
      | xref)*
  }

<em anchor="v3_ol"><iref item="ol V3 Extension Element"/><iref item="V3 Extension Elements" subitem="ol"
/># Ordered List (see <xref target="v3.ol"/>)</em>
<x:ref>v3_ol</x:ref> =
  element ol {
    attribute anchor { xsd:ID }?,
    attribute indent { text }?,
    attribute pn { text }?, # (see <xref target="RFC7991bis" x:rel="#anchorsandids"/>)
    attribute start { TEXT }?,
    attribute group { TEXT }?,
    attribute type { TEXT }?,
    <x:ref>v3_li</x:ref>+
  }

<em anchor="v3_pobox"><iref item="extaddr V3 Extension Element"/><iref item="V3 Extension Elements" subitem="pobox"
/># Extended Postal Address (see <xref target="v3.pobox"/>)</em>
<x:ref>v3_pobox</x:ref> =
  element pobox {
    attribute ascii { ATEXT }?,
    TEXT
  }

<em anchor="v3_postalLine"><iref item="postalLine V3 Extension Element"/><iref item="V3 Extension Elements" subitem="postalLine"
/># Line in postal address (see <xref target="v3.postalLine"/>)</em>
<x:ref>v3_postalLine</x:ref> =
  element postalLine {
    attribute ascii { TEXT }?,
    TEXT
  }

<em anchor="v3_relref"><iref item="relref V3 Extension Element"/><iref item="V3 Extension Elements" subitem="relref"
/># EXPERIMENTAL DO NOT USE YET (see <xref target="v3.relref"/>)</em>
<x:ref>v3_relref</x:ref> =
  element relref {
    attribute derivedLink { text }?, # (see <xref target="RFC7991bis" x:rel="#prepatts"/>)
    attribute displayFormat { "of" | "comma" | "parens" | "bare" }?,
    attribute relative { text }?,
    attribute section { text },
    attribute target { xsd:IDREF },
    TEXT
  }

<em anchor="v3_refcontent"><iref item="refcontent V3 Extension Element"/><iref item="V3 Extension Elements" subitem="refcontent"
/># additional content for references (see <xref target="v3.refcontent"/>)</em>
<x:ref>v3_refcontent</x:ref> =
  element refcontent {
    (TEXT
      | <x:ref>v3_em</x:ref>)*
  }

<em anchor="v3_referencegroup"><iref item="referencegroup V3 Extension Element"/><iref item="V3 Extension Elements" subitem="referencegroup"
/># reference group (see <xref target="v3.referencegroup"/>)</em>
<x:ref>v3_referencegroup</x:ref> =
  element referencegroup {
    attribute anchor { xsd:ID },
    attribute target { URI }?,
    (reference
      | <x:ref>xi_include</x:ref>)+
  }

<em anchor="v3_sortingcode"><iref item="sortingcode V3 Extension Element"/><iref item="V3 Extension Elements" subitem="sortingcode"
/># (see <xref target="v3.sortingcode"/>)</em>
<x:ref>v3_sortingcode</x:ref> =
  element sortingcode {
    attribute ascii { ATEXT }?,
    TEXT
  }

<em anchor="v3_sourcecode"><iref item="sourcecode V3 Extension Element"/><iref item="V3 Extension Elements" subitem="sourcecode"
/># Source Code (see <xref target="v3.sourcecode"/>)</em>
<x:ref>v3_sourcecode</x:ref> =
  element sourcecode {
    attribute anchor { xsd:ID }?,
    attribute pn { text }?, # (see <xref target="RFC7991bis" x:rel="#anchorsandids"/>)
    attribute markers { text }?, #(see <xref target="V3IMPNOTES" x:sec="3.1.22"/>)
    attribute name { text }?,
    attribute src { text }?,
    attribute type { text }?,
    attribute x:lang { "" }?,
    (TEXT
      | iref
      | xref
      | <x:ref>x_ref</x:ref>)*
  }

<em anchor="v3_strong"><iref item="strong V3 Extension Element"/><iref item="V3 Extension Elements" subitem="strong"
/># Emphasized Text (see <xref target="v3.strong"/>)</em>
<x:ref>v3_strong</x:ref> =
  element strong {
    attribute anchor { xsd:ID }?,
    (TEXT
      | xref
      | <x:ref>v3_em</x:ref>
      | <x:ref>x_ref</x:ref>)*
  }

<em anchor="v3_sub"><iref item="sub V3 Extension Element"/><iref item="V3 Extension Elements" subitem="sub"
/># Subscript (see <xref target="v3.sub"/>)</em>
<x:ref>v3_sub</x:ref> =
  element sub {
    (TEXT
      | <x:ref>v3_sup</x:ref>)*
  }

<em anchor="v3_sup"><iref item="sup V3 Extension Element"/><iref item="V3 Extension Elements" subitem="sup"
/># Superscript (see <xref target="v3.sup"/>)</em>
<x:ref>v3_sup</x:ref> =
  element sup {
    (TEXT
      | <x:ref>v3_sub</x:ref>)*
  }

<em anchor="v3_table"><iref item="table V3 Extension Element"/><iref item="V3 Extension Elements" subitem="table"
/># Table (see <xref target="v3.table"/>)</em>
<x:ref>v3_table</x:ref> =
  element table {
    attribute anchor { xsd:ID }?,
    attribute align { "left" | "center" | "right" }?,
    attribute pn { text }?, # (see <xref target="RFC7991bis" x:rel="#anchorsandids"/>)
    <x:ref>v3_name</x:ref>?,
    iref*,
    <x:ref>v3_thead</x:ref>?,
    <x:ref>v3_tbody</x:ref>+,
    <x:ref>v3_tfoot</x:ref>?
  }

<em anchor="v3_tbody"><iref item="tbody V3 Extension Element"/><iref item="V3 Extension Elements" subitem="tbody"
/># Table Body (see <xref target="v3.tbody"/>)</em>
<x:ref>v3_tbody</x:ref> =
  element tbody {
    attribute anchor { xsd:ID }?,
    attribute pn { text }?, # (see <xref target="RFC7991bis" x:rel="#anchorsandids"/>)
    <x:ref>v3_tr</x:ref>+
  }

<em anchor="v3_td"><iref item="td V3 Extension Element"/><iref item="V3 Extension Elements" subitem="td"
/># Table Contents Cell (see <xref target="v3.td"/>)</em>
<x:ref>v3_td</x:ref> =
  element td {
    attribute anchor { xsd:ID }?,
    attribute align { "left" | "center" | "right" }?,
    attribute colspan { text }?,
    attribute pn { text }?, # (see <xref target="RFC7991bis" x:rel="#anchorsandids"/>)
    attribute rowspan { text }?,
    ( (t
       | <x:ref>v3_dl</x:ref>
       | <x:ref>v3_ol</x:ref>
       | <x:ref>v3_sourcecode</x:ref>
       | <x:ref>v3_ul</x:ref>
      )+
      | (TEXT
         | <x:ref>v3_bcp14</x:ref>
         | <x:ref>v3_br</x:ref>
         | cref
         | <x:ref>v3_em</x:ref>
         | eref
         | <x:ref>v3_strong</x:ref>
         | <x:ref>v3_sub</x:ref>
         | <x:ref>v3_sup</x:ref>
         | <x:ref>v3_tt</x:ref>
         | xref)*
    )
  }

<em anchor="v3_tfoot"><iref item="tfoot V3 Extension Element"/><iref item="V3 Extension Elements" subitem="tfoot"
/># Table Footer (see <xref target="v3.tfoot"/>)</em>
<x:ref>v3_tfoot</x:ref> =
  element tfoot {
    attribute anchor { xsd:ID }?,
    attribute pn { text }?, # (see <xref target="RFC7991bis" x:rel="#anchorsandids"/>)
    <x:ref>v3_tr</x:ref>
  }

<em anchor="v3_th"><iref item="th V3 Extension Element"/><iref item="V3 Extension Elements" subitem="th"
/># Table Header Cell (see <xref target="v3.th"/>)</em>
<x:ref>v3_th</x:ref> =
  element th {
    attribute anchor { xsd:ID }?,
    attribute align { "left" | "center" | "right" }?,
    attribute colspan { text }?,
    attribute pn { text }?, # (see <xref target="RFC7991bis" x:rel="#anchorsandids"/>)
    attribute rowspan { text }?,
    ( (t
       | <x:ref>v3_dl</x:ref>
       | <x:ref>v3_ol</x:ref>
       | <x:ref>v3_sourcecode</x:ref>
       | <x:ref>v3_ul</x:ref>
      )+
      | (TEXT
         | <x:ref>v3_bcp14</x:ref>
         | cref
         | <x:ref>v3_em</x:ref>
         | eref
         | <x:ref>v3_strong</x:ref>
         | <x:ref>v3_sub</x:ref>
         | <x:ref>v3_sup</x:ref>
         | <x:ref>v3_tt</x:ref>
         | xref)*
    )
  }

<em anchor="v3_thead"><iref item="thead V3 Extension Element"/><iref item="V3 Extension Elements" subitem="thead"
/># Table Head (see <xref target="v3.thead"/>)</em>
<x:ref>v3_thead</x:ref> =
  element thead {
    attribute anchor { xsd:ID }?,
    attribute pn { text }?, # (see <xref target="RFC7991bis" x:rel="#anchorsandids"/>)
    <x:ref>v3_tr</x:ref>+
  }

<em anchor="v3_tr"><iref item="tre V3 Extension Element"/><iref item="V3 Extension Elements" subitem="tr"
/># Table Row (see <xref target="v3.tr"/>)</em>
<x:ref>v3_tr</x:ref> =
  element tr {
    attribute anchor { xsd:ID }?,
    attribute pn { text }?, # (see <xref target="RFC7991bis" x:rel="#anchorsandids"/>)
    (
      <x:ref>v3_td</x:ref>
      | <x:ref>v3_th</x:ref>
    )+
  }

<em anchor="v3_tt"><iref item="tt V3 Extension Element"/><iref item="V3 Extension Elements" subitem="tt"
/># Monospaced Text (see <xref target="v3.tt"/>)</em>
<x:ref>v3_tt</x:ref> =
  element tt {
    (TEXT
      | xref
      | <x:ref>v3_em</x:ref>
      | <x:ref>x_ref</x:ref>)*
  }

<em anchor="v3_u"><iref item="u V3 Extension Element"/><iref item="V3 Extension Elements" subitem="u"
/># Non-ASCII characters (see <xref target="v3.u"/>)</em>
<x:ref>v3_u</x:ref> =
  element u {
    attribute ascii { text }?,
    attribute format { text }?,
    TEXT
  }

<em anchor="v3_ul"><iref item="ul V3 Extension Element"/><iref item="V3 Extension Elements" subitem="ul"
/># Unordered List (see <xref target="v3.ul"/>)</em>
<x:ref>v3_ul</x:ref> =
  element ul {
    attribute anchor { xsd:ID }?,
    attribute bare { "false" | "true" }?, # but see <eref target="https://trac.tools.ietf.org/tools/xml2rfc/trac/ticket/547"/>
    attribute indent { text }?,
    attribute empty { "false" | "true" }?,
    attribute pn { text }?, # (see <xref target="RFC7991bis" x:rel="#anchorsandids"/>)
    <x:ref>v3_li</x:ref>+
  }

<em anchor="v3_svg"><iref item="svg V3 Extension Element"/><iref item="V3 Extension Elements" subitem="svg"
/># SVG (see <xref target="v3.svg"/>)</em>
<x:ref>v3_svg</x:ref> =
  element svg:svg {
    (attribute * { text }
        | text
        | anySVGElement)*
  }

 anySVGElement =
    element svg:* {
       (attribute * { text }
        | text
        | anySVGElement)*
    }
      
<em anchor="x_abnf-char-sequence"><iref item="abnf-char-sequence Extension Element"/><iref item="Extension Elements" subitem="abnf-char-sequence"
/># Conversion to ABNF char sequence (see <xref target="ext.element.abnf-char-sequence"/>)</em>
<x:ref>x_abnf-char-sequence</x:ref> =
  element x:abnf-char-sequence {
    TEXT
  }

<em anchor="x_anchor-alias"><iref item="anchor-alias Extension Element"/><iref item="Extension Elements" subitem="anchor-alias"
/># Aliasing of anchors (see <xref target="ext.element.anchor-alias"/>)</em>
<x:ref>x_anchor-alias</x:ref> =
  element x:anchor-alias {
    attribute value { TEXT },
    empty
  }

<em anchor="x_contributor"><iref item="contributor Extension Element"/><iref item="Extension Elements" subitem="contributor"
/># Contributor information (see <xref target="ext.element.contributor"/>)
# (experimental)</em>
<x:ref>x_contributor</x:ref> =
  element x:contributor {
    attlist.author,
    organization?,
    address?
  }

<em anchor="x_feedback"><iref item="feedback Extension Element"/><iref item="Extension Elements" subitem="feedback"
/># Supply feedback links (see <xref target="ext.element.feedback"/>)</em>
<x:ref>x_feedback</x:ref> =
  element x:feedback {
    attribute template { TEXT },
    empty
  }

<em anchor="x_include-author"><iref item="include-author Extension Element"/><iref item="Extension Elements" subitem="include-author"
/># Including Author information
# (experimental)</em>
<x:ref>x_include-author</x:ref> =
  element x:include-author {
    attribute target { xsd:IDREF }
  }

<em anchor="x_assign-section-number"><iref item="assign-section-number Extension Element"/><iref item="Extension Elements" subitem="assign-section-number"
/># Setting section numbers for internally generated sections
# (experimental)</em>
<x:ref>x_assign-section-number</x:ref> =
  element x:assign-section-number {
    attribute builtin-target { "authors" },
    attribute number { TEXT },
    empty
  }

<em anchor="x_bb"><iref item="bb Extension Element"/><iref item="Extension Elements" subitem="bb"
/># Bottom line of box drawing (see <xref target="ext.element.bb"/>)</em>
<x:ref>x_bb</x:ref> =
  element x:bb {
    (TEXT
      | iref
      | xref
      | <x:ref>x_bb</x:ref>
      | <x:ref>x_bc</x:ref>
      | <x:ref>x_bt</x:ref>
      | <x:ref>x_ref</x:ref>)* 
  }

<em anchor="x_bc"><iref item="bc Extension Element"/><iref item="Extension Elements" subitem="bc"
/># Center line of box drawing (see <xref target="ext.element.bc"/>)</em>
<x:ref>x_bc</x:ref> =
  element x:bc {
    (TEXT
      | iref
      | spanx
      | xref
      | <x:ref>x_bb</x:ref>
      | <x:ref>x_bc</x:ref>
      | <x:ref>x_bt</x:ref>
      | <x:ref>x_ref</x:ref>)* 
  }

<em anchor="x_bcp14"><iref item="bcp14 Extension Element"/><iref item="Extension Elements" subitem="bcp14"
/># BCP14/RFC2119 keywords (see <xref target="ext.element.bcp14"/>)</em>
<x:ref>x_bcp14</x:ref> =
  element x:bcp14 {
    TEXT
  }
  
<em anchor="x_blockquote"><iref item="blockquote Extension Element"/><iref item="Extension Elements" subitem="blockquote"
/># Blockquote (see <xref target="ext.element.blockquote"/>)</em>
<x:ref>x_blockquote</x:ref> =
  element x:blockquote {
    attribute anchor { xsd:ID }?,
    attribute cite { URI }?,
    t+
  }

<em anchor="x_bt"><iref item="bt Extension Element"/><iref item="Extension Elements" subitem="bt"
/># Top line of box drawing (see <xref target="ext.element.bt"/>)</em>
<x:ref>x_bt</x:ref> =
  element x:bt {
    (TEXT
      | iref
      | xref
      | <x:ref>x_bb</x:ref>
      | <x:ref>x_bc</x:ref>
      | <x:ref>x_bt</x:ref>
      | <x:ref>x_ref</x:ref>)* 
  }

<em anchor="x_c"><iref item="c Extension Element"/><iref item="Extension Elements" subitem="c"
/># Unicode character map entry (see <xref target="ext.element.c"/>)</em>
<x:ref>x_c</x:ref> =
  element x:c {
    attribute c { TEXT },
    attribute d { TEXT }?,
    attribute n { TEXT }
  }

<em anchor="x_defines"><iref item="defines Extension Element"/><iref item="Extension Elements" subitem="defines"
/># declaration of definition in external reference<!-- (see <xref target="ext.element.sup"/>)--></em>
<x:ref>x_defines</x:ref> =
  element x:defines {
    TEXT
  }

<em anchor="x_dfn"><iref item="dfn Extension Element"/><iref item="Extension Elements" subitem="dfn"
/># Definition (see <xref target="ext.element.dfn"/>)</em>
<x:ref>x_dfn</x:ref> =
  element x:dfn {
    attribute anchor { xsd:ID }?,
    (TEXT
      | iref)*
  }
  
<em anchor="x_h"><iref item="h Extension Element"/><iref item="Extension Elements" subitem="h"
/># Heading (see <xref target="ext.element.h"/>)</em>
<x:ref>x_h</x:ref> =
  element x:h {
    TEXT
  }

<em anchor="x_has"><iref item="has Extension Element"/><iref item="Extension Elements" subitem="has"
/># declaration of anchor in external reference<!-- (see <xref target="ext.element.sup"/>)--></em>
<x:ref>x_has</x:ref> =
  element x:has {
    attribute anchor { xsd:ID }?
  }

<em anchor="x_highlight"><iref item="highlight Extension Element"/><iref item="Extension Elements" subitem="highlight"
/># Heading (see <xref target="ext.element.highlight"/>)</em>
<x:ref>x_highlight</x:ref> =
  element x:highlight {
    TEXT
  }

<em anchor="x_length-of"><iref item="length-of Extension Element"/><iref item="Extension Elements" subitem="length-of"
/># Length Measurement (see <xref target="ext.element.length-of"/>)</em>
<x:ref>x_length-of</x:ref> =
  element x:length-of {
    attribute indented { NUMBER }?,
    attribute target { xsd:IDREF },
    empty
  }

<em anchor="x_link"><iref item="link Extension Element"/><iref item="Extension Elements" subitem="link"
/># Link (see <xref target="ext.element.link"/>)</em>
<x:ref>x_link</x:ref> =
  element x:link {
    attribute basename { URI }?,
    attribute href { URI }?,
    attribute title { TEXT }?,
    attribute rel { TEXT },
    empty
  }
  
<em anchor="x_lt"><iref item="lt Extension Element"/><iref item="Extension Elements" subitem="lt"
/># Extended list item (see <xref target="ext.element.lt"/>)</em>
<x:ref>x_lt</x:ref> =
  element x:lt {
    attribute anchor { xsd:ID }?,
    attribute hangText { TEXT }?,
    t+
  }

<em anchor="x_note"><iref item="note Extension Element"/><iref item="Extension Elements" subitem="note"
/># Note (see <xref target="ext.element.note"/>)</em>
<x:ref>x_note</x:ref> =
  element x:note {
    attribute anchor { xsd:ID }?,
    t+
  }

<em anchor="x_parse-xml"><iref item="parse-xml Extension Element"/><iref item="Extension Elements" subitem="parse-xml"
/># Signal XML content (see <xref target="ext.element.parse-xml"/>)</em>
<x:ref>x_parse-xml</x:ref> =
  element x:parse-xml {
    (TEXT
      | xref)* 
  }

<em anchor="x_prose"><iref item="prose Extension Element"/><iref item="Extension Elements" subitem="prose"
/># Inline prose in a reference (see <xref target="ext.element.prose"/>)</em>
<x:ref>x_prose</x:ref> =
  element x:prose {
    TEXT
  }

<em anchor="x_q"><iref item="q Extension Element"/><iref item="Extension Elements" subitem="q"
/># Inline quote (see <xref target="ext.element.q"/>)</em>
<x:ref>x_q</x:ref> =
  element x:q {
    TEXT
  }

<em anchor="x_ref"><iref item="ref Extension Element"/><iref item="Extension Elements" subitem="ref"
/># Anchor reference (see <xref target="ext.element.ref"/>)</em>  
<x:ref>x_ref</x:ref> =
  element x:ref {
    attribute anchor { xsd:ID }?,
    TEXT
  }

<em anchor="x_source"><iref item="source Extension Element"/><iref item="Extension Elements" subitem="source"
/># source information (see <xref target="ext.element.source"/>)</em>  
<x:ref>x_source</x:ref> =
  element x:source {
    attribute basename { ATEXT }?,
    attribute href { URI },
    <x:ref>x_defines</x:ref>*,
    <x:ref>x_has</x:ref>*
  }

<em anchor="x_sup"><iref item="sup Extension Element"/><iref item="Extension Elements" subitem="sup"
/># superscript (see <xref target="ext.element.sup"/>)</em>
<x:ref>x_sup</x:ref> =
  element x:sup {
    TEXT
  }

<em anchor="x_span"><iref item="span Extension Element"/><iref item="Extension Elements" subitem="span"
/># Inline Span <!--(see <xref target="ext.element.span"/>)--></em>
<x:ref>x_span</x:ref> =
  element x:span {
    attribute anchor { xsd:ID }?,
    attribute x:lang { "" }?,
    (TEXT
      | <x:ref>x_parse-xml</x:ref>)* 
  }

<em anchor="x_u-map"><iref item="u-map Extension Element"/><iref item="Extension Elements" subitem="u-map"
/># Unicode character map (see <xref target="ext.element.u-map"/>)</em>
<x:ref>x_u-map</x:ref> =
  element x:u-map {
    <x:ref>x_c</x:ref>*
  }

<em anchor="x_x"><iref item="x Extension Element"/><iref item="Extension Elements" subitem="x"
/># Nop (for alignment in source)</em>
<x:ref>x_x</x:ref> =
  element x:x {
    empty
  }

<em anchor="xi_include"><iref item="xi:include Extension Element"/><iref item="XInclude Extension Elements" subitem="include"
/># XInclude (see <xref target="v3.xi-include"/>)</em>
<x:ref>xi_include</x:ref> =
  element xi:include {
    attribute href { text },
    empty
  }

<em anchor="rdf_Description"><iref item="rdf:Description Extension Element"/><iref item="Extension Elements" subitem="rdf:Description"
/># Embed RDF statements </em>
<x:ref>rdf_Description</x:ref> =
  element rdf:Description {
    rdf_content
  }
  
rdf_content =
  ( TEXT | element * { rdf_content })*
</artwork></figure>
  </section>
  
  <section title="Implementation Notes">
  
  <section title="Recognized type attributes for &lt;artwork> element" anchor="artwork.types">
  <t>
    Specific values in the &lt;artwork> element's "type" attribute are
    recognized and cause a different visual style to be used:
  </t>
  <texttable>
    <ttcol>Type</ttcol>
    <ttcol>Comment</ttcol>
    
    <c>abnf</c><c>ABNF as per <xref target="RFC5234"/></c>
    <c>abnf2045</c><c>ABNF as per <xref target="RFC2045"/></c>
    <c>abnf2616</c><c>ABNF as per <xref target="RFC2616" x:fmt="," x:sec="2.1" /></c>
    <c>abnf7230</c><c>ABNF as per <xref target="RFC7230" x:fmt="," x:sec="1.2" /></c>
    <c>application/relax-ng-compact-syntax</c><c>Relax NG Compact Syntax as per <xref target="RNC"/></c>
    <c>application/xml-dtd</c><c>XML DTD</c>
    <c>code</c><c>monospaced text (with outline)</c>
    <c>drawing</c><c>drawing (with outline)</c>
    <c>example</c><c>monospaced text (with outline)</c>
    <c>image/*</c><c>images (to be used with "src" attribute)</c>
    <c>inline</c><c>monospaced text (no outline)</c>
    <c>message/http; msgtype="request"</c><c>HTTP message, as per <xref target="RFC7230" x:fmt="," x:sec="8.3.1" /></c>
    <c>message/http; msgtype="response"</c><c>HTTP message, as per <xref target="RFC7230" x:fmt="," x:sec="8.3.1" /></c>
    <c>pdu</c><c>pdu (with outline)</c>
    <c>svg and image/svg+xml</c><c>SVG</c>
  </texttable>
  </section>
  
  </section>
  
  <section title="Examples" anchor="examples">

  <section title="Using the 'Internal Subset'" anchor="examples.internalsubset">
  <t>
    The prolog of the XML document can both be used to refer to an external
    DTD, and also to define internal entities (<xref target="XML" x:fmt="of" x:sec="2.8" x:rel="#sec-prolog-dtd"/>): 
  </t>
  <figure><artwork type="example" x:lang="">
&lt;?xml version="1.0"?>
&lt;?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>

&lt;!DOCTYPE rfc SYSTEM "rfc2629.dtd" [

  &lt;!-- <em>use "&amp;MAY;" for a BCP 14 "MAY", see <xref target="ext.element.bcp14"/></em> -->
  &lt;!ENTITY MAY
  "&lt;bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>MAY&lt;/bcp14>">

  &lt;!-- <em>re-declare "&amp;nbsp;" as code point 160 (non-breaking space)</em> -->
  &lt;!-- <em>you may need this for UAs that do not read external DTDs</em> -->
  &lt;!ENTITY nbsp
  "&amp;#160;">

  &lt;!-- <em>allow later RFC2616 reference using "&amp;rfc2616;"</em> -->
  &lt;!-- <em>the data will be fetched from xml.resource.org</em> -->
  &lt;!ENTITY rfc2616 SYSTEM
  "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2616.xml">

  &lt;!-- <em>allow a custom reference using "&amp;mydraft;"</em> -->
  &lt;!-- <em>the data will be fetched from the same location as the 
       source file</em> -->
  &lt;!ENTITY mydraft SYSTEM "reference.mydraft.xml">
]>
</artwork>
<postamble>
  Note: including entities from a remote site will not work in browsers due
  to the Same-Origin policy.</postamble>
</figure>
  
  </section>

  <section title="Customization" anchor="examples.customizing">
  <t>
    The XSLT code can be customized by creating a custom XSLT file that
    uses &lt;xsl:import> to include the original code, and just overrides
    particular rules.
  </t>
  <figure>
  <preamble>For instance, the code below overrides several attributes in
  <tt>rfc2629toFO.xslt</tt>, changing the color, spacing and font family for 
  headers.</preamble>
  <artwork type="example" x:lang="">
&lt;xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
               version="1.0">

  &lt;xsl:import href="rfc2629toFO.xslt"/>
  
  &lt;xsl:attribute-set name="h1">
    &lt;xsl:attribute name="color">darkblue&lt;/xsl:attribute>
    &lt;xsl:attribute name="font-family">sans-serif&lt;/xsl:attribute>
    &lt;xsl:attribute name="space-before">24pt&lt;/xsl:attribute>
  &lt;/xsl:attribute-set>
  
  &lt;xsl:attribute-set name="h2">
    &lt;xsl:attribute name="color">darkblue&lt;/xsl:attribute>
    &lt;xsl:attribute name="font-family">sans-serif&lt;/xsl:attribute>
    &lt;xsl:attribute name="space-before">18pt&lt;/xsl:attribute>
    &lt;xsl:attribute name="space-after">3pt&lt;/xsl:attribute>
  &lt;/xsl:attribute-set>
  
  &lt;xsl:attribute-set name="h3">
    &lt;xsl:attribute name="color">darkblue&lt;/xsl:attribute>
    &lt;xsl:attribute name="font-family">sans-serif&lt;/xsl:attribute>
    &lt;xsl:attribute name="space-before">16pt&lt;/xsl:attribute>
    &lt;xsl:attribute name="space-after">2pt&lt;/xsl:attribute>
  &lt;/xsl:attribute-set>

&lt;/xsl:transform>
</artwork></figure>
<x:note>
  <t>
    <x:h>Note:</x:h> the name for the attribute sets may change in the future
    as more working is done with respect to customizability. In any case,
    overriding the settings in a separate file will be easier to maintain.
    Please contact the author if you find yourself trying to override style
    definitions that currently do not use attribute sets.
  </t>
  <t>
    <x:h>Note:</x:h> the CSS style information used in <tt>rfc2629.xslt</tt>
    can be overriden in a similar (but less granular) way: just overwrite the
    template called "insertCss". As for XSL-FO, the class names may change in
    future.
  </t>
</x:note>
</section>
</section>

<section title="Producing the IETF 'Boilerplate'" anchor="boilerplate">
<t>
  Various attributes of the <tt>&lt;rfc&gt;</tt>
  element plus some child elements of <tt>&lt;front&gt;</tt>
  affect the automatically generated parts of the front page, such as the
  tabular information at the beginning, the "Status Of This Memo", and the
  "Copyright Notice".
</t>
<t>
  When submitting an Internet Draft, this "boilerplate" is checked
  by "Idnits" (<eref target="http://tools.ietf.org/tools/idnits/"/>) for
  compliance with the current Intellectual Property rules, and thus
  it is important to set the correct values.
</t>
<t>
  Furthermore, the RFC Production Center uses RFC7749-based tools to 
  generate the final RFC text, so the more accurate the supplied information
  is, the less additional work is left, and the risk for errors in producing
  the final (and immutable!) document is reduced.
</t>
<x:note>
  <t>
    <x:h>Note:</x:h> this only applies to the case when IETF documents are
    produced. The "private" processing instruction <iref item="private PI pseudo-attribute"/><iref item="Processing Instruction pseudo attributes" subitem="private"/>
    allows to switch off most of the autogeneration logic.
  </t>
</x:note>
<t anchor="boiler.plate.attributes">
  <x:anchor-alias value="attribute-ipr"/>
  <x:anchor-alias value="attribute-ipr-current"/>
  <x:anchor-alias value="attribute-ipr-trust200902"/>
  <x:anchor-alias value="attribute-ipr-noModificationTrust200902"/>
  <x:anchor-alias value="attribute-ipr-noDerivativesTrust200902"/>
  <x:anchor-alias value="attribute-ipr-pre5378Trust200902"/>
  <x:anchor-alias value="attribute-ipr-historic"/>
  <x:anchor-alias value="attribute-ipr-200811"/>
  <x:anchor-alias value="attribute-ipr-3978"/>
  <x:anchor-alias value="attribute-ipr-3667"/>
  <x:anchor-alias value="attribute-ipr-2026"/>
  <x:anchor-alias value="attribute-category"/>
  <x:anchor-alias value="attribute-submissiontype"/>
  <x:anchor-alias value="attribute-consensus"/>
  The individual attributes on the <tt>&lt;rfc&gt;</tt> element are
  discussed in detail in <xref target="RFC7749" x:rel="#front.page"/>.
</t>

</section>

  <section title="License" anchor="license">
  <t>
Copyright (c) 2006-2019, Julian Reschke (julian.reschke@greenbytes.de)
  </t>
  <t>
All rights reserved.
  </t>
  <t>
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
  <list style="symbols">
    <t>Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.</t>
    <t>Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.</t>
    <t>Neither the name of Julian Reschke nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.</t>
  </list>
  </t>
  <t>
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  </t>
  </section>
</back>
</rfc>
