Changeset 2750


Ignore:
Timestamp:
01/03/16 08:05:48 (7 years ago)
Author:
julian.reschke@…
Message:

update rfc2629.xslt

Location:
rfc2629xslt
Files:
2 added
61 edited

Legend:

Unmodified
Added
Removed
  • rfc2629xslt/check-references.xslt

    r2177 r2750  
    44    "tr.rdf", available from <http://www.w3.org/2002/01/tr-automation/tr.rdf>)
    55
    6     Copyright (c) 2006-2013, Julian Reschke (julian.reschke@greenbytes.de)
     6    Copyright (c) 2006-2016, Julian Reschke (julian.reschke@greenbytes.de)
    77    All rights reserved.
    88
     
    226226      <xsl:value-of select="concat('[',$stat/ietfdoc/state/phase/@ts,' ',$stat/ietfdoc/state/phase,'] ok')"/>
    227227    </xsl:when>
    228     <xsl:when test="$stat/ietfdoc[state/phase='ID-Exists' and info/validity='Active']">
     228    <xsl:when test="$stat/ietfdoc[(state/phase='ID-Exists' or not(state/phase/*)) and info/validity='Active']">
    229229      <xsl:value-of select="concat('[',$stat/ietfdoc/state/phase/@ts,' ',$stat/ietfdoc/state/phase,'] ok')"/>
    230230    </xsl:when>
  • rfc2629xslt/clean-for-DTD.xslt

    r2739 r2750  
    22    Strip rfc2629.xslt extensions, generating XML input for MTR's xml2rfc
    33
    4     Copyright (c) 2006-2015, Julian Reschke (julian.reschke@greenbytes.de)
     4    Copyright (c) 2006-2016, Julian Reschke (julian.reschke@greenbytes.de)
    55    All rights reserved.
    66
     
    3535                xmlns:grddl="http://www.w3.org/2003/g/data-view#"
    3636                xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
     37                xmlns:svg="http://www.w3.org/2000/svg"
    3738                xmlns:x="http://purl.org/net/xml2rfc/ext"
     39                xmlns:xi="http://www.w3.org/2001/XInclude"
    3840                xmlns:xhtml="http://www.w3.org/1999/xhtml"
    39                 exclude-result-prefixes="ed grddl rdf x xhtml"
     41                exclude-result-prefixes="ed grddl rdf svg x xi xhtml"
    4042>
    4143
     
    200202            <!-- it's not an element we can link to -->
    201203            <xsl:call-template name="warning">
    202               <xsl:with-param name="inline" select="'no'"/>
    203204              <xsl:with-param name="msg">couldn't create the link as <xsl:value-of select="name()"/> does not support the anchor attribute.</xsl:with-param>
    204205            </xsl:call-template>
     
    213214    <xsl:otherwise>
    214215      <xsl:call-template name="warning">
    215         <xsl:with-param name="inline" select="'no'"/>
    216216        <xsl:with-param name="msg">internal link target for '<xsl:value-of select="$val"/>' does not exist.</xsl:with-param>
    217217      </xsl:call-template>
     
    663663<xsl:template match="@x:is-code-component" mode="cleanup"/>
    664664
     665<xsl:template match="artwork[svg:svg]" mode="cleanup">
     666<xsl:call-template name="warning">
     667  <xsl:with-param name="msg">SVG image removed.</xsl:with-param>
     668</xsl:call-template>
     669<artwork>(see SVG image in HTML version)</artwork>
     670</xsl:template>
     671
    665672<xsl:template match="artwork" mode="cleanup">
    666673  <xsl:variable name="content2"><xsl:apply-templates select="."/></xsl:variable>
     
    695702
    696703<xsl:template match="@x:indent-with" mode="cleanup"/>
     704<xsl:template match="@x:lang" mode="cleanup"/>
    697705
    698706<xsl:template name="indent">
     
    752760  </xsl:comment>
    753761  <xsl:call-template name="warning">
    754     <xsl:with-param name="inline" select="'no'"/>
    755762    <xsl:with-param name="msg">Dropping annotation on <xsl:value-of select="local-name(..)"/> element.</xsl:with-param>
    756763  </xsl:call-template>
     
    813820    <xsl:when test="*">
    814821      <xsl:call-template name="warning">
    815         <xsl:with-param name="inline" select="'no'"/>
    816822        <xsl:with-param name="msg">strong not translated when including child elements</xsl:with-param>
    817823      </xsl:call-template>
     
    830836    <xsl:when test="*">
    831837      <xsl:call-template name="warning">
    832         <xsl:with-param name="inline" select="'no'"/>
    833838        <xsl:with-param name="msg">em not translated when including child elements</xsl:with-param>
    834839      </xsl:call-template>
     
    847852    <xsl:when test="*">
    848853      <xsl:call-template name="warning">
    849         <xsl:with-param name="inline" select="'no'"/>
    850854        <xsl:with-param name="msg">tt not translated when they include child elements</xsl:with-param>
    851855      </xsl:call-template>
     
    949953  <xsl:if test="@numbered='no'">
    950954    <xsl:call-template name="warning">
    951       <xsl:with-param name="inline" select="'no'"/>
    952955      <xsl:with-param name="msg">unnumbered sections not supported</xsl:with-param>
    953956    </xsl:call-template>
     
    10631066    <xsl:if test="@start and @start!='1'">
    10641067      <xsl:call-template name="warning">
    1065         <xsl:with-param name="inline" select="'no'"/>
    10661068        <xsl:with-param name="msg">list start != 1 not supported</xsl:with-param>
    10671069      </xsl:call-template>
     
    10911093</xsl:template>
    10921094
     1095<!-- Source Code -->
     1096<xsl:template match="sourcecode" mode="cleanup">
     1097  <xsl:choose>
     1098    <xsl:when test="parent::figure">
     1099      <artwork>
     1100        <xsl:copy-of select="@anchor|@type"/>
     1101        <xsl:apply-templates mode="cleanup"/>
     1102      </artwork>
     1103    </xsl:when>
     1104    <xsl:otherwise>
     1105      <figure>
     1106        <artwork>
     1107          <xsl:copy-of select="@anchor|@type"/>
     1108          <xsl:apply-templates mode="cleanup"/>
     1109        </artwork>
     1110      </figure>
     1111    </xsl:otherwise>
     1112  </xsl:choose>
     1113</xsl:template>
     1114
     1115<!-- date formats -->
     1116<xsl:template match="/rfc/front/date/@month" mode="cleanup">
     1117  <xsl:attribute name="month">
     1118    <xsl:choose>
     1119      <xsl:when test="string(number(.))!='NaN' and number(.)&gt;0 and number(.)&lt;13">
     1120        <xsl:call-template name="get-month-as-name">
     1121          <xsl:with-param name="month" select="."/>
     1122        </xsl:call-template>
     1123      </xsl:when>
     1124      <xsl:otherwise>
     1125        <xsl:value-of select="."/>
     1126      </xsl:otherwise>
     1127    </xsl:choose>
     1128  </xsl:attribute>
     1129</xsl:template>
     1130
     1131<!-- x:include -->
     1132<xsl:template match="/rfc/back/references/xi:include" mode="cleanup">
     1133  <xsl:copy-of select="document(@href)"/>
     1134</xsl:template>
     1135
    10931136<!-- Display names for references -->
    10941137<xsl:template match="displayreference" mode="cleanup"/>
     
    11121155      <xsl:value-of select="concat('_',$tnewname)"/>
    11131156      <xsl:call-template name="warning">
    1114         <xsl:with-param name="inline" select="'no'"/>
    11151157        <xsl:with-param name="msg">rewriting reference name '<xsl:value-of select="$tnewname"/>' to '<xsl:value-of select="concat('_',$tnewname)"/>' due to illegal start character</xsl:with-param>
    11161158      </xsl:call-template>
  • rfc2629xslt/gen-w3c-reference.xslt

    r2726 r2750  
    33    <http://www.w3.org/2002/01/tr-automation/tr.rdf>)
    44
    5     Copyright (c) 2010-2014, Julian Reschke (julian.reschke@greenbytes.de)
     5    Copyright (c) 2010-2016, Julian Reschke (julian.reschke@greenbytes.de)
    66    All rights reserved.
    77
     
    3838               xmlns:r="http://www.w3.org/2001/02pd/rec54#"
    3939               xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
     40               xmlns:x="http://purl.org/net/xml2rfc/ext"
    4041               version="1.0"
    4142               exclude-result-prefixes="contact dc doc org r rdf"
     
    7273      <xsl:processing-instruction name="rfc-ext">include-references-in-index='yes'</xsl:processing-instruction>
    7374      <xsl:processing-instruction name="rfc-ext">check-artwork-width='no'</xsl:processing-instruction>
     75      <xsl:processing-instruction name="rfc-ext">html-pretty-print="prettyprint https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js"</xsl:processing-instruction>
    7476      <rfc>
    7577        <front>
     
    245247        Reference element for <xref target="{$s}"/>.
    246248      </t>
    247 <figure><artwork type="inline">
     249<figure><artwork type="inline" x:lang="">
    248250&lt;reference anchor='<xsl:value-of select="$anchor"/>'
    249251           target='<xsl:value-of select="$link"/>'>
  • rfc2629xslt/rfc2629-ext.rnc

    r2738 r2750  
    1111# Define RDF namespace
    1212namespace rdf = "http://www.w3.org/1999/02/22-rdf-syntax-ns#"
     13
     14# Define SVG namespace
     15namespace svg = "http://www.w3.org/2000/svg"
     16
     17# Define XInclude namespace
     18namespace xi = "http://www.w3.org/2001/XInclude"
    1319
    1420# Include rfc2629bis RNC grammar
     
    3339    element artwork {
    3440      attlist.artwork,
    35       (TEXT
    36         | eref
    37         | iref
    38         | spanx
    39         | xref
    40         | v3_em
    41         | v3_strong
    42         | x_abnf-char-sequence
    43         | x_bb
    44         | x_bc
    45         | x_bcp14
    46         | x_bt
    47         | x_highlight
    48         | x_length-of
    49         | x_parse-xml
    50         | x_ref
    51         | x_span
    52         | x_x)*
     41      ( v3_svg |
     42        (TEXT
     43          | eref
     44          | iref
     45          | spanx
     46          | xref
     47          | v3_em
     48          | v3_strong
     49          | x_abnf-char-sequence
     50          | x_bb
     51          | x_bc
     52          | x_bcp14
     53          | x_bt
     54          | x_highlight
     55          | x_length-of
     56          | x_parse-xml
     57          | x_ref
     58          | x_span
     59          | x_x)*
     60        )
    5361    }
    5462
     
    8694        | eref
    8795        | xref)*
     96    }
     97
     98  # Redefine <figure> to allow more child elements
     99  figure =
     100    element figure {
     101      attlist.cref,
     102      iref*,
     103      preamble?,
     104      ( artwork | v3_sourcecode),
     105      postamble?
    88106    }
    89107
     
    173191      attribute title { text }?,
    174192      v3_name?,
    175       reference+
     193      (reference
     194       | xi_include)+
    176195    }
    177196
     
    202221       | v3_name
    203222       | v3_ol
     223       | v3_sourcecode
    204224       | v3_ul
    205225       | x_anchor-alias
     
    251271}
    252272
    253 # Allow x:indent-with attribute on <artwork>
     273# Allow extension attributes on <artwork> (Section 11.23)
    254274attlist.artwork &=
    255275  attribute x:indent-with { ATEXT }?,
     276  attribute x:lang { "" }?,
    256277  attribute x:is-code-component { "no" | "yes" }?
    257278
     
    279300# Extend attribute set for <reference>
    280301attlist.reference &=
    281   attribute quoteTitle { "false" | "true" }? # see Section 12.14.1
     302  attribute quoteTitle { "false" | "true" }? # see Section 12.15.1
    282303
    283304# Extend attribute set for <rfc>
     
    291312  attribute title { ATEXT }?,
    292313  attribute toc { "include" | "exclude" | "default" }?,
    293   attribute numbered { "false" | "true" }?, # see Section 12.15.1
    294   attribute removeInRFC { "false" | "true" }?, # see Section 12.15.2
     314  attribute numbered { "false" | "true" }?, # see Section 12.16.1
     315  attribute removeInRFC { "false" | "true" }?, # see Section 12.16.2
    295316  attribute x:fixed-section-number { ATEXT }?
    296317
     
    312333                     "none" }?,
    313334  attribute x:rel  { ATEXT }?,
    314   attribute x:sec  { ATEXT }?,
    315   attribute relative { ATEXT }?,      # Section 12.21.1
    316   attribute section { ATEXT }?,       # Section 12.21.2
    317   attribute sectionFormat { ATEXT }?  # Section 12.21.3
     335  attribute x:sec  { ATEXT }?
    318336
    319337# Side Note (see Section 12.1)
     
    450468  }
    451469
    452 # Emphasized Text (see Section 12.16)
     470# Source Code (see Section 12.14)
     471v3_sourcecode =
     472  element sourcecode {
     473    attribute anchor { xsd:ID }?,
     474    attribute x:lang { "" }?,
     475    TEXT
     476  }
     477
     478# Emphasized Text (see Section 12.17)
    453479v3_strong =
    454480  element strong {
     
    459485  }
    460486
    461 # Subscript (see Section 12.17)
     487# Subscript (see Section 12.18)
    462488v3_sub =
    463489  element sub {
     
    465491  }
    466492
    467 # Superscript (see Section 12.18)
     493# Superscript (see Section 12.19)
    468494v3_sup =
    469495  element sup {
     
    471497  }
    472498
    473 # Monospaced Text (see Section 12.19)
     499# Monospaced Text (see Section 12.21)
    474500v3_tt =
    475501  element tt {
     
    480506  }
    481507
    482 # Unordered List (see Section 12.20)
     508# Unordered List (see Section 12.22)
    483509v3_ul =
    484510  element ul {
     
    488514  }
    489515
     516# SVG (see Section 12.20)
     517v3_svg =
     518  element svg:svg {
     519    (attribute * { text }
     520        | text
     521        | anySVGElement)*
     522  }
     523
     524 anySVGElement =
     525    element svg:* {
     526       (attribute * { text }
     527        | text
     528        | anySVGElement)*
     529    }
     530     
    490531# Conversion to ABNF char sequence (see Section 11.1)
    491532x_abnf-char-sequence =
     
    688729  element x:span {
    689730    attribute anchor { xsd:ID }?,
     731    attribute x:lang { "" }?,
    690732    (TEXT
    691733      | x_parse-xml)*
     
    698740  }
    699741
     742# XInclude
     743xi_include =
     744  element xi:include {
     745    attribute href { text },
     746    empty
     747  }
     748
    700749# Embed RDF statements
    701750rdf_Description =
  • rfc2629xslt/rfc2629.xslt

    r2748 r2750  
    22    XSLT transformation from RFC2629 XML format to HTML
    33
    4     Copyright (c) 2006-2015, Julian Reschke (julian.reschke@greenbytes.de)
     4    Copyright (c) 2006-2016, Julian Reschke (julian.reschke@greenbytes.de)
    55    All rights reserved.
    66
     
    4141                xmlns:saxon="http://saxon.sf.net/"
    4242                xmlns:saxon-old="http://icl.com/saxon"
     43                xmlns:svg="http://www.w3.org/2000/svg"
    4344                xmlns:x="http://purl.org/net/xml2rfc/ext"
     45                xmlns:xi="http://www.w3.org/2001/XInclude"
    4446                xmlns:xhtml="http://www.w3.org/1999/xhtml"
    4547
    46                 exclude-result-prefixes="date ed exslt msxsl myns rdf saxon saxon-old x xhtml"
     48                exclude-result-prefixes="date ed exslt msxsl myns rdf saxon saxon-old svg x xi xhtml"
    4749                >
    4850
    4951<xsl:strip-space elements="abstract author back figure front list middle note postal reference references rfc section texttable"/>
    5052
    51 <xsl:output method="html" encoding="iso-8859-1" version="4.0" doctype-public="-//W3C//DTD HTML 4.01//EN" indent="no"/>
     53<xsl:output method="html" encoding="utf-8" doctype-system="about:legacy-compat" indent="no"/>
    5254
    5355<!-- rfc comments PI -->
     
    237239</xsl:variable>
    238240
     241<!-- include PI -->
     242
     243<xsl:template name="getIncludes">
     244  <xsl:param name="nodes"/>
     245  <xsl:for-each select="$nodes">
     246    <xsl:variable name="include">
     247      <xsl:call-template name="parse-pis">
     248        <xsl:with-param name="nodes" select="."/>
     249        <xsl:with-param name="attr" select="'include'"/>
     250      </xsl:call-template>
     251    </xsl:variable>
     252    <xsl:variable name="doc">
     253      <xsl:choose>
     254        <xsl:when test="$include=''"/>
     255        <xsl:when test="substring($include, string-length($include) - 3) != '.xml'">
     256          <xsl:copy-of select="document(concat($include,'.xml'))"/>
     257        </xsl:when>
     258        <xsl:otherwise>
     259          <xsl:copy-of select="document($include)"/>
     260        </xsl:otherwise>
     261      </xsl:choose>
     262    </xsl:variable>
     263    <xsl:if test="count(exslt:node-set($doc)) = 1">
     264      <myns:include from="{$include}" in="{generate-id(..)}">
     265        <xsl:copy-of select="$doc"/>
     266      </myns:include>
     267    </xsl:if>
     268  </xsl:for-each>
     269</xsl:template>
     270
     271<xsl:template name="getXIncludes">
     272  <xsl:param name="nodes"/>
     273  <xsl:for-each select="$nodes">
     274    <xsl:choose>
     275      <xsl:when test="(@parse and @parse!='xml') or @xpointer">
     276        <xsl:call-template name="error">
     277          <xsl:with-param name="msg" select="'Unsupported attributes on x:include element'"/>
     278        </xsl:call-template>
     279      </xsl:when>
     280      <xsl:otherwise>
     281        <xsl:variable name="doc">
     282          <xsl:copy-of select="document(@href)"/>
     283        </xsl:variable>
     284        <xsl:if test="count(exslt:node-set($doc)) = 1">
     285          <myns:include from="{@href}" in="{generate-id(..)}">
     286            <xsl:copy-of select="$doc"/>
     287          </myns:include>
     288        </xsl:if>
     289      </xsl:otherwise>
     290    </xsl:choose>
     291  </xsl:for-each>
     292</xsl:template>
     293
     294<xsl:variable name="includeDirectives">
     295  <xsl:call-template name="getIncludes">
     296    <xsl:with-param name="nodes" select="/rfc/back/references/processing-instruction('rfc')"/>
     297  </xsl:call-template>
     298  <xsl:call-template name="getXIncludes">
     299    <xsl:with-param name="nodes" select="/rfc/back/references/xi:include"/>
     300  </xsl:call-template>
     301</xsl:variable>
     302
     303<!-- prettyprinting -->
     304
     305<xsl:param name="xml2rfc-ext-html-pretty-print">
     306  <xsl:call-template name="parse-pis">
     307    <xsl:with-param name="nodes" select="/processing-instruction('rfc-ext')"/>
     308    <xsl:with-param name="attr" select="'html-pretty-print'"/>
     309  </xsl:call-template>
     310</xsl:param>
     311
     312<xsl:variable name="prettyprint-class">
     313  <xsl:if test="$xml2rfc-ext-html-pretty-print">
     314    <xsl:value-of select="substring-before(normalize-space($xml2rfc-ext-html-pretty-print),' ')"/>
     315  </xsl:if>
     316</xsl:variable>
     317
     318<xsl:variable name="prettyprint-script">
     319  <xsl:if test="$xml2rfc-ext-html-pretty-print">
     320    <xsl:value-of select="substring-after(normalize-space($xml2rfc-ext-html-pretty-print),' ')"/>
     321  </xsl:if>
     322</xsl:variable>
     323
    239324<!-- CSS class name remapping -->
    240325
     
    263348<xsl:variable name="css-left"><xsl:call-template name="generate-css-class"><xsl:with-param name="name" select="'left'"/></xsl:call-template></xsl:variable>
    264349<xsl:variable name="css-noprint"><xsl:call-template name="generate-css-class"><xsl:with-param name="name" select="'noprint'"/></xsl:call-template></xsl:variable>
    265 <xsl:variable name="css-note"><xsl:call-template name="generate-css-class"><xsl:with-param name="name" select="'note'"/></xsl:call-template></xsl:variable>
    266350<xsl:variable name="css-publishedasrfc"><xsl:call-template name="generate-css-class"><xsl:with-param name="name" select="'publishedasrfc'"/></xsl:call-template></xsl:variable>
    267351<xsl:variable name="css-reference"><xsl:call-template name="generate-css-class"><xsl:with-param name="name" select="'reference'"/></xsl:call-template></xsl:variable>
     
    743827
    744828
    745 <xsl:template match="text()[not(ancestor::artwork)]">
     829<xsl:template match="text()[not(ancestor::artwork) and not(ancestor::sourcecode)]">
    746830  <xsl:variable name="ws" select="'&#9;&#10;&#13;&#32;'"/>
    747831  <xsl:variable name="starts-with-ws" select="'' = translate(substring(.,1,1),$ws,'')"/>
     
    763847<xsl:template match="abstract">
    764848  <xsl:call-template name="check-no-text-content"/>
    765   <h2 id="{$anchor-prefix}.abstract"><a href="#{$anchor-prefix}.abstract">Abstract</a></h2>
    766   <xsl:apply-templates />
     849  <section id="{$anchor-prefix}.abstract">
     850    <h2><a href="#{$anchor-prefix}.abstract">Abstract</a></h2>
     851    <xsl:apply-templates />
     852  </section>
    767853</xsl:template>
    768854
     
    786872
    787873<xsl:template name="add-artwork-class">
    788   <xsl:choose>
    789     <xsl:when test="@type='abnf' or @type='abnf2045' or @type='abnf2616' or @type='application/xml-dtd' or @type='inline' or @type='application/relax-ng-compact-syntax'">
    790       <xsl:attribute name="class">inline</xsl:attribute>
    791     </xsl:when>
    792     <xsl:when test="starts-with(@type,'message/http') and contains(@type,'msgtype=&quot;request&quot;')">
    793       <xsl:attribute name="class">text2</xsl:attribute>
    794     </xsl:when>
    795     <xsl:when test="starts-with(@type,'message/http')">
    796       <xsl:attribute name="class">text</xsl:attribute>
    797     </xsl:when>
    798     <xsl:when test="starts-with(@type,'drawing')">
    799       <xsl:attribute name="class">drawing</xsl:attribute>
    800     </xsl:when>
    801     <xsl:when test="starts-with(@type,'text/plain') or @type='example' or @type='code' or @type='application/xml-dtd' or @type='application/json'">
    802       <xsl:attribute name="class">text</xsl:attribute>
    803     </xsl:when>
    804     <xsl:otherwise/>
    805   </xsl:choose>
     874  <xsl:variable name="v">
     875    <xsl:choose>
     876      <xsl:when test="@type='abnf' or @type='abnf2045' or @type='abnf2616' or @type='abnf7230' or @type='application/xml-dtd' or @type='inline' or @type='application/relax-ng-compact-syntax'">inline</xsl:when>
     877      <xsl:when test="starts-with(@type,'message/http') and contains(@type,'msgtype=&quot;request&quot;')">text2</xsl:when>
     878      <xsl:when test="starts-with(@type,'message/http')">text</xsl:when>
     879      <xsl:when test="starts-with(@type,'drawing')">drawing</xsl:when>
     880      <xsl:when test="starts-with(@type,'text/plain') or @type='example' or @type='code' or @type='application/xml-dtd' or @type='application/json'">text</xsl:when>
     881      <xsl:otherwise/>
     882    </xsl:choose>
     883    <xsl:if test="@x:lang and $prettyprint-class!=''"><xsl:value-of select="concat(' ',$prettyprint-class)"/></xsl:if>
     884  </xsl:variable>
     885  <xsl:if test="normalize-space($v)!=''">
     886    <xsl:attribute name="class"><xsl:value-of select="normalize-space($v)"/></xsl:attribute>
     887  </xsl:if>
    806888</xsl:template>
    807889
     
    818900</xsl:template>
    819901
    820 <xsl:template match="artwork">
     902<xsl:template match="artwork[svg:svg]">
     903  <xsl:copy-of select="svg:svg"/>
     904</xsl:template>
     905
     906<xsl:template match="artwork|sourcecode">
    821907  <xsl:if test="not(ancestor::ed:del) and $xml2rfc-ext-parse-xml-in-artwork='yes' and function-available('myns:parseXml')" use-when="function-available('myns:parseXml')">
    822908    <xsl:if test="contains(.,'&lt;?xml')">
     
    12671353<xsl:template match="front">
    12681354  <xsl:call-template name="check-no-text-content"/>
    1269   <xsl:if test="$xml2rfc-topblock!='no'">
    1270     <!-- collect information for left column -->
    1271     <xsl:variable name="leftColumn">
    1272       <xsl:call-template name="collectLeftHeaderColumn" />
    1273     </xsl:variable>
    1274     <!-- collect information for right column -->
    1275     <xsl:variable name="rightColumn">
    1276       <xsl:call-template name="collectRightHeaderColumn" />
    1277     </xsl:variable>
    1278     <!-- insert the collected information -->
    1279     <table class="{$css-header}" id="{$anchor-prefix}.headerblock">
    1280       <xsl:choose>
    1281         <xsl:when test="function-available('exslt:node-set')">
    1282           <xsl:call-template name="emitheader">
    1283             <xsl:with-param name="lc" select="exslt:node-set($leftColumn)" />
    1284             <xsl:with-param name="rc" select="exslt:node-set($rightColumn)" />
    1285           </xsl:call-template>
    1286         </xsl:when>
    1287         <xsl:otherwise>
    1288           <xsl:call-template name="error">
    1289             <xsl:with-param name="msg" select="$node-set-warning"/>
    1290           </xsl:call-template>
    1291         </xsl:otherwise>
    1292       </xsl:choose>
    1293     </table>
    1294   </xsl:if>
    1295 
    1296   <div id="{$anchor-prefix}.title">
    1297     <!-- main title -->
    1298 
    1299     <h1><xsl:apply-templates select="title"/></h1>
    1300     <xsl:if test="/rfc/@docName">
    1301    
    1302       <xsl:variable name="docname" select="/rfc/@docName"/>
    1303 
    1304       <xsl:choose>
    1305         <xsl:when test="$rfcno!=''">
    1306           <xsl:call-template name="warning">
    1307             <xsl:with-param name="msg">The @docName attribute '<xsl:value-of select="$docname"/>' is ignored because an RFC number is specified as well.</xsl:with-param>
    1308           </xsl:call-template>
    1309         </xsl:when>
    1310         <xsl:otherwise>
    1311           <div class="filename"><xsl:value-of select="$docname"/></div>
    1312         </xsl:otherwise>
    1313       </xsl:choose>
    1314      
    1315       <xsl:variable name="docname-noext">
     1355  <header>
     1356    <xsl:if test="$xml2rfc-topblock!='no'">
     1357      <!-- collect information for left column -->
     1358      <xsl:variable name="leftColumn">
     1359        <xsl:call-template name="collectLeftHeaderColumn" />
     1360      </xsl:variable>
     1361      <!-- collect information for right column -->
     1362      <xsl:variable name="rightColumn">
     1363        <xsl:call-template name="collectRightHeaderColumn" />
     1364      </xsl:variable>
     1365      <!-- insert the collected information -->
     1366      <table class="{$css-header}" id="{$anchor-prefix}.headerblock">
    13161367        <xsl:choose>
    1317           <xsl:when test="contains($docname,'.')">
    1318             <xsl:call-template name="warning">
    1319               <xsl:with-param name="msg">The @docName attribute '<xsl:value-of select="$docname"/>' should contain the base name, not the filename (thus no file extension).</xsl:with-param>
     1368          <xsl:when test="function-available('exslt:node-set')">
     1369            <xsl:call-template name="emitheader">
     1370              <xsl:with-param name="lc" select="exslt:node-set($leftColumn)" />
     1371              <xsl:with-param name="rc" select="exslt:node-set($rightColumn)" />
    13201372            </xsl:call-template>
    1321             <xsl:value-of select="substring-before($docname,'.')"/>
    13221373          </xsl:when>
    13231374          <xsl:otherwise>
    1324             <xsl:value-of select="$docname"/>
     1375            <xsl:call-template name="error">
     1376              <xsl:with-param name="msg" select="$node-set-warning"/>
     1377            </xsl:call-template>
    13251378          </xsl:otherwise>
    13261379        </xsl:choose>
    1327       </xsl:variable>
    1328 
    1329       <!-- more name checks -->
    1330       <xsl:variable name="offending" select="translate($docname,concat($lcase,$digits,'-.'),'')"/>
    1331       <xsl:if test="$offending != ''">
    1332         <xsl:call-template name="warning">
    1333           <xsl:with-param name="msg">The @docName attribute '<xsl:value-of select="$docname"/>' should not contain the character '<xsl:value-of select="substring($offending,1,1)"/>'.</xsl:with-param>
    1334         </xsl:call-template>
     1380      </table>
     1381    </xsl:if>
     1382
     1383    <div id="{$anchor-prefix}.title">
     1384      <!-- main title -->
     1385      <h1><xsl:apply-templates select="title"/></h1>
     1386      <xsl:if test="/rfc/@docName">
     1387        <xsl:variable name="docname" select="/rfc/@docName"/>
     1388        <xsl:choose>
     1389          <xsl:when test="$rfcno!=''">
     1390            <xsl:call-template name="warning">
     1391              <xsl:with-param name="msg">The @docName attribute '<xsl:value-of select="$docname"/>' is ignored because an RFC number is specified as well.</xsl:with-param>
     1392            </xsl:call-template>
     1393          </xsl:when>
     1394          <xsl:otherwise>
     1395            <div class="filename"><xsl:value-of select="$docname"/></div>
     1396          </xsl:otherwise>
     1397        </xsl:choose>
     1398       
     1399        <xsl:variable name="docname-noext">
     1400          <xsl:choose>
     1401            <xsl:when test="contains($docname,'.')">
     1402              <xsl:call-template name="warning">
     1403                <xsl:with-param name="msg">The @docName attribute '<xsl:value-of select="$docname"/>' should contain the base name, not the filename (thus no file extension).</xsl:with-param>
     1404              </xsl:call-template>
     1405              <xsl:value-of select="substring-before($docname,'.')"/>
     1406            </xsl:when>
     1407            <xsl:otherwise>
     1408              <xsl:value-of select="$docname"/>
     1409            </xsl:otherwise>
     1410          </xsl:choose>
     1411        </xsl:variable>
     1412 
     1413        <!-- more name checks -->
     1414        <xsl:variable name="offending" select="translate($docname,concat($lcase,$digits,'-.'),'')"/>
     1415        <xsl:if test="$offending != ''">
     1416          <xsl:call-template name="warning">
     1417            <xsl:with-param name="msg">The @docName attribute '<xsl:value-of select="$docname"/>' should not contain the character '<xsl:value-of select="substring($offending,1,1)"/>'.</xsl:with-param>
     1418          </xsl:call-template>
     1419        </xsl:if>
     1420 
     1421        <xsl:if test="contains($docname,'--')">
     1422          <xsl:call-template name="warning">
     1423            <xsl:with-param name="msg">The @docName attribute '<xsl:value-of select="$docname"/>' should not contain the character sequence '--'.</xsl:with-param>
     1424          </xsl:call-template>
     1425        </xsl:if>
     1426 
     1427        <xsl:if test="not(starts-with($docname,'draft-'))">
     1428          <xsl:call-template name="warning">
     1429            <xsl:with-param name="msg">The @docName attribute '<xsl:value-of select="$docname"/>' should start with 'draft-'.</xsl:with-param>
     1430          </xsl:call-template>
     1431        </xsl:if>
     1432 
     1433        <!-- sequence number -->
     1434        <xsl:variable name="seq">
     1435          <xsl:choose>
     1436            <xsl:when test="substring($docname-noext,string-length($docname-noext) + 1 - string-length('-latest'))='-latest'">latest</xsl:when>
     1437            <xsl:when test="substring($docname-noext,string-length($docname-noext) - 2, 1)='-'"><xsl:value-of select="substring($docname-noext,string-length($docname-noext)-1)"/></xsl:when>
     1438            <xsl:otherwise/>
     1439          </xsl:choose>
     1440        </xsl:variable>
     1441 
     1442        <xsl:if test="$seq='' or ($seq!='latest' and translate($seq,$digits,'')!='')">
     1443          <xsl:call-template name="warning">
     1444            <xsl:with-param name="msg">The @docName attribute '<xsl:value-of select="$docname"/>' should end with a two-digit sequence number or 'latest'.</xsl:with-param>
     1445          </xsl:call-template>
     1446        </xsl:if>
     1447 
     1448        <xsl:if test="string-length($docname)-string-length($seq) > 50">
     1449          <xsl:call-template name="warning">
     1450            <xsl:with-param name="msg">The @docName attribute '<xsl:value-of select="$docname"/>', excluding sequence number, should have less than 50 characters.</xsl:with-param>
     1451          </xsl:call-template>
     1452        </xsl:if>
     1453 
    13351454      </xsl:if>
    1336 
    1337       <xsl:if test="contains($docname,'--')">
    1338         <xsl:call-template name="warning">
    1339           <xsl:with-param name="msg">The @docName attribute '<xsl:value-of select="$docname"/>' should not contain the character sequence '--'.</xsl:with-param>
    1340         </xsl:call-template>
    1341       </xsl:if>
    1342 
    1343       <xsl:if test="not(starts-with($docname,'draft-'))">
    1344         <xsl:call-template name="warning">
    1345           <xsl:with-param name="msg">The @docName attribute '<xsl:value-of select="$docname"/>' should start with 'draft-'.</xsl:with-param>
    1346         </xsl:call-template>
    1347       </xsl:if>
    1348 
    1349       <!-- sequence number -->
    1350       <xsl:variable name="seq">
    1351         <xsl:choose>
    1352           <xsl:when test="substring($docname-noext,string-length($docname-noext) + 1 - string-length('-latest'))='-latest'">latest</xsl:when>
    1353           <xsl:when test="substring($docname-noext,string-length($docname-noext) - 2, 1)='-'"><xsl:value-of select="substring($docname-noext,string-length($docname-noext)-1)"/></xsl:when>
    1354           <xsl:otherwise/>
    1355         </xsl:choose>
    1356       </xsl:variable>
    1357 
    1358       <xsl:if test="$seq='' or ($seq!='latest' and translate($seq,$digits,'')!='')">
    1359         <xsl:call-template name="warning">
    1360           <xsl:with-param name="msg">The @docName attribute '<xsl:value-of select="$docname"/>' should end with a two-digit sequence number or 'latest'.</xsl:with-param>
    1361         </xsl:call-template>
    1362       </xsl:if>
    1363 
    1364       <xsl:if test="string-length($docname)-string-length($seq) > 50">
    1365         <xsl:call-template name="warning">
    1366           <xsl:with-param name="msg">The @docName attribute '<xsl:value-of select="$docname"/>', excluding sequence number, should have less than 50 characters.</xsl:with-param>
    1367         </xsl:call-template>
    1368       </xsl:if>
    1369 
    1370     </xsl:if>
    1371   </div>
     1455    </div>
     1456  </header>
    13721457
    13731458  <!-- insert notice about update -->
     
    18211906  </xsl:variable>
    18221907
    1823   <xsl:if test="$dd-content!=''">
    1824     <dd>
    1825       <xsl:call-template name="insertInsDelClass"/>
    1826       <!-- if hangIndent present, use 0.7 of the specified value (1em is the width of the "m" character -->
    1827       <xsl:if test="../@hangIndent">
    1828         <xsl:attribute name="style">margin-left: <xsl:value-of select="format-number(../@hangIndent * 0.7,'#.#')"/>em</xsl:attribute>
    1829       </xsl:if>
    1830       <xsl:apply-templates />
    1831     </dd>
    1832   </xsl:if>
     1908  <xsl:choose>
     1909    <xsl:when test="$dd-content!=''">
     1910      <dd>
     1911        <xsl:call-template name="insertInsDelClass"/>
     1912        <!-- if hangIndent present, use 0.7 of the specified value (1em is the width of the "m" character -->
     1913        <xsl:if test="../@hangIndent">
     1914          <xsl:attribute name="style">margin-left: <xsl:value-of select="format-number(../@hangIndent * 0.7,'#.#')"/>em</xsl:attribute>
     1915        </xsl:if>
     1916        <xsl:apply-templates />
     1917      </dd>
     1918    </xsl:when>
     1919    <xsl:otherwise>
     1920      <dd>&#160;</dd>
     1921    </xsl:otherwise>
     1922  </xsl:choose>
    18331923</xsl:template>
    18341924
     
    19041994  <xsl:call-template name="check-no-text-content"/>
    19051995  <xsl:variable name="num"><xsl:number/></xsl:variable>
    1906     <h2 id="{$anchor-prefix}.note.{$num}">
     1996  <section id="{$anchor-prefix}.note.{$num}">
     1997    <h2>
    19071998      <xsl:call-template name="insertInsDelClass"/>
    19081999      <a href="#{$anchor-prefix}.note.{$num}">
     
    19102001      </a>
    19112002    </h2>
    1912   <xsl:apply-templates />
     2003    <xsl:apply-templates />
     2004  </section>
    19132005</xsl:template>
    19142006
     
    20392131    <xsl:choose>
    20402132      <xsl:when test="starts-with($bib/@target,'http://www.rfc-editor.org/info/rfc') or starts-with($bib/@target,'https://www.rfc-editor.org/info/rfc') and $ref and ($ref/@x:sec or $ref/@x:rel or $ref/@section or $ref/@relative)">
    2041         <xsl:call-template name="warning">
    2042           <xsl:with-param name="msg">Ignoring @target <xsl:value-of select="$bib/@target"/> in link calculation</xsl:with-param>
    2043         </xsl:call-template>
     2133        <!--ignored, use tools.ietf.org link instead -->
    20442134      </xsl:when>
    20452135      <xsl:otherwise>
     
    21122202      </xsl:call-template>
    21132203    </xsl:when>
    2114     <xsl:when test="not(ancestor::ed:del) and not(key('xref-item',$anchor))">
     2204    <xsl:when test="not(ancestor::ed:del) and (ancestor::rfc and not(key('xref-item',$anchor)))">
    21152205      <xsl:call-template name="warning">
    21162206        <xsl:with-param name="msg">unused reference '<xsl:value-of select="@anchor"/>'</xsl:with-param>
     2207      </xsl:call-template>
     2208    </xsl:when>
     2209    <xsl:when test="not(ancestor::ed:del) and (not(ancestor::rfc) and not($src//xref[@target=$anchor]))">
     2210      <xsl:call-template name="warning">
     2211        <xsl:with-param name="msg">unused (included) reference '<xsl:value-of select="@anchor"/>'</xsl:with-param>
    21172212      </xsl:call-template>
    21182213    </xsl:when>
     
    21422237  <xsl:variable name="target">
    21432238    <xsl:choose>
     2239      <xsl:when test="starts-with(@target,'http://www.rfc-editor.org/info/rfc') or starts-with(@target,'https://www.rfc-editor.org/info/rfc')">
     2240        <xsl:call-template name="info">
     2241          <xsl:with-param name="msg">Ignoring @target <xsl:value-of select="@target"/> in link calculation</xsl:with-param>
     2242        </xsl:call-template>
     2243        <xsl:call-template name="computed-auto-target">
     2244          <xsl:with-param name="bib" select="."/>
     2245        </xsl:call-template>
     2246      </xsl:when>
    21442247      <xsl:when test="@target">
    2145         <xsl:if test="string-length(normalize-space(@target)) = 0">
     2248        <xsl:if test="normalize-space(@target)=''">
    21462249          <xsl:call-template name="warning">
    21472250            <xsl:with-param name="msg">invalid (empty) target attribute in reference '<xsl:value-of select="@anchor"/>'</xsl:with-param>
     
    23662469</xsl:template>
    23672470
    2368 
    23692471<xsl:template match="references">
    23702472  <xsl:call-template name="check-no-text-content"/>
    23712473
     2474  <xsl:variable name="refseccount" select="count(/rfc/back/references)+count(/rfc/back/ed:replace/ed:ins/references)"/>
     2475
     2476  <xsl:choose>
     2477    <!-- insert pseudo section when needed -->
     2478    <xsl:when test="not(preceding::references) and $refseccount!=1">
     2479      <xsl:call-template name="insert-conditional-hrule"/>
     2480      <section id="{$anchor-prefix}.references">
     2481        <xsl:call-template name="insert-conditional-pagebreak"/>
     2482        <xsl:variable name="sectionNumber">
     2483          <xsl:call-template name="get-references-section-number"/>
     2484        </xsl:variable>
     2485        <h2 id="{$anchor-prefix}.section.{$sectionNumber}">
     2486          <a href="#{$anchor-prefix}.section.{$sectionNumber}">
     2487            <xsl:call-template name="emit-section-number">
     2488              <xsl:with-param name="no" select="$sectionNumber"/>
     2489            </xsl:call-template>
     2490          </a>
     2491          <xsl:text> </xsl:text>
     2492          <xsl:value-of select="$xml2rfc-refparent"/>
     2493        </h2>
     2494        <xsl:for-each select=".|following-sibling::references">
     2495          <xsl:call-template name="make-references">
     2496            <xsl:with-param name="nested" select="true()"/>
     2497          </xsl:call-template>
     2498        </xsl:for-each>
     2499      </section>
     2500    </xsl:when>
     2501    <xsl:when test="preceding::references">
     2502      <!-- already processed -->
     2503    </xsl:when>
     2504    <xsl:otherwise>
     2505      <xsl:call-template name="make-references">
     2506        <xsl:with-param name="nested" select="false()"/>
     2507      </xsl:call-template>
     2508    </xsl:otherwise>
     2509  </xsl:choose>
     2510
     2511</xsl:template>
     2512
     2513<xsl:template name="make-references">
     2514  <xsl:param name="nested"/>
     2515 
    23722516  <xsl:variable name="name">
    23732517    <xsl:if test="ancestor::ed:del">
     
    23772521  </xsl:variable>
    23782522
    2379   <xsl:variable name="refseccount" select="count(/rfc/back/references)+count(/rfc/back/ed:replace/ed:ins/references)"/>
    2380 
    2381   <!-- insert pseudo section when needed -->
    2382   <xsl:if test="not(preceding::references) and $refseccount!=1">
    2383     <xsl:call-template name="insert-conditional-hrule"/>
    2384     <h2 id="{$anchor-prefix}.references">
    2385       <xsl:call-template name="insert-conditional-pagebreak"/>
    2386       <xsl:variable name="sectionNumber">
    2387         <xsl:call-template name="get-references-section-number"/>
    2388       </xsl:variable>
    2389       <a id="{$anchor-prefix}.section.{$sectionNumber}" href="#{$anchor-prefix}.section.{$sectionNumber}">
    2390         <xsl:call-template name="emit-section-number">
    2391           <xsl:with-param name="no" select="$sectionNumber"/>
    2392         </xsl:call-template>
    2393       </a>
    2394       <xsl:text> </xsl:text>
    2395       <xsl:value-of select="$xml2rfc-refparent"/>
    2396     </h2>
    2397   </xsl:if>
    2398 
    23992523  <xsl:variable name="elemtype">
    24002524    <xsl:choose>
    2401       <xsl:when test="$refseccount!=1">h3</xsl:when>
     2525      <xsl:when test="$nested">h3</xsl:when>
    24022526      <xsl:otherwise>h2</xsl:otherwise>
    24032527    </xsl:choose>
     
    24222546  </xsl:variable>
    24232547
    2424   <xsl:element name="{$elemtype}">
     2548  <xsl:variable name="sectionNumber">
     2549    <xsl:call-template name="get-section-number"/>
     2550  </xsl:variable>
     2551
     2552  <xsl:variable name="anchorpostfix">
     2553    <xsl:if test="$nested">.<xsl:value-of select="$name"/></xsl:if>
     2554  </xsl:variable>
     2555
     2556  <section id="{$anchor-prefix}.references{$anchorpostfix}">
    24252557    <xsl:if test="$name='1'">
    24262558      <xsl:call-template name="insert-conditional-pagebreak"/>
    24272559    </xsl:if>
    2428     <xsl:variable name="sectionNumber">
    2429       <xsl:call-template name="get-section-number"/>
    2430     </xsl:variable>
    2431     <xsl:variable name="anchorpref">
     2560    <xsl:element name="{$elemtype}">
     2561      <xsl:attribute name="id"><xsl:value-of select="concat($anchor-prefix,'.section.',$sectionNumber)"/></xsl:attribute>
     2562      <a href="#{$anchor-prefix}.section.{$sectionNumber}">
     2563        <xsl:call-template name="emit-section-number">
     2564          <xsl:with-param name="no" select="$sectionNumber"/>
     2565        </xsl:call-template>
     2566      </a>
     2567      <xsl:text> </xsl:text>
     2568      <xsl:copy-of select="$title"/>
     2569    </xsl:element>
     2570 
     2571    <xsl:variable name="included" select="exslt:node-set($includeDirectives)/myns:include[@in=generate-id(current())]/reference"/>
     2572    <dl class="{$css-reference}">
    24322573      <xsl:choose>
    2433         <xsl:when test="$elemtype='h2'"></xsl:when>
    2434         <xsl:otherwise>.<xsl:value-of select="$name"/></xsl:otherwise>
     2574        <xsl:when test="$xml2rfc-sortrefs='yes' and $xml2rfc-symrefs!='no'">
     2575          <xsl:apply-templates select="*|$included">
     2576            <xsl:sort select="concat(/rfc/back/displayreference[@target=current()/@anchor]/@to,@anchor,.//ed:ins//reference/@anchor)" />
     2577          </xsl:apply-templates>
     2578        </xsl:when>
     2579        <xsl:otherwise>
     2580          <xsl:apply-templates select="*|$included"/>
     2581        </xsl:otherwise>
    24352582      </xsl:choose>
    2436     </xsl:variable>
    2437     <xsl:attribute name="id"><xsl:value-of select="concat($anchor-prefix,'.references',$anchorpref)"/></xsl:attribute>
    2438     <a href="#{$anchor-prefix}.section.{$sectionNumber}" id="{$anchor-prefix}.section.{$sectionNumber}">
    2439       <xsl:call-template name="emit-section-number">
    2440         <xsl:with-param name="no" select="$sectionNumber"/>
     2583    </dl>
     2584  </section>
     2585</xsl:template>
     2586
     2587<xsl:template match="xi:include">
     2588  <xsl:choose>
     2589    <xsl:when test="not(parent::references)">
     2590      <xsl:call-template name="error">
     2591        <xsl:with-param name="msg" select="'Support for x:include is restricted to child elements of &lt;references>'"/>
    24412592      </xsl:call-template>
    2442     </a>
    2443     <xsl:text> </xsl:text>
    2444     <xsl:copy-of select="$title"/>
    2445   </xsl:element>
    2446 
    2447   <dl class="{$css-reference}">
    2448     <xsl:choose>
    2449       <xsl:when test="$xml2rfc-sortrefs='yes' and $xml2rfc-symrefs!='no'">
    2450         <xsl:apply-templates>
    2451           <xsl:sort select="/rfc/back/displayreference[@target=current()/@anchor]/@to|@anchor|.//ed:ins//reference/@anchor" />
    2452         </xsl:apply-templates>
    2453       </xsl:when>
    2454       <xsl:otherwise>
    2455         <xsl:apply-templates />
    2456       </xsl:otherwise>
    2457     </xsl:choose>
    2458   </dl>
    2459 
    2460 </xsl:template>
     2593    </xsl:when>
     2594    <xsl:otherwise>
     2595      <!-- handled elsewhere -->
     2596    </xsl:otherwise>
     2597  </xsl:choose>
     2598</xsl:template>
     2599
    24612600<!-- processed earlier -->
    24622601<xsl:template match="references/name"/>
     
    24812620  <html lang="{$lang}">
    24822621    <head>
    2483       <xsl:if test="$xml2rfc-ext-support-rfc2731!='no'">
    2484         <xsl:attribute name="profile">http://dublincore.org/documents/2008/08/04/dc-html/</xsl:attribute>
    2485       </xsl:if>
    24862622      <title>
    24872623        <xsl:apply-templates select="front/title" mode="get-text-content" />
     
    25472683      <xsl:if test="$xml2rfc-ext-support-rfc2731!='no'">
    25482684        <!-- Dublin Core Metadata -->
    2549         <link rel="schema.dct" href="http://purl.org/dc/terms/" />
     2685        <link rel="schema.dcterms" href="http://purl.org/dc/terms/" />
    25502686
    25512687        <!-- DC creator, see RFC2731 -->
     
    25542690            <xsl:call-template name="format-initials"/>
    25552691          </xsl:variable>
    2556           <meta name="dct.creator" content="{concat(@surname,', ',$initials)}" />
     2692          <meta name="dcterms.creator" content="{concat(@surname,', ',$initials)}" />
    25572693        </xsl:for-each>
    25582694
     
    25602696          <xsl:choose>
    25612697            <xsl:when test="@number">
    2562               <meta name="dct.identifier" content="urn:ietf:rfc:{@number}" />
     2698              <meta name="dcterms.identifier" content="urn:ietf:rfc:{@number}" />
    25632699            </xsl:when>
    25642700            <xsl:when test="@docName">
    2565               <meta name="dct.identifier" content="urn:ietf:id:{@docName}" />
     2701              <meta name="dcterms.identifier" content="urn:ietf:id:{@docName}" />
    25662702            </xsl:when>
    25672703            <xsl:otherwise/>
    25682704          </xsl:choose>
    2569           <meta name="dct.issued" scheme="ISO8601">
     2705          <meta name="dcterms.issued">
    25702706            <xsl:attribute name="content">
    25712707              <xsl:value-of select="concat($xml2rfc-ext-pub-year,'-',$pub-month-numeric)"/>
     
    25842720
    25852721        <xsl:if test="front/abstract">
    2586           <meta name="dct.abstract" content="{normalize-space(front/abstract)}" />
     2722          <meta name="dcterms.abstract" content="{normalize-space(front/abstract)}" />
    25872723        </xsl:if>
    25882724
    25892725        <xsl:if test="@number">
    2590           <meta name="dct.isPartOf" content="urn:issn:2070-1721" />
     2726          <meta name="dcterms.isPartOf" content="urn:issn:2070-1721" />
    25912727        </xsl:if>
    25922728
    25932729      </xsl:if>
    25942730
    2595       <!-- this replicates dct.abstract, but is used by Google & friends -->
     2731      <!-- this replicates dcterms.abstract, but is used by Google & friends -->
    25962732      <xsl:if test="front/abstract">
    25972733        <meta name="description" content="{normalize-space(front/abstract)}" />
     
    28522988    <div id="{$anchor-prefix}.meta" class="{$css-docstatus}"></div>
    28532989  </xsl:if>
    2854   <div>
     2990  <section>
    28552991    <xsl:if test="@anchor">
    28562992      <xsl:call-template name="check-anchor"/>
     
    29123048      </xsl:if>
    29133049    </xsl:for-each>
    2914   </div>
     3050  </section>
    29153051</xsl:template>
    29163052
     
    29263062
    29273063<xsl:template match="spanx[@style='verb' or @style='vbare']|tt">
    2928   <tt>
     3064  <span class="tt">
    29293065    <xsl:call-template name="copy-anchor"/>
    29303066    <xsl:apply-templates />
    2931   </tt>
     3067  </span>
    29323068</xsl:template>
    29333069
     
    30383174  <xsl:choose>
    30393175    <xsl:when test="@sectionFormat">
     3176      <xsl:call-template name="warning">
     3177        <xsl:with-param name="msg">@sectionFormat is deprecated, use @x:fmt instead</xsl:with-param>
     3178      </xsl:call-template>
    30403179      <xsl:if test="@x:fmt">
    30413180        <xsl:call-template name="warning">
     
    30783217  <xsl:choose>
    30793218    <xsl:when test="@section">
     3219      <xsl:call-template name="warning">
     3220        <xsl:with-param name="msg">@section is deprecated, use @x:sec instead</xsl:with-param>
     3221      </xsl:call-template>
    30803222      <xsl:if test="@x:sec">
    30813223        <xsl:call-template name="warning">
     
    32293371  <xsl:for-each select="$src">
    32303372
    3231     <xsl:variable name="node" select="key('anchor-item',$xref/@target)" />
     3373    <xsl:variable name="node" select="key('anchor-item',$xref/@target)|exslt:node-set($includeDirectives)//reference[@anchor=$xref/@target]"/>
    32323374    <xsl:if test="count($node)=0 and not($node/ancestor::ed:del)">
    32333375      <xsl:for-each select="$xref">
     
    36193761    <xsl:with-param name="msg">no XSLT template for element '<xsl:value-of select="name()"/>'</xsl:with-param>
    36203762  </xsl:call-template>
    3621   <tt class="{$css-error}">&lt;<xsl:value-of select="name()" />&gt;</tt>
     3763  <span class="tt {$css-error}">&lt;<xsl:value-of select="name()" />&gt;</span>
    36223764  <xsl:copy><xsl:apply-templates select="node()|@*" /></xsl:copy>
    3623   <tt class="{$css-error}">&lt;/<xsl:value-of select="name()" />&gt;</tt>
     3765  <span class="tt {$css-error}">&lt;/<xsl:value-of select="name()" />&gt;</span>
    36243766</xsl:template>
    36253767
     
    36533795          <xsl:otherwise>
    36543796            <xsl:call-template name="info">
    3655               <xsl:with-param name="inline" select="'no'"/>
    36563797              <xsl:with-param name="msg">The /rfc/front/workgroup should only be used for Working/Research Group drafts</xsl:with-param>
    36573798            </xsl:call-template>
     
    36633804          <xsl:if test="contains($tmp,' research group') or contains($tmp,' working group')">
    36643805            <xsl:call-template name="info">
    3665               <xsl:with-param name="inline" select="'no'"/>
    36663806              <xsl:with-param name="msg">No need to include 'Working Group' or 'Research Group' postfix in /rfc/front/workgroup value '<xsl:value-of select="$v"/>'</xsl:with-param>
    36673807            </xsl:call-template>
     
    36893829        <xsl:if test="starts-with(/rfc/@docName,'draft-ietf-') and not(/rfc/front/workgroup)">
    36903830          <xsl:call-template name="info">
    3691             <xsl:with-param name="inline" select="'no'"/>
    36923831            <xsl:with-param name="msg">WG submissions should include a /rfc/front/workgroup element</xsl:with-param>
    36933832          </xsl:call-template>
     
    37323871        <xsl:otherwise>
    37333872          <xsl:call-template name="warning">
    3734             <xsl:with-param name="inline" select="'no'"/>
    37353873            <xsl:with-param name="msg">Unknown IETF area: "<xsl:value-of select="$area"/>" - should be one of: <xsl:for-each select="$allowed/ed:v">
    37363874              <xsl:text>"</xsl:text>
     
    37723910          <xsl:otherwise>
    37733911            <xsl:call-template name="warning">
    3774               <xsl:with-param name="inline" select="'no'"/>
    37753912              <xsl:with-param name="msg">There is no IETF document series called '<xsl:value-of select="/rfc/@category"/>'</xsl:with-param>
    37763913            </xsl:call-template>
     
    39284065  <xsl:choose>
    39294066    <xsl:when test="number($xml2rfc-ext-pub-day) >= 1">
     4067      <!-- have day of month? -->
    39304068      <xsl:if test="$in-prose">
    39314069        <xsl:text>on </xsl:text>
     
    39414079        <xsl:text>in </xsl:text>
    39424080      </xsl:if>
     4081      <xsl:variable name="month">
     4082        <xsl:call-template name="get-month-as-num">
     4083          <xsl:with-param name="month" select="$xml2rfc-ext-pub-month"/>
     4084        </xsl:call-template>
     4085      </xsl:variable>
    39434086      <xsl:choose>
    3944         <xsl:when test="$xml2rfc-ext-pub-month='January'">July <xsl:value-of select="$xml2rfc-ext-pub-year" /></xsl:when>
    3945         <xsl:when test="$xml2rfc-ext-pub-month='February'">August <xsl:value-of select="$xml2rfc-ext-pub-year" /></xsl:when>
    3946         <xsl:when test="$xml2rfc-ext-pub-month='March'">September <xsl:value-of select="$xml2rfc-ext-pub-year" /></xsl:when>
    3947         <xsl:when test="$xml2rfc-ext-pub-month='April'">October <xsl:value-of select="$xml2rfc-ext-pub-year" /></xsl:when>
    3948         <xsl:when test="$xml2rfc-ext-pub-month='May'">November <xsl:value-of select="$xml2rfc-ext-pub-year" /></xsl:when>
    3949         <xsl:when test="$xml2rfc-ext-pub-month='June'">December <xsl:value-of select="$xml2rfc-ext-pub-year" /></xsl:when>
    3950         <xsl:when test="$xml2rfc-ext-pub-month='July'">January <xsl:value-of select="$xml2rfc-ext-pub-year + 1" /></xsl:when>
    3951         <xsl:when test="$xml2rfc-ext-pub-month='August'">February <xsl:value-of select="$xml2rfc-ext-pub-year + 1" /></xsl:when>
    3952         <xsl:when test="$xml2rfc-ext-pub-month='September'">March <xsl:value-of select="$xml2rfc-ext-pub-year + 1" /></xsl:when>
    3953         <xsl:when test="$xml2rfc-ext-pub-month='October'">April <xsl:value-of select="$xml2rfc-ext-pub-year + 1" /></xsl:when>
    3954         <xsl:when test="$xml2rfc-ext-pub-month='November'">May <xsl:value-of select="$xml2rfc-ext-pub-year + 1" /></xsl:when>
    3955         <xsl:when test="$xml2rfc-ext-pub-month='December'">June <xsl:value-of select="$xml2rfc-ext-pub-year + 1" /></xsl:when>
     4087        <xsl:when test="string(number($month))!='NaN' and number($month) &gt; 0 and number($month) &lt; 7">
     4088          <xsl:call-template name="get-month-as-name">
     4089            <xsl:with-param name="month" select="number($month) + 6"/>
     4090          </xsl:call-template>
     4091          <xsl:text> </xsl:text>
     4092          <xsl:value-of select="$xml2rfc-ext-pub-year" />
     4093        </xsl:when>
     4094        <xsl:when test="string(number($month))!='NaN' and number($month) &gt; 6 and number($month) &lt; 13">
     4095          <xsl:call-template name="get-month-as-name">
     4096            <xsl:with-param name="month" select="number($month) - 6"/>
     4097          </xsl:call-template>
     4098          <xsl:text> </xsl:text>
     4099          <xsl:value-of select="$xml2rfc-ext-pub-year + 1" />
     4100        </xsl:when>
    39564101        <xsl:otherwise>WRONG SYNTAX FOR MONTH</xsl:otherwise>
    39574102      </xsl:choose>
     
    40664211    <xsl:call-template name="insert-conditional-hrule"/>
    40674212
    4068     <div class="avoidbreakinside">
    4069       <h2 id="{$anchor-prefix}.authors">
    4070         <xsl:call-template name="insert-conditional-pagebreak"/>
     4213    <section id="{$anchor-prefix}.authors" class="avoidbreakinside">
     4214      <xsl:call-template name="insert-conditional-pagebreak"/>
     4215      <h2>
    40714216        <xsl:if test="$number != ''">
    40724217          <a href="#{$anchor-prefix}.section.{$number}" id="{$anchor-prefix}.section.{$number}"><xsl:value-of select="$number"/>.</a>
     
    40774222
    40784223      <xsl:apply-templates select="/rfc/front/author" />
    4079     </div>
     4224    </section>
    40804225  </xsl:if>
    40814226</xsl:template>
     
    46764821</script>
    46774822</xsl:if>
     4823<script type="application/javascript">
     4824function anchorRewrite() {
     4825<xsl:text>  map = { </xsl:text>
     4826  <xsl:for-each select="//x:anchor-alias">
     4827    <xsl:text>"</xsl:text>
     4828    <xsl:call-template name="replace-substring">
     4829      <xsl:with-param name="string" select="@value"/>
     4830      <xsl:with-param name="replace">"</xsl:with-param>
     4831      <xsl:with-param name="by">\"</xsl:with-param>
     4832    </xsl:call-template>
     4833    <xsl:text>": "</xsl:text>
     4834    <xsl:call-template name="replace-substring">
     4835      <xsl:with-param name="string" select="ancestor::*[@anchor][1]/@anchor"/>
     4836      <xsl:with-param name="replace">"</xsl:with-param>
     4837      <xsl:with-param name="by">\"</xsl:with-param>
     4838    </xsl:call-template>
     4839    <xsl:text>"</xsl:text>
     4840    <xsl:if test="position()!=last()">, </xsl:if>
     4841  </xsl:for-each>
     4842<xsl:text>};</xsl:text>
     4843  if (window.location.hash.length >= 1) {
     4844    var fragid = window.location.hash.substr(1);
     4845    if (fragid) {
     4846      if (! document.getElementById(fragid)) {
     4847        var prefix = "<xsl:value-of select="$anchor-prefix"/>";
     4848        var mapped = map[fragid];
     4849        if (mapped) {
     4850          window.location.hash = mapped;
     4851        } else if (fragid.indexOf("section-") == 0) {
     4852          window.location.hash = prefix + ".section." + fragid.substring(8);
     4853        } else if (fragid.indexOf("appendix-") == 0) {
     4854          window.location.hash = prefix + ".section." + fragid.substring(9);
     4855        }
     4856      }
     4857    } 
     4858  }
     4859}
     4860window.addEventListener('hashchange', anchorRewrite);
     4861window.addEventListener('DOMContentLoaded', anchorRewrite);
     4862</script><xsl:if test="$prettyprint-script!=''">
     4863<script src="{$prettyprint-script}"/></xsl:if>
    46784864</xsl:template>
    46794865
     
    47144900  max-width: <xsl:value-of select="$parsedMaxwidth"/>px;</xsl:if>
    47154901}
    4716 samp, tt, code, pre {
     4902samp, span.tt, code, pre {
    47174903  font-family: consolas, monaco, monospace;
    47184904}<xsl:if test="//xhtml:p">
     
    47234909  font-style: normal;
    47244910}<xsl:if test="//x:note|//aside">
    4725 div.<xsl:value-of select="$css-note"/> {
     4911aside {
    47264912  margin-left: 2em;
    47274913}</xsl:if>
     
    48445030  background-color: white;
    48455031  padding: 0em;
    4846   page-break-inside: auto;
     5032  page-break-inside: auto;<xsl:if test="$prettyprint-script!=''">
     5033  border: none !important;</xsl:if>
    48475034}
    48485035pre.text {
     
    48715058}<xsl:if test="//texttable">
    48725059table.<xsl:value-of select="$css-tt"/> {
     5060  border-collapse: collapse;
     5061  border-color: gray;
     5062  border-spacing: 0;
    48735063  vertical-align: top;
    4874   border-color: gray;
    4875 }
     5064 }
    48765065table.<xsl:value-of select="$css-tt"/> th {
    48775066  border-color: gray;
     5067  padding: 3px;
    48785068}
    48795069table.<xsl:value-of select="$css-tt"/> td {
    48805070  border-color: gray;
     5071  padding: 3px;
    48815072}
    48825073table.all {
     
    49945185  line-height: 150%;
    49955186  margin-left: 0em;
    4996 }
     5187}<xsl:if test="//svg:svg">
     5188@namespace svg url(http://www.w3.org/2000/svg);
     5189svg|svg {
     5190  margin-left: 3em;
     5191}
     5192svg {
     5193  margin-left: 3em;
     5194}</xsl:if>
    49975195.avoidbreakinside {
    49985196  page-break-inside: avoid;
     
    51605358  border: 1px solid silver;
    51615359  border-radius: 5px;
     5360  -webkit-user-select: none;<!-- not std CSS yet-->
     5361  -moz-user-select: none;
     5362  -ms-user-select: none;
    51625363}</xsl:if><xsl:if test="$xml2rfc-ext-justification='always'">
    51635364dd, li, p {
     
    54135614  <xsl:call-template name="insert-conditional-hrule"/>
    54145615
    5415   <h2 id="{$anchor-prefix}.index">
     5616  <section id="{$anchor-prefix}.index">
    54165617    <xsl:call-template name="insert-conditional-pagebreak"/>
    5417     <a href="#{$anchor-prefix}.index">Index</a>
    5418   </h2>
    5419 
    5420   <!-- generate navigation links to index subsections -->
    5421   <p class="{$css-noprint}">
    5422     <xsl:variable name="irefs" select="//iref[generate-id(.) = generate-id(key('index-first-letter',translate(substring(@item,1,1),$lcase,$ucase))[1])]"/>
    5423     <xsl:variable name="xrefs" select="//reference[not(starts-with(@anchor,'deleted-'))][generate-id(.) = generate-id(key('index-first-letter',translate(substring(concat(/rfc/back/displayreference[@target=current()/@anchor]/@to,@anchor),1,1),$lcase,$ucase))[1])]"/>
    5424 
    5425     <xsl:for-each select="$irefs | $xrefs">
     5618    <h2>
     5619      <a href="#{$anchor-prefix}.index">Index</a>
     5620    </h2>
     5621
     5622    <!-- generate navigation links to index subsections -->
     5623    <p class="{$css-noprint}">
     5624      <xsl:variable name="irefs" select="//iref[generate-id(.) = generate-id(key('index-first-letter',translate(substring(@item,1,1),$lcase,$ucase))[1])]"/>
     5625      <xsl:variable name="xrefs" select="//reference[not(starts-with(@anchor,'deleted-'))][generate-id(.) = generate-id(key('index-first-letter',translate(substring(concat(/rfc/back/displayreference[@target=current()/@anchor]/@to,@anchor),1,1),$lcase,$ucase))[1])]"/>
     5626 
     5627      <xsl:for-each select="$irefs | $xrefs">
     5628     
     5629        <xsl:sort select="translate(concat(@item,/rfc/back/displayreference[@target=current()/@anchor]/@to,@anchor),$lcase,$ucase)" />
     5630 
     5631        <xsl:variable name="letter" select="translate(substring(concat(@item,/rfc/back/displayreference[@target=current()/@anchor]/@to,@anchor),1,1),$lcase,$ucase)"/>
     5632 
     5633        <!-- character? -->
     5634        <xsl:if test="translate($letter,concat($lcase,$ucase,'0123456789'),'')=''">
     5635 
     5636          <xsl:variable name="showit" select="$xml2rfc-ext-include-references-in-index='yes' or $irefs[starts-with(translate(@item,$lcase,$ucase),$letter)]"/>
     5637 
     5638          <xsl:if test="$showit">
     5639            <a href="#{$anchor-prefix}.index.{$letter}">
     5640              <xsl:value-of select="$letter" />
     5641            </a>
     5642            <xsl:text> </xsl:text>
     5643          </xsl:if>
     5644        </xsl:if>
     5645      </xsl:for-each>
     5646    </p>
     5647
     5648    <!-- for each index subsection -->
     5649    <div class="print2col">
     5650      <ul class="ind">
     5651        <xsl:variable name="irefs2" select="//iref[generate-id(.) = generate-id(key('index-first-letter',translate(substring(@item,1,1),$lcase,$ucase))[1])]"/>
     5652        <xsl:variable name="xrefs2" select="//reference[not(starts-with(@anchor,'deleted-'))][generate-id(.) = generate-id(key('index-first-letter',translate(substring(concat(/rfc/back/displayreference[@target=current()/@anchor]/@to,@anchor),1,1),$lcase,$ucase))[1])]"/>
    54265653   
    5427       <xsl:sort select="translate(concat(@item,/rfc/back/displayreference[@target=current()/@anchor]/@to,@anchor),$lcase,$ucase)" />
    5428 
    5429       <xsl:variable name="letter" select="translate(substring(concat(@item,/rfc/back/displayreference[@target=current()/@anchor]/@to,@anchor),1,1),$lcase,$ucase)"/>
    5430 
    5431       <!-- character? -->
    5432       <xsl:if test="translate($letter,concat($lcase,$ucase,'0123456789'),'')=''">
    5433 
    5434         <xsl:variable name="showit" select="$xml2rfc-ext-include-references-in-index='yes' or $irefs[starts-with(translate(@item,$lcase,$ucase),$letter)]"/>
    5435 
    5436         <xsl:if test="$showit">
    5437           <a href="#{$anchor-prefix}.index.{$letter}">
    5438             <xsl:value-of select="$letter" />
    5439           </a>
    5440           <xsl:text> </xsl:text>
    5441         </xsl:if>
    5442 
    5443       </xsl:if>
    5444 
    5445     </xsl:for-each>
    5446   </p>
    5447 
    5448   <!-- for each index subsection -->
    5449   <div class="print2col">
    5450   <ul class="ind">
    5451     <xsl:variable name="irefs2" select="//iref[generate-id(.) = generate-id(key('index-first-letter',translate(substring(@item,1,1),$lcase,$ucase))[1])]"/>
    5452     <xsl:variable name="xrefs2" select="//reference[not(starts-with(@anchor,'deleted-'))][generate-id(.) = generate-id(key('index-first-letter',translate(substring(concat(/rfc/back/displayreference[@target=current()/@anchor]/@to,@anchor),1,1),$lcase,$ucase))[1])]"/>
    5453 
    5454     <xsl:for-each select="$irefs2 | $xrefs2">
    5455       <xsl:sort select="translate(concat(@item,/rfc/back/displayreference[@target=current()/@anchor]/@to,@anchor),$lcase,$ucase)" />
    5456       <xsl:variable name="letter" select="translate(substring(concat(@item,/rfc/back/displayreference[@target=current()/@anchor]/@to,@anchor),1,1),$lcase,$ucase)"/>
    5457 
    5458       <xsl:variable name="showit" select="$xml2rfc-ext-include-references-in-index='yes' or $irefs2[starts-with(translate(@item,$lcase,$ucase),$letter)]"/>
    5459 
    5460       <xsl:if test="$showit">
    5461         <li>
    5462 
    5463           <!-- make letters and digits stand out -->
    5464           <xsl:choose>
    5465             <xsl:when test="translate($letter,concat($lcase,$ucase,'0123456789'),'')=''">
    5466               <a id="{$anchor-prefix}.index.{$letter}" href="#{$anchor-prefix}.index.{$letter}">
    5467                 <b><xsl:value-of select="$letter" /></b>
    5468               </a>
    5469             </xsl:when>
    5470             <xsl:otherwise>
    5471               <b><xsl:value-of select="$letter" /></b>
    5472             </xsl:otherwise>
    5473           </xsl:choose>
    5474 
    5475           <ul>
    5476             <xsl:for-each select="key('index-first-letter',translate(substring(concat(@item,@anchor),1,1),$lcase,$ucase))">
    5477 
    5478               <xsl:sort select="translate(concat(@item,@anchor),$lcase,$ucase)" />
    5479 
     5654        <xsl:for-each select="$irefs2 | $xrefs2">
     5655          <xsl:sort select="translate(concat(@item,/rfc/back/displayreference[@target=current()/@anchor]/@to,@anchor),$lcase,$ucase)" />
     5656          <xsl:variable name="letter" select="translate(substring(concat(@item,/rfc/back/displayreference[@target=current()/@anchor]/@to,@anchor),1,1),$lcase,$ucase)"/>
     5657   
     5658          <xsl:variable name="showit" select="$xml2rfc-ext-include-references-in-index='yes' or $irefs2[starts-with(translate(@item,$lcase,$ucase),$letter)]"/>
     5659   
     5660          <xsl:if test="$showit">
     5661            <li>
     5662   
     5663              <!-- make letters and digits stand out -->
    54805664              <xsl:choose>
    5481                 <xsl:when test="self::reference">
    5482                   <xsl:if test="$xml2rfc-ext-include-references-in-index='yes' and not(starts-with(@anchor,'deleted-'))">
    5483                     <li>
    5484                       <xsl:variable name="val">
    5485                         <xsl:call-template name="reference-name"/>
    5486                       </xsl:variable>
    5487                       <em>
    5488                         <xsl:value-of select="substring($val,2,string-length($val)-2)"/>
    5489                       </em>
    5490                       <xsl:text>&#160;&#160;</xsl:text>
    5491 
    5492                       <xsl:variable name="rs" select="key('xref-item',current()/@anchor) | . | key('anchor-item',concat('deleted-',current()/@anchor))"/>
    5493 
    5494                       <xsl:for-each select="$rs">
    5495                         <xsl:call-template name="insertSingleXref" />
    5496                       </xsl:for-each>
    5497 
    5498                       <xsl:variable name="rs2" select="$rs[@x:sec|@section]"/>
    5499 
    5500                       <xsl:if test="$rs2">
    5501                         <ul>
    5502                           <xsl:for-each select="$rs2">
    5503                             <xsl:sort select="substring-before(concat(@x:sec,@section,'.'),'.')" data-type="number"/>
    5504                             <xsl:sort select="substring(concat(@x:sec,@section),2+string-length(substring-before(concat(@x:sec,@section),'.')))" data-type="number"/>
    5505 
    5506                             <xsl:if test="generate-id(.) = generate-id(key('index-xref-by-sec',concat(@target,'..',@x:sec,@section))[1])">
    5507                               <li>
    5508                                 <em>
    5509                                   <xsl:choose>
    5510                                     <xsl:when test="translate(substring(concat(@x:sec,@section),1,1),$ucase,'')=''">
    5511                                       <xsl:text>Appendix </xsl:text>
    5512                                     </xsl:when>
    5513                                     <xsl:otherwise>
    5514                                       <xsl:text>Section </xsl:text>
    5515                                     </xsl:otherwise>
    5516                                   </xsl:choose>
    5517                                   <xsl:value-of select="@x:sec|@section"/>
    5518                                 </em>
    5519                                 <xsl:text>&#160;&#160;</xsl:text>
    5520                                 <xsl:for-each select="key('index-xref-by-sec',concat(@target,'..',@x:sec,@section))">
    5521                                   <xsl:call-template name="insertSingleXref" />
     5665                <xsl:when test="translate($letter,concat($lcase,$ucase,'0123456789'),'')=''">
     5666                  <a id="{$anchor-prefix}.index.{$letter}" href="#{$anchor-prefix}.index.{$letter}">
     5667                    <b><xsl:value-of select="$letter" /></b>
     5668                  </a>
     5669                </xsl:when>
     5670                <xsl:otherwise>
     5671                  <b><xsl:value-of select="$letter" /></b>
     5672                </xsl:otherwise>
     5673              </xsl:choose>
     5674   
     5675              <ul>
     5676                <xsl:for-each select="key('index-first-letter',translate(substring(concat(@item,@anchor),1,1),$lcase,$ucase))">
     5677   
     5678                  <xsl:sort select="translate(concat(@item,@anchor),$lcase,$ucase)" />
     5679   
     5680                  <xsl:choose>
     5681                    <xsl:when test="self::reference">
     5682                      <xsl:if test="$xml2rfc-ext-include-references-in-index='yes' and not(starts-with(@anchor,'deleted-'))">
     5683                        <li>
     5684                          <xsl:variable name="val">
     5685                            <xsl:call-template name="reference-name"/>
     5686                          </xsl:variable>
     5687                          <em>
     5688                            <xsl:value-of select="substring($val,2,string-length($val)-2)"/>
     5689                          </em>
     5690                          <xsl:text>&#160;&#160;</xsl:text>
     5691   
     5692                          <xsl:variable name="rs" select="key('xref-item',current()/@anchor) | . | key('anchor-item',concat('deleted-',current()/@anchor))"/>
     5693   
     5694                          <xsl:for-each select="$rs">
     5695                            <xsl:call-template name="insertSingleXref" />
     5696                          </xsl:for-each>
     5697   
     5698                          <xsl:variable name="rs2" select="$rs[@x:sec|@section]"/>
     5699   
     5700                          <xsl:if test="$rs2">
     5701                            <ul>
     5702                              <xsl:for-each select="$rs2">
     5703                                <xsl:sort select="substring-before(concat(@x:sec,@section,'.'),'.')" data-type="number"/>
     5704                                <xsl:sort select="substring(concat(@x:sec,@section),2+string-length(substring-before(concat(@x:sec,@section),'.')))" data-type="number"/>
     5705   
     5706                                <xsl:if test="generate-id(.) = generate-id(key('index-xref-by-sec',concat(@target,'..',@x:sec,@section))[1])">
     5707                                  <li>
     5708                                    <em>
     5709                                      <xsl:choose>
     5710                                        <xsl:when test="translate(substring(concat(@x:sec,@section),1,1),$ucase,'')=''">
     5711                                          <xsl:text>Appendix </xsl:text>
     5712                                        </xsl:when>
     5713                                        <xsl:otherwise>
     5714                                          <xsl:text>Section </xsl:text>
     5715                                        </xsl:otherwise>
     5716                                      </xsl:choose>
     5717                                      <xsl:value-of select="@x:sec|@section"/>
     5718                                    </em>
     5719                                    <xsl:text>&#160;&#160;</xsl:text>
     5720                                    <xsl:for-each select="key('index-xref-by-sec',concat(@target,'..',@x:sec,@section))">
     5721                                      <xsl:call-template name="insertSingleXref" />
     5722                                    </xsl:for-each>
     5723                                  </li>
     5724                                </xsl:if>
     5725                              </xsl:for-each>
     5726                            </ul>
     5727                          </xsl:if>
     5728   
     5729                          <xsl:if test="current()/x:source/@href">
     5730                            <xsl:variable name="rs3" select="$rs[not(@x:sec) and @x:rel]"/>
     5731                            <xsl:variable name="doc" select="document(current()/x:source/@href)"/>
     5732                            <xsl:if test="$rs3">
     5733                              <ul>
     5734                                <xsl:for-each select="$rs3">
     5735                                  <xsl:sort select="count($doc//*[@anchor and following::*/@anchor=substring-after(current()/@x:rel,'#')])" order="ascending" data-type="number"/>
     5736                                  <xsl:if test="generate-id(.) = generate-id(key('index-xref-by-anchor',concat(@target,'..',@x:rel))[1])">
     5737                                    <li>
     5738                                      <em>
     5739                                        <xsl:variable name="sec">
     5740                                          <xsl:for-each select="$doc//*[@anchor=substring-after(current()/@x:rel,'#')]">
     5741                                            <xsl:call-template name="get-section-number"/>
     5742                                          </xsl:for-each>
     5743                                        </xsl:variable>
     5744                                        <xsl:choose>
     5745                                          <xsl:when test="translate(substring($sec,1,1),$ucase,'')=''">
     5746                                            <xsl:text>Appendix </xsl:text>
     5747                                          </xsl:when>
     5748                                          <xsl:otherwise>
     5749                                            <xsl:text>Section </xsl:text>
     5750                                          </xsl:otherwise>
     5751                                        </xsl:choose>
     5752                                        <xsl:value-of select="$sec"/>
     5753                                      </em>
     5754                                      <xsl:text>&#160;&#160;</xsl:text>
     5755                                      <xsl:for-each select="key('index-xref-by-anchor',concat(@target,'..',@x:rel))">
     5756                                        <xsl:call-template name="insertSingleXref" />
     5757                                      </xsl:for-each>
     5758                                    </li>
     5759                                  </xsl:if>
    55225760                                </xsl:for-each>
    5523                               </li>
     5761                              </ul>
    55245762                            </xsl:if>
     5763                          </xsl:if>
     5764                        </li>
     5765                      </xsl:if>
     5766                    </xsl:when>
     5767                    <xsl:otherwise>
     5768                      <!-- regular iref -->
     5769                      <xsl:if test="generate-id(.) = generate-id(key('index-item',concat(@item,@anchor))[1])">
     5770                        <xsl:variable name="item" select="@item"/>
     5771                        <xsl:variable name="in-artwork" select="key('index-item',$item)[@primary='true' and ancestor::artwork]"/>
     5772   
     5773                        <li>
     5774                          <xsl:choose>
     5775                            <xsl:when test="$in-artwork">
     5776                              <span class="tt"><xsl:value-of select="@item" /></span>
     5777                            </xsl:when>
     5778                            <xsl:otherwise>
     5779                              <xsl:value-of select="@item" />
     5780                            </xsl:otherwise>
     5781                          </xsl:choose>
     5782                          <xsl:text>&#160;&#160;</xsl:text>
     5783   
     5784                          <xsl:variable name="irefs3" select="key('index-item',@item)[not(@subitem) or @subitem='']"/>
     5785                          <xsl:variable name="xrefs3" select="key('xref-item',$irefs3[@x:for-anchor='']/../@anchor) | key('xref-item',$irefs3/@x:for-anchor)"/>
     5786                          <xsl:variable name="extrefs3" select="key('extref-item',$irefs3[@x:for-anchor='']/../@anchor) | key('extref-item',$irefs3/@x:for-anchor)"/>
     5787   
     5788                          <xsl:for-each select="$irefs3|$xrefs3|$extrefs3">
     5789                            <!-- <xsl:sort select="translate(@item,$lcase,$ucase)" />  -->
     5790                            <xsl:call-template name="insertSingleIref" />
    55255791                          </xsl:for-each>
    5526                         </ul>
    5527                       </xsl:if>
    5528 
    5529                       <xsl:if test="current()/x:source/@href">
    5530                         <xsl:variable name="rs3" select="$rs[not(@x:sec) and @x:rel]"/>
    5531                         <xsl:variable name="doc" select="document(current()/x:source/@href)"/>
    5532                         <xsl:if test="$rs3">
    5533                           <ul>
    5534                             <xsl:for-each select="$rs3">
    5535                               <xsl:sort select="count($doc//*[@anchor and following::*/@anchor=substring-after(current()/@x:rel,'#')])" order="ascending" data-type="number"/>
    5536                               <xsl:if test="generate-id(.) = generate-id(key('index-xref-by-anchor',concat(@target,'..',@x:rel))[1])">
    5537                                 <li>
    5538                                   <em>
    5539                                     <xsl:variable name="sec">
    5540                                       <xsl:for-each select="$doc//*[@anchor=substring-after(current()/@x:rel,'#')]">
    5541                                         <xsl:call-template name="get-section-number"/>
    5542                                       </xsl:for-each>
    5543                                     </xsl:variable>
     5792   
     5793                          <xsl:variable name="s2" select="key('index-item',@item)[@subitem and @subitem!='']"/>
     5794                          <xsl:if test="$s2">
     5795                            <ul>
     5796                              <xsl:for-each select="$s2">
     5797                                <xsl:sort select="translate(@subitem,$lcase,$ucase)" />
     5798   
     5799                                <xsl:if test="generate-id(.) = generate-id(key('index-item-subitem',concat(@item,'..',@subitem))[1])">
     5800   
     5801                                  <xsl:variable name="in-artwork2" select="key('index-item-subitem',concat(@item,'..',@subitem))[@primary='true' and ancestor::artwork]" />
     5802   
     5803                                  <li>
     5804   
    55445805                                    <xsl:choose>
    5545                                       <xsl:when test="translate(substring($sec,1,1),$ucase,'')=''">
    5546                                         <xsl:text>Appendix </xsl:text>
     5806                                      <xsl:when test="$in-artwork2">
     5807                                        <span class="tt"><xsl:value-of select="@subitem" /></span>
    55475808                                      </xsl:when>
    55485809                                      <xsl:otherwise>
    5549                                         <xsl:text>Section </xsl:text>
     5810                                        <xsl:value-of select="@subitem" />
    55505811                                      </xsl:otherwise>
    55515812                                    </xsl:choose>
    5552                                     <xsl:value-of select="$sec"/>
    5553                                   </em>
    5554                                   <xsl:text>&#160;&#160;</xsl:text>
    5555                                   <xsl:for-each select="key('index-xref-by-anchor',concat(@target,'..',@x:rel))">
    5556                                     <xsl:call-template name="insertSingleXref" />
    5557                                   </xsl:for-each>
    5558                                 </li>
    5559                               </xsl:if>
    5560                             </xsl:for-each>
    5561                           </ul>
    5562                         </xsl:if>
     5813                                    <xsl:text>&#160;&#160;</xsl:text>
     5814   
     5815                                    <xsl:variable name="irefs4" select="key('index-item-subitem',concat(@item,'..',@subitem))"/>
     5816                                    <xsl:variable name="xrefs4" select="key('xref-item',$irefs4[@x:for-anchor='']/../@anchor) | key('xref-item',$irefs4/@x:for-anchor)"/>
     5817                                    <xsl:variable name="extrefs4" select="key('extref-item',$irefs4[@x:for-anchor='']/../@anchor) | key('extref-item',$irefs4/@x:for-anchor)"/>
     5818   
     5819                                    <xsl:for-each select="$irefs4|$xrefs4|$extrefs4">
     5820                                      <!--<xsl:sort select="translate(@item,$lcase,$ucase)" />-->
     5821                                      <xsl:call-template name="insertSingleIref" />
     5822                                    </xsl:for-each>
     5823   
     5824                                  </li>
     5825                                </xsl:if>
     5826                              </xsl:for-each>
     5827                            </ul>
     5828                          </xsl:if>
     5829                        </li>
    55635830                      </xsl:if>
    5564                     </li>
    5565                   </xsl:if>
    5566                 </xsl:when>
    5567                 <xsl:otherwise>
    5568                   <!-- regular iref -->
    5569                   <xsl:if test="generate-id(.) = generate-id(key('index-item',concat(@item,@anchor))[1])">
    5570                     <xsl:variable name="item" select="@item"/>
    5571                     <xsl:variable name="in-artwork" select="key('index-item',$item)[@primary='true' and ancestor::artwork]"/>
    5572 
    5573                     <li>
    5574                       <xsl:choose>
    5575                         <xsl:when test="$in-artwork">
    5576                           <tt><xsl:value-of select="@item" /></tt>
    5577                         </xsl:when>
    5578                         <xsl:otherwise>
    5579                           <xsl:value-of select="@item" />
    5580                         </xsl:otherwise>
    5581                       </xsl:choose>
    5582                       <xsl:text>&#160;&#160;</xsl:text>
    5583 
    5584                       <xsl:variable name="irefs3" select="key('index-item',@item)[not(@subitem) or @subitem='']"/>
    5585                       <xsl:variable name="xrefs3" select="key('xref-item',$irefs3[@x:for-anchor='']/../@anchor) | key('xref-item',$irefs3/@x:for-anchor)"/>
    5586                       <xsl:variable name="extrefs3" select="key('extref-item',$irefs3[@x:for-anchor='']/../@anchor) | key('extref-item',$irefs3/@x:for-anchor)"/>
    5587 
    5588                       <xsl:for-each select="$irefs3|$xrefs3|$extrefs3">
    5589                         <!-- <xsl:sort select="translate(@item,$lcase,$ucase)" />  -->
    5590                         <xsl:call-template name="insertSingleIref" />
    5591                       </xsl:for-each>
    5592 
    5593                       <xsl:variable name="s2" select="key('index-item',@item)[@subitem and @subitem!='']"/>
    5594                       <xsl:if test="$s2">
    5595                         <ul>
    5596                           <xsl:for-each select="$s2">
    5597                             <xsl:sort select="translate(@subitem,$lcase,$ucase)" />
    5598 
    5599                             <xsl:if test="generate-id(.) = generate-id(key('index-item-subitem',concat(@item,'..',@subitem))[1])">
    5600 
    5601                               <xsl:variable name="in-artwork2" select="key('index-item-subitem',concat(@item,'..',@subitem))[@primary='true' and ancestor::artwork]" />
    5602 
    5603                               <li>
    5604 
    5605                                 <xsl:choose>
    5606                                   <xsl:when test="$in-artwork2">
    5607                                     <tt><xsl:value-of select="@subitem" /></tt>
    5608                                   </xsl:when>
    5609                                   <xsl:otherwise>
    5610                                     <xsl:value-of select="@subitem" />
    5611                                   </xsl:otherwise>
    5612                                 </xsl:choose>
    5613                                 <xsl:text>&#160;&#160;</xsl:text>
    5614 
    5615                                 <xsl:variable name="irefs4" select="key('index-item-subitem',concat(@item,'..',@subitem))"/>
    5616                                 <xsl:variable name="xrefs4" select="key('xref-item',$irefs4[@x:for-anchor='']/../@anchor) | key('xref-item',$irefs4/@x:for-anchor)"/>
    5617                                 <xsl:variable name="extrefs4" select="key('extref-item',$irefs4[@x:for-anchor='']/../@anchor) | key('extref-item',$irefs4/@x:for-anchor)"/>
    5618 
    5619                                 <xsl:for-each select="$irefs4|$xrefs4|$extrefs4">
    5620                                   <!--<xsl:sort select="translate(@item,$lcase,$ucase)" />-->
    5621                                   <xsl:call-template name="insertSingleIref" />
    5622                                 </xsl:for-each>
    5623 
    5624                               </li>
    5625                             </xsl:if>
    5626                           </xsl:for-each>
    5627                         </ul>
    5628                       </xsl:if>
    5629                     </li>
    5630                   </xsl:if>
    5631                 </xsl:otherwise>
    5632               </xsl:choose>
    5633 
    5634 
    5635             </xsl:for-each>
    5636           </ul>
    5637         </li>
    5638       </xsl:if>
    5639 
    5640     </xsl:for-each>
    5641   </ul>
    5642   </div>
    5643 
     5831                    </xsl:otherwise>
     5832                  </xsl:choose>
     5833   
     5834   
     5835                </xsl:for-each>
     5836              </ul>
     5837            </li>
     5838          </xsl:if>
     5839   
     5840        </xsl:for-each>
     5841      </ul>
     5842    </div>
     5843  </section>
    56445844</xsl:template>
    56455845
     
    62246424  <hr class="{$css-noprint}"/>
    62256425
    6226   <div id="{$anchor-prefix}.toc">
     6426  <nav id="{$anchor-prefix}.toc">
    62276427    <h2 class="np"> <!-- this pagebreak occurs always -->
    62286428      <a href="#{$anchor-prefix}.toc">Table of Contents</a>
     
    62326432      <xsl:apply-templates mode="toc" />
    62336433    </ul>
    6234   </div>
     6434  </nav>
    62356435</xsl:template>
    62366436
     
    68387038  </xsl:variable>
    68397039
    6840   <div class="{$css-note}">
     7040  <aside>
    68417041    <xsl:call-template name="copy-anchor"/>
    68427042    <div>
     
    68527052      </xsl:for-each>
    68537053    </div>
    6854   </div>
     7054  </aside>
    68557055</xsl:template>
    68567056
     
    69747174</xsl:template>
    69757175
    6976 <!-- Nop -->
     7176<!-- Almost Nop -->
    69777177<xsl:template match="x:span">
    6978   <span>
    6979     <xsl:call-template name="copy-anchor"/>
    6980     <xsl:apply-templates/>
    6981   </span>
     7178  <xsl:choose>
     7179    <xsl:when test="@x:lang and $prettyprint-class!=''">
     7180      <code class="{$prettyprint-class}">
     7181        <xsl:call-template name="copy-anchor"/>
     7182        <xsl:apply-templates/>
     7183      </code>
     7184    </xsl:when>
     7185    <xsl:otherwise>
     7186      <span>
     7187        <xsl:call-template name="copy-anchor"/>
     7188        <xsl:apply-templates/>
     7189      </span>
     7190    </xsl:otherwise>
     7191  </xsl:choose>
    69827192</xsl:template>
    69837193
     
    73807590
    73817591  <!-- check ABNF syntax references -->
    7382   <xsl:if test="//artwork[@type='abnf2616']">
     7592  <xsl:if test="//artwork[@type='abnf2616' or @type='abnf7230']">
    73837593    <xsl:if test="not(//reference/seriesInfo[@name='RFC' and (@value='2068' or @value='2616' or @value='7230')]) and not(//reference/seriesInfo[@name='Internet-Draft' and (starts-with(@value, 'draft-ietf-httpbis-p1-messaging-'))])">
    73847594      <!-- check for draft-ietf-httpbis-p1-messaging- is for backwards compat -->
     
    73977607
    73987608  <!-- check IDs -->
    7399   <xsl:variable name="badTargets" select="//xref[not(@target=//@anchor) and not(ancestor::ed:del)]" />
     7609  <xsl:variable name="badTargets" select="//xref[not(@target=//@anchor) and not(@target=exslt:node-set($includeDirectives)//@anchor) and not(ancestor::ed:del)]" />
    74007610  <xsl:if test="$badTargets">
    74017611    <xsl:variable name="text">
     
    76537863  <xsl:param name="msg"/>
    76547864  <xsl:param name="msg2"/>
    7655   <xsl:param name="inline"/>
    76567865  <xsl:call-template name="emit-message">
    76577866    <xsl:with-param name="level">WARNING</xsl:with-param>
     
    76657874  <xsl:param name="msg"/>
    76667875  <xsl:param name="msg2"/>
    7667   <xsl:param name="inline"/>
    76687876  <xsl:call-template name="emit-message">
    76697877    <xsl:with-param name="level">INFO</xsl:with-param>
    76707878    <xsl:with-param name="msg" select="$msg"/>
    76717879    <xsl:with-param name="msg2" select="$msg2"/>
    7672     <xsl:with-param name="inline" select="$inline"/>
     7880    <xsl:with-param name="inline" select="'no'"/>
    76737881  </xsl:call-template>
    76747882</xsl:template>
     
    77447952    </xsl:variable>
    77457953
    7746     <table class="{$style}" cellpadding="3" cellspacing="0">
     7954    <table class="{$style}">
    77477955      <xsl:if test="(@title!='') or (@anchor!='' and not(@suppress-title='true'))">
    77487956        <xsl:variable name="n"><xsl:call-template name="get-table-number"/></xsl:variable>
     
    80598267    <xsl:text>http://greenbytes.de/tech/webdav/rfc2629.xslt, </xsl:text>
    80608268    <!-- when RCS keyword substitution in place, add version info -->
    8061     <xsl:if test="contains('$Revision: 1.756 $',':')">
    8062       <xsl:value-of select="concat('Revision ',normalize-space(translate(substring-after('$Revision: 1.756 $', 'Revision: '),'$','')),', ')" />
     8269    <xsl:if test="contains('$Revision: 1.785 $',':')">
     8270      <xsl:value-of select="concat('Revision ',normalize-space(translate(substring-after('$Revision: 1.785 $', 'Revision: '),'$','')),', ')" />
    80638271    </xsl:if>
    8064     <xsl:if test="contains('$Date: 2015/12/31 17:59:21 $',':')">
    8065       <xsl:value-of select="concat(normalize-space(translate(substring-after('$Date: 2015/12/31 17:59:21 $', 'Date: '),'$','')),', ')" />
     8272    <xsl:if test="contains('$Date: 2016/02/29 18:17:25 $',':')">
     8273      <xsl:value-of select="concat(normalize-space(translate(substring-after('$Date: 2016/02/29 18:17:25 $', 'Date: '),'$','')),', ')" />
    80668274    </xsl:if>
    80678275    <xsl:value-of select="concat('XSLT vendor: ',system-property('xsl:vendor'),' ',system-property('xsl:vendor-url'))" />
     
    81038311      <xsl:text>unnumbered-</xsl:text>
    81048312      <xsl:number count="section[@x:fixed-section-number='' or @numbered='false']" level="any"/>
     8313      <!-- checks -->
     8314      <xsl:if test="@numbered='false'">
     8315        <xsl:if test="ancestor::section or ancestor::section">
     8316          <xsl:call-template name="error">
     8317            <xsl:with-param name="msg">Only top-level sections can be unnumbered</xsl:with-param>
     8318          </xsl:call-template>
     8319        </xsl:if>
     8320        <xsl:if test="following-sibling::section[not(@numbered) or @numberer!='false'] or following-sibling::references">
     8321          <xsl:call-template name="error">
     8322            <xsl:with-param name="msg">Unnumbered section is followed by numbered sections</xsl:with-param>
     8323          </xsl:call-template>
     8324        </xsl:if>
     8325      </xsl:if>
    81058326    </xsl:when>
    81068327    <xsl:when test="$has-edits or ancestor::*/@x:fixed-section-number">
     
    85068727                      <xsl:when test="$attrname='check-artwork-width'"/>
    85078728                      <xsl:when test="$attrname='duplex'"/>
     8729                      <xsl:when test="$attrname='html-pretty-print'"/>
    85088730                      <xsl:when test="$attrname='include-index'"/>
    85098731                      <xsl:when test="$attrname='include-references-in-index'"/>
     
    85298751                      <xsl:when test="$attrname='comments'"/>
    85308752                      <xsl:when test="$attrname='compact'"/>
     8753                      <xsl:when test="$attrname='docmapping'">
     8754                        <xsl:if test="$value!='yes'">
     8755                          <xsl:call-template name="warning">
     8756                            <xsl:with-param name="msg">the rfc docmapping pseudo-attribute with values other than 'yes' in not supported by this processor.</xsl:with-param>
     8757                          </xsl:call-template>
     8758                        </xsl:if>
     8759                      </xsl:when>
    85318760                      <xsl:when test="$attrname='editing'"/>
    85328761                      <xsl:when test="$attrname='footer'"/>
     
    85348763                      <xsl:when test="$attrname='include'">
    85358764                        <xsl:call-template name="warning">
    8536                           <xsl:with-param name="msg">the rfc include pseudo-attribute is not supported by this processor, see http://greenbytes.de/tech/webdav/rfc2629xslt/rfc2629xslt.html#examples.internalsubset for help.</xsl:with-param>
     8765                          <xsl:with-param name="msg">the rfc include pseudo-attribute is only partially supported by this processor, see http://greenbytes.de/tech/webdav/rfc2629xslt/rfc2629xslt.html#examples.internalsubset for alternative syntax.</xsl:with-param>
    85378766                        </xsl:call-template>
    85388767                      </xsl:when>
     
    85508779                      <xsl:when test="$attrname='toc'"/>
    85518780                      <xsl:when test="$attrname='tocdepth'"/>
     8781                      <xsl:when test="$attrname='tocindent'">
     8782                        <xsl:if test="$value!='yes'">
     8783                          <xsl:call-template name="warning">
     8784                            <xsl:with-param name="msg">the rfc tocindent pseudo-attribute with values other than 'yes' in not supported by this processor.</xsl:with-param>
     8785                          </xsl:call-template>
     8786                        </xsl:if>
     8787                      </xsl:when>
    85528788                      <xsl:otherwise>
    85538789                        <xsl:call-template name="info">
     
    87899025  <xsl:choose>
    87909026    <xsl:when test="/rfc/front/date/@month and /rfc/front/date/@month!=''">
    8791       <xsl:value-of select="/rfc/front/date/@month"/>
     9027      <xsl:variable name="m" select="/rfc/front/date/@month"/>
     9028      <xsl:choose>
     9029        <xsl:when test="string(number($m))!='NaN' and number($m) &gt; 0 and number($m) &lt; 13">
     9030          <xsl:call-template name="get-month-as-name">
     9031            <xsl:with-param name="month" select="$m"/>
     9032          </xsl:call-template>
     9033        </xsl:when>
     9034        <xsl:otherwise>
     9035          <xsl:value-of select="$m"/>
     9036        </xsl:otherwise>
     9037      </xsl:choose>
    87929038    </xsl:when>
    87939039    <xsl:when test="$current-month!='' and $may-default-dates='yes'">
  • rfc2629xslt/rfc2629toFO.xslt

    r2740 r2750  
    22    XSLT transformation from RFC2629 XML format to XSL-FO
    33     
    4     Copyright (c) 2006-2015, Julian Reschke (julian.reschke@greenbytes.de)
     4    Copyright (c) 2006-2016, Julian Reschke (julian.reschke@greenbytes.de)
    55    All rights reserved.
    66
     
    3838    xmlns:myns="mailto:julian.reschke@greenbytes.de?subject=rcf2629.xslt"
    3939    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
     40    xmlns:svg="http://www.w3.org/2000/svg"
    4041    xmlns:x="http://purl.org/net/xml2rfc/ext"
    41 
    42     exclude-result-prefixes="ed exslt msxsl myns rdf x"
     42    xmlns:xi="http://www.w3.org/2001/XInclude"
     43
     44    exclude-result-prefixes="ed exslt msxsl myns rdf svg x xi"
    4345>
    4446
    45 <xsl:import href="rfc2629.xslt" />
     47<xsl:import href="rfc2629-no-doctype.xslt" />
    4648
    4749<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
     
    139141<xsl:template name="add-artwork-attr">
    140142  <xsl:choose>
    141     <xsl:when test="@type='abnf' or @type='abnf2045' or @type='abnf2616' or @type='application/xml-dtd' or @type='application/relax-ng-compact-syntax'">
     143    <xsl:when test="@type='abnf' or @type='abnf2045' or @type='abnf2616' or @type='abnf7230' or @type='application/xml-dtd' or @type='application/relax-ng-compact-syntax'">
    142144      <!-- just display inline -->
    143145    </xsl:when>
     
    178180</xsl:template>
    179181
    180 <xsl:template match="artwork">
    181   <xsl:if test="@x:isCodeComponent='yes'">
    182     <fo:block font-family="monospace" color="gray">&lt;CODE BEGINS></fo:block>
    183   </xsl:if>
    184   <fo:block font-family="monospace" padding=".5em"
    185     white-space-treatment="preserve" linefeed-treatment="preserve"
    186     white-space-collapse="false" page-break-inside="avoid">
    187     <xsl:call-template name="add-artwork-attr"/>
    188     <xsl:apply-templates/>
     182<xsl:template match="artwork[svg:svg]">
     183  <fo:instream-foreign-object>
     184    <xsl:copy-of select="svg:svg"/>
     185  </fo:instream-foreign-object>
     186</xsl:template>
     187
     188<xsl:template match="artwork|sourcecode">
     189  <fo:block>
     190    <xsl:if test="not(ancestor::figure)">
     191      <xsl:attribute name="start-indent">2em</xsl:attribute>
     192    </xsl:if>
     193    <xsl:if test="@x:isCodeComponent='yes'">
     194      <fo:block font-family="monospace" color="gray">&lt;CODE BEGINS></fo:block>
     195    </xsl:if>
     196    <fo:block font-family="monospace" padding=".5em"
     197      white-space-treatment="preserve" linefeed-treatment="preserve"
     198      white-space-collapse="false" page-break-inside="avoid">
     199      <xsl:call-template name="add-artwork-attr"/>
     200      <xsl:apply-templates/>
     201    </fo:block>
     202    <xsl:if test="@x:isCodeComponent='yes'">
     203      <fo:block font-family="monospace" color="gray">&lt;CODE ENDS></fo:block>
     204    </xsl:if>
    189205  </fo:block>
    190   <xsl:if test="@x:isCodeComponent='yes'">
    191     <fo:block font-family="monospace" color="gray">&lt;CODE ENDS></fo:block>
    192   </xsl:if>
    193206</xsl:template>
    194207
     
    399412
    400413<!-- processed in a later stage -->
    401 <xsl:template match="iref[not(ancestor::t) and not(parent::section)]">
     414<xsl:template match="iref[not(ancestor::t or ancestor::li) and not(parent::section)]">
    402415  <fo:block>
    403416    <xsl:attribute name="id"><xsl:value-of select="$anchor-prefix" />.iref.<xsl:number level="any"/></xsl:attribute>
     
    421434</xsl:template>
    422435
    423 <xsl:template match="iref[ancestor::t and not(parent::section)]">
     436<xsl:template match="iref[(ancestor::t or ancestor::li) and not(parent::section)]">
    424437  <fo:inline>
    425438    <xsl:attribute name="id"><xsl:value-of select="$anchor-prefix" />.iref.<xsl:number level="any"/></xsl:attribute>
     
    610623<xsl:template match="ul | list[@style='symbols' or (not(@style) and ancestor::list[@style='symbols'])]" priority="1">
    611624  <fo:list-block provisional-distance-between-starts="1.5em">
     625    <xsl:if test="self::ul and parent::section|parent::note|parent::abstract">
     626      <xsl:attribute name="start-indent">2em</xsl:attribute>
     627    </xsl:if>
    612628    <xsl:apply-templates />
    613629  </fo:list-block>
     
    10561072  </xsl:variable>
    10571073
     1074  <xsl:variable name="included" select="exslt:node-set($includeDirectives)/myns:include[@in=generate-id(current())]/reference"/>
    10581075  <fo:list-block provisional-distance-between-starts="{string-length($l) * 0.8}em">
    10591076    <xsl:choose>
    1060       <xsl:when test="$xml2rfc-sortrefs='yes'">
    1061         <xsl:apply-templates>
    1062           <xsl:sort select="/rfc/back/displayreference[@target=current()/@anchor]/@to|@anchor"/>
     1077      <xsl:when test="$xml2rfc-sortrefs='yes' and $xml2rfc-symrefs!='no'">
     1078        <xsl:apply-templates select="*|$included">
     1079          <xsl:sort select="concat(/rfc/back/displayreference[@target=current()/@anchor]/@to,@anchor,.//ed:ins//reference/@anchor)" />
    10631080        </xsl:apply-templates>
    10641081      </xsl:when>
    10651082      <xsl:otherwise>
    1066         <xsl:apply-templates />
     1083        <xsl:apply-templates select="*|$included"/>
    10671084      </xsl:otherwise>
    10681085    </xsl:choose>
     
    14911508  <xsl:variable name="target" select="@target"/>
    14921509  <xsl:variable name="anchor"><xsl:value-of select="$anchor-prefix"/>.xref.<xsl:value-of select="@target"/>.<xsl:number level="any" count="xref[@target=$target]"/></xsl:variable>
    1493   <xsl:variable name="node" select="//*[@anchor=$target]" />
     1510  <xsl:variable name="node" select="key('anchor-item',$xref/@target)|exslt:node-set($includeDirectives)//reference[@anchor=$xref/@target]"/>
    14941511  <xsl:if test="count($node)=0 and not(ancestor::ed:del)">
    14951512    <xsl:message>Undefined target: <xsl:value-of select="@target" /></xsl:message>
     
    18131830<xsl:template match="/">
    18141831  <xsl:apply-templates />
     1832</xsl:template>
     1833
     1834<xsl:template match="xi:include">
     1835  <xsl:choose>
     1836    <xsl:when test="not(parent::references)">
     1837      <xsl:call-template name="error">
     1838        <xsl:with-param name="msg" select="'Support for x:include is restricted to child elements of &lt;references>'"/>
     1839      </xsl:call-template>
     1840    </xsl:when>
     1841    <xsl:otherwise>
     1842      <!-- handled elsewhere -->
     1843    </xsl:otherwise>
     1844  </xsl:choose>
    18151845</xsl:template>
    18161846
  • rfc2629xslt/rfc2629toXHTML.xslt

    r2748 r2750  
    11<?xml version="1.0" encoding="ISO-8859-1"?>
    22<!--Auto-generated from rfc2629.xslt through HTMLtoXHTML.xslt-->
    3 <xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:date="http://exslt.org/dates-and-times" xmlns:ed="http://greenbytes.de/2002/rfcedit" xmlns:exslt="http://exslt.org/common" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:myns="mailto:julian.reschke@greenbytes.de?subject=rcf2629.xslt" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:saxon="http://saxon.sf.net/" xmlns:saxon-old="http://icl.com/saxon" xmlns:x="http://purl.org/net/xml2rfc/ext" xmlns:xhtml="http://www.w3.org/1999/xhtml" version="2.0" exclude-result-prefixes="date ed exslt msxsl myns rdf saxon saxon-old x xhtml">
     3<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:date="http://exslt.org/dates-and-times" xmlns:ed="http://greenbytes.de/2002/rfcedit" xmlns:exslt="http://exslt.org/common" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:myns="mailto:julian.reschke@greenbytes.de?subject=rcf2629.xslt" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:saxon="http://saxon.sf.net/" xmlns:saxon-old="http://icl.com/saxon" xmlns:svg="http://www.w3.org/2000/svg" xmlns:x="http://purl.org/net/xml2rfc/ext" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xhtml="http://www.w3.org/1999/xhtml" version="2.0" exclude-result-prefixes="date ed exslt msxsl myns rdf saxon saxon-old svg x xi xhtml">
    44
    55<xsl:strip-space elements="abstract author back figure front list middle note postal reference references rfc section texttable"/>
     
    193193</xsl:variable>
    194194
     195<!-- include PI -->
     196
     197<xsl:template name="getIncludes">
     198  <xsl:param name="nodes"/>
     199  <xsl:for-each select="$nodes">
     200    <xsl:variable name="include">
     201      <xsl:call-template name="parse-pis">
     202        <xsl:with-param name="nodes" select="."/>
     203        <xsl:with-param name="attr" select="'include'"/>
     204      </xsl:call-template>
     205    </xsl:variable>
     206    <xsl:variable name="doc">
     207      <xsl:choose>
     208        <xsl:when test="$include=''"/>
     209        <xsl:when test="substring($include, string-length($include) - 3) != '.xml'">
     210          <xsl:copy-of select="document(concat($include,'.xml'))"/>
     211        </xsl:when>
     212        <xsl:otherwise>
     213          <xsl:copy-of select="document($include)"/>
     214        </xsl:otherwise>
     215      </xsl:choose>
     216    </xsl:variable>
     217    <xsl:if test="count(exslt:node-set($doc)) = 1">
     218      <myns:include from="{$include}" in="{generate-id(..)}">
     219        <xsl:copy-of select="$doc"/>
     220      </myns:include>
     221    </xsl:if>
     222  </xsl:for-each>
     223</xsl:template>
     224
     225<xsl:template name="getXIncludes">
     226  <xsl:param name="nodes"/>
     227  <xsl:for-each select="$nodes">
     228    <xsl:choose>
     229      <xsl:when test="(@parse and @parse!='xml') or @xpointer">
     230        <xsl:call-template name="error">
     231          <xsl:with-param name="msg" select="'Unsupported attributes on x:include element'"/>
     232        </xsl:call-template>
     233      </xsl:when>
     234      <xsl:otherwise>
     235        <xsl:variable name="doc">
     236          <xsl:copy-of select="document(@href)"/>
     237        </xsl:variable>
     238        <xsl:if test="count(exslt:node-set($doc)) = 1">
     239          <myns:include from="{@href}" in="{generate-id(..)}">
     240            <xsl:copy-of select="$doc"/>
     241          </myns:include>
     242        </xsl:if>
     243      </xsl:otherwise>
     244    </xsl:choose>
     245  </xsl:for-each>
     246</xsl:template>
     247
     248<xsl:variable name="includeDirectives">
     249  <xsl:call-template name="getIncludes">
     250    <xsl:with-param name="nodes" select="/rfc/back/references/processing-instruction('rfc')"/>
     251  </xsl:call-template>
     252  <xsl:call-template name="getXIncludes">
     253    <xsl:with-param name="nodes" select="/rfc/back/references/xi:include"/>
     254  </xsl:call-template>
     255</xsl:variable>
     256
     257<!-- prettyprinting -->
     258
     259<xsl:param name="xml2rfc-ext-html-pretty-print">
     260  <xsl:call-template name="parse-pis">
     261    <xsl:with-param name="nodes" select="/processing-instruction('rfc-ext')"/>
     262    <xsl:with-param name="attr" select="'html-pretty-print'"/>
     263  </xsl:call-template>
     264</xsl:param>
     265
     266<xsl:variable name="prettyprint-class">
     267  <xsl:if test="$xml2rfc-ext-html-pretty-print">
     268    <xsl:value-of select="substring-before(normalize-space($xml2rfc-ext-html-pretty-print),' ')"/>
     269  </xsl:if>
     270</xsl:variable>
     271
     272<xsl:variable name="prettyprint-script">
     273  <xsl:if test="$xml2rfc-ext-html-pretty-print">
     274    <xsl:value-of select="substring-after(normalize-space($xml2rfc-ext-html-pretty-print),' ')"/>
     275  </xsl:if>
     276</xsl:variable>
     277
    195278<!-- CSS class name remapping -->
    196279
     
    219302<xsl:variable name="css-left"><xsl:call-template name="generate-css-class"><xsl:with-param name="name" select="'left'"/></xsl:call-template></xsl:variable>
    220303<xsl:variable name="css-noprint"><xsl:call-template name="generate-css-class"><xsl:with-param name="name" select="'noprint'"/></xsl:call-template></xsl:variable>
    221 <xsl:variable name="css-note"><xsl:call-template name="generate-css-class"><xsl:with-param name="name" select="'note'"/></xsl:call-template></xsl:variable>
    222304<xsl:variable name="css-publishedasrfc"><xsl:call-template name="generate-css-class"><xsl:with-param name="name" select="'publishedasrfc'"/></xsl:call-template></xsl:variable>
    223305<xsl:variable name="css-reference"><xsl:call-template name="generate-css-class"><xsl:with-param name="name" select="'reference'"/></xsl:call-template></xsl:variable>
     
    611693
    612694
    613 <xsl:template match="text()[not(ancestor::artwork)]">
     695<xsl:template match="text()[not(ancestor::artwork) and not(ancestor::sourcecode)]">
    614696  <xsl:variable name="ws" select="'&#x9;&#xA;&#xD; '"/>
    615697  <xsl:variable name="starts-with-ws" select="'' = translate(substring(.,1,1),$ws,'')"/>
     
    631713<xsl:template match="abstract">
    632714  <xsl:call-template name="check-no-text-content"/>
    633   <h2 xmlns="http://www.w3.org/1999/xhtml" id="{$anchor-prefix}.abstract"><a href="#{$anchor-prefix}.abstract">Abstract</a></h2>
    634   <xsl:apply-templates/>
     715  <section xmlns="http://www.w3.org/1999/xhtml" id="{$anchor-prefix}.abstract">
     716    <h2><a href="#{$anchor-prefix}.abstract">Abstract</a></h2>
     717    <xsl:apply-templates/>
     718  </section>
    635719</xsl:template>
    636720
     
    654738
    655739<xsl:template name="add-artwork-class">
    656   <xsl:choose>
    657     <xsl:when test="@type='abnf' or @type='abnf2045' or @type='abnf2616' or @type='application/xml-dtd' or @type='inline' or @type='application/relax-ng-compact-syntax'">
    658       <xsl:attribute name="class">inline</xsl:attribute>
    659     </xsl:when>
    660     <xsl:when test="starts-with(@type,'message/http') and contains(@type,'msgtype=&#34;request&#34;')">
    661       <xsl:attribute name="class">text2</xsl:attribute>
    662     </xsl:when>
    663     <xsl:when test="starts-with(@type,'message/http')">
    664       <xsl:attribute name="class">text</xsl:attribute>
    665     </xsl:when>
    666     <xsl:when test="starts-with(@type,'drawing')">
    667       <xsl:attribute name="class">drawing</xsl:attribute>
    668     </xsl:when>
    669     <xsl:when test="starts-with(@type,'text/plain') or @type='example' or @type='code' or @type='application/xml-dtd' or @type='application/json'">
    670       <xsl:attribute name="class">text</xsl:attribute>
    671     </xsl:when>
    672     <xsl:otherwise/>
    673   </xsl:choose>
     740  <xsl:variable name="v">
     741    <xsl:choose>
     742      <xsl:when test="@type='abnf' or @type='abnf2045' or @type='abnf2616' or @type='abnf7230' or @type='application/xml-dtd' or @type='inline' or @type='application/relax-ng-compact-syntax'">inline</xsl:when>
     743      <xsl:when test="starts-with(@type,'message/http') and contains(@type,'msgtype=&#34;request&#34;')">text2</xsl:when>
     744      <xsl:when test="starts-with(@type,'message/http')">text</xsl:when>
     745      <xsl:when test="starts-with(@type,'drawing')">drawing</xsl:when>
     746      <xsl:when test="starts-with(@type,'text/plain') or @type='example' or @type='code' or @type='application/xml-dtd' or @type='application/json'">text</xsl:when>
     747      <xsl:otherwise/>
     748    </xsl:choose>
     749    <xsl:if test="@x:lang and $prettyprint-class!=''"><xsl:value-of select="concat(' ',$prettyprint-class)"/></xsl:if>
     750  </xsl:variable>
     751  <xsl:if test="normalize-space($v)!=''">
     752    <xsl:attribute name="class"><xsl:value-of select="normalize-space($v)"/></xsl:attribute>
     753  </xsl:if>
    674754</xsl:template>
    675755
     
    686766</xsl:template>
    687767
    688 <xsl:template match="artwork">
     768<xsl:template match="artwork[svg:svg]">
     769  <xsl:copy-of select="svg:svg"/>
     770</xsl:template>
     771
     772<xsl:template match="artwork|sourcecode">
    689773  <xsl:if test="not(ancestor::ed:del) and $xml2rfc-ext-parse-xml-in-artwork='yes' and function-available('myns:parseXml')" use-when="function-available('myns:parseXml')">
    690774    <xsl:if test="contains(.,'&lt;?xml')">
     
    836920              <xsl:copy-of select="@width|@height"/>
    837921            </xsl:when>
    838             <xsl:otherwise xmlns:svg="http://www.w3.org/2000/svg">
     922            <xsl:otherwise>
    839923              <!-- try to find width and height from SVG -->
    840924              <xsl:variable name="svg" select="document(@src)"/>
     
    11351219<xsl:template match="front">
    11361220  <xsl:call-template name="check-no-text-content"/>
    1137   <xsl:if test="$xml2rfc-topblock!='no'">
    1138     <!-- collect information for left column -->
    1139     <xsl:variable name="leftColumn">
    1140       <xsl:call-template name="collectLeftHeaderColumn"/>
    1141     </xsl:variable>
    1142     <!-- collect information for right column -->
    1143     <xsl:variable name="rightColumn">
    1144       <xsl:call-template name="collectRightHeaderColumn"/>
    1145     </xsl:variable>
    1146     <!-- insert the collected information -->
    1147     <table xmlns="http://www.w3.org/1999/xhtml" class="{$css-header}" id="{$anchor-prefix}.headerblock">
    1148       <xsl:choose>
    1149         <xsl:when test="function-available('exslt:node-set')">
    1150           <xsl:call-template name="emitheader">
    1151             <xsl:with-param name="lc" select="exslt:node-set($leftColumn)"/>
    1152             <xsl:with-param name="rc" select="exslt:node-set($rightColumn)"/>
    1153           </xsl:call-template>
    1154         </xsl:when>
    1155         <xsl:otherwise>
    1156           <xsl:call-template name="error">
    1157             <xsl:with-param name="msg" select="$node-set-warning"/>
    1158           </xsl:call-template>
    1159         </xsl:otherwise>
    1160       </xsl:choose>
    1161     </table>
    1162   </xsl:if>
    1163 
    1164   <div xmlns="http://www.w3.org/1999/xhtml" id="{$anchor-prefix}.title">
    1165     <!-- main title -->
    1166 
    1167     <h1><xsl:apply-templates select="title"/></h1>
    1168     <xsl:if test="/rfc/@docName">
    1169    
    1170       <xsl:variable name="docname" select="/rfc/@docName"/>
    1171 
    1172       <xsl:choose>
    1173         <xsl:when test="$rfcno!=''">
    1174           <xsl:call-template name="warning">
    1175             <xsl:with-param name="msg">The @docName attribute '<xsl:value-of select="$docname"/>' is ignored because an RFC number is specified as well.</xsl:with-param>
    1176           </xsl:call-template>
    1177         </xsl:when>
    1178         <xsl:otherwise>
    1179           <div class="filename"><xsl:value-of select="$docname"/></div>
    1180         </xsl:otherwise>
    1181       </xsl:choose>
    1182      
    1183       <xsl:variable name="docname-noext">
     1221  <header xmlns="http://www.w3.org/1999/xhtml">
     1222    <xsl:if test="$xml2rfc-topblock!='no'">
     1223      <!-- collect information for left column -->
     1224      <xsl:variable name="leftColumn">
     1225        <xsl:call-template name="collectLeftHeaderColumn"/>
     1226      </xsl:variable>
     1227      <!-- collect information for right column -->
     1228      <xsl:variable name="rightColumn">
     1229        <xsl:call-template name="collectRightHeaderColumn"/>
     1230      </xsl:variable>
     1231      <!-- insert the collected information -->
     1232      <table class="{$css-header}" id="{$anchor-prefix}.headerblock">
    11841233        <xsl:choose>
    1185           <xsl:when test="contains($docname,'.')">
    1186             <xsl:call-template name="warning">
    1187               <xsl:with-param name="msg">The @docName attribute '<xsl:value-of select="$docname"/>' should contain the base name, not the filename (thus no file extension).</xsl:with-param>
     1234          <xsl:when test="function-available('exslt:node-set')">
     1235            <xsl:call-template name="emitheader">
     1236              <xsl:with-param name="lc" select="exslt:node-set($leftColumn)"/>
     1237              <xsl:with-param name="rc" select="exslt:node-set($rightColumn)"/>
    11881238            </xsl:call-template>
    1189             <xsl:value-of select="substring-before($docname,'.')"/>
    11901239          </xsl:when>
    11911240          <xsl:otherwise>
    1192             <xsl:value-of select="$docname"/>
     1241            <xsl:call-template name="error">
     1242              <xsl:with-param name="msg" select="$node-set-warning"/>
     1243            </xsl:call-template>
    11931244          </xsl:otherwise>
    11941245        </xsl:choose>
    1195       </xsl:variable>
    1196 
    1197       <!-- more name checks -->
    1198       <xsl:variable name="offending" select="translate($docname,concat($lcase,$digits,'-.'),'')"/>
    1199       <xsl:if test="$offending != ''">
    1200         <xsl:call-template name="warning">
    1201           <xsl:with-param name="msg">The @docName attribute '<xsl:value-of select="$docname"/>' should not contain the character '<xsl:value-of select="substring($offending,1,1)"/>'.</xsl:with-param>
    1202         </xsl:call-template>
     1246      </table>
     1247    </xsl:if>
     1248
     1249    <div id="{$anchor-prefix}.title">
     1250      <!-- main title -->
     1251      <h1><xsl:apply-templates select="title"/></h1>
     1252      <xsl:if test="/rfc/@docName">
     1253        <xsl:variable name="docname" select="/rfc/@docName"/>
     1254        <xsl:choose>
     1255          <xsl:when test="$rfcno!=''">
     1256            <xsl:call-template name="warning">
     1257              <xsl:with-param name="msg">The @docName attribute '<xsl:value-of select="$docname"/>' is ignored because an RFC number is specified as well.</xsl:with-param>
     1258            </xsl:call-template>
     1259          </xsl:when>
     1260          <xsl:otherwise>
     1261            <div class="filename"><xsl:value-of select="$docname"/></div>
     1262          </xsl:otherwise>
     1263        </xsl:choose>
     1264       
     1265        <xsl:variable name="docname-noext">
     1266          <xsl:choose>
     1267            <xsl:when test="contains($docname,'.')">
     1268              <xsl:call-template name="warning">
     1269                <xsl:with-param name="msg">The @docName attribute '<xsl:value-of select="$docname"/>' should contain the base name, not the filename (thus no file extension).</xsl:with-param>
     1270              </xsl:call-template>
     1271              <xsl:value-of select="substring-before($docname,'.')"/>
     1272            </xsl:when>
     1273            <xsl:otherwise>
     1274              <xsl:value-of select="$docname"/>
     1275            </xsl:otherwise>
     1276          </xsl:choose>
     1277        </xsl:variable>
     1278 
     1279        <!-- more name checks -->
     1280        <xsl:variable name="offending" select="translate($docname,concat($lcase,$digits,'-.'),'')"/>
     1281        <xsl:if test="$offending != ''">
     1282          <xsl:call-template name="warning">
     1283            <xsl:with-param name="msg">The @docName attribute '<xsl:value-of select="$docname"/>' should not contain the character '<xsl:value-of select="substring($offending,1,1)"/>'.</xsl:with-param>
     1284          </xsl:call-template>
     1285        </xsl:if>
     1286 
     1287        <xsl:if test="contains($docname,'--')">
     1288          <xsl:call-template name="warning">
     1289            <xsl:with-param name="msg">The @docName attribute '<xsl:value-of select="$docname"/>' should not contain the character sequence '--'.</xsl:with-param>
     1290          </xsl:call-template>
     1291        </xsl:if>
     1292 
     1293        <xsl:if test="not(starts-with($docname,'draft-'))">
     1294          <xsl:call-template name="warning">
     1295            <xsl:with-param name="msg">The @docName attribute '<xsl:value-of select="$docname"/>' should start with 'draft-'.</xsl:with-param>
     1296          </xsl:call-template>
     1297        </xsl:if>
     1298 
     1299        <!-- sequence number -->
     1300        <xsl:variable name="seq">
     1301          <xsl:choose>
     1302            <xsl:when test="substring($docname-noext,string-length($docname-noext) + 1 - string-length('-latest'))='-latest'">latest</xsl:when>
     1303            <xsl:when test="substring($docname-noext,string-length($docname-noext) - 2, 1)='-'"><xsl:value-of select="substring($docname-noext,string-length($docname-noext)-1)"/></xsl:when>
     1304            <xsl:otherwise/>
     1305          </xsl:choose>
     1306        </xsl:variable>
     1307 
     1308        <xsl:if test="$seq='' or ($seq!='latest' and translate($seq,$digits,'')!='')">
     1309          <xsl:call-template name="warning">
     1310            <xsl:with-param name="msg">The @docName attribute '<xsl:value-of select="$docname"/>' should end with a two-digit sequence number or 'latest'.</xsl:with-param>
     1311          </xsl:call-template>
     1312        </xsl:if>
     1313 
     1314        <xsl:if test="string-length($docname)-string-length($seq) &gt; 50">
     1315          <xsl:call-template name="warning">
     1316            <xsl:with-param name="msg">The @docName attribute '<xsl:value-of select="$docname"/>', excluding sequence number, should have less than 50 characters.</xsl:with-param>
     1317          </xsl:call-template>
     1318        </xsl:if>
     1319 
    12031320      </xsl:if>
    1204 
    1205       <xsl:if test="contains($docname,'--')">
    1206         <xsl:call-template name="warning">
    1207           <xsl:with-param name="msg">The @docName attribute '<xsl:value-of select="$docname"/>' should not contain the character sequence '--'.</xsl:with-param>
    1208         </xsl:call-template>
    1209       </xsl:if>
    1210 
    1211       <xsl:if test="not(starts-with($docname,'draft-'))">
    1212         <xsl:call-template name="warning">
    1213           <xsl:with-param name="msg">The @docName attribute '<xsl:value-of select="$docname"/>' should start with 'draft-'.</xsl:with-param>
    1214         </xsl:call-template>
    1215       </xsl:if>
    1216 
    1217       <!-- sequence number -->
    1218       <xsl:variable name="seq">
    1219         <xsl:choose>
    1220           <xsl:when test="substring($docname-noext,string-length($docname-noext) + 1 - string-length('-latest'))='-latest'">latest</xsl:when>
    1221           <xsl:when test="substring($docname-noext,string-length($docname-noext) - 2, 1)='-'"><xsl:value-of select="substring($docname-noext,string-length($docname-noext)-1)"/></xsl:when>
    1222           <xsl:otherwise/>
    1223         </xsl:choose>
    1224       </xsl:variable>
    1225 
    1226       <xsl:if test="$seq='' or ($seq!='latest' and translate($seq,$digits,'')!='')">
    1227         <xsl:call-template name="warning">
    1228           <xsl:with-param name="msg">The @docName attribute '<xsl:value-of select="$docname"/>' should end with a two-digit sequence number or 'latest'.</xsl:with-param>
    1229         </xsl:call-template>
    1230       </xsl:if>
    1231 
    1232       <xsl:if test="string-length($docname)-string-length($seq) &gt; 50">
    1233         <xsl:call-template name="warning">
    1234           <xsl:with-param name="msg">The @docName attribute '<xsl:value-of select="$docname"/>', excluding sequence number, should have less than 50 characters.</xsl:with-param>
    1235         </xsl:call-template>
    1236       </xsl:if>
    1237 
    1238     </xsl:if>
    1239   </div>
     1321    </div>
     1322  </header>
    12401323
    12411324  <!-- insert notice about update -->
     
    16891772  </xsl:variable>
    16901773
    1691   <xsl:if test="$dd-content!=''">
    1692     <dd xmlns="http://www.w3.org/1999/xhtml">
    1693       <xsl:call-template name="insertInsDelClass"/>
    1694       <!-- if hangIndent present, use 0.7 of the specified value (1em is the width of the "m" character -->
    1695       <xsl:if test="../@hangIndent">
    1696         <xsl:attribute name="style">margin-left: <xsl:value-of select="format-number(../@hangIndent * 0.7,'#.#')"/>em</xsl:attribute>
    1697       </xsl:if>
    1698       <xsl:apply-templates/>
    1699     </dd>
    1700   </xsl:if>
     1774  <xsl:choose>
     1775    <xsl:when test="$dd-content!=''">
     1776      <dd xmlns="http://www.w3.org/1999/xhtml">
     1777        <xsl:call-template name="insertInsDelClass"/>
     1778        <!-- if hangIndent present, use 0.7 of the specified value (1em is the width of the "m" character -->
     1779        <xsl:if test="../@hangIndent">
     1780          <xsl:attribute name="style">margin-left: <xsl:value-of select="format-number(../@hangIndent * 0.7,'#.#')"/>em</xsl:attribute>
     1781        </xsl:if>
     1782        <xsl:apply-templates/>
     1783      </dd>
     1784    </xsl:when>
     1785    <xsl:otherwise>
     1786      <dd xmlns="http://www.w3.org/1999/xhtml"> </dd>
     1787    </xsl:otherwise>
     1788  </xsl:choose>
    17011789</xsl:template>
    17021790
     
    17721860  <xsl:call-template name="check-no-text-content"/>
    17731861  <xsl:variable name="num"><xsl:number/></xsl:variable>
    1774     <h2 xmlns="http://www.w3.org/1999/xhtml" id="{$anchor-prefix}.note.{$num}">
     1862  <section xmlns="http://www.w3.org/1999/xhtml" id="{$anchor-prefix}.note.{$num}">
     1863    <h2>
    17751864      <xsl:call-template name="insertInsDelClass"/>
    17761865      <a href="#{$anchor-prefix}.note.{$num}">
     
    17781867      </a>
    17791868    </h2>
    1780   <xsl:apply-templates/>
     1869    <xsl:apply-templates/>
     1870  </section>
    17811871</xsl:template>
    17821872
     
    19071997    <xsl:choose>
    19081998      <xsl:when test="starts-with($bib/@target,'http://www.rfc-editor.org/info/rfc') or starts-with($bib/@target,'https://www.rfc-editor.org/info/rfc') and $ref and ($ref/@x:sec or $ref/@x:rel or $ref/@section or $ref/@relative)">
    1909         <xsl:call-template name="warning">
    1910           <xsl:with-param name="msg">Ignoring @target <xsl:value-of select="$bib/@target"/> in link calculation</xsl:with-param>
    1911         </xsl:call-template>
     1999        <!--ignored, use tools.ietf.org link instead -->
    19122000      </xsl:when>
    19132001      <xsl:otherwise>
     
    19802068      </xsl:call-template>
    19812069    </xsl:when>
    1982     <xsl:when test="not(ancestor::ed:del) and not(key('xref-item',$anchor))">
     2070    <xsl:when test="not(ancestor::ed:del) and (ancestor::rfc and not(key('xref-item',$anchor)))">
    19832071      <xsl:call-template name="warning">
    19842072        <xsl:with-param name="msg">unused reference '<xsl:value-of select="@anchor"/>'</xsl:with-param>
     2073      </xsl:call-template>
     2074    </xsl:when>
     2075    <xsl:when test="not(ancestor::ed:del) and (not(ancestor::rfc) and not($src//xref[@target=$anchor]))">
     2076      <xsl:call-template name="warning">
     2077        <xsl:with-param name="msg">unused (included) reference '<xsl:value-of select="@anchor"/>'</xsl:with-param>
    19852078      </xsl:call-template>
    19862079    </xsl:when>
     
    20102103  <xsl:variable name="target">
    20112104    <xsl:choose>
     2105      <xsl:when test="starts-with(@target,'http://www.rfc-editor.org/info/rfc') or starts-with(@target,'https://www.rfc-editor.org/info/rfc')">
     2106        <xsl:call-template name="info">
     2107          <xsl:with-param name="msg">Ignoring @target <xsl:value-of select="@target"/> in link calculation</xsl:with-param>
     2108        </xsl:call-template>
     2109        <xsl:call-template name="computed-auto-target">
     2110          <xsl:with-param name="bib" select="."/>
     2111        </xsl:call-template>
     2112      </xsl:when>
    20122113      <xsl:when test="@target">
    2013         <xsl:if test="string-length(normalize-space(@target)) = 0">
     2114        <xsl:if test="normalize-space(@target)=''">
    20142115          <xsl:call-template name="warning">
    20152116            <xsl:with-param name="msg">invalid (empty) target attribute in reference '<xsl:value-of select="@anchor"/>'</xsl:with-param>
     
    22342335</xsl:template>
    22352336
    2236 
    22372337<xsl:template match="references">
    22382338  <xsl:call-template name="check-no-text-content"/>
    22392339
     2340  <xsl:variable name="refseccount" select="count(/rfc/back/references)+count(/rfc/back/ed:replace/ed:ins/references)"/>
     2341
     2342  <xsl:choose>
     2343    <!-- insert pseudo section when needed -->
     2344    <xsl:when test="not(preceding::references) and $refseccount!=1">
     2345      <xsl:call-template name="insert-conditional-hrule"/>
     2346      <section xmlns="http://www.w3.org/1999/xhtml" id="{$anchor-prefix}.references">
     2347        <xsl:call-template name="insert-conditional-pagebreak"/>
     2348        <xsl:variable name="sectionNumber">
     2349          <xsl:call-template name="get-references-section-number"/>
     2350        </xsl:variable>
     2351        <h2 id="{$anchor-prefix}.section.{$sectionNumber}">
     2352          <a href="#{$anchor-prefix}.section.{$sectionNumber}">
     2353            <xsl:call-template name="emit-section-number">
     2354              <xsl:with-param name="no" select="$sectionNumber"/>
     2355            </xsl:call-template>
     2356          </a>
     2357          <xsl:text> </xsl:text>
     2358          <xsl:value-of select="$xml2rfc-refparent"/>
     2359        </h2>
     2360        <xsl:for-each select=".|following-sibling::references">
     2361          <xsl:call-template name="make-references">
     2362            <xsl:with-param name="nested" select="true()"/>
     2363          </xsl:call-template>
     2364        </xsl:for-each>
     2365      </section>
     2366    </xsl:when>
     2367    <xsl:when test="preceding::references">
     2368      <!-- already processed -->
     2369    </xsl:when>
     2370    <xsl:otherwise>
     2371      <xsl:call-template name="make-references">
     2372        <xsl:with-param name="nested" select="false()"/>
     2373      </xsl:call-template>
     2374    </xsl:otherwise>
     2375  </xsl:choose>
     2376
     2377</xsl:template>
     2378
     2379<xsl:template name="make-references">
     2380  <xsl:param name="nested"/>
     2381 
    22402382  <xsl:variable name="name">
    22412383    <xsl:if test="ancestor::ed:del">
     
    22452387  </xsl:variable>
    22462388
    2247   <xsl:variable name="refseccount" select="count(/rfc/back/references)+count(/rfc/back/ed:replace/ed:ins/references)"/>
    2248 
    2249   <!-- insert pseudo section when needed -->
    2250   <xsl:if test="not(preceding::references) and $refseccount!=1">
    2251     <xsl:call-template name="insert-conditional-hrule"/>
    2252     <h2 xmlns="http://www.w3.org/1999/xhtml" id="{$anchor-prefix}.references">
    2253       <xsl:call-template name="insert-conditional-pagebreak"/>
    2254       <xsl:variable name="sectionNumber">
    2255         <xsl:call-template name="get-references-section-number"/>
    2256       </xsl:variable>
    2257       <a id="{$anchor-prefix}.section.{$sectionNumber}" href="#{$anchor-prefix}.section.{$sectionNumber}">
    2258         <xsl:call-template name="emit-section-number">
    2259           <xsl:with-param name="no" select="$sectionNumber"/>
    2260         </xsl:call-template>
    2261       </a>
    2262       <xsl:text> </xsl:text>
    2263       <xsl:value-of select="$xml2rfc-refparent"/>
    2264     </h2>
    2265   </xsl:if>
    2266 
    22672389  <xsl:variable name="elemtype">
    22682390    <xsl:choose>
    2269       <xsl:when test="$refseccount!=1">h3</xsl:when>
     2391      <xsl:when test="$nested">h3</xsl:when>
    22702392      <xsl:otherwise>h2</xsl:otherwise>
    22712393    </xsl:choose>
     
    22902412  </xsl:variable>
    22912413
    2292   <xsl:element namespace="http://www.w3.org/1999/xhtml" name="{$elemtype}">
     2414  <xsl:variable name="sectionNumber">
     2415    <xsl:call-template name="get-section-number"/>
     2416  </xsl:variable>
     2417
     2418  <xsl:variable name="anchorpostfix">
     2419    <xsl:if test="$nested">.<xsl:value-of select="$name"/></xsl:if>
     2420  </xsl:variable>
     2421
     2422  <section xmlns="http://www.w3.org/1999/xhtml" id="{$anchor-prefix}.references{$anchorpostfix}">
    22932423    <xsl:if test="$name='1'">
    22942424      <xsl:call-template name="insert-conditional-pagebreak"/>
    22952425    </xsl:if>
    2296     <xsl:variable name="sectionNumber">
    2297       <xsl:call-template name="get-section-number"/>
    2298     </xsl:variable>
    2299     <xsl:variable name="anchorpref">
     2426    <xsl:element namespace="http://www.w3.org/1999/xhtml" name="{$elemtype}">
     2427      <xsl:attribute name="id"><xsl:value-of select="concat($anchor-prefix,'.section.',$sectionNumber)"/></xsl:attribute>
     2428      <a href="#{$anchor-prefix}.section.{$sectionNumber}">
     2429        <xsl:call-template name="emit-section-number">
     2430          <xsl:with-param name="no" select="$sectionNumber"/>
     2431        </xsl:call-template>
     2432      </a>
     2433      <xsl:text> </xsl:text>
     2434      <xsl:copy-of select="$title"/>
     2435    </xsl:element>
     2436 
     2437    <xsl:variable name="included" select="exslt:node-set($includeDirectives)/myns:include[@in=generate-id(current())]/reference"/>
     2438    <dl class="{$css-reference}">
    23002439      <xsl:choose>
    2301         <xsl:when test="$elemtype='h2'"/>
    2302         <xsl:otherwise>.<xsl:value-of select="$name"/></xsl:otherwise>
     2440        <xsl:when test="$xml2rfc-sortrefs='yes' and $xml2rfc-symrefs!='no'">
     2441          <xsl:apply-templates select="*|$included">
     2442            <xsl:sort select="concat(/rfc/back/displayreference[@target=current()/@anchor]/@to,@anchor,.//ed:ins//reference/@anchor)"/>
     2443          </xsl:apply-templates>
     2444        </xsl:when>
     2445        <xsl:otherwise>
     2446          <xsl:apply-templates select="*|$included"/>
     2447        </xsl:otherwise>
    23032448      </xsl:choose>
    2304     </xsl:variable>
    2305     <xsl:attribute name="id"><xsl:value-of select="concat($anchor-prefix,'.references',$anchorpref)"/></xsl:attribute>
    2306     <a xmlns="http://www.w3.org/1999/xhtml" href="#{$anchor-prefix}.section.{$sectionNumber}" id="{$anchor-prefix}.section.{$sectionNumber}">
    2307       <xsl:call-template name="emit-section-number">
    2308         <xsl:with-param name="no" select="$sectionNumber"/>
     2449    </dl>
     2450  </section>
     2451</xsl:template>
     2452
     2453<xsl:template match="xi:include">
     2454  <xsl:choose>
     2455    <xsl:when test="not(parent::references)">
     2456      <xsl:call-template name="error">
     2457        <xsl:with-param name="msg" select="'Support for x:include is restricted to child elements of &lt;references&gt;'"/>
    23092458      </xsl:call-template>
    2310     </a>
    2311     <xsl:text> </xsl:text>
    2312     <xsl:copy-of select="$title"/>
    2313   </xsl:element>
    2314 
    2315   <dl xmlns="http://www.w3.org/1999/xhtml" class="{$css-reference}">
    2316     <xsl:choose>
    2317       <xsl:when test="$xml2rfc-sortrefs='yes' and $xml2rfc-symrefs!='no'">
    2318         <xsl:apply-templates>
    2319           <xsl:sort select="/rfc/back/displayreference[@target=current()/@anchor]/@to|@anchor|.//ed:ins//reference/@anchor"/>
    2320         </xsl:apply-templates>
    2321       </xsl:when>
    2322       <xsl:otherwise>
    2323         <xsl:apply-templates/>
    2324       </xsl:otherwise>
    2325     </xsl:choose>
    2326   </dl>
    2327 
    2328 </xsl:template>
     2459    </xsl:when>
     2460    <xsl:otherwise>
     2461      <!-- handled elsewhere -->
     2462    </xsl:otherwise>
     2463  </xsl:choose>
     2464</xsl:template>
     2465
    23292466<!-- processed earlier -->
    23302467<xsl:template match="references/name"/>
     
    23492486  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{$lang}">
    23502487    <head>
    2351       <xsl:if test="$xml2rfc-ext-support-rfc2731!='no'">
    2352         <xsl:attribute name="profile">http://dublincore.org/documents/2008/08/04/dc-html/</xsl:attribute>
    2353       </xsl:if>
    23542488      <title>
    23552489        <xsl:apply-templates select="front/title" mode="get-text-content"/>
     
    24152549      <xsl:if test="$xml2rfc-ext-support-rfc2731!='no'">
    24162550        <!-- Dublin Core Metadata -->
    2417         <link rel="schema.dct" href="http://purl.org/dc/terms/"/>
     2551        <link rel="schema.dcterms" href="http://purl.org/dc/terms/"/>
    24182552
    24192553        <!-- DC creator, see RFC2731 -->
     
    24222556            <xsl:call-template name="format-initials"/>
    24232557          </xsl:variable>
    2424           <meta name="dct.creator" content="{concat(@surname,', ',$initials)}"/>
     2558          <meta name="dcterms.creator" content="{concat(@surname,', ',$initials)}"/>
    24252559        </xsl:for-each>
    24262560
     
    24282562          <xsl:choose>
    24292563            <xsl:when test="@number">
    2430               <meta name="dct.identifier" content="urn:ietf:rfc:{@number}"/>
     2564              <meta name="dcterms.identifier" content="urn:ietf:rfc:{@number}"/>
    24312565            </xsl:when>
    24322566            <xsl:when test="@docName">
    2433               <meta name="dct.identifier" content="urn:ietf:id:{@docName}"/>
     2567              <meta name="dcterms.identifier" content="urn:ietf:id:{@docName}"/>
    24342568            </xsl:when>
    24352569            <xsl:otherwise/>
    24362570          </xsl:choose>
    2437           <meta name="dct.issued" scheme="ISO8601">
     2571          <meta name="dcterms.issued">
    24382572            <xsl:attribute name="content">
    24392573              <xsl:value-of select="concat($xml2rfc-ext-pub-year,'-',$pub-month-numeric)"/>
     
    24522586
    24532587        <xsl:if test="front/abstract">
    2454           <meta name="dct.abstract" content="{normalize-space(front/abstract)}"/>
     2588          <meta name="dcterms.abstract" content="{normalize-space(front/abstract)}"/>
    24552589        </xsl:if>
    24562590
    24572591        <xsl:if test="@number">
    2458           <meta name="dct.isPartOf" content="urn:issn:2070-1721"/>
     2592          <meta name="dcterms.isPartOf" content="urn:issn:2070-1721"/>
    24592593        </xsl:if>
    24602594
    24612595      </xsl:if>
    24622596
    2463       <!-- this replicates dct.abstract, but is used by Google & friends -->
     2597      <!-- this replicates dcterms.abstract, but is used by Google & friends -->
    24642598      <xsl:if test="front/abstract">
    24652599        <meta name="description" content="{normalize-space(front/abstract)}"/>
     
    27202854    <div xmlns="http://www.w3.org/1999/xhtml" id="{$anchor-prefix}.meta" class="{$css-docstatus}"/>
    27212855  </xsl:if>
    2722   <div xmlns="http://www.w3.org/1999/xhtml">
     2856  <section xmlns="http://www.w3.org/1999/xhtml">
    27232857    <xsl:if test="@anchor">
    27242858      <xsl:call-template name="check-anchor"/>
     
    27802914      </xsl:if>
    27812915    </xsl:for-each>
    2782   </div>
     2916  </section>
    27832917</xsl:template>
    27842918
     
    27942928
    27952929<xsl:template match="spanx[@style='verb' or @style='vbare']|tt">
    2796   <tt xmlns="http://www.w3.org/1999/xhtml">
     2930  <span xmlns="http://www.w3.org/1999/xhtml" class="tt">
    27972931    <xsl:call-template name="copy-anchor"/>
    27982932    <xsl:apply-templates/>
    2799   </tt>
     2933  </span>
    28002934</xsl:template>
    28012935
     
    29063040  <xsl:choose>
    29073041    <xsl:when test="@sectionFormat">
     3042      <xsl:call-template name="warning">
     3043        <xsl:with-param name="msg">@sectionFormat is deprecated, use @x:fmt instead</xsl:with-param>
     3044      </xsl:call-template>
    29083045      <xsl:if test="@x:fmt">
    29093046        <xsl:call-template name="warning">
     
    29463083  <xsl:choose>
    29473084    <xsl:when test="@section">
     3085      <xsl:call-template name="warning">
     3086        <xsl:with-param name="msg">@section is deprecated, use @x:sec instead</xsl:with-param>
     3087      </xsl:call-template>
    29483088      <xsl:if test="@x:sec">
    29493089        <xsl:call-template name="warning">
     
    30973237  <xsl:for-each select="$src">
    30983238
    3099     <xsl:variable name="node" select="key('anchor-item',$xref/@target)"/>
     3239    <xsl:variable name="node" select="key('anchor-item',$xref/@target)|exslt:node-set($includeDirectives)//reference[@anchor=$xref/@target]"/>
    31003240    <xsl:if test="count($node)=0 and not($node/ancestor::ed:del)">
    31013241      <xsl:for-each select="$xref">
     
    34873627    <xsl:with-param name="msg">no XSLT template for element '<xsl:value-of select="name()"/>'</xsl:with-param>
    34883628  </xsl:call-template>
    3489   <tt xmlns="http://www.w3.org/1999/xhtml" class="{$css-error}">&lt;<xsl:value-of select="name()"/>&gt;</tt>
     3629  <span xmlns="http://www.w3.org/1999/xhtml" class="tt {$css-error}">&lt;<xsl:value-of select="name()"/>&gt;</span>
    34903630  <xsl:copy><xsl:apply-templates select="node()|@*"/></xsl:copy>
    3491   <tt xmlns="http://www.w3.org/1999/xhtml" class="{$css-error}">&lt;/<xsl:value-of select="name()"/>&gt;</tt>
     3631  <span xmlns="http://www.w3.org/1999/xhtml" class="tt {$css-error}">&lt;/<xsl:value-of select="name()"/>&gt;</span>
    34923632</xsl:template>
    34933633
     
    35213661          <xsl:otherwise>
    35223662            <xsl:call-template name="info">
    3523               <xsl:with-param name="inline" select="'no'"/>
    35243663              <xsl:with-param name="msg">The /rfc/front/workgroup should only be used for Working/Research Group drafts</xsl:with-param>
    35253664            </xsl:call-template>
     
    35313670          <xsl:if test="contains($tmp,' research group') or contains($tmp,' working group')">
    35323671            <xsl:call-template name="info">
    3533               <xsl:with-param name="inline" select="'no'"/>
    35343672              <xsl:with-param name="msg">No need to include 'Working Group' or 'Research Group' postfix in /rfc/front/workgroup value '<xsl:value-of select="$v"/>'</xsl:with-param>
    35353673            </xsl:call-template>
     
    35573695        <xsl:if test="starts-with(/rfc/@docName,'draft-ietf-') and not(/rfc/front/workgroup)">
    35583696          <xsl:call-template name="info">
    3559             <xsl:with-param name="inline" select="'no'"/>
    35603697            <xsl:with-param name="msg">WG submissions should include a /rfc/front/workgroup element</xsl:with-param>
    35613698          </xsl:call-template>
     
    36003737        <xsl:otherwise>
    36013738          <xsl:call-template name="warning">
    3602             <xsl:with-param name="inline" select="'no'"/>
    36033739            <xsl:with-param name="msg">Unknown IETF area: "<xsl:value-of select="$area"/>" - should be one of: <xsl:for-each select="$allowed/ed:v">
    36043740              <xsl:text>"</xsl:text>
     
    36403776          <xsl:otherwise>
    36413777            <xsl:call-template name="warning">
    3642               <xsl:with-param name="inline" select="'no'"/>
    36433778              <xsl:with-param name="msg">There is no IETF document series called '<xsl:value-of select="/rfc/@category"/>'</xsl:with-param>
    36443779            </xsl:call-template>
     
    37963931  <xsl:choose>
    37973932    <xsl:when test="number($xml2rfc-ext-pub-day) &gt;= 1">
     3933      <!-- have day of month? -->
    37983934      <xsl:if test="$in-prose">
    37993935        <xsl:text>on </xsl:text>
     
    38093945        <xsl:text>in </xsl:text>
    38103946      </xsl:if>
     3947      <xsl:variable name="month">
     3948        <xsl:call-template name="get-month-as-num">
     3949          <xsl:with-param name="month" select="$xml2rfc-ext-pub-month"/>
     3950        </xsl:call-template>
     3951      </xsl:variable>
    38113952      <xsl:choose>
    3812         <xsl:when test="$xml2rfc-ext-pub-month='January'">July <xsl:value-of select="$xml2rfc-ext-pub-year"/></xsl:when>
    3813         <xsl:when test="$xml2rfc-ext-pub-month='February'">August <xsl:value-of select="$xml2rfc-ext-pub-year"/></xsl:when>
    3814         <xsl:when test="$xml2rfc-ext-pub-month='March'">September <xsl:value-of select="$xml2rfc-ext-pub-year"/></xsl:when>
    3815         <xsl:when test="$xml2rfc-ext-pub-month='April'">October <xsl:value-of select="$xml2rfc-ext-pub-year"/></xsl:when>
    3816         <xsl:when test="$xml2rfc-ext-pub-month='May'">November <xsl:value-of select="$xml2rfc-ext-pub-year"/></xsl:when>
    3817         <xsl:when test="$xml2rfc-ext-pub-month='June'">December <xsl:value-of select="$xml2rfc-ext-pub-year"/></xsl:when>
    3818         <xsl:when test="$xml2rfc-ext-pub-month='July'">January <xsl:value-of select="$xml2rfc-ext-pub-year + 1"/></xsl:when>
    3819         <xsl:when test="$xml2rfc-ext-pub-month='August'">February <xsl:value-of select="$xml2rfc-ext-pub-year + 1"/></xsl:when>
    3820         <xsl:when test="$xml2rfc-ext-pub-month='September'">March <xsl:value-of select="$xml2rfc-ext-pub-year + 1"/></xsl:when>
    3821         <xsl:when test="$xml2rfc-ext-pub-month='October'">April <xsl:value-of select="$xml2rfc-ext-pub-year + 1"/></xsl:when>
    3822         <xsl:when test="$xml2rfc-ext-pub-month='November'">May <xsl:value-of select="$xml2rfc-ext-pub-year + 1"/></xsl:when>
    3823         <xsl:when test="$xml2rfc-ext-pub-month='December'">June <xsl:value-of select="$xml2rfc-ext-pub-year + 1"/></xsl:when>
     3953        <xsl:when test="string(number($month))!='NaN' and number($month) &gt; 0 and number($month) &lt; 7">
     3954          <xsl:call-template name="get-month-as-name">
     3955            <xsl:with-param name="month" select="number($month) + 6"/>
     3956          </xsl:call-template>
     3957          <xsl:text> </xsl:text>
     3958          <xsl:value-of select="$xml2rfc-ext-pub-year"/>
     3959        </xsl:when>
     3960        <xsl:when test="string(number($month))!='NaN' and number($month) &gt; 6 and number($month) &lt; 13">
     3961          <xsl:call-template name="get-month-as-name">
     3962            <xsl:with-param name="month" select="number($month) - 6"/>
     3963          </xsl:call-template>
     3964          <xsl:text> </xsl:text>
     3965          <xsl:value-of select="$xml2rfc-ext-pub-year + 1"/>
     3966        </xsl:when>
    38243967        <xsl:otherwise>WRONG SYNTAX FOR MONTH</xsl:otherwise>
    38253968      </xsl:choose>
     
    39344077    <xsl:call-template name="insert-conditional-hrule"/>
    39354078
    3936     <div xmlns="http://www.w3.org/1999/xhtml" class="avoidbreakinside">
    3937       <h2 id="{$anchor-prefix}.authors">
    3938         <xsl:call-template name="insert-conditional-pagebreak"/>
     4079    <section xmlns="http://www.w3.org/1999/xhtml" id="{$anchor-prefix}.authors" class="avoidbreakinside">
     4080      <xsl:call-template name="insert-conditional-pagebreak"/>
     4081      <h2>
    39394082        <xsl:if test="$number != ''">
    39404083          <a href="#{$anchor-prefix}.section.{$number}" id="{$anchor-prefix}.section.{$number}"><xsl:value-of select="$number"/>.</a>
     
    39454088
    39464089      <xsl:apply-templates select="/rfc/front/author"/>
    3947     </div>
     4090    </section>
    39484091  </xsl:if>
    39494092</xsl:template>
     
    45444687</script>
    45454688</xsl:if>
     4689<script xmlns="http://www.w3.org/1999/xhtml" type="application/javascript">
     4690function anchorRewrite() {
     4691<xsl:text>  map = { </xsl:text>
     4692  <xsl:for-each select="//x:anchor-alias">
     4693    <xsl:text>"</xsl:text>
     4694    <xsl:call-template name="replace-substring">
     4695      <xsl:with-param name="string" select="@value"/>
     4696      <xsl:with-param name="replace">"</xsl:with-param>
     4697      <xsl:with-param name="by">\"</xsl:with-param>
     4698    </xsl:call-template>
     4699    <xsl:text>": "</xsl:text>
     4700    <xsl:call-template name="replace-substring">
     4701      <xsl:with-param name="string" select="ancestor::*[@anchor][1]/@anchor"/>
     4702      <xsl:with-param name="replace">"</xsl:with-param>
     4703      <xsl:with-param name="by">\"</xsl:with-param>
     4704    </xsl:call-template>
     4705    <xsl:text>"</xsl:text>
     4706    <xsl:if test="position()!=last()">, </xsl:if>
     4707  </xsl:for-each>
     4708<xsl:text>};</xsl:text>
     4709  if (window.location.hash.length &gt;= 1) {
     4710    var fragid = window.location.hash.substr(1);
     4711    if (fragid) {
     4712      if (! document.getElementById(fragid)) {
     4713        var prefix = "<xsl:value-of select="$anchor-prefix"/>";
     4714        var mapped = map[fragid];
     4715        if (mapped) {
     4716          window.location.hash = mapped;
     4717        } else if (fragid.indexOf("section-") == 0) {
     4718          window.location.hash = prefix + ".section." + fragid.substring(8);
     4719        } else if (fragid.indexOf("appendix-") == 0) {
     4720          window.location.hash = prefix + ".section." + fragid.substring(9);
     4721        }
     4722      }
     4723    } 
     4724  }
     4725}
     4726window.addEventListener('hashchange', anchorRewrite);
     4727window.addEventListener('DOMContentLoaded', anchorRewrite);
     4728</script><xsl:if test="$prettyprint-script!=''">
     4729<script xmlns="http://www.w3.org/1999/xhtml" src="{$prettyprint-script}"/></xsl:if>
    45464730</xsl:template>
    45474731
     
    45824766  max-width: <xsl:value-of select="$parsedMaxwidth"/>px;</xsl:if>
    45834767}
    4584 samp, tt, code, pre {
     4768samp, span.tt, code, pre {
    45854769  font-family: consolas, monaco, monospace;
    45864770}<xsl:if test="//xhtml:p">
     
    45914775  font-style: normal;
    45924776}<xsl:if test="//x:note|//aside">
    4593 div.<xsl:value-of select="$css-note"/> {
     4777aside {
    45944778  margin-left: 2em;
    45954779}</xsl:if>
     
    47124896  background-color: white;
    47134897  padding: 0em;
    4714   page-break-inside: auto;
     4898  page-break-inside: auto;<xsl:if test="$prettyprint-script!=''">
     4899  border: none !important;</xsl:if>
    47154900}
    47164901pre.text {
     
    47394924}<xsl:if test="//texttable">
    47404925table.<xsl:value-of select="$css-tt"/> {
     4926  border-collapse: collapse;
     4927  border-color: gray;
     4928  border-spacing: 0;
    47414929  vertical-align: top;
    4742   border-color: gray;
    4743 }
     4930 }
    47444931table.<xsl:value-of select="$css-tt"/> th {
    47454932  border-color: gray;
     4933  padding: 3px;
    47464934}
    47474935table.<xsl:value-of select="$css-tt"/> td {
    47484936  border-color: gray;
     4937  padding: 3px;
    47494938}
    47504939table.all {
     
    48625051  line-height: 150%;
    48635052  margin-left: 0em;
    4864 }
     5053}<xsl:if test="//svg:svg">
     5054@namespace svg url(http://www.w3.org/2000/svg);
     5055svg|svg {
     5056  margin-left: 3em;
     5057}
     5058svg {
     5059  margin-left: 3em;
     5060}</xsl:if>
    48655061.avoidbreakinside {
    48665062  page-break-inside: avoid;
     
    50285224  border: 1px solid silver;
    50295225  border-radius: 5px;
     5226  -webkit-user-select: none;<!-- not std CSS yet-->
     5227  -moz-user-select: none;
     5228  -ms-user-select: none;
    50305229}</xsl:if><xsl:if test="$xml2rfc-ext-justification='always'">
    50315230dd, li, p {
     
    52815480  <xsl:call-template name="insert-conditional-hrule"/>
    52825481
    5283   <h2 xmlns="http://www.w3.org/1999/xhtml" id="{$anchor-prefix}.index">
     5482  <section xmlns="http://www.w3.org/1999/xhtml" id="{$anchor-prefix}.index">
    52845483    <xsl:call-template name="insert-conditional-pagebreak"/>
    5285     <a href="#{$anchor-prefix}.index">Index</a>
    5286   </h2>
    5287 
    5288   <!-- generate navigation links to index subsections -->
    5289   <p xmlns="http://www.w3.org/1999/xhtml" class="{$css-noprint}">
    5290     <xsl:variable name="irefs" select="//iref[generate-id(.) = generate-id(key('index-first-letter',translate(substring(@item,1,1),$lcase,$ucase))[1])]"/>
    5291     <xsl:variable name="xrefs" select="//reference[not(starts-with(@anchor,'deleted-'))][generate-id(.) = generate-id(key('index-first-letter',translate(substring(concat(/rfc/back/displayreference[@target=current()/@anchor]/@to,@anchor),1,1),$lcase,$ucase))[1])]"/>
    5292 
    5293     <xsl:for-each select="$irefs | $xrefs">
     5484    <h2>
     5485      <a href="#{$anchor-prefix}.index">Index</a>
     5486    </h2>
     5487
     5488    <!-- generate navigation links to index subsections -->
     5489    <p class="{$css-noprint}">
     5490      <xsl:variable name="irefs" select="//iref[generate-id(.) = generate-id(key('index-first-letter',translate(substring(@item,1,1),$lcase,$ucase))[1])]"/>
     5491      <xsl:variable name="xrefs" select="//reference[not(starts-with(@anchor,'deleted-'))][generate-id(.) = generate-id(key('index-first-letter',translate(substring(concat(/rfc/back/displayreference[@target=current()/@anchor]/@to,@anchor),1,1),$lcase,$ucase))[1])]"/>
     5492 
     5493      <xsl:for-each select="$irefs | $xrefs">
     5494     
     5495        <xsl:sort select="translate(concat(@item,/rfc/back/displayreference[@target=current()/@anchor]/@to,@anchor),$lcase,$ucase)"/>
     5496 
     5497        <xsl:variable name="letter" select="translate(substring(concat(@item,/rfc/back/displayreference[@target=current()/@anchor]/@to,@anchor),1,1),$lcase,$ucase)"/>
     5498 
     5499        <!-- character? -->
     5500        <xsl:if test="translate($letter,concat($lcase,$ucase,'0123456789'),'')=''">
     5501 
     5502          <xsl:variable name="showit" select="$xml2rfc-ext-include-references-in-index='yes' or $irefs[starts-with(translate(@item,$lcase,$ucase),$letter)]"/>
     5503 
     5504          <xsl:if test="$showit">
     5505            <a href="#{$anchor-prefix}.index.{$letter}">
     5506              <xsl:value-of select="$letter"/>
     5507            </a>
     5508            <xsl:text> </xsl:text>
     5509          </xsl:if>
     5510        </xsl:if>
     5511      </xsl:for-each>
     5512    </p>
     5513
     5514    <!-- for each index subsection -->
     5515    <div class="print2col">
     5516      <ul class="ind">
     5517        <xsl:variable name="irefs2" select="//iref[generate-id(.) = generate-id(key('index-first-letter',translate(substring(@item,1,1),$lcase,$ucase))[1])]"/>
     5518        <xsl:variable name="xrefs2" select="//reference[not(starts-with(@anchor,'deleted-'))][generate-id(.) = generate-id(key('index-first-letter',translate(substring(concat(/rfc/back/displayreference[@target=current()/@anchor]/@to,@anchor),1,1),$lcase,$ucase))[1])]"/>
    52945519   
    5295       <xsl:sort select="translate(concat(@item,/rfc/back/displayreference[@target=current()/@anchor]/@to,@anchor),$lcase,$ucase)"/>
    5296 
    5297       <xsl:variable name="letter" select="translate(substring(concat(@item,/rfc/back/displayreference[@target=current()/@anchor]/@to,@anchor),1,1),$lcase,$ucase)"/>
    5298 
    5299       <!-- character? -->
    5300       <xsl:if test="translate($letter,concat($lcase,$ucase,'0123456789'),'')=''">
    5301 
    5302         <xsl:variable name="showit" select="$xml2rfc-ext-include-references-in-index='yes' or $irefs[starts-with(translate(@item,$lcase,$ucase),$letter)]"/>
    5303 
    5304         <xsl:if test="$showit">
    5305           <a href="#{$anchor-prefix}.index.{$letter}">
    5306             <xsl:value-of select="$letter"/>
    5307           </a>
    5308           <xsl:text> </xsl:text>
    5309         </xsl:if>
    5310 
    5311       </xsl:if>
    5312 
    5313     </xsl:for-each>
    5314   </p>
    5315 
    5316   <!-- for each index subsection -->
    5317   <div xmlns="http://www.w3.org/1999/xhtml" class="print2col">
    5318   <ul class="ind">
    5319     <xsl:variable name="irefs2" select="//iref[generate-id(.) = generate-id(key('index-first-letter',translate(substring(@item,1,1),$lcase,$ucase))[1])]"/>
    5320     <xsl:variable name="xrefs2" select="//reference[not(starts-with(@anchor,'deleted-'))][generate-id(.) = generate-id(key('index-first-letter',translate(substring(concat(/rfc/back/displayreference[@target=current()/@anchor]/@to,@anchor),1,1),$lcase,$ucase))[1])]"/>
    5321 
    5322     <xsl:for-each select="$irefs2 | $xrefs2">
    5323       <xsl:sort select="translate(concat(@item,/rfc/back/displayreference[@target=current()/@anchor]/@to,@anchor),$lcase,$ucase)"/>
    5324       <xsl:variable name="letter" select="translate(substring(concat(@item,/rfc/back/displayreference[@target=current()/@anchor]/@to,@anchor),1,1),$lcase,$ucase)"/>
    5325 
    5326       <xsl:variable name="showit" select="$xml2rfc-ext-include-references-in-index='yes' or $irefs2[starts-with(translate(@item,$lcase,$ucase),$letter)]"/>
    5327 
    5328       <xsl:if test="$showit">
    5329         <li>
    5330 
    5331           <!-- make letters and digits stand out -->
    5332           <xsl:choose>
    5333             <xsl:when test="translate($letter,concat($lcase,$ucase,'0123456789'),'')=''">
    5334               <a id="{$anchor-prefix}.index.{$letter}" href="#{$anchor-prefix}.index.{$letter}">
    5335                 <b><xsl:value-of select="$letter"/></b>
    5336               </a>
    5337             </xsl:when>
    5338             <xsl:otherwise>
    5339               <b><xsl:value-of select="$letter"/></b>
    5340             </xsl:otherwise>
    5341           </xsl:choose>
    5342 
    5343           <ul>
    5344             <xsl:for-each select="key('index-first-letter',translate(substring(concat(@item,@anchor),1,1),$lcase,$ucase))">
    5345 
    5346               <xsl:sort select="translate(concat(@item,@anchor),$lcase,$ucase)"/>
    5347 
     5520        <xsl:for-each select="$irefs2 | $xrefs2">
     5521          <xsl:sort select="translate(concat(@item,/rfc/back/displayreference[@target=current()/@anchor]/@to,@anchor),$lcase,$ucase)"/>
     5522          <xsl:variable name="letter" select="translate(substring(concat(@item,/rfc/back/displayreference[@target=current()/@anchor]/@to,@anchor),1,1),$lcase,$ucase)"/>
     5523   
     5524          <xsl:variable name="showit" select="$xml2rfc-ext-include-references-in-index='yes' or $irefs2[starts-with(translate(@item,$lcase,$ucase),$letter)]"/>
     5525   
     5526          <xsl:if test="$showit">
     5527            <li>
     5528   
     5529              <!-- make letters and digits stand out -->
    53485530              <xsl:choose>
    5349                 <xsl:when test="self::reference">
    5350                   <xsl:if test="$xml2rfc-ext-include-references-in-index='yes' and not(starts-with(@anchor,'deleted-'))">
    5351                     <li>
    5352                       <xsl:variable name="val">
    5353                         <xsl:call-template name="reference-name"/>
    5354                       </xsl:variable>
    5355                       <em>
    5356                         <xsl:value-of select="substring($val,2,string-length($val)-2)"/>
    5357                       </em>
    5358                       <xsl:text>  </xsl:text>
    5359 
    5360                       <xsl:variable name="rs" select="key('xref-item',current()/@anchor) | . | key('anchor-item',concat('deleted-',current()/@anchor))"/>
    5361 
    5362                       <xsl:for-each select="$rs">
    5363                         <xsl:call-template name="insertSingleXref"/>
    5364                       </xsl:for-each>
    5365 
    5366                       <xsl:variable name="rs2" select="$rs[@x:sec|@section]"/>
    5367 
    5368                       <xsl:if test="$rs2">
    5369                         <ul>
    5370                           <xsl:for-each select="$rs2">
    5371                             <xsl:sort select="substring-before(concat(@x:sec,@section,'.'),'.')" data-type="number"/>
    5372                             <xsl:sort select="substring(concat(@x:sec,@section),2+string-length(substring-before(concat(@x:sec,@section),'.')))" data-type="number"/>
    5373 
    5374                             <xsl:if test="generate-id(.) = generate-id(key('index-xref-by-sec',concat(@target,'..',@x:sec,@section))[1])">
    5375                               <li>
    5376                                 <em>
    5377                                   <xsl:choose>
    5378                                     <xsl:when test="translate(substring(concat(@x:sec,@section),1,1),$ucase,'')=''">
    5379                                       <xsl:text>Appendix </xsl:text>
    5380                                     </xsl:when>
    5381                                     <xsl:otherwise>
    5382                                       <xsl:text>Section </xsl:text>
    5383                                     </xsl:otherwise>
    5384                                   </xsl:choose>
    5385                                   <xsl:value-of select="@x:sec|@section"/>
    5386                                 </em>
    5387                                 <xsl:text>  </xsl:text>
    5388                                 <xsl:for-each select="key('index-xref-by-sec',concat(@target,'..',@x:sec,@section))">
    5389                                   <xsl:call-template name="insertSingleXref"/>
     5531                <xsl:when test="translate($letter,concat($lcase,$ucase,'0123456789'),'')=''">
     5532                  <a id="{$anchor-prefix}.index.{$letter}" href="#{$anchor-prefix}.index.{$letter}">
     5533                    <b><xsl:value-of select="$letter"/></b>
     5534                  </a>
     5535                </xsl:when>
     5536                <xsl:otherwise>
     5537                  <b><xsl:value-of select="$letter"/></b>
     5538                </xsl:otherwise>
     5539              </xsl:choose>
     5540   
     5541              <ul>
     5542                <xsl:for-each select="key('index-first-letter',translate(substring(concat(@item,@anchor),1,1),$lcase,$ucase))">
     5543   
     5544                  <xsl:sort select="translate(concat(@item,@anchor),$lcase,$ucase)"/>
     5545   
     5546                  <xsl:choose>
     5547                    <xsl:when test="self::reference">
     5548                      <xsl:if test="$xml2rfc-ext-include-references-in-index='yes' and not(starts-with(@anchor,'deleted-'))">
     5549                        <li>
     5550                          <xsl:variable name="val">
     5551                            <xsl:call-template name="reference-name"/>
     5552                          </xsl:variable>
     5553                          <em>
     5554                            <xsl:value-of select="substring($val,2,string-length($val)-2)"/>
     5555                          </em>
     5556                          <xsl:text>  </xsl:text>
     5557   
     5558                          <xsl:variable name="rs" select="key('xref-item',current()/@anchor) | . | key('anchor-item',concat('deleted-',current()/@anchor))"/>
     5559   
     5560                          <xsl:for-each select="$rs">
     5561                            <xsl:call-template name="insertSingleXref"/>
     5562                          </xsl:for-each>
     5563   
     5564                          <xsl:variable name="rs2" select="$rs[@x:sec|@section]"/>
     5565   
     5566                          <xsl:if test="$rs2">
     5567                            <ul>
     5568                              <xsl:for-each select="$rs2">
     5569                                <xsl:sort select="substring-before(concat(@x:sec,@section,'.'),'.')" data-type="number"/>
     5570                                <xsl:sort select="substring(concat(@x:sec,@section),2+string-length(substring-before(concat(@x:sec,@section),'.')))" data-type="number"/>
     5571   
     5572                                <xsl:if test="generate-id(.) = generate-id(key('index-xref-by-sec',concat(@target,'..',@x:sec,@section))[1])">
     5573                                  <li>
     5574                                    <em>
     5575                                      <xsl:choose>
     5576                                        <xsl:when test="translate(substring(concat(@x:sec,@section),1,1),$ucase,'')=''">
     5577                                          <xsl:text>Appendix </xsl:text>
     5578                                        </xsl:when>
     5579                                        <xsl:otherwise>
     5580                                          <xsl:text>Section </xsl:text>
     5581                                        </xsl:otherwise>
     5582                                      </xsl:choose>
     5583                                      <xsl:value-of select="@x:sec|@section"/>
     5584                                    </em>
     5585                                    <xsl:text>  </xsl:text>
     5586                                    <xsl:for-each select="key('index-xref-by-sec',concat(@target,'..',@x:sec,@section))">
     5587                                      <xsl:call-template name="insertSingleXref"/>
     5588                                    </xsl:for-each>
     5589                                  </li>
     5590                                </xsl:if>
     5591                              </xsl:for-each>
     5592                            </ul>
     5593                          </xsl:if>
     5594   
     5595                          <xsl:if test="current()/x:source/@href">
     5596                            <xsl:variable name="rs3" select="$rs[not(@x:sec) and @x:rel]"/>
     5597                            <xsl:variable name="doc" select="document(current()/x:source/@href)"/>
     5598                            <xsl:if test="$rs3">
     5599                              <ul>
     5600                                <xsl:for-each select="$rs3">
     5601                                  <xsl:sort select="count($doc//*[@anchor and following::*/@anchor=substring-after(current()/@x:rel,'#')])" order="ascending" data-type="number"/>
     5602                                  <xsl:if test="generate-id(.) = generate-id(key('index-xref-by-anchor',concat(@target,'..',@x:rel))[1])">
     5603                                    <li>
     5604                                      <em>
     5605                                        <xsl:variable name="sec">
     5606                                          <xsl:for-each select="$doc//*[@anchor=substring-after(current()/@x:rel,'#')]">
     5607                                            <xsl:call-template name="get-section-number"/>
     5608                                          </xsl:for-each>
     5609                                        </xsl:variable>
     5610                                        <xsl:choose>
     5611                                          <xsl:when test="translate(substring($sec,1,1),$ucase,'')=''">
     5612                                            <xsl:text>Appendix </xsl:text>
     5613                                          </xsl:when>
     5614                                          <xsl:otherwise>
     5615                                            <xsl:text>Section </xsl:text>
     5616                                          </xsl:otherwise>
     5617                                        </xsl:choose>
     5618                                        <xsl:value-of select="$sec"/>
     5619                                      </em>
     5620                                      <xsl:text>  </xsl:text>
     5621                                      <xsl:for-each select="key('index-xref-by-anchor',concat(@target,'..',@x:rel))">
     5622                                        <xsl:call-template name="insertSingleXref"/>
     5623                                      </xsl:for-each>
     5624                                    </li>
     5625                                  </xsl:if>
    53905626                                </xsl:for-each>
    5391                               </li>
     5627                              </ul>
    53925628                            </xsl:if>
     5629                          </xsl:if>
     5630                        </li>
     5631                      </xsl:if>
     5632                    </xsl:when>
     5633                    <xsl:otherwise>
     5634                      <!-- regular iref -->
     5635                      <xsl:if test="generate-id(.) = generate-id(key('index-item',concat(@item,@anchor))[1])">
     5636                        <xsl:variable name="item" select="@item"/>
     5637                        <xsl:variable name="in-artwork" select="key('index-item',$item)[@primary='true' and ancestor::artwork]"/>
     5638   
     5639                        <li>
     5640                          <xsl:choose>
     5641                            <xsl:when test="$in-artwork">
     5642                              <span class="tt"><xsl:value-of select="@item"/></span>
     5643                            </xsl:when>
     5644                            <xsl:otherwise>
     5645                              <xsl:value-of select="@item"/>
     5646                            </xsl:otherwise>
     5647                          </xsl:choose>
     5648                          <xsl:text>  </xsl:text>
     5649   
     5650                          <xsl:variable name="irefs3" select="key('index-item',@item)[not(@subitem) or @subitem='']"/>
     5651                          <xsl:variable name="xrefs3" select="key('xref-item',$irefs3[@x:for-anchor='']/../@anchor) | key('xref-item',$irefs3/@x:for-anchor)"/>
     5652                          <xsl:variable name="extrefs3" select="key('extref-item',$irefs3[@x:for-anchor='']/../@anchor) | key('extref-item',$irefs3/@x:for-anchor)"/>
     5653   
     5654                          <xsl:for-each select="$irefs3|$xrefs3|$extrefs3">
     5655                            <!-- <xsl:sort select="translate(@item,$lcase,$ucase)" />  -->
     5656                            <xsl:call-template name="insertSingleIref"/>
    53935657                          </xsl:for-each>
    5394                         </ul>
    5395                       </xsl:if>
    5396 
    5397                       <xsl:if test="current()/x:source/@href">
    5398                         <xsl:variable name="rs3" select="$rs[not(@x:sec) and @x:rel]"/>
    5399                         <xsl:variable name="doc" select="document(current()/x:source/@href)"/>
    5400                         <xsl:if test="$rs3">
    5401                           <ul>
    5402                             <xsl:for-each select="$rs3">
    5403                               <xsl:sort select="count($doc//*[@anchor and following::*/@anchor=substring-after(current()/@x:rel,'#')])" order="ascending" data-type="number"/>
    5404                               <xsl:if test="generate-id(.) = generate-id(key('index-xref-by-anchor',concat(@target,'..',@x:rel))[1])">
    5405                                 <li>
    5406                                   <em>
    5407                                     <xsl:variable name="sec">
    5408                                       <xsl:for-each select="$doc//*[@anchor=substring-after(current()/@x:rel,'#')]">
    5409                                         <xsl:call-template name="get-section-number"/>
    5410                                       </xsl:for-each>
    5411                                     </xsl:variable>
     5658   
     5659                          <xsl:variable name="s2" select="key('index-item',@item)[@subitem and @subitem!='']"/>
     5660                          <xsl:if test="$s2">
     5661                            <ul>
     5662                              <xsl:for-each select="$s2">
     5663                                <xsl:sort select="translate(@subitem,$lcase,$ucase)"/>
     5664   
     5665                                <xsl:if test="generate-id(.) = generate-id(key('index-item-subitem',concat(@item,'..',@subitem))[1])">
     5666   
     5667                                  <xsl:variable name="in-artwork2" select="key('index-item-subitem',concat(@item,'..',@subitem))[@primary='true' and ancestor::artwork]"/>
     5668   
     5669                                  <li>
     5670   
    54125671                                    <xsl:choose>
    5413                                       <xsl:when test="translate(substring($sec,1,1),$ucase,'')=''">
    5414                                         <xsl:text>Appendix </xsl:text>
     5672                                      <xsl:when test="$in-artwork2">
     5673                                        <span class="tt"><xsl:value-of select="@subitem"/></span>
    54155674                                      </xsl:when>
    54165675                                      <xsl:otherwise>
    5417                                         <xsl:text>Section </xsl:text>
     5676                                        <xsl:value-of select="@subitem"/>
    54185677                                      </xsl:otherwise>
    54195678                                    </xsl:choose>
    5420                                     <xsl:value-of select="$sec"/>
    5421                                   </em>
    5422                                   <xsl:text>  </xsl:text>
    5423                                   <xsl:for-each select="key('index-xref-by-anchor',concat(@target,'..',@x:rel))">
    5424                                     <xsl:call-template name="insertSingleXref"/>
    5425                                   </xsl:for-each>
    5426                                 </li>
    5427                               </xsl:if>
    5428                             </xsl:for-each>
    5429                           </ul>
    5430                         </xsl:if>
     5679                                    <xsl:text>  </xsl:text>
     5680   
     5681                                    <xsl:variable name="irefs4" select="key('index-item-subitem',concat(@item,'..',@subitem))"/>
     5682                                    <xsl:variable name="xrefs4" select="key('xref-item',$irefs4[@x:for-anchor='']/../@anchor) | key('xref-item',$irefs4/@x:for-anchor)"/>
     5683                                    <xsl:variable name="extrefs4" select="key('extref-item',$irefs4[@x:for-anchor='']/../@anchor) | key('extref-item',$irefs4/@x:for-anchor)"/>
     5684   
     5685                                    <xsl:for-each select="$irefs4|$xrefs4|$extrefs4">
     5686                                      <!--<xsl:sort select="translate(@item,$lcase,$ucase)" />-->
     5687                                      <xsl:call-template name="insertSingleIref"/>
     5688                                    </xsl:for-each>
     5689   
     5690                                  </li>
     5691                                </xsl:if>
     5692                              </xsl:for-each>
     5693                            </ul>
     5694                          </xsl:if>
     5695                        </li>
    54315696                      </xsl:if>
    5432                     </li>
    5433                   </xsl:if>
    5434                 </xsl:when>
    5435                 <xsl:otherwise>
    5436                   <!-- regular iref -->
    5437                   <xsl:if test="generate-id(.) = generate-id(key('index-item',concat(@item,@anchor))[1])">
    5438                     <xsl:variable name="item" select="@item"/>
    5439                     <xsl:variable name="in-artwork" select="key('index-item',$item)[@primary='true' and ancestor::artwork]"/>
    5440 
    5441                     <li>
    5442                       <xsl:choose>
    5443                         <xsl:when test="$in-artwork">
    5444                           <tt><xsl:value-of select="@item"/></tt>
    5445                         </xsl:when>
    5446                         <xsl:otherwise>
    5447                           <xsl:value-of select="@item"/>
    5448                         </xsl:otherwise>
    5449                       </xsl:choose>
    5450                       <xsl:text>  </xsl:text>
    5451 
    5452                       <xsl:variable name="irefs3" select="key('index-item',@item)[not(@subitem) or @subitem='']"/>
    5453                       <xsl:variable name="xrefs3" select="key('xref-item',$irefs3[@x:for-anchor='']/../@anchor) | key('xref-item',$irefs3/@x:for-anchor)"/>
    5454                       <xsl:variable name="extrefs3" select="key('extref-item',$irefs3[@x:for-anchor='']/../@anchor) | key('extref-item',$irefs3/@x:for-anchor)"/>
    5455 
    5456                       <xsl:for-each select="$irefs3|$xrefs3|$extrefs3">
    5457                         <!-- <xsl:sort select="translate(@item,$lcase,$ucase)" />  -->
    5458                         <xsl:call-template name="insertSingleIref"/>
    5459                       </xsl:for-each>
    5460 
    5461                       <xsl:variable name="s2" select="key('index-item',@item)[@subitem and @subitem!='']"/>
    5462                       <xsl:if test="$s2">
    5463                         <ul>
    5464                           <xsl:for-each select="$s2">
    5465                             <xsl:sort select="translate(@subitem,$lcase,$ucase)"/>
    5466 
    5467                             <xsl:if test="generate-id(.) = generate-id(key('index-item-subitem',concat(@item,'..',@subitem))[1])">
    5468 
    5469                               <xsl:variable name="in-artwork2" select="key('index-item-subitem',concat(@item,'..',@subitem))[@primary='true' and ancestor::artwork]"/>
    5470 
    5471                               <li>
    5472 
    5473                                 <xsl:choose>
    5474                                   <xsl:when test="$in-artwork2">
    5475                                     <tt><xsl:value-of select="@subitem"/></tt>
    5476                                   </xsl:when>
    5477                                   <xsl:otherwise>
    5478                                     <xsl:value-of select="@subitem"/>
    5479                                   </xsl:otherwise>
    5480                                 </xsl:choose>
    5481                                 <xsl:text>  </xsl:text>
    5482 
    5483                                 <xsl:variable name="irefs4" select="key('index-item-subitem',concat(@item,'..',@subitem))"/>
    5484                                 <xsl:variable name="xrefs4" select="key('xref-item',$irefs4[@x:for-anchor='']/../@anchor) | key('xref-item',$irefs4/@x:for-anchor)"/>
    5485                                 <xsl:variable name="extrefs4" select="key('extref-item',$irefs4[@x:for-anchor='']/../@anchor) | key('extref-item',$irefs4/@x:for-anchor)"/>
    5486 
    5487                                 <xsl:for-each select="$irefs4|$xrefs4|$extrefs4">
    5488                                   <!--<xsl:sort select="translate(@item,$lcase,$ucase)" />-->
    5489                                   <xsl:call-template name="insertSingleIref"/>
    5490                                 </xsl:for-each>
    5491 
    5492                               </li>
    5493                             </xsl:if>
    5494                           </xsl:for-each>
    5495                         </ul>
    5496                       </xsl:if>
    5497                     </li>
    5498                   </xsl:if>
    5499                 </xsl:otherwise>
    5500               </xsl:choose>
    5501 
    5502 
    5503             </xsl:for-each>
    5504           </ul>
    5505         </li>
    5506       </xsl:if>
    5507 
    5508     </xsl:for-each>
    5509   </ul>
    5510   </div>
    5511 
     5697                    </xsl:otherwise>
     5698                  </xsl:choose>
     5699   
     5700   
     5701                </xsl:for-each>
     5702              </ul>
     5703            </li>
     5704          </xsl:if>
     5705   
     5706        </xsl:for-each>
     5707      </ul>
     5708    </div>
     5709  </section>
    55125710</xsl:template>
    55135711
     
    60806278  <hr xmlns="http://www.w3.org/1999/xhtml" class="{$css-noprint}"/>
    60816279
    6082   <div xmlns="http://www.w3.org/1999/xhtml" id="{$anchor-prefix}.toc">
     6280  <nav xmlns="http://www.w3.org/1999/xhtml" id="{$anchor-prefix}.toc">
    60836281    <h2 class="np"> <!-- this pagebreak occurs always -->
    60846282      <a href="#{$anchor-prefix}.toc">Table of Contents</a>
     
    60886286      <xsl:apply-templates mode="toc"/>
    60896287    </ul>
    6090   </div>
     6288  </nav>
    60916289</xsl:template>
    60926290
     
    66966894  </xsl:variable>
    66976895
    6698   <div xmlns="http://www.w3.org/1999/xhtml" class="{$css-note}">
     6896  <aside xmlns="http://www.w3.org/1999/xhtml">
    66996897    <xsl:call-template name="copy-anchor"/>
    67006898    <div>
     
    67106908      </xsl:for-each>
    67116909    </div>
    6712   </div>
     6910  </aside>
    67136911</xsl:template>
    67146912
     
    68327030</xsl:template>
    68337031
    6834 <!-- Nop -->
     7032<!-- Almost Nop -->
    68357033<xsl:template match="x:span">
    6836   <span xmlns="http://www.w3.org/1999/xhtml">
    6837     <xsl:call-template name="copy-anchor"/>
    6838     <xsl:apply-templates/>
    6839   </span>
     7034  <xsl:choose>
     7035    <xsl:when test="@x:lang and $prettyprint-class!=''">
     7036      <code xmlns="http://www.w3.org/1999/xhtml" class="{$prettyprint-class}">
     7037        <xsl:call-template name="copy-anchor"/>
     7038        <xsl:apply-templates/>
     7039      </code>
     7040    </xsl:when>
     7041    <xsl:otherwise>
     7042      <span xmlns="http://www.w3.org/1999/xhtml">
     7043        <xsl:call-template name="copy-anchor"/>
     7044        <xsl:apply-templates/>
     7045      </span>
     7046    </xsl:otherwise>
     7047  </xsl:choose>
    68407048</xsl:template>
    68417049
     
    72377445
    72387446  <!-- check ABNF syntax references -->
    7239   <xsl:if test="//artwork[@type='abnf2616']">
     7447  <xsl:if test="//artwork[@type='abnf2616' or @type='abnf7230']">
    72407448    <xsl:if test="not(//reference/seriesInfo[@name='RFC' and (@value='2068' or @value='2616' or @value='7230')]) and not(//reference/seriesInfo[@name='Internet-Draft' and (starts-with(@value, 'draft-ietf-httpbis-p1-messaging-'))])">
    72417449      <!-- check for draft-ietf-httpbis-p1-messaging- is for backwards compat -->
     
    72547462
    72557463  <!-- check IDs -->
    7256   <xsl:variable name="badTargets" select="//xref[not(@target=//@anchor) and not(ancestor::ed:del)]"/>
     7464  <xsl:variable name="badTargets" select="//xref[not(@target=//@anchor) and not(@target=exslt:node-set($includeDirectives)//@anchor) and not(ancestor::ed:del)]"/>
    72577465  <xsl:if test="$badTargets">
    72587466    <xsl:variable name="text">
     
    75107718  <xsl:param name="msg"/>
    75117719  <xsl:param name="msg2"/>
    7512   <xsl:param name="inline"/>
    75137720  <xsl:call-template name="emit-message">
    75147721    <xsl:with-param name="level">WARNING</xsl:with-param>
     
    75227729  <xsl:param name="msg"/>
    75237730  <xsl:param name="msg2"/>
    7524   <xsl:param name="inline"/>
    75257731  <xsl:call-template name="emit-message">
    75267732    <xsl:with-param name="level">INFO</xsl:with-param>
    75277733    <xsl:with-param name="msg" select="$msg"/>
    75287734    <xsl:with-param name="msg2" select="$msg2"/>
    7529     <xsl:with-param name="inline" select="$inline"/>
     7735    <xsl:with-param name="inline" select="'no'"/>
    75307736  </xsl:call-template>
    75317737</xsl:template>
     
    76017807    </xsl:variable>
    76027808
    7603     <table class="{$style}" cellpadding="3" cellspacing="0">
     7809    <table class="{$style}">
    76047810      <xsl:if test="(@title!='') or (@anchor!='' and not(@suppress-title='true'))">
    76057811        <xsl:variable name="n"><xsl:call-template name="get-table-number"/></xsl:variable>
     
    79168122    <xsl:text>http://greenbytes.de/tech/webdav/rfc2629.xslt, </xsl:text>
    79178123    <!-- when RCS keyword substitution in place, add version info -->
    7918     <xsl:if test="contains('$Revision: 1.756 $',':')">
    7919       <xsl:value-of select="concat('Revision ',normalize-space(translate(substring-after('$Revision: 1.756 $', 'Revision: '),'$','')),', ')"/>
     8124    <xsl:if test="contains('$Revision: 1.785 $',':')">
     8125      <xsl:value-of select="concat('Revision ',normalize-space(translate(substring-after('$Revision: 1.785 $', 'Revision: '),'$','')),', ')"/>
    79208126    </xsl:if>
    7921     <xsl:if test="contains('$Date: 2015/12/31 17:59:21 $',':')">
    7922       <xsl:value-of select="concat(normalize-space(translate(substring-after('$Date: 2015/12/31 17:59:21 $', 'Date: '),'$','')),', ')"/>
     8127    <xsl:if test="contains('$Date: 2016/02/29 18:17:25 $',':')">
     8128      <xsl:value-of select="concat(normalize-space(translate(substring-after('$Date: 2016/02/29 18:17:25 $', 'Date: '),'$','')),', ')"/>
    79238129    </xsl:if>
    79248130    <xsl:value-of select="concat('XSLT vendor: ',system-property('xsl:vendor'),' ',system-property('xsl:vendor-url'))"/>
     
    79608166      <xsl:text>unnumbered-</xsl:text>
    79618167      <xsl:number count="section[@x:fixed-section-number='' or @numbered='false']" level="any"/>
     8168      <!-- checks -->
     8169      <xsl:if test="@numbered='false'">
     8170        <xsl:if test="ancestor::section or ancestor::section">
     8171          <xsl:call-template name="error">
     8172            <xsl:with-param name="msg">Only top-level sections can be unnumbered</xsl:with-param>
     8173          </xsl:call-template>
     8174        </xsl:if>
     8175        <xsl:if test="following-sibling::section[not(@numbered) or @numberer!='false'] or following-sibling::references">
     8176          <xsl:call-template name="error">
     8177            <xsl:with-param name="msg">Unnumbered section is followed by numbered sections</xsl:with-param>
     8178          </xsl:call-template>
     8179        </xsl:if>
     8180      </xsl:if>
    79628181    </xsl:when>
    79638182    <xsl:when test="$has-edits or ancestor::*/@x:fixed-section-number">
     
    83638582                      <xsl:when test="$attrname='check-artwork-width'"/>
    83648583                      <xsl:when test="$attrname='duplex'"/>
     8584                      <xsl:when test="$attrname='html-pretty-print'"/>
    83658585                      <xsl:when test="$attrname='include-index'"/>
    83668586                      <xsl:when test="$attrname='include-references-in-index'"/>
     
    83868606                      <xsl:when test="$attrname='comments'"/>
    83878607                      <xsl:when test="$attrname='compact'"/>
     8608                      <xsl:when test="$attrname='docmapping'">
     8609                        <xsl:if test="$value!='yes'">
     8610                          <xsl:call-template name="warning">
     8611                            <xsl:with-param name="msg">the rfc docmapping pseudo-attribute with values other than 'yes' in not supported by this processor.</xsl:with-param>
     8612                          </xsl:call-template>
     8613                        </xsl:if>
     8614                      </xsl:when>
    83888615                      <xsl:when test="$attrname='editing'"/>
    83898616                      <xsl:when test="$attrname='footer'"/>
     
    83918618                      <xsl:when test="$attrname='include'">
    83928619                        <xsl:call-template name="warning">
    8393                           <xsl:with-param name="msg">the rfc include pseudo-attribute is not supported by this processor, see http://greenbytes.de/tech/webdav/rfc2629xslt/rfc2629xslt.html#examples.internalsubset for help.</xsl:with-param>
     8620                          <xsl:with-param name="msg">the rfc include pseudo-attribute is only partially supported by this processor, see http://greenbytes.de/tech/webdav/rfc2629xslt/rfc2629xslt.html#examples.internalsubset for alternative syntax.</xsl:with-param>
    83948621                        </xsl:call-template>
    83958622                      </xsl:when>
     
    84078634                      <xsl:when test="$attrname='toc'"/>
    84088635                      <xsl:when test="$attrname='tocdepth'"/>
     8636                      <xsl:when test="$attrname='tocindent'">
     8637                        <xsl:if test="$value!='yes'">
     8638                          <xsl:call-template name="warning">
     8639                            <xsl:with-param name="msg">the rfc tocindent pseudo-attribute with values other than 'yes' in not supported by this processor.</xsl:with-param>
     8640                          </xsl:call-template>
     8641                        </xsl:if>
     8642                      </xsl:when>
    84098643                      <xsl:otherwise>
    84108644                        <xsl:call-template name="info">
     
    86468880  <xsl:choose>
    86478881    <xsl:when test="/rfc/front/date/@month and /rfc/front/date/@month!=''">
    8648       <xsl:value-of select="/rfc/front/date/@month"/>
     8882      <xsl:variable name="m" select="/rfc/front/date/@month"/>
     8883      <xsl:choose>
     8884        <xsl:when test="string(number($m))!='NaN' and number($m) &gt; 0 and number($m) &lt; 13">
     8885          <xsl:call-template name="get-month-as-name">
     8886            <xsl:with-param name="month" select="$m"/>
     8887          </xsl:call-template>
     8888        </xsl:when>
     8889        <xsl:otherwise>
     8890          <xsl:value-of select="$m"/>
     8891        </xsl:otherwise>
     8892      </xsl:choose>
    86498893    </xsl:when>
    86508894    <xsl:when test="$current-month!='' and $may-default-dates='yes'">
  • rfc2629xslt/rfc2629xslt.html

    r2748 r2750  
    1 
    2 <!DOCTYPE html
    3   PUBLIC "-//W3C//DTD HTML 4.01//EN">
    4 <html lang="en"><head profile="http://dublincore.org/documents/2008/08/04/dc-html/">
    5       <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    6    <title>Transforming RFC2629-formatted XML through XSLT</title><style type="text/css" title="Xml2Rfc (sans serif)">
     1<!DOCTYPE html>
     2<html lang="en"><head>
     3      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
     4   <title>Transforming RFC2629-formatted XML through XSLT</title><script type="application/javascript">
     5function anchorRewrite() {
     6  map = { "abnf-char-sequence": "ext.element.abnf-char-sequence", "anchor-alias": "ext.element.anchor-alias", "bcp14": "ext.element.bcp14", "bb": "ext.element.bb", "bc": "ext.element.bc", "blockquote": "ext.element.blockquote", "boilerplate": "ext.element.boilerplate", "bt": "ext.element.bt", "dfn": "ext.element.dfn", "feedback": "ext.element.feedback", "h": "ext.element.h", "highlight": "ext.element.highlight", "length-of": "ext.element.length-of", "link": "ext.element.link", "lt": "ext.element.lt", "note": "ext.element.note", "parse-xml": "ext.element.parse-xml", "prose": "ext.element.prose", "q": "ext.element.q", "ref": "ext.element.ref", "source": "ext.element.source", "sup": "ext.element.sup", "attribute-ipr": "boiler.plate.attributes", "attribute-ipr-current": "boiler.plate.attributes", "attribute-ipr-trust200902": "boiler.plate.attributes", "attribute-ipr-noModificationTrust200902": "boiler.plate.attributes", "attribute-ipr-noDerivativesTrust200902": "boiler.plate.attributes", "attribute-ipr-pre5378Trust200902": "boiler.plate.attributes", "attribute-ipr-historic": "boiler.plate.attributes", "attribute-ipr-200811": "boiler.plate.attributes", "attribute-ipr-3978": "boiler.plate.attributes", "attribute-ipr-3667": "boiler.plate.attributes", "attribute-ipr-2026": "boiler.plate.attributes", "attribute-category": "boiler.plate.attributes", "attribute-submissiontype": "boiler.plate.attributes", "attribute-consensus": "boiler.plate.attributes"};
     7  if (window.location.hash.length >= 1) {
     8    var fragid = window.location.hash.substr(1);
     9    if (fragid) {
     10      if (! document.getElementById(fragid)) {
     11        var prefix = "rfc";
     12        var mapped = map[fragid];
     13        if (mapped) {
     14          window.location.hash = mapped;
     15        } else if (fragid.indexOf("section-") == 0) {
     16          window.location.hash = prefix + ".section." + fragid.substring(8);
     17        } else if (fragid.indexOf("appendix-") == 0) {
     18          window.location.hash = prefix + ".section." + fragid.substring(9);
     19        }
     20      }
     21    } 
     22  }
     23}
     24window.addEventListener('hashchange', anchorRewrite);
     25window.addEventListener('DOMContentLoaded', anchorRewrite);
     26</script><script src="https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js"></script><style type="text/css" title="Xml2Rfc (sans serif)">
    727a {
    828  text-decoration: none;
     
    2141  margin-left: 2em;
    2242  font-style: normal;
    23 }
    24 blockquote {
    25   border-style: solid;
    26   border-color: gray;
    27   border-width: 0 0 0 .25em;
    28   font-style: italic;
    29   padding-left: 0.5em;
    3043}
    3144body {
     
    3649  max-width: 1000px;
    3750}
    38 samp, tt, code, pre {
     51samp, span.tt, code, pre {
    3952  font-family: consolas, monaco, monospace;
    4053}
     
    4255  font-style: normal;
    4356}
    44 div.note {
     57aside {
    4558  margin-left: 2em;
    4659}
     
    148161  padding: 0em;
    149162  page-break-inside: auto;
     163  border: none !important;
    150164}
    151165pre.text {
     
    167181}
    168182table.tt {
     183  border-collapse: collapse;
     184  border-color: gray;
     185  border-spacing: 0;
    169186  vertical-align: top;
    170   border-color: gray;
    171 }
     187 }
    172188table.tt th {
    173189  border-color: gray;
     190  padding: 3px;
    174191}
    175192table.tt td {
    176193  border-color: gray;
     194  padding: 3px;
    177195}
    178196table.all {
     
    295313}
    296314
    297 blockquote > * .bcp14 {
    298   font-style: italic;
    299 }
    300315.comment {
    301316  background-color: yellow;
     
    403418  }
    404419  @top-right {
    405        content: "December 2015";
     420       content: "February 2016";
    406421  }
    407422  @top-center {
     
    430445    }
    431446}
    432 </style><link rel="Contents" href="#rfc.toc"><link rel="Author" href="#rfc.authors"><link rel="Index" href="#rfc.index"><link rel="Chapter" title="1 Introduction" href="#rfc.section.1"><link rel="Chapter" title="2 Supported RFC2629 elements" href="#rfc.section.2"><link rel="Chapter" title="3 Processing Instructions" href="#rfc.section.3"><link rel="Chapter" title="4 Anchors" href="#rfc.section.4"><link rel="Chapter" title="5 Supported XSLT engines" href="#rfc.section.5"><link rel="Chapter" title="6 Transforming to HTML" href="#rfc.section.6"><link rel="Chapter" title="7 Transforming to XHTML" href="#rfc.section.7"><link rel="Chapter" title="8 Transforming to CHM (Microsoft Compiled Help)" href="#rfc.section.8"><link rel="Chapter" title="9 Transforming to PDF" href="#rfc.section.9"><link rel="Chapter" title="10 Transforming to ePub" href="#rfc.section.10"><link rel="Chapter" title="11 Generic Extensions" href="#rfc.section.11"><link rel="Chapter" title="12 Experimental Support for XML2RFCv3 Vocabulary" href="#rfc.section.12"><link rel="Chapter" title="13 Utilities" href="#rfc.section.13"><link rel="Chapter" href="#rfc.section.14" title="14 Informative References"><link rel="Appendix" title="A RELAX NG Compact Schema" href="#rfc.section.A"><link rel="Appendix" title="B Implementation Notes" href="#rfc.section.B"><link rel="Appendix" title="C Examples" href="#rfc.section.C"><link rel="Appendix" title="D Producing the IETF 'Boilerplate'" href="#rfc.section.D"><link rel="Appendix" title="E License" href="#rfc.section.E"><meta name="generator" content="http://greenbytes.de/tech/webdav/rfc2629.xslt, Revision 1.756, 2015/12/31 17:59:21, XSLT vendor: SAXON 6.5.5 from Michael Kay http://saxon.sf.net/"><meta name="keywords" content="RFC2629, xml2rfc, XSLT, hCard, XSL-FO, PDF, GRDDL, epub, Dublin Core"><link rel="schema.dct" href="http://purl.org/dc/terms/"><meta name="dct.creator" content="Reschke, J. F."></head><body><table class="header" id="rfc.headerblock"><tbody><tr><td class="left">RFC2629 through XSLT</td><td class="right">J. Reschke</td></tr><tr><td class="left"></td><td class="right">greenbytes</td></tr><tr><td class="left"></td><td class="right">December 2015</td></tr></tbody></table><div id="rfc.title"><h1>Transforming RFC2629-formatted XML through XSLT</h1></div><hr class="noprint"><div id="rfc.toc"><h2 class="np"><a href="#rfc.toc">Table of Contents</a></h2><ul class="toc"><li><a href="#rfc.section.1">1.</a>&nbsp;&nbsp;&nbsp;<a href="#introduction">Introduction</a></li><li><a href="#rfc.section.2">2.</a>&nbsp;&nbsp;&nbsp;<a href="#supported.elements">Supported RFC2629 elements</a><ul><li><a href="#rfc.section.2.1">2.1</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.2.1">Extension elements</a></li></ul></li><li><a href="#rfc.section.3">3.</a>&nbsp;&nbsp;&nbsp;<a href="#processing.instructions">Processing Instructions</a><ul><li><a href="#rfc.section.3.1">3.1</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.3.1">Supported xml2rfc-compatible PIs</a></li><li><a href="#rfc.section.3.2">3.2</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.3.2">Unsupported xml2rfc-compatible PIs</a></li><li><a href="#rfc.section.3.3">3.3</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.3.3">Extension PIs</a></li></ul></li><li><a href="#rfc.section.4">4.</a>&nbsp;&nbsp;&nbsp;<a href="#anchors">Anchors</a></li><li><a href="#rfc.section.5">5.</a>&nbsp;&nbsp;&nbsp;<a href="#xslt.engines">Supported XSLT engines</a><ul><li><a href="#rfc.section.5.1">5.1</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.5.1">Standalone Engines</a></li><li><a href="#rfc.section.5.2">5.2</a>&nbsp;&nbsp;&nbsp;<a href="#xslt.engines.browser">In-Browser Engines</a></li></ul></li><li><a href="#rfc.section.6">6.</a>&nbsp;&nbsp;&nbsp;<a href="#output.html">Transforming to HTML</a><ul><li><a href="#rfc.section.6.1">6.1</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.6.1">HTML compliance</a></li><li><a href="#rfc.section.6.2">6.2</a>&nbsp;&nbsp;&nbsp;<a href="#html.link">Standard HTML LINK elements</a></li><li><a href="#rfc.section.6.3">6.3</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.6.3">Standard HTML metadata</a></li><li><a href="#rfc.section.6.4">6.4</a>&nbsp;&nbsp;&nbsp;<a href="#rfc2731.properties">Dublin Core (RFC2731) metadata</a></li></ul></li><li><a href="#rfc.section.7">7.</a>&nbsp;&nbsp;&nbsp;<a href="#output.xhtml">Transforming to XHTML</a></li><li><a href="#rfc.section.8">8.</a>&nbsp;&nbsp;&nbsp;<a href="#output.chm">Transforming to CHM (Microsoft Compiled Help)</a></li><li><a href="#rfc.section.9">9.</a>&nbsp;&nbsp;&nbsp;<a href="#output.pdf">Transforming to PDF</a><ul><li><a href="#rfc.section.9.1">9.1</a>&nbsp;&nbsp;&nbsp;<a href="#output.pdf.fop">Via XSL-FO</a><ul><li><a href="#rfc.section.9.1.1">9.1.1</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.9.1.1">Example: producing output for Apache FOP</a></li></ul></li><li><a href="#rfc.section.9.2">9.2</a>&nbsp;&nbsp;&nbsp;<a href="#output.pdf.html">Via X(HTML)</a></li></ul></li><li><a href="#rfc.section.10">10.</a>&nbsp;&nbsp;&nbsp;<a href="#output.epub">Transforming to ePub</a></li><li><a href="#rfc.section.11">11.</a>&nbsp;&nbsp;&nbsp;<a href="#extensions">Generic Extensions</a><ul><li><a href="#rfc.section.11.1">11.1</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.abnf-char-sequence">&lt;abnf-char-sequence&gt; element</a></li><li><a href="#rfc.section.11.2">11.2</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.anchor-alias">&lt;anchor-alias&gt; element</a></li><li><a href="#rfc.section.11.3">11.3</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.bcp14">&lt;bcp14&gt; element</a></li><li><a href="#rfc.section.11.4">11.4</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.bb">&lt;bb&gt; element</a></li><li><a href="#rfc.section.11.5">11.5</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.bc">&lt;bc&gt; element</a></li><li><a href="#rfc.section.11.6">11.6</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.blockquote">&lt;blockquote&gt; element</a></li><li><a href="#rfc.section.11.7">11.7</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.boilerplate">&lt;boilerplate&gt; element</a></li><li><a href="#rfc.section.11.8">11.8</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.bt">&lt;bt&gt; element</a></li><li><a href="#rfc.section.11.9">11.9</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.dfn">&lt;dfn&gt; element</a></li><li><a href="#rfc.section.11.10">11.10</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.feedback">&lt;feedback&gt; element</a></li><li><a href="#rfc.section.11.11">11.11</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.h">&lt;h&gt; element</a></li><li><a href="#rfc.section.11.12">11.12</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.highlight">&lt;highlight&gt; element</a></li><li><a href="#rfc.section.11.13">11.13</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.length-of">&lt;length-of&gt; element</a></li><li><a href="#rfc.section.11.14">11.14</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.link">&lt;link&gt; element</a></li><li><a href="#rfc.section.11.15">11.15</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.lt">&lt;lt&gt; element</a></li><li><a href="#rfc.section.11.16">11.16</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.note">&lt;note&gt; element</a></li><li><a href="#rfc.section.11.17">11.17</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.parse-xml">&lt;parse-xml&gt; element</a></li><li><a href="#rfc.section.11.18">11.18</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.prose">&lt;prose&gt; element</a></li><li><a href="#rfc.section.11.19">11.19</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.q">&lt;q&gt; element</a></li><li><a href="#rfc.section.11.20">11.20</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.ref">&lt;ref&gt; element</a></li><li><a href="#rfc.section.11.21">11.21</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.source">&lt;source&gt; element</a></li><li><a href="#rfc.section.11.22">11.22</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.sup">&lt;sup&gt; element</a></li><li><a href="#rfc.section.11.23">11.23</a>&nbsp;&nbsp;&nbsp;<a href="#ext-rfc2629.artwork">Extensions to Xml2rfc &lt;artwork&gt; element</a></li><li><a href="#rfc.section.11.24">11.24</a>&nbsp;&nbsp;&nbsp;<a href="#ext-rfc2629.iref">Extensions to Xml2rfc &lt;iref&gt; element</a></li><li><a href="#rfc.section.11.25">11.25</a>&nbsp;&nbsp;&nbsp;<a href="#ext-rfc2629.list">Extensions to Xml2rfc &lt;list&gt; element</a></li><li><a href="#rfc.section.11.26">11.26</a>&nbsp;&nbsp;&nbsp;<a href="#ext-rfc2629.rfc">Extensions to Xml2rfc &lt;rfc&gt; element</a></li><li><a href="#rfc.section.11.27">11.27</a>&nbsp;&nbsp;&nbsp;<a href="#ext-rfc2629.section">Extensions to Xml2rfc &lt;section&gt; element</a></li><li><a href="#rfc.section.11.28">11.28</a>&nbsp;&nbsp;&nbsp;<a href="#ext-rfc2629.xref">Extensions to Xml2rfc &lt;xref&gt; element</a></li></ul></li><li><a href="#rfc.section.12">12.</a>&nbsp;&nbsp;&nbsp;<a href="#v3">Experimental Support for XML2RFCv3 Vocabulary</a><ul><li><a href="#rfc.section.12.1">12.1</a>&nbsp;&nbsp;&nbsp;<a href="#v3.aside">aside Element</a></li><li><a href="#rfc.section.12.2">12.2</a>&nbsp;&nbsp;&nbsp;<a href="#v3.bcp14">bcp14 Element</a></li><li><a href="#rfc.section.12.3">12.3</a>&nbsp;&nbsp;&nbsp;<a href="#v3.blockquote">blockquote Element</a></li><li><a href="#rfc.section.12.4">12.4</a>&nbsp;&nbsp;&nbsp;<a href="#v3.displayreference">displayreference Element</a></li><li><a href="#rfc.section.12.5">12.5</a>&nbsp;&nbsp;&nbsp;<a href="#v3.dd">dd Element</a></li><li><a href="#rfc.section.12.6">12.6</a>&nbsp;&nbsp;&nbsp;<a href="#v3.dl">dl Element</a></li><li><a href="#rfc.section.12.7">12.7</a>&nbsp;&nbsp;&nbsp;<a href="#v3.dt">dt Element</a></li><li><a href="#rfc.section.12.8">12.8</a>&nbsp;&nbsp;&nbsp;<a href="#v3.em">em Element</a></li><li><a href="#rfc.section.12.9">12.9</a>&nbsp;&nbsp;&nbsp;<a href="#v3.li">li Element</a></li><li><a href="#rfc.section.12.10">12.10</a>&nbsp;&nbsp;&nbsp;<a href="#v3.name">name Element</a></li><li><a href="#rfc.section.12.11">12.11</a>&nbsp;&nbsp;&nbsp;<a href="#v3.ol">ol Element</a></li><li><a href="#rfc.section.12.12">12.12</a>&nbsp;&nbsp;&nbsp;<a href="#v3.postalLine">postalLine Element</a></li><li><a href="#rfc.section.12.13">12.13</a>&nbsp;&nbsp;&nbsp;<a href="#v3.refcontent">refcontent Element</a></li><li><a href="#rfc.section.12.14">12.14</a>&nbsp;&nbsp;&nbsp;<a href="#v3.reference">Extensions to reference Element</a><ul><li><a href="#rfc.section.12.14.1">12.14.1</a>&nbsp;&nbsp;&nbsp;<a href="#v3.reference.quoteTitle">quoteTitle attribute</a></li></ul></li><li><a href="#rfc.section.12.15">12.15</a>&nbsp;&nbsp;&nbsp;<a href="#v3.section">Extensions to section Element</a><ul><li><a href="#rfc.section.12.15.1">12.15.1</a>&nbsp;&nbsp;&nbsp;<a href="#v3.section.numbered">numbered attribute</a></li><li><a href="#rfc.section.12.15.2">12.15.2</a>&nbsp;&nbsp;&nbsp;<a href="#v3.section.removeInRFC">removeInRFC attribute</a></li></ul></li><li><a href="#rfc.section.12.16">12.16</a>&nbsp;&nbsp;&nbsp;<a href="#v3.strong">strong Element</a></li><li><a href="#rfc.section.12.17">12.17</a>&nbsp;&nbsp;&nbsp;<a href="#v3.sub">sub Element</a></li><li><a href="#rfc.section.12.18">12.18</a>&nbsp;&nbsp;&nbsp;<a href="#v3.sup">sup Element</a></li><li><a href="#rfc.section.12.19">12.19</a>&nbsp;&nbsp;&nbsp;<a href="#v3.tt">tt Element</a></li><li><a href="#rfc.section.12.20">12.20</a>&nbsp;&nbsp;&nbsp;<a href="#v3.ul">ul Element</a></li><li><a href="#rfc.section.12.21">12.21</a>&nbsp;&nbsp;&nbsp;<a href="#v3.xref">Extensions to xref Element</a><ul><li><a href="#rfc.section.12.21.1">12.21.1</a>&nbsp;&nbsp;&nbsp;<a href="#v3.xref.relative">relative attribute</a></li><li><a href="#rfc.section.12.21.2">12.21.2</a>&nbsp;&nbsp;&nbsp;<a href="#v3.xref.section">section attribute</a></li><li><a href="#rfc.section.12.21.3">12.21.3</a>&nbsp;&nbsp;&nbsp;<a href="#v3.xref.sectionFormat">sectionFormat attribute</a></li></ul></li></ul></li><li><a href="#rfc.section.13">13.</a>&nbsp;&nbsp;&nbsp;<a href="#utilities">Utilities</a><ul><li><a href="#rfc.section.13.1">13.1</a>&nbsp;&nbsp;&nbsp;<a href="#checking-references">Checking References</a></li><li><a href="#rfc.section.13.2">13.2</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.13.2">Generating Graphs from References</a></li><li><a href="#rfc.section.13.3">13.3</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.13.3">Producing reference entries for books</a></li><li><a href="#rfc.section.13.4">13.4</a>&nbsp;&nbsp;&nbsp;<a href="#clean-for-dtd">Down-converting to RFC2629bis DTD</a></li><li><a href="#rfc.section.13.5">13.5</a>&nbsp;&nbsp;&nbsp;<a href="#extract-artwork">Extracting artwork</a></li><li><a href="#rfc.section.13.6">13.6</a>&nbsp;&nbsp;&nbsp;<a href="#grddl">GRRDL</a></li><li><a href="#rfc.section.13.7">13.7</a>&nbsp;&nbsp;&nbsp;<a href="#html.live.refresh">HTML Live Refresh</a></li></ul></li><li><a href="#rfc.section.14">14.</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.references">Informative References</a></li><li><a href="#rfc.section.A">A.</a>&nbsp;&nbsp;&nbsp;<a href="#grammar">RELAX NG Compact Schema</a></li><li><a href="#rfc.section.B">B.</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.B">Implementation Notes</a><ul><li><a href="#rfc.section.B.1">B.1</a>&nbsp;&nbsp;&nbsp;<a href="#artwork.types">Recognized type attributes for &lt;artwork&gt; element</a></li></ul></li><li><a href="#rfc.section.C">C.</a>&nbsp;&nbsp;&nbsp;<a href="#examples">Examples</a><ul><li><a href="#rfc.section.C.1">C.1</a>&nbsp;&nbsp;&nbsp;<a href="#examples.internalsubset">Using the 'Internal Subset'</a></li><li><a href="#rfc.section.C.2">C.2</a>&nbsp;&nbsp;&nbsp;<a href="#examples.customizing">Customization</a></li></ul></li><li><a href="#rfc.section.D">D.</a>&nbsp;&nbsp;&nbsp;<a href="#boilerplate">Producing the IETF 'Boilerplate'</a><ul><li><a href="#rfc.section.D.1">D.1</a>&nbsp;&nbsp;&nbsp;<a href="#attribute-ipr">The /rfc/@ipr Attribute</a><ul><li><a href="#rfc.section.D.1.1">D.1.1</a>&nbsp;&nbsp;&nbsp;<a href="#attribute-ipr-current">Current Values: '*trust200902'</a></li><li><a href="#rfc.section.D.1.2">D.1.2</a>&nbsp;&nbsp;&nbsp;<a href="#attribute-ipr-historic">Historic Values</a></li></ul></li><li><a href="#rfc.section.D.2">D.2</a>&nbsp;&nbsp;&nbsp;<a href="#attribute-category">The /rfc/@category Attribute</a></li><li><a href="#rfc.section.D.3">D.3</a>&nbsp;&nbsp;&nbsp;<a href="#attribute-submissiontype">The /rfc/@submissionType Attribute</a></li><li><a href="#rfc.section.D.4">D.4</a>&nbsp;&nbsp;&nbsp;<a href="#attribute-consensus">The /rfc/@consensus Attribute</a></li><li><a href="#rfc.section.D.5">D.5</a>&nbsp;&nbsp;&nbsp;<a href="#attribute-number">The /rfc/@number Attribute</a></li><li><a href="#rfc.section.D.6">D.6</a>&nbsp;&nbsp;&nbsp;<a href="#attribute-docname">The /rfc/@docName Attribute</a></li><li><a href="#rfc.section.D.7">D.7</a>&nbsp;&nbsp;&nbsp;<a href="#attribute-obsoletes">The /rfc/@obsoletes Attribute</a></li><li><a href="#rfc.section.D.8">D.8</a>&nbsp;&nbsp;&nbsp;<a href="#attribute-updates">The /rfc/@updates Attribute</a></li></ul></li><li><a href="#rfc.section.E">E.</a>&nbsp;&nbsp;&nbsp;<a href="#license">License</a></li><li><a href="#rfc.index">Index</a></li><li><a href="#rfc.authors">Author's Address</a></li></ul></div><hr class="noprint"><div id="introduction"><h2 id="rfc.section.1" class="np"><a href="#rfc.section.1">1.</a>&nbsp;<a href="#introduction">Introduction</a></h2><div id="rfc.section.1.p.1"><p>This document describes a set of XSLT transformations that can be used to transform "XML2RFC" XML (<a href="#XML2RFCV2" id="rfc.xref.XML2RFCV2.1"><cite title="The 'XML2RFC' version 2 Vocabulary">[XML2RFCV2]</cite></a>, updating <a href="#RFC2629" id="rfc.xref.RFC2629.1"><cite title="Writing I-Ds and RFCs using XML">[RFC2629]</cite></a>) to various output formats, such as HTML and PDF. The main topics are <a class="self" href="#rfc.section.1.p.1">&para;</a></p><ul><li>compliance to the xml2rfc XML element set (<a href="#supported.elements" title="Supported RFC2629 elements">Section&nbsp;2</a>),</li><li>support for xml2rfc processing instructions (<a href="#processing.instructions" title="Processing Instructions">Section&nbsp;3</a>),</li><li>the names of anchor elements generated in HTML and PDF output (<a href="#anchors" title="Anchors">Section&nbsp;4</a>),</li><li>various XSLT engines that can be used (<a href="#xslt.engines" title="Supported XSLT engines">Section&nbsp;5</a>),</li><li>outputting HTML (<a href="#output.html" title="Transforming to HTML">Section&nbsp;6</a>) and XHTML (<a href="#output.xhtml" title="Transforming to XHTML">Section&nbsp;7</a>),</li><li>outputting CHM (Compiled Microsoft Help, <a href="#output.chm" title="Transforming to CHM (Microsoft Compiled Help)">Section&nbsp;8</a>),</li><li>outputting PDF (<a href="#output.pdf" title="Transforming to PDF">Section&nbsp;9</a>),</li><li>outputting ePub (<a href="#output.epub" title="Transforming to ePub">Section&nbsp;10</a>),</li><li>extensions to the xml2rfc vocabulary (<a href="#extensions" title="Generic Extensions">Section&nbsp;11</a>).</li><li>various utilities (<a href="#utilities" title="Utilities">Section&nbsp;13</a>).</li></ul></div><div id="rfc.section.1.p.2"><p>The full distribution is available at &lt;<a href="http://greenbytes.de/tech/webdav/rfc2629xslt.zip">http://greenbytes.de/tech/webdav/rfc2629xslt.zip</a>&gt;.<a class="self" href="#rfc.section.1.p.2">&para;</a></p></div></div><hr class="noprint"><div id="supported.elements"><h2 id="rfc.section.2" class="np"><a href="#rfc.section.2">2.</a>&nbsp;<a href="#supported.elements">Supported RFC2629 elements</a></h2><div id="rfc.section.2.p.1"><p><tt>rfc2629.xslt</tt> supports both all RFC2629 grammar elements and the extensions implemented in xml2rfc 1.36.<a class="self" href="#rfc.section.2.p.1">&para;</a></p></div><div><h3 id="rfc.section.2.1"><a href="#rfc.section.2.1">2.1</a>&nbsp;Extension elements</h3><div id="rfc.section.2.1.p.1"><p><tt>rfc2629.xslt</tt> supports two kind of extension elements, using different XML namespaces.<a class="self" href="#rfc.section.2.1.p.1">&para;</a></p></div><div id="rfc.section.2.1.p.2"><p>The first set contains (hopefully) generally useful extensions, see <a href="#extensions" title="Generic Extensions">Section&nbsp;11</a>.<a class="self" href="#rfc.section.2.1.p.2">&para;</a></p></div><div id="rfc.section.2.1.p.3"><p>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.<a class="self" href="#rfc.section.2.1.p.3">&para;</a></p></div></div></div><hr class="noprint"><div id="processing.instructions"><h2 id="rfc.section.3" class="np"><a href="#rfc.section.3">3.</a>&nbsp;<a href="#processing.instructions">Processing Instructions</a></h2><div id="rfc.section.3.p.1"><p>All PIs can be set as XSLT parameter as well, overriding any value that is found in the source file to be transformed.<a class="self" href="#rfc.section.3.p.1">&para;</a></p></div><div id="rfc.figure.u.1"><p>Using processing instructions:</p><pre class="text">&lt;?rfc toc="yes"?&gt;
     447</style><link rel="Contents" href="#rfc.toc"><link rel="Author" href="#rfc.authors"><link rel="Index" href="#rfc.index"><link rel="Chapter" title="1 Introduction" href="#rfc.section.1"><link rel="Chapter" title="2 Supported RFC2629 elements" href="#rfc.section.2"><link rel="Chapter" title="3 Processing Instructions" href="#rfc.section.3"><link rel="Chapter" title="4 Anchors" href="#rfc.section.4"><link rel="Chapter" title="5 Supported XSLT engines" href="#rfc.section.5"><link rel="Chapter" title="6 Transforming to HTML" href="#rfc.section.6"><link rel="Chapter" title="7 Transforming to XHTML" href="#rfc.section.7"><link rel="Chapter" title="8 Transforming to CHM (Microsoft Compiled Help)" href="#rfc.section.8"><link rel="Chapter" title="9 Transforming to PDF" href="#rfc.section.9"><link rel="Chapter" title="10 Transforming to ePub" href="#rfc.section.10"><link rel="Chapter" title="11 Generic Extensions" href="#rfc.section.11"><link rel="Chapter" title="12 Experimental Support for XML2RFCv3 Vocabulary" href="#rfc.section.12"><link rel="Chapter" title="13 Utilities" href="#rfc.section.13"><link rel="Chapter" href="#rfc.section.14" title="14 Informative References"><link rel="Appendix" title="A RELAX NG Compact Schema" href="#rfc.section.A"><link rel="Appendix" title="B Implementation Notes" href="#rfc.section.B"><link rel="Appendix" title="C Examples" href="#rfc.section.C"><link rel="Appendix" title="D Producing the IETF 'Boilerplate'" href="#rfc.section.D"><link rel="Appendix" title="E License" href="#rfc.section.E"><meta name="generator" content="http://greenbytes.de/tech/webdav/rfc2629.xslt, Revision 1.785, 2016/02/29 18:17:25, XSLT vendor: SAXON 6.5.5 from Michael Kay http://saxon.sf.net/"><meta name="keywords" content="RFC2629, xml2rfc, XSLT, XSL-FO, PDF, GRDDL, epub, Dublin Core"><link rel="schema.dcterms" href="http://purl.org/dc/terms/"><meta name="dcterms.creator" content="Reschke, J. F."></head><body><header><table class="header" id="rfc.headerblock"><tbody><tr><td class="left">RFC2629 through XSLT</td><td class="right">J. Reschke</td></tr><tr><td class="left"></td><td class="right">greenbytes</td></tr><tr><td class="left"></td><td class="right">February 2016</td></tr></tbody></table><div id="rfc.title"><h1>Transforming RFC2629-formatted XML through XSLT</h1></div></header><hr class="noprint"><nav id="rfc.toc"><h2 class="np"><a href="#rfc.toc">Table of Contents</a></h2><ul class="toc"><li><a href="#rfc.section.1">1.</a>&nbsp;&nbsp;&nbsp;<a href="#introduction">Introduction</a></li><li><a href="#rfc.section.2">2.</a>&nbsp;&nbsp;&nbsp;<a href="#supported.elements">Supported RFC2629 elements</a><ul><li><a href="#rfc.section.2.1">2.1</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.2.1">Extension elements</a></li></ul></li><li><a href="#rfc.section.3">3.</a>&nbsp;&nbsp;&nbsp;<a href="#processing.instructions">Processing Instructions</a><ul><li><a href="#rfc.section.3.1">3.1</a>&nbsp;&nbsp;&nbsp;<a href="#supported.pis">Supported xml2rfc-compatible PIs</a></li><li><a href="#rfc.section.3.2">3.2</a>&nbsp;&nbsp;&nbsp;<a href="#unsupported.pis">Unsupported xml2rfc-compatible PIs</a></li><li><a href="#rfc.section.3.3">3.3</a>&nbsp;&nbsp;&nbsp;<a href="#extension.pis">Extension PIs</a></li></ul></li><li><a href="#rfc.section.4">4.</a>&nbsp;&nbsp;&nbsp;<a href="#anchors">Anchors</a></li><li><a href="#rfc.section.5">5.</a>&nbsp;&nbsp;&nbsp;<a href="#xslt.engines">Supported XSLT engines</a><ul><li><a href="#rfc.section.5.1">5.1</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.5.1">Standalone Engines</a></li><li><a href="#rfc.section.5.2">5.2</a>&nbsp;&nbsp;&nbsp;<a href="#xslt.engines.browser">In-Browser Engines</a></li></ul></li><li><a href="#rfc.section.6">6.</a>&nbsp;&nbsp;&nbsp;<a href="#output.html">Transforming to HTML</a><ul><li><a href="#rfc.section.6.1">6.1</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.6.1">HTML compliance</a></li><li><a href="#rfc.section.6.2">6.2</a>&nbsp;&nbsp;&nbsp;<a href="#html.link">Standard HTML LINK elements</a></li><li><a href="#rfc.section.6.3">6.3</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.6.3">Standard HTML metadata</a></li><li><a href="#rfc.section.6.4">6.4</a>&nbsp;&nbsp;&nbsp;<a href="#rfc2731.properties">Dublin Core (RFC2731) metadata</a></li></ul></li><li><a href="#rfc.section.7">7.</a>&nbsp;&nbsp;&nbsp;<a href="#output.xhtml">Transforming to XHTML</a></li><li><a href="#rfc.section.8">8.</a>&nbsp;&nbsp;&nbsp;<a href="#output.chm">Transforming to CHM (Microsoft Compiled Help)</a></li><li><a href="#rfc.section.9">9.</a>&nbsp;&nbsp;&nbsp;<a href="#output.pdf">Transforming to PDF</a><ul><li><a href="#rfc.section.9.1">9.1</a>&nbsp;&nbsp;&nbsp;<a href="#output.pdf.fop">Via XSL-FO</a><ul><li><a href="#rfc.section.9.1.1">9.1.1</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.9.1.1">Example: producing output for Apache FOP</a></li></ul></li><li><a href="#rfc.section.9.2">9.2</a>&nbsp;&nbsp;&nbsp;<a href="#output.pdf.html">Via HTML</a></li></ul></li><li><a href="#rfc.section.10">10.</a>&nbsp;&nbsp;&nbsp;<a href="#output.epub">Transforming to ePub</a></li><li><a href="#rfc.section.11">11.</a>&nbsp;&nbsp;&nbsp;<a href="#extensions">Generic Extensions</a><ul><li><a href="#rfc.section.11.1">11.1</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.abnf-char-sequence">&lt;abnf-char-sequence&gt; element</a></li><li><a href="#rfc.section.11.2">11.2</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.anchor-alias">&lt;anchor-alias&gt; element</a></li><li><a href="#rfc.section.11.3">11.3</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.bcp14">&lt;bcp14&gt; element</a></li><li><a href="#rfc.section.11.4">11.4</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.bb">&lt;bb&gt; element</a></li><li><a href="#rfc.section.11.5">11.5</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.bc">&lt;bc&gt; element</a></li><li><a href="#rfc.section.11.6">11.6</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.blockquote">&lt;blockquote&gt; element</a></li><li><a href="#rfc.section.11.7">11.7</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.boilerplate">&lt;boilerplate&gt; element</a></li><li><a href="#rfc.section.11.8">11.8</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.bt">&lt;bt&gt; element</a></li><li><a href="#rfc.section.11.9">11.9</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.dfn">&lt;dfn&gt; element</a></li><li><a href="#rfc.section.11.10">11.10</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.feedback">&lt;feedback&gt; element</a></li><li><a href="#rfc.section.11.11">11.11</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.h">&lt;h&gt; element</a></li><li><a href="#rfc.section.11.12">11.12</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.highlight">&lt;highlight&gt; element</a></li><li><a href="#rfc.section.11.13">11.13</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.length-of">&lt;length-of&gt; element</a></li><li><a href="#rfc.section.11.14">11.14</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.link">&lt;link&gt; element</a></li><li><a href="#rfc.section.11.15">11.15</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.lt">&lt;lt&gt; element</a></li><li><a href="#rfc.section.11.16">11.16</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.note">&lt;note&gt; element</a></li><li><a href="#rfc.section.11.17">11.17</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.parse-xml">&lt;parse-xml&gt; element</a></li><li><a href="#rfc.section.11.18">11.18</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.prose">&lt;prose&gt; element</a></li><li><a href="#rfc.section.11.19">11.19</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.q">&lt;q&gt; element</a></li><li><a href="#rfc.section.11.20">11.20</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.ref">&lt;ref&gt; element</a></li><li><a href="#rfc.section.11.21">11.21</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.source">&lt;source&gt; element</a></li><li><a href="#rfc.section.11.22">11.22</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.sup">&lt;sup&gt; element</a></li><li><a href="#rfc.section.11.23">11.23</a>&nbsp;&nbsp;&nbsp;<a href="#ext-rfc2629.artwork">Extensions to Xml2rfc &lt;artwork&gt; element</a></li><li><a href="#rfc.section.11.24">11.24</a>&nbsp;&nbsp;&nbsp;<a href="#ext-rfc2629.iref">Extensions to Xml2rfc &lt;iref&gt; element</a></li><li><a href="#rfc.section.11.25">11.25</a>&nbsp;&nbsp;&nbsp;<a href="#ext-rfc2629.list">Extensions to Xml2rfc &lt;list&gt; element</a></li><li><a href="#rfc.section.11.26">11.26</a>&nbsp;&nbsp;&nbsp;<a href="#ext-rfc2629.rfc">Extensions to Xml2rfc &lt;rfc&gt; element</a></li><li><a href="#rfc.section.11.27">11.27</a>&nbsp;&nbsp;&nbsp;<a href="#ext-rfc2629.section">Extensions to Xml2rfc &lt;section&gt; element</a></li><li><a href="#rfc.section.11.28">11.28</a>&nbsp;&nbsp;&nbsp;<a href="#ext-rfc2629.xref">Extensions to Xml2rfc &lt;xref&gt; element</a></li></ul></li><li><a href="#rfc.section.12">12.</a>&nbsp;&nbsp;&nbsp;<a href="#v3">Experimental Support for XML2RFCv3 Vocabulary</a><ul><li><a href="#rfc.section.12.1">12.1</a>&nbsp;&nbsp;&nbsp;<a href="#v3.aside">aside Element</a></li><li><a href="#rfc.section.12.2">12.2</a>&nbsp;&nbsp;&nbsp;<a href="#v3.bcp14">bcp14 Element</a></li><li><a href="#rfc.section.12.3">12.3</a>&nbsp;&nbsp;&nbsp;<a href="#v3.blockquote">blockquote Element</a></li><li><a href="#rfc.section.12.4">12.4</a>&nbsp;&nbsp;&nbsp;<a href="#v3.displayreference">displayreference Element</a></li><li><a href="#rfc.section.12.5">12.5</a>&nbsp;&nbsp;&nbsp;<a href="#v3.dd">dd Element</a></li><li><a href="#rfc.section.12.6">12.6</a>&nbsp;&nbsp;&nbsp;<a href="#v3.dl">dl Element</a></li><li><a href="#rfc.section.12.7">12.7</a>&nbsp;&nbsp;&nbsp;<a href="#v3.dt">dt Element</a></li><li><a href="#rfc.section.12.8">12.8</a>&nbsp;&nbsp;&nbsp;<a href="#v3.em">em Element</a></li><li><a href="#rfc.section.12.9">12.9</a>&nbsp;&nbsp;&nbsp;<a href="#v3.li">li Element</a></li><li><a href="#rfc.section.12.10">12.10</a>&nbsp;&nbsp;&nbsp;<a href="#v3.name">name Element</a></li><li><a href="#rfc.section.12.11">12.11</a>&nbsp;&nbsp;&nbsp;<a href="#v3.ol">ol Element</a></li><li><a href="#rfc.section.12.12">12.12</a>&nbsp;&nbsp;&nbsp;<a href="#v3.postalLine">postalLine Element</a></li><li><a href="#rfc.section.12.13">12.13</a>&nbsp;&nbsp;&nbsp;<a href="#v3.refcontent">refcontent Element</a></li><li><a href="#rfc.section.12.14">12.14</a>&nbsp;&nbsp;&nbsp;<a href="#v3.sourcecode">sourcecode Element</a></li><li><a href="#rfc.section.12.15">12.15</a>&nbsp;&nbsp;&nbsp;<a href="#v3.reference">Extensions to reference Element</a><ul><li><a href="#rfc.section.12.15.1">12.15.1</a>&nbsp;&nbsp;&nbsp;<a href="#v3.reference.quoteTitle">quoteTitle attribute</a></li></ul></li><li><a href="#rfc.section.12.16">12.16</a>&nbsp;&nbsp;&nbsp;<a href="#v3.section">Extensions to section Element</a><ul><li><a href="#rfc.section.12.16.1">12.16.1</a>&nbsp;&nbsp;&nbsp;<a href="#v3.section.numbered">numbered attribute</a></li><li><a href="#rfc.section.12.16.2">12.16.2</a>&nbsp;&nbsp;&nbsp;<a href="#v3.section.removeInRFC">removeInRFC attribute</a></li></ul></li><li><a href="#rfc.section.12.17">12.17</a>&nbsp;&nbsp;&nbsp;<a href="#v3.strong">strong Element</a></li><li><a href="#rfc.section.12.18">12.18</a>&nbsp;&nbsp;&nbsp;<a href="#v3.sub">sub Element</a></li><li><a href="#rfc.section.12.19">12.19</a>&nbsp;&nbsp;&nbsp;<a href="#v3.sup">sup Element</a></li><li><a href="#rfc.section.12.20">12.20</a>&nbsp;&nbsp;&nbsp;<a href="#v3.svg">svg Element</a></li><li><a href="#rfc.section.12.21">12.21</a>&nbsp;&nbsp;&nbsp;<a href="#v3.tt">tt Element</a></li><li><a href="#rfc.section.12.22">12.22</a>&nbsp;&nbsp;&nbsp;<a href="#v3.ul">ul Element</a></li></ul></li><li><a href="#rfc.section.13">13.</a>&nbsp;&nbsp;&nbsp;<a href="#utilities">Utilities</a><ul><li><a href="#rfc.section.13.1">13.1</a>&nbsp;&nbsp;&nbsp;<a href="#checking-references">Checking References</a></li><li><a href="#rfc.section.13.2">13.2</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.13.2">Generating Graphs from References</a></li><li><a href="#rfc.section.13.3">13.3</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.13.3">Producing reference entries for books</a></li><li><a href="#rfc.section.13.4">13.4</a>&nbsp;&nbsp;&nbsp;<a href="#clean-for-dtd">Down-converting to RFC2629bis DTD</a></li><li><a href="#rfc.section.13.5">13.5</a>&nbsp;&nbsp;&nbsp;<a href="#extract-artwork">Extracting artwork</a></li><li><a href="#rfc.section.13.6">13.6</a>&nbsp;&nbsp;&nbsp;<a href="#grddl">GRRDL</a></li><li><a href="#rfc.section.13.7">13.7</a>&nbsp;&nbsp;&nbsp;<a href="#html.live.refresh">HTML Live Refresh</a></li><li><a href="#rfc.section.13.8">13.8</a>&nbsp;&nbsp;&nbsp;<a href="#refreshing.inclusions">Refreshing included material in the XML source</a></li></ul></li><li><a href="#rfc.section.14">14.</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.references">Informative References</a></li><li><a href="#rfc.section.A">A.</a>&nbsp;&nbsp;&nbsp;<a href="#grammar">RELAX NG Compact Schema</a></li><li><a href="#rfc.section.B">B.</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.B">Implementation Notes</a><ul><li><a href="#rfc.section.B.1">B.1</a>&nbsp;&nbsp;&nbsp;<a href="#artwork.types">Recognized type attributes for &lt;artwork&gt; element</a></li></ul></li><li><a href="#rfc.section.C">C.</a>&nbsp;&nbsp;&nbsp;<a href="#examples">Examples</a><ul><li><a href="#rfc.section.C.1">C.1</a>&nbsp;&nbsp;&nbsp;<a href="#examples.internalsubset">Using the 'Internal Subset'</a></li><li><a href="#rfc.section.C.2">C.2</a>&nbsp;&nbsp;&nbsp;<a href="#examples.customizing">Customization</a></li></ul></li><li><a href="#rfc.section.D">D.</a>&nbsp;&nbsp;&nbsp;<a href="#boilerplate">Producing the IETF 'Boilerplate'</a></li><li><a href="#rfc.section.E">E.</a>&nbsp;&nbsp;&nbsp;<a href="#license">License</a></li><li><a href="#rfc.index">Index</a></li><li><a href="#rfc.authors">Author's Address</a></li></ul></nav><hr class="noprint"><section id="introduction"><h2 id="rfc.section.1" class="np"><a href="#rfc.section.1">1.</a>&nbsp;<a href="#introduction">Introduction</a></h2><div id="rfc.section.1.p.1"><p>This document describes a set of XSLT transformations that can be used to transform "XML2RFC" XML (<a href="#RFC7749" id="rfc.xref.RFC7749.1"><cite title="The &#34;xml2rfc&#34; Version 2 Vocabulary">[RFC7749]</cite></a>, updating <a href="#RFC2629" id="rfc.xref.RFC2629.1"><cite title="Writing I-Ds and RFCs using XML">[RFC2629]</cite></a>) to various output formats, such as HTML and PDF. The main topics are <a class="self" href="#rfc.section.1.p.1">&para;</a></p><ul><li>compliance to the xml2rfc XML element set (<a href="#supported.elements" title="Supported RFC2629 elements">Section&nbsp;2</a>),</li><li>support for xml2rfc processing instructions (<a href="#processing.instructions" title="Processing Instructions">Section&nbsp;3</a>),</li><li>the names of anchor elements generated in HTML and PDF output (<a href="#anchors" title="Anchors">Section&nbsp;4</a>),</li><li>various XSLT engines that can be used (<a href="#xslt.engines" title="Supported XSLT engines">Section&nbsp;5</a>),</li><li>outputting HTML (<a href="#output.html" title="Transforming to HTML">Section&nbsp;6</a>) and XHTML (<a href="#output.xhtml" title="Transforming to XHTML">Section&nbsp;7</a>),</li><li>outputting CHM (Compiled Microsoft Help, <a href="#output.chm" title="Transforming to CHM (Microsoft Compiled Help)">Section&nbsp;8</a>),</li><li>outputting PDF (<a href="#output.pdf" title="Transforming to PDF">Section&nbsp;9</a>),</li><li>outputting ePub (<a href="#output.epub" title="Transforming to ePub">Section&nbsp;10</a>),</li><li>extensions to the xml2rfc vocabulary (<a href="#extensions" title="Generic Extensions">Section&nbsp;11</a>),</li><li>selected extensions from the proposed xml2rfc V3 vocabulary (<a href="#v3" title="Experimental Support for XML2RFCv3 Vocabulary">Section&nbsp;12</a>),</li><li>various utilities (<a href="#utilities" title="Utilities">Section&nbsp;13</a>).</li></ul></div><div id="rfc.section.1.p.2"><p>The full distribution is available at &lt;<a href="http://greenbytes.de/tech/webdav/rfc2629xslt.zip">http://greenbytes.de/tech/webdav/rfc2629xslt.zip</a>&gt;.<a class="self" href="#rfc.section.1.p.2">&para;</a></p></div></section><hr class="noprint"><section id="supported.elements"><h2 id="rfc.section.2" class="np"><a href="#rfc.section.2">2.</a>&nbsp;<a href="#supported.elements">Supported RFC2629 elements</a></h2><div id="rfc.section.2.p.1"><p><span class="tt">rfc2629.xslt</span> supports both all RFC2629 grammar elements and the extensions implemented in xml2rfc 1.36.<a class="self" href="#rfc.section.2.p.1">&para;</a></p></div><section><h3 id="rfc.section.2.1"><a href="#rfc.section.2.1">2.1</a>&nbsp;Extension elements</h3><div id="rfc.section.2.1.p.1"><p><span class="tt">rfc2629.xslt</span> supports two kind of extension elements, using different XML namespaces.<a class="self" href="#rfc.section.2.1.p.1">&para;</a></p></div><div id="rfc.section.2.1.p.2"><p>The first set contains (hopefully) generally useful extensions, see <a href="#extensions" title="Generic Extensions">Section&nbsp;11</a>.<a class="self" href="#rfc.section.2.1.p.2">&para;</a></p></div><div id="rfc.section.2.1.p.3"><p>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.<a class="self" href="#rfc.section.2.1.p.3">&para;</a></p></div></section></section><hr class="noprint"><section id="processing.instructions"><h2 id="rfc.section.3" class="np"><a href="#rfc.section.3">3.</a>&nbsp;<a href="#processing.instructions">Processing Instructions</a></h2><div id="rfc.section.3.p.1"><p>All PIs can be set as XSLT parameter as well, overriding any value that is found in the source file to be transformed.<a class="self" href="#rfc.section.3.p.1">&para;</a></p></div><div id="rfc.figure.u.1"><p>Using processing instructions:</p><pre class="text prettyprint">&lt;?rfc toc="yes"?&gt;
    433448&lt;?rfc-ext support-rfc2731="no"?&gt;
    434449</pre></div><div id="rfc.figure.u.2"><p>Using XSLT parameters (Saxon):</p><pre class="text">java -cp saxon.jar com.icl.saxon.StyleSheet source.xml rfc2629.xslt \
     
    437452   --param xml2rfc-ext-support-rfc2731 '"no"' \
    438453   rfc2629.xslt source.xml &gt; result.html
    439 </pre><p>(note the required quoting of string parameters)<span id="rfc.iref.x.1"></span></p></div><div><h3 id="rfc.section.3.1"><a href="#rfc.section.3.1">3.1</a>&nbsp;Supported xml2rfc-compatible PIs</h3><div id="rfc.table.u.1"><table class="tt full tcenter" cellpadding="3" cellspacing="0"><thead><tr><th>PI target</th><th>PI pseudo-attribute</th><th>XSLT parameter name</th><th>default</th><th>comment</th></tr></thead><tbody><tr><td class="left">rfc</td><td class="left">background<div id="rfc.iref.b.1"></div><div id="rfc.iref.p.1"></div></td><td class="left">xml2rfc-background<div id="rfc.iref.x.2"></div> <div id="rfc.iref.p.2"></div></td><td class="left">(not set)</td><td class="left"></td></tr><tr><td class="left">rfc</td><td class="left">compact<div id="rfc.iref.c.1"></div><div id="rfc.iref.p.3"></div></td><td class="left">xml2rfc-compact<div id="rfc.iref.x.3"></div> <div id="rfc.iref.p.4"></div></td><td class="left">"no"</td><td class="left">only applies to HTML output method when printing</td></tr><tr><td class="left">rfc</td><td class="left">comments<div id="rfc.iref.c.2"></div><div id="rfc.iref.p.5"></div></td><td class="left">xml2rfc-comments<div id="rfc.iref.x.4"></div> <div id="rfc.iref.p.6"></div></td><td class="left">(not set)</td><td class="left"></td></tr><tr><td class="left">rfc</td><td class="left">editing<div id="rfc.iref.e.1"></div><div id="rfc.iref.p.7"></div></td><td class="left">xml2rfc-editing<div id="rfc.iref.x.5"></div> <div id="rfc.iref.p.8"></div></td><td class="left">"no"</td><td class="left"></td></tr><tr><td class="left">rfc</td><td class="left">footer<div id="rfc.iref.f.1"></div><div id="rfc.iref.p.9"></div></td><td class="left">xml2rfc-footer<div id="rfc.iref.x.6"></div> <div id="rfc.iref.p.10"></div></td><td class="left">(not set)</td><td class="left"></td></tr><tr><td class="left">rfc</td><td class="left">header<div id="rfc.iref.h.1"></div><div id="rfc.iref.p.11"></div></td><td class="left">xml2rfc-header<div id="rfc.iref.x.7"></div> <div id="rfc.iref.p.12"></div></td><td class="left">(not set)</td><td class="left"></td></tr><tr><td class="left">rfc</td><td class="left">inline<div id="rfc.iref.i.1"></div><div id="rfc.iref.p.13"></div></td><td class="left">xml2rfc-inline<div id="rfc.iref.x.8"></div> <div id="rfc.iref.p.14"></div></td><td class="left">(not set)</td><td class="left"></td></tr><tr><td class="left">rfc</td><td class="left">iprnotified<div id="rfc.iref.i.2"></div><div id="rfc.iref.p.15"></div></td><td class="left">xml2rfc-iprnotified<div id="rfc.iref.x.9"></div> <div id="rfc.iref.p.16"></div></td><td class="left">"no"</td><td class="left"></td></tr><tr><td class="left">rfc</td><td class="left">linkmailto<div id="rfc.iref.l.1"></div><div id="rfc.iref.p.17"></div></td><td class="left">xml2rfc-linkmailto<div id="rfc.iref.x.10"></div> <div id="rfc.iref.p.18"></div></td><td class="left">"yes"</td><td class="left"></td></tr><tr><td class="left">rfc</td><td class="left">private<div id="rfc.iref.p.19"></div><div id="rfc.iref.p.20"></div></td><td class="left">xml2rfc-private<div id="rfc.iref.x.11"></div> <div id="rfc.iref.p.21"></div></td><td class="left">(not set)</td><td class="left"></td></tr><tr><td class="left">rfc</td><td class="left">refparent<div id="rfc.iref.r.1"></div><div id="rfc.iref.p.22"></div></td><td class="left">xml2rfc-private<div id="rfc.iref.x.12"></div> <div id="rfc.iref.p.23"></div></td><td class="left">"References"</td><td class="left">Title for References sections when automatically inserted</td></tr><tr><td class="left">rfc</td><td class="left">rfcedstyle<div id="rfc.iref.r.2"></div><div id="rfc.iref.p.24"></div></td><td class="left">xml2rfc-rfcedstyle<div id="rfc.iref.x.13"></div> <div id="rfc.iref.p.25"></div></td><td class="left">(not set)</td><td class="left">(limited support)</td></tr><tr><td class="left">rfc</td><td class="left">sortrefs<div id="rfc.iref.s.1"></div><div id="rfc.iref.p.26"></div></td><td class="left">xml2rfc-sortrefs<div id="rfc.iref.x.14"></div> <div id="rfc.iref.p.27"></div></td><td class="left">"no"</td><td class="left"></td></tr><tr><td class="left">rfc</td><td class="left">symrefs<div id="rfc.iref.s.2"></div><div id="rfc.iref.p.28"></div></td><td class="left">xml2rfc-symrefs<div id="rfc.iref.x.15"></div> <div id="rfc.iref.p.29"></div></td><td class="left">"yes"</td><td class="left">The default has changed from "no" to "yes" as of June 6, 2007 and xml2rfc 1.33pre4.</td></tr><tr><td class="left">rfc</td><td class="left">toc<div id="rfc.iref.t.1"></div><div id="rfc.iref.p.30"></div></td><td class="left">xml2rfc-toc<div id="rfc.iref.x.16"></div> <div id="rfc.iref.p.31"></div></td><td class="left">"no"</td><td class="left"></td></tr><tr><td class="left">rfc</td><td class="left">tocdepth<div id="rfc.iref.t.2"></div><div id="rfc.iref.p.32"></div></td><td class="left">xml2rfc-tocdepth<div id="rfc.iref.x.17"></div> <div id="rfc.iref.p.33"></div></td><td class="left">99</td><td class="left"></td></tr><tr><td class="left">rfc</td><td class="left">topblock<div id="rfc.iref.t.3"></div><div id="rfc.iref.p.34"></div></td><td class="left">xml2rfc-topblock<div id="rfc.iref.x.18"></div> <div id="rfc.iref.p.35"></div></td><td class="left">"yes"</td><td class="left"></td></tr></tbody></table></div></div><div><h3 id="rfc.section.3.2"><a href="#rfc.section.3.2">3.2</a>&nbsp;Unsupported xml2rfc-compatible PIs</h3><div id="rfc.table.u.2"><table class="tt full tcenter" cellpadding="3" cellspacing="0"><thead><tr><th>PI target</th><th>PI pseudo-attribute</th><th>comment</th></tr></thead><tbody><tr><td class="left">rfc</td><td class="left">include<div id="rfc.iref.i.3"></div><div id="rfc.iref.p.36"></div></td><td class="left">incompatible with XML/XSLT processing model, please use external entities instead (see <a href="#examples.internalsubset" title="Using the 'Internal Subset'">Appendix&nbsp;C.1</a>)</td></tr><tr><td class="left">rfc</td><td class="left">needLines<div id="rfc.iref.n.1"></div><div id="rfc.iref.p.37"></div></td><td class="left"></td></tr><tr><td class="left">rfc</td><td class="left">slides<div id="rfc.iref.s.3"></div><div id="rfc.iref.p.38"></div></td><td class="left"></td></tr><tr><td class="left">rfc</td><td class="left">strict<div id="rfc.iref.s.4"></div><div id="rfc.iref.p.39"></div></td><td class="left"></td></tr><tr><td class="left">rfc</td><td class="left">subcompact<div id="rfc.iref.s.5"></div><div id="rfc.iref.p.40"></div></td><td class="left"></td></tr><tr><td class="left">rfc</td><td class="left">tocindent<div id="rfc.iref.t.4"></div><div id="rfc.iref.p.41"></div></td><td class="left">(defaults to "yes")</td></tr><tr><td class="left">rfc</td><td class="left">tocompact<div id="rfc.iref.t.5"></div><div id="rfc.iref.p.42"></div></td><td class="left"></td></tr></tbody></table></div></div><div><h3 id="rfc.section.3.3"><a href="#rfc.section.3.3">3.3</a>&nbsp;Extension PIs</h3><div id="rfc.table.u.3"><table class="tt full tcenter" cellpadding="3" cellspacing="0"><thead><tr><th>PI target</th><th>PI pseudo-attribute</th><th>XSLT parameter name</th><th>default</th><th>description</th></tr></thead><tbody><tr><td class="left">rfc-ext</td><td class="left">allow-markup-in-artwork<div id="rfc.iref.a.1"></div><div id="rfc.iref.p.43"></div></td><td class="left">xml2rfc-allow-markup-in-artwork<div id="rfc.iref.x.19"></div> <div id="rfc.iref.p.44"></div></td><td class="left">"no"</td><td class="left">Enables support for specific elements inside abstract elements (using this extension makes the document incompatible to the RFC2629bis DTD; see description of conversion XSLT in <a href="#clean-for-dtd" title="Down-converting to RFC2629bis DTD">Section&nbsp;13.4</a>).</td></tr><tr><td class="left">rfc-ext</td><td class="left">authors-section<div id="rfc.iref.a.2"></div><div id="rfc.iref.p.45"></div></td><td class="left">xml2rfc-ext-authors-section<div id="rfc.iref.x.20"></div> <div id="rfc.iref.p.46"></div></td><td class="left">"end"</td><td class="left">When "before-appendices", place the authors section between references and appendices (this ordering was used a long time ago).</td></tr><tr><td class="left">rfc-ext</td><td class="left">duplex<div id="rfc.iref.d.1"></div><div id="rfc.iref.p.47"></div></td><td class="left">xml2rfc-ext-duplex<div id="rfc.iref.x.21"></div> <div id="rfc.iref.p.48"></div></td><td class="left">"no"</td><td class="left">When set to "yes", format the PDF output for doublesided printing.</td></tr><tr><td class="left">rfc-ext</td><td class="left">include-index<div id="rfc.iref.i.4"></div><div id="rfc.iref.p.49"></div></td><td class="left">xml2rfc-ext-include-index<div id="rfc.iref.x.22"></div> <div id="rfc.iref.p.50"></div></td><td class="left">"yes"</td><td class="left">When set to "no", no index will be generated.</td></tr><tr><td class="left">rfc-ext</td><td class="left">include-references-in-index<div id="rfc.iref.i.5"></div><div id="rfc.iref.p.51"></div></td><td class="left">xml2rfc-ext-include-references-in-index<div id="rfc.iref.x.23"></div> <div id="rfc.iref.p.52"></div></td><td class="left">"no"</td><td class="left">When set to "yes", index entries are generated for all references.</td></tr><tr><td class="left">rfc-ext</td><td class="left">insert-metadata<div id="rfc.iref.i.6"></div><div id="rfc.iref.p.53"></div></td><td class="left">xml2rfc-ext-insert-metadata<div id="rfc.iref.x.24"></div> <div id="rfc.iref.p.54"></div></td><td class="left">"yes"</td><td class="left">When set to "yes", include JS code that fetches current RFC metadata and inserts it into the front page (standards track, obsoletion, updates, errata).</td></tr><tr><td class="left">rfc-ext</td><td class="left">justification<div id="rfc.iref.j.1"></div><div id="rfc.iref.p.55"></div></td><td class="left">xml2rfc-ext-justification<div id="rfc.iref.x.25"></div> <div id="rfc.iref.p.56"></div></td><td class="left">"never"</td><td class="left">"never": never emit justified text, "always": always emit justified text, "print": only emit justified text for print media.</td></tr><tr><td class="left">rfc-ext</td><td class="left">parse-xml-in-artwork<div id="rfc.iref.p.57"></div><div id="rfc.iref.p.58"></div></td><td class="left">xml2rfc-parse-xml-in-artwork<div id="rfc.iref.x.26"></div> <div id="rfc.iref.p.59"></div></td><td class="left">"no"</td><td class="left">May be used to enable parsing of XML content in figures (MSXML only).</td></tr><tr><td class="left">rfc-ext</td><td class="left">sec-no-trailing-dots<div id="rfc.iref.s.6"></div><div id="rfc.iref.p.60"></div></td><td class="left">xml2rfc-ext-sec-no-trailing-dots<div id="rfc.iref.x.27"></div> <div id="rfc.iref.p.61"></div></td><td class="left"></td><td class="left">When set to "yes", add trailing dots to section numbers. This seems to be the preferred format in the newest RFCs.</td></tr><tr><td class="left">rfc-ext</td><td class="left">support-rfc2731<div id="rfc.iref.s.7"></div><div id="rfc.iref.p.62"></div></td><td class="left">xml2rfc-ext-support-rfc2731<div id="rfc.iref.x.28"></div> <div id="rfc.iref.p.63"></div></td><td class="left">"yes"</td><td class="left">Decides whether the HTML transformation should generate META tags according <a href="#rfc2731.properties" title="Dublin Core (RFC2731) metadata">Section&nbsp;6.4</a>.</td></tr></tbody></table></div></div></div><hr class="noprint"><div id="anchors"><h2 id="rfc.section.4" class="np"><a href="#rfc.section.4">4.</a>&nbsp;<a href="#anchors">Anchors</a></h2><div id="rfc.section.4.p.1"><p>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).<a class="self" href="#rfc.section.4.p.1">&para;</a></p></div><div id="rfc.table.u.4"><p>The following anchors get auto-generated:</p><table class="tt full tcenter" cellpadding="3" cellspacing="0"><thead><tr><th>Anchor name</th><th>Description</th></tr></thead><tbody><tr><td class="left">rfc.abstract <div id="rfc.iref.r.3"></div><div id="rfc.iref.a.3"></div></td><td class="left">Abstract</td></tr><tr><td class="left">rfc.authors <div id="rfc.iref.r.4"></div><div id="rfc.iref.a.4"></div></td><td class="left">Authors section</td></tr><tr><td class="left">rfc.copyright <div id="rfc.iref.r.5"></div><div id="rfc.iref.a.5"></div></td><td class="left">Copyright section</td></tr><tr><td class="left">rfc.copyrightnotice <div id="rfc.iref.r.6"></div><div id="rfc.iref.a.6"></div></td><td class="left">Copyright notice</td></tr><tr><td class="left">rfc.figure.<em>n</em> <div id="rfc.iref.r.7"></div><div id="rfc.iref.a.7"></div></td><td class="left">Figures (titled)</td></tr><tr><td class="left">rfc.figure.u.<em>n</em> <div id="rfc.iref.r.8"></div><div id="rfc.iref.a.8"></div></td><td class="left">Figures (untitled)</td></tr><tr><td class="left">rfc.index <div id="rfc.iref.r.9"></div><div id="rfc.iref.a.9"></div></td><td class="left">Index</td></tr><tr><td class="left">rfc.ipr <div id="rfc.iref.r.10"></div><div id="rfc.iref.a.10"></div></td><td class="left">Intellectual Property</td></tr><tr><td class="left">rfc.iref.<em>n</em> <div id="rfc.iref.r.11"></div><div id="rfc.iref.a.11"></div></td><td class="left">Internal references</td></tr><tr><td class="left">rfc.note.<em>n</em> <div id="rfc.iref.r.12"></div><div id="rfc.iref.a.12"></div></td><td class="left">Notes (from front section)</td></tr><tr><td class="left">rfc.references <div id="rfc.iref.r.13"></div><div id="rfc.iref.a.13"></div></td><td class="left">References</td></tr><tr><td class="left">rfc.references.<em>n</em> <div id="rfc.iref.r.14"></div><div id="rfc.iref.a.14"></div></td><td class="left">Additional references</td></tr><tr><td class="left">rfc.section.<em>n</em> <div id="rfc.iref.r.15"></div><div id="rfc.iref.a.15"></div></td><td class="left">Section <em>n</em></td></tr><tr><td class="left">rfc.section.<em>n</em>.p.<em>m</em> <div id="rfc.iref.r.16"></div><div id="rfc.iref.a.16"></div></td><td class="left">Section <em>n</em>, paragraph <em>m</em></td></tr><tr><td class="left">rfc.status <div id="rfc.iref.r.17"></div><div id="rfc.iref.a.17"></div></td><td class="left">Status of memo</td></tr><tr><td class="left">rfc.table.<em>n</em> <div id="rfc.iref.r.18"></div><div id="rfc.iref.a.18"></div></td><td class="left">Tables (titled)</td></tr><tr><td class="left">rfc.table.u.<em>n</em> <div id="rfc.iref.r.19"></div><div id="rfc.iref.a.19"></div></td><td class="left">Tables (untitled)</td></tr><tr><td class="left">rfc.toc <div id="rfc.iref.r.20"></div><div id="rfc.iref.a.20"></div></td><td class="left">Table of contents</td></tr><tr><td class="left">rfc.xref.<em>name</em>.<em>n</em> <div id="rfc.iref.r.21"></div><div id="rfc.iref.a.21"></div></td><td class="left">References to reference <em>n</em> to <em>name</em></td></tr></tbody></table></div></div><hr class="noprint"><div id="xslt.engines"><h2 id="rfc.section.5" class="np"><a href="#rfc.section.5">5.</a>&nbsp;<a href="#xslt.engines">Supported XSLT engines</a></h2><div id="rfc.section.5.p.1"><p>The transformation requires a non-standard extension function (see <a href="http://www.exslt.org/exsl/functions/node-set/index.html">exsl:node-set</a>) 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.<a class="self" href="#rfc.section.5.p.1">&para;</a></p></div><div id="exsl-date-time"><div id="rfc.section.5.p.2"><p>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 <a href="http://www.exslt.org/date/functions/date-time/">exsl:date-time</a> extension function.<a class="self" href="#rfc.section.5.p.2">&para;</a></p></div></div><div><h3 id="rfc.section.5.1"><a href="#rfc.section.5.1">5.1</a>&nbsp;Standalone Engines</h3><div id="rfc.section.5.1.p.1"><p>The following XSLT engines are believed to work well: <a class="self" href="#rfc.section.5.1.p.1">&para;</a></p><ul><li>Windows: <span id="rfc.iref.m.1"></span><span id="rfc.iref.m.2"></span>MSXML3 and MSXML4 (&lt;<a href="http://msdn.microsoft.com/xml">http://msdn.microsoft.com/xml</a>&gt;; command line processor "msxsl" is available from <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=2FB55371-C94E-4373-B0E9-DB4816552E41">Microsoft Download Center</a>)</li><li>Java: <span id="rfc.iref.s.8"></span>Saxon (&lt;<a href="http://saxon.sourceforge.net/">http://saxon.sourceforge.net/</a>&gt;)</li><li>Java: <span id="rfc.iref.x.29"></span>Xalan (&lt;<a href="http://xml.apache.org/xalan-j/">http://xml.apache.org/xalan-j/</a>&gt;)</li><li>C/C++: <span id="rfc.iref.x.30"></span>xsltproc (libxslt) (&lt;<a href="http://xmlsoft.org/XSLT/">http://xmlsoft.org/XSLT/</a>&gt;, make sure that you have a current version)</li></ul></div></div><div id="xslt.engines.browser"><h3 id="rfc.section.5.2"><a href="#rfc.section.5.2">5.2</a>&nbsp;<a href="#xslt.engines.browser">In-Browser Engines</a></h3><div id="rfc.section.5.2.p.1"><p>The following browsers seem to work fine: <a class="self" href="#rfc.section.5.2.p.1">&para;</a></p><ul><li><p><span id="rfc.iref.i.7"></span>Internet Explorer 5.5 (Windows version, if MSXML3 is installed)</p></li><li><p><span id="rfc.iref.i.8"></span><span id="rfc.iref.i.9"></span><span id="rfc.iref.i.10"></span><span id="rfc.iref.i.11"></span>Internet Explorer 6 and newer</p></li><li><div id="firefox3"><p><span id="rfc.iref.m.3"></span><span id="rfc.iref.f.2"></span>Firefox 3.0 and newer</p></div><ul><li>Be aware that XSLT execution can be suppressed using <span id="rfc.iref.n.2"></span><a href="https://addons.mozilla.org/de/firefox/addon/722">NoScript</a></li><li>Firefox does not load external DTDs nor external entities, see <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=22942">Mozilla Bug 22942</a>, thus entities like &amp;nbsp; need to be declared in the internal subset (<a href="#examples.internalsubset" title="Using the 'Internal Subset'">Appendix&nbsp;C.1</a>)</li><li>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 &lt;<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=640390">https://bugzilla.mozilla.org/show_bug.cgi?id=640390</a>&gt;.</li><li>Date computation is available in Firefox starting with Firefox 6 (see &lt;<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=603159">https://bugzilla.mozilla.org/show_bug.cgi?id=603159</a>&gt;)</li></ul></li><li><p><span id="rfc.iref.s.9"></span><span id="rfc.iref.s.10"></span>Safari 3 (starting with version 3.0.4)</p><ul><li>Date computation not available (see &lt;<a href="https://bugs.webkit.org/show_bug.cgi?id=4079">https://bugs.webkit.org/show_bug.cgi?id=4079</a>&gt;)</li></ul></li><li><p><span id="rfc.iref.g.1"></span>Google Chrome</p><ul><li>Date computation not available (see &lt;<a href="https://bugs.webkit.org/show_bug.cgi?id=4079">https://bugs.webkit.org/show_bug.cgi?id=4079</a>&gt;)</li></ul></li><li><p><span id="rfc.iref.o.1"></span>Opera (starting with version 10)</p><ul><li>Date computation not available</li></ul></li></ul></div><div id="rfc.section.5.2.p.2"><p>The following browsers are known not to work properly: <a class="self" href="#rfc.section.5.2.p.2">&para;</a></p><ul><li><div id="firefox12"><p><span id="rfc.iref.m.4"></span><span id="rfc.iref.f.3"></span>Firefox 1.*/2.*: (missing extension function - see change request at Mozilla BugZilla <a href="http://bugzilla.mozilla.org/show_bug.cgi?id=193678">193678</a>)</p></div></li><li><div id="opera"><p><span id="rfc.iref.o.2"></span>Opera 9.21: execution fails, potentially to a somewhat complex XPath expression (reported to Opera as bug 245725).</p></div></li><li><p>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).</p></li><li><div id="safari"><p><span id="rfc.iref.s.11"></span>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 &lt;<a href="http://drakken.dbc.mtview.ca.us/pipermail/xml2rfc/2005-May/002073.html">http://drakken.dbc.mtview.ca.us/pipermail/xml2rfc/2005-May/002073.html</a>&gt; and &lt;<a href="http://bugs.webkit.org/show_bug.cgi?id=4079">http://bugs.webkit.org/show_bug.cgi?id=4079</a>&gt;.</p></div></li></ul></div></div></div><hr class="noprint"><div id="output.html"><h2 id="rfc.section.6" class="np"><a href="#rfc.section.6">6.</a>&nbsp;<a href="#output.html">Transforming to HTML</a></h2><div id="rfc.section.6.p.1" class="avoidbreakafter"><p>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:<a class="self" href="#rfc.section.6.p.1">&para;</a></p></div><div id="rfc.iref.x.31"></div><div id="rfc.figure.u.4"><pre class="text">  &lt;?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?&gt;
    440 </pre></div><div id="rfc.section.6.p.2"><p>(and ensure that <tt>rfc2629.xslt</tt> is present).<a class="self" href="#rfc.section.6.p.2">&para;</a></p></div><div><h3 id="rfc.section.6.1"><a href="#rfc.section.6.1">6.1</a>&nbsp;HTML compliance</h3><div id="rfc.section.6.1.p.1"><p>The transformation result is supposed to conform to the HTML 4.01 strict DTD <a href="#HTML" id="rfc.xref.HTML.1"><cite title="HTML 4.01 Specification">[HTML]</cite></a>. This can be checked using the W3C's online validator at &lt;<a href="http://validator.w3.org">http://validator.w3.org</a>&gt;<span id="rfc.iref.h.2"></span>.<a class="self" href="#rfc.section.6.1.p.1">&para;</a></p></div></div><div id="html.link"><h3 id="rfc.section.6.2"><a href="#rfc.section.6.2">6.2</a>&nbsp;<a href="#html.link">Standard HTML LINK elements</a></h3><div id="rfc.section.6.2.p.1"><p>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 <a href="https://addons.mozilla.org/firefox/2933/">Link Widgets</a> extension.<a class="self" href="#rfc.section.6.2.p.1">&para;</a></p></div><div id="rfc.table.u.5"><p>The following LINK elements are produced:</p><table class="tt full tcenter" cellpadding="3" cellspacing="0"><thead><tr><th>LINK type</th><th>description</th></tr></thead><tbody><tr><td class="left">alternate<div id="rfc.iref.a.22"></div><div id="rfc.iref.h.3"></div></td><td class="left">for RFCs, a link to the authorative ASCII version on the IETF web site</td></tr><tr><td class="left">appendic<div id="rfc.iref.a.23"></div><div id="rfc.iref.h.4"></div></td><td class="left">pointer to all top-level appendics</td></tr><tr><td class="left">author<div id="rfc.iref.a.24"></div><div id="rfc.iref.h.5"></div></td><td class="left">pointer to "authors" section</td></tr><tr><td class="left">chapter<div id="rfc.iref.c.3"></div><div id="rfc.iref.h.6"></div></td><td class="left">pointer to all top-level sections</td></tr><tr><td class="left">contents<div id="rfc.iref.c.4"></div><div id="rfc.iref.h.7"></div></td><td class="left">pointer to table of contents</td></tr><tr><td class="left">copyright<div id="rfc.iref.c.5"></div><div id="rfc.iref.h.8"></div></td><td class="left">pointer to copyright statement</td></tr><tr><td class="left">index<div id="rfc.iref.i.12"></div><div id="rfc.iref.h.9"></div></td><td class="left">pointer to index</td></tr></tbody></table></div><div id="rfc.figure.u.5"><p>The figure below shows how Mozilla Firefox 1.0 displays the Site Navigation Bar for rfc2396.xml.</p><p><img src="rfc2629xslt-fig1.png" alt="&#xA;(LINK elements displayed in Mozilla Firefox for RFC2396.xml)&#xA;" width="509" height="235"></p></div></div><div><h3 id="rfc.section.6.3"><a href="#rfc.section.6.3">6.3</a>&nbsp;Standard HTML metadata</h3><div id="rfc.table.u.6"><p>The following standard HTML META elements are produced:</p><table class="tt full tcenter" cellpadding="3" cellspacing="0"><thead><tr><th>META name</th><th>description</th></tr></thead><tbody><tr><td class="left">generator<div id="rfc.iref.g.2"></div><div id="rfc.iref.h.10"></div></td><td class="left">from XSLT engine version and stylesheet version</td></tr><tr><td class="left">keywords<div id="rfc.iref.k.1"></div><div id="rfc.iref.h.11"></div></td><td class="left">from keyword elements in front section</td></tr></tbody></table></div></div><div id="rfc2731.properties"><h3 id="rfc.section.6.4"><a href="#rfc.section.6.4">6.4</a>&nbsp;<a href="#rfc2731.properties">Dublin Core (RFC2731) metadata</a></h3><div id="rfc.section.6.4.p.1"><p>Unless turned off using the "rfc-ext support-rfc2731" processing instruction, the transformation will generate metadata according to <a href="#RFC2731" id="rfc.xref.RFC2731.1"><cite title="Encoding Dublin Core Metadata in HTML">[RFC2731]</cite></a> and <a href="#DC-HTML" id="rfc.xref.DC-HTML.1"><cite title="Expressing Dublin Core metadata using HTML/XHTML meta and link elements">[DC-HTML]</cite></a>.<a class="self" href="#rfc.section.6.4.p.1">&para;</a></p></div><div id="rfc.table.u.7"><p>The following DCMI properties are produced:</p><table class="tt full tcenter" cellpadding="3" cellspacing="0"><thead><tr><th>META name</th><th>description</th></tr></thead><tbody><tr><td class="left">DC.Creator<div id="rfc.iref.c.6"></div><div id="rfc.iref.d.2"></div></td><td class="left">from author information in front section</td></tr><tr><td class="left">DC.Date.Issued<div id="rfc.iref.d.3"></div><div id="rfc.iref.d.4"></div></td><td class="left">from date information in front section</td></tr><tr><td class="left">DC.Description.Abstract<div id="rfc.iref.d.5"></div><div id="rfc.iref.d.6"></div></td><td class="left">from abstract</td></tr><tr><td class="left">DC.Identifier<div id="rfc.iref.i.13"></div><div id="rfc.iref.d.7"></div></td><td class="left">document URN <a href="#RFC2648" id="rfc.xref.RFC2648.1"><cite title="A URN Namespace for IETF Documents">[RFC2648]</cite></a> from "docName" attribute</td></tr><tr><td class="left">DC.isPartOf<div id="rfc.iref.i.14"></div><div id="rfc.iref.d.8"></div></td><td class="left">RFC ISSN (for RFCs)</td></tr><tr><td class="left">DC.Relation.Replaces<div id="rfc.iref.r.22"></div><div id="rfc.iref.d.9"></div></td><td class="left">from "obsoletes" attribute</td></tr></tbody></table></div></div></div><hr class="noprint"><div id="output.xhtml"><h2 id="rfc.section.7" class="np"><a href="#rfc.section.7">7.</a>&nbsp;<a href="#output.xhtml">Transforming to XHTML</a></h2><div id="rfc.section.7.p.1"><p>Transforming to XHTML requires slightly different XSLT output options and is implemented by the derived transformation script <tt>rfc2629toXHTML.xslt</tt>.<a class="self" href="#rfc.section.7.p.1">&para;</a></p></div><div id="rfc.section.7.p.2"><ul class="empty"><li><b>Note:</b> Microsoft Internet Explorer does <em>not</em> support XHTML. Therefore it usually makes more sense to generate plain old HTML.</li></ul></div></div><hr class="noprint"><div id="output.chm"><h2 id="rfc.section.8" class="np"><a href="#rfc.section.8">8.</a>&nbsp;<a href="#output.chm">Transforming to CHM (Microsoft Compiled Help)</a></h2><div id="rfc.section.8.p.1"><p><span id="rfc.iref.c.7"></span> <span id="rfc.iref.m.5"></span> To generate a CHM file using Microsoft's HTML Help Compiler (hhc), three files are required in addition to the HTML file. <a class="self" href="#rfc.section.8.p.1">&para;</a></p><ol><li>hhc - table of contents file (HTML)</li><li>hhk - index file (HTML)</li><li>hhp - project file (plain text)</li></ol></div><div id="rfc.section.8.p.2"><p>The three files are generated with three specific transformations, each requiring the additional XSLT parameter "basename" to specify the filename prefix.<a class="self" href="#rfc.section.8.p.2">&para;</a></p></div><div id="rfc.figure.u.6"><p>Example:</p><pre class="text">saxon rfc2616.xml rfc2629toHhp.xslt basename=rfc2616  &gt; rfc2616.hhp
     454</pre><p>(note the required quoting of string parameters)<span id="rfc.iref.x.1"></span></p></div><section id="supported.pis"><h3 id="rfc.section.3.1"><a href="#rfc.section.3.1">3.1</a>&nbsp;<a href="#supported.pis">Supported xml2rfc-compatible PIs</a></h3><div id="rfc.table.u.1"><table class="tt full tcenter"><thead><tr><th>PI target</th><th>PI pseudo-attribute</th><th>XSLT parameter name</th><th>default</th><th>comment</th></tr></thead><tbody><tr><td class="left">rfc</td><td class="left">background<div id="rfc.iref.b.1"></div><div id="rfc.iref.p.1"></div></td><td class="left">xml2rfc-background<div id="rfc.iref.x.2"></div> <div id="rfc.iref.p.2"></div></td><td class="left">(not set)</td><td class="left"></td></tr><tr><td class="left">rfc</td><td class="left">compact<div id="rfc.iref.c.1"></div><div id="rfc.iref.p.3"></div></td><td class="left">xml2rfc-compact<div id="rfc.iref.x.3"></div> <div id="rfc.iref.p.4"></div></td><td class="left">"no"</td><td class="left">only applies to HTML output method when printing</td></tr><tr><td class="left">rfc</td><td class="left">comments<div id="rfc.iref.c.2"></div><div id="rfc.iref.p.5"></div></td><td class="left">xml2rfc-comments<div id="rfc.iref.x.4"></div> <div id="rfc.iref.p.6"></div></td><td class="left">(not set)</td><td class="left"></td></tr><tr><td class="left">rfc</td><td class="left">docmapping<div id="rfc.iref.d.1"></div><div id="rfc.iref.p.7"></div></td><td class="left"></td><td class="left">"yes"</td><td class="left">This is the default for rfc2629.xslt anyway, and it can not be changed</td></tr><tr><td class="left">rfc</td><td class="left">editing<div id="rfc.iref.e.1"></div><div id="rfc.iref.p.8"></div></td><td class="left">xml2rfc-editing<div id="rfc.iref.x.5"></div> <div id="rfc.iref.p.9"></div></td><td class="left">"no"</td><td class="left"></td></tr><tr><td class="left">rfc</td><td class="left">footer<div id="rfc.iref.f.1"></div><div id="rfc.iref.p.10"></div></td><td class="left">xml2rfc-footer<div id="rfc.iref.x.6"></div> <div id="rfc.iref.p.11"></div></td><td class="left">(not set)</td><td class="left"></td></tr><tr><td class="left">rfc</td><td class="left">header<div id="rfc.iref.h.1"></div><div id="rfc.iref.p.12"></div></td><td class="left">xml2rfc-header<div id="rfc.iref.x.7"></div> <div id="rfc.iref.p.13"></div></td><td class="left">(not set)</td><td class="left"></td></tr><tr><td class="left">rfc</td><td class="left">include<div id="rfc.iref.i.1"></div><div id="rfc.iref.p.14"></div></td><td class="left">only partly supported, use external entities instead (see <a href="#examples.internalsubset" title="Using the 'Internal Subset'">Appendix&nbsp;C.1</a>) or other tools (<a href="#refreshing.inclusions" title="Refreshing included material in the XML source">Section&nbsp;13.8</a>) instead</td><td class="left">rfc</td><td class="left">inline<div id="rfc.iref.i.2"></div><div id="rfc.iref.p.15"></div></td></tr><tr><td class="left">xml2rfc-inline<div id="rfc.iref.x.8"></div> <div id="rfc.iref.p.16"></div></td><td class="left">(not set)</td><td class="left"></td><td class="left">rfc</td><td class="left">iprnotified<div id="rfc.iref.i.3"></div><div id="rfc.iref.p.17"></div></td></tr><tr><td class="left">xml2rfc-iprnotified<div id="rfc.iref.x.9"></div> <div id="rfc.iref.p.18"></div></td><td class="left">"no"</td><td class="left"></td><td class="left">rfc</td><td class="left">linkmailto<div id="rfc.iref.l.1"></div><div id="rfc.iref.p.19"></div></td></tr><tr><td class="left">xml2rfc-linkmailto<div id="rfc.iref.x.10"></div> <div id="rfc.iref.p.20"></div></td><td class="left">"yes"</td><td class="left"></td><td class="left">rfc</td><td class="left">private<div id="rfc.iref.p.21"></div><div id="rfc.iref.p.22"></div></td></tr><tr><td class="left">xml2rfc-private<div id="rfc.iref.x.11"></div> <div id="rfc.iref.p.23"></div></td><td class="left">(not set)</td><td class="left"></td><td class="left">rfc</td><td class="left">refparent<div id="rfc.iref.r.1"></div><div id="rfc.iref.p.24"></div></td></tr><tr><td class="left">xml2rfc-private<div id="rfc.iref.x.12"></div> <div id="rfc.iref.p.25"></div></td><td class="left">"References"</td><td class="left">Title for References sections when automatically inserted</td><td class="left">rfc</td><td class="left">rfcedstyle<div id="rfc.iref.r.2"></div><div id="rfc.iref.p.26"></div></td></tr><tr><td class="left">xml2rfc-rfcedstyle<div id="rfc.iref.x.13"></div> <div id="rfc.iref.p.27"></div></td><td class="left">(not set)</td><td class="left">(limited support)</td><td class="left">rfc</td><td class="left">sortrefs<div id="rfc.iref.s.1"></div><div id="rfc.iref.p.28"></div></td></tr><tr><td class="left">xml2rfc-sortrefs<div id="rfc.iref.x.14"></div> <div id="rfc.iref.p.29"></div></td><td class="left">"no"</td><td class="left"></td><td class="left">rfc</td><td class="left">symrefs<div id="rfc.iref.s.2"></div><div id="rfc.iref.p.30"></div></td></tr><tr><td class="left">xml2rfc-symrefs<div id="rfc.iref.x.15"></div> <div id="rfc.iref.p.31"></div></td><td class="left">"yes"</td><td class="left">The default has changed from "no" to "yes" as of June 6, 2007 and xml2rfc 1.33pre4.</td><td class="left">rfc</td><td class="left">toc<div id="rfc.iref.t.1"></div><div id="rfc.iref.p.32"></div></td></tr><tr><td class="left">xml2rfc-toc<div id="rfc.iref.x.16"></div> <div id="rfc.iref.p.33"></div></td><td class="left">"no"</td><td class="left"></td><td class="left">rfc</td><td class="left">tocdepth<div id="rfc.iref.t.2"></div><div id="rfc.iref.p.34"></div></td></tr><tr><td class="left">xml2rfc-tocdepth<div id="rfc.iref.x.17"></div> <div id="rfc.iref.p.35"></div></td><td class="left">99</td><td class="left"></td><td class="left">rfc</td><td class="left">topblock<div id="rfc.iref.t.3"></div><div id="rfc.iref.p.36"></div></td></tr><tr><td class="left">xml2rfc-topblock<div id="rfc.iref.x.18"></div> <div id="rfc.iref.p.37"></div></td><td class="left">"yes"</td><td class="left"></td></tr></tbody></table></div></section><section id="unsupported.pis"><h3 id="rfc.section.3.2"><a href="#rfc.section.3.2">3.2</a>&nbsp;<a href="#unsupported.pis">Unsupported xml2rfc-compatible PIs</a></h3><div id="rfc.table.u.2"><table class="tt full tcenter"><thead><tr><th>PI target</th><th>PI pseudo-attribute</th><th>comment</th></tr></thead><tbody><tr><td class="left">rfc</td><td class="left">needLines<div id="rfc.iref.n.1"></div><div id="rfc.iref.p.38"></div></td><td class="left"></td></tr><tr><td class="left">rfc</td><td class="left">slides<div id="rfc.iref.s.3"></div><div id="rfc.iref.p.39"></div></td><td class="left"></td></tr><tr><td class="left">rfc</td><td class="left">strict<div id="rfc.iref.s.4"></div><div id="rfc.iref.p.40"></div></td><td class="left"></td></tr><tr><td class="left">rfc</td><td class="left">subcompact<div id="rfc.iref.s.5"></div><div id="rfc.iref.p.41"></div></td><td class="left"></td></tr><tr><td class="left">rfc</td><td class="left">tocindent<div id="rfc.iref.t.4"></div><div id="rfc.iref.p.42"></div></td><td class="left">(defaults to "yes")</td></tr><tr><td class="left">rfc</td><td class="left">tocompact<div id="rfc.iref.t.5"></div><div id="rfc.iref.p.43"></div></td><td class="left"></td></tr></tbody></table></div></section><section id="extension.pis"><h3 id="rfc.section.3.3"><a href="#rfc.section.3.3">3.3</a>&nbsp;<a href="#extension.pis">Extension PIs</a></h3><div id="rfc.table.u.3"><table class="tt full tcenter"><thead><tr><th>PI target</th><th>PI pseudo-attribute</th><th>XSLT parameter name</th><th>default</th><th>description</th></tr></thead><tbody><tr><td class="left">rfc-ext</td><td class="left">allow-markup-in-artwork<div id="rfc.iref.a.1"></div><div id="rfc.iref.p.44"></div></td><td class="left">xml2rfc-allow-markup-in-artwork<div id="rfc.iref.x.19"></div> <div id="rfc.iref.p.45"></div></td><td class="left">"no"</td><td class="left">Enables support for specific elements inside abstract elements (using this extension makes the document incompatible to the RFC2629bis DTD; see description of conversion XSLT in <a href="#clean-for-dtd" title="Down-converting to RFC2629bis DTD">Section&nbsp;13.4</a>).</td></tr><tr><td class="left">rfc-ext</td><td class="left">authors-section<div id="rfc.iref.a.2"></div><div id="rfc.iref.p.46"></div></td><td class="left">xml2rfc-ext-authors-section<div id="rfc.iref.x.20"></div> <div id="rfc.iref.p.47"></div></td><td class="left">"end"</td><td class="left">When "before-appendices", place the authors section between references and appendices (this ordering was used a long time ago).</td></tr><tr><td class="left">rfc-ext</td><td class="left">duplex<div id="rfc.iref.d.2"></div><div id="rfc.iref.p.48"></div></td><td class="left">xml2rfc-ext-duplex<div id="rfc.iref.x.21"></div> <div id="rfc.iref.p.49"></div></td><td class="left">"no"</td><td class="left">When set to "yes", format the PDF output for doublesided printing.</td></tr><tr><td class="left">rfc-ext</td><td class="left">html-pretty-print<div id="rfc.iref.h.2"></div><div id="rfc.iref.p.50"></div></td><td class="left">xml2rfc-ext-html-pretty-print<div id="rfc.iref.x.22"></div> <div id="rfc.iref.p.51"></div></td><td class="left"></td><td class="left">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"</td></tr><tr><td class="left">rfc-ext</td><td class="left">include-index<div id="rfc.iref.i.4"></div><div id="rfc.iref.p.52"></div></td><td class="left">xml2rfc-ext-include-index<div id="rfc.iref.x.23"></div> <div id="rfc.iref.p.53"></div></td><td class="left">"yes"</td><td class="left">When set to "no", no index will be generated.</td></tr><tr><td class="left">rfc-ext</td><td class="left">include-references-in-index<div id="rfc.iref.i.5"></div><div id="rfc.iref.p.54"></div></td><td class="left">xml2rfc-ext-include-references-in-index<div id="rfc.iref.x.24"></div> <div id="rfc.iref.p.55"></div></td><td class="left">"no"</td><td class="left">When set to "yes", index entries are generated for all references.</td></tr><tr><td class="left">rfc-ext</td><td class="left">insert-metadata<div id="rfc.iref.i.6"></div><div id="rfc.iref.p.56"></div></td><td class="left">xml2rfc-ext-insert-metadata<div id="rfc.iref.x.25"></div> <div id="rfc.iref.p.57"></div></td><td class="left">"yes"</td><td class="left">When set to "yes", include JS code that fetches current RFC metadata and inserts it into the front page (standards track, obsoletion, updates, errata).</td></tr><tr><td class="left">rfc-ext</td><td class="left">justification<div id="rfc.iref.j.1"></div><div id="rfc.iref.p.58"></div></td><td class="left">xml2rfc-ext-justification<div id="rfc.iref.x.26"></div> <div id="rfc.iref.p.59"></div></td><td class="left">"never"</td><td class="left">"never": never emit justified text, "always": always emit justified text, "print": only emit justified text for print media.</td></tr><tr><td class="left">rfc-ext</td><td class="left">parse-xml-in-artwork<div id="rfc.iref.p.60"></div><div id="rfc.iref.p.61"></div></td><td class="left">xml2rfc-parse-xml-in-artwork<div id="rfc.iref.x.27"></div> <div id="rfc.iref.p.62"></div></td><td class="left">"no"</td><td class="left">May be used to enable parsing of XML content in figures (MSXML only).</td></tr><tr><td class="left">rfc-ext</td><td class="left">sec-no-trailing-dots<div id="rfc.iref.s.6"></div><div id="rfc.iref.p.63"></div></td><td class="left">xml2rfc-ext-sec-no-trailing-dots<div id="rfc.iref.x.28"></div> <div id="rfc.iref.p.64"></div></td><td class="left"></td><td class="left">When set to "yes", add trailing dots to section numbers. This seems to be the preferred format in the newest RFCs.</td></tr><tr><td class="left">rfc-ext</td><td class="left">support-rfc2731<div id="rfc.iref.s.7"></div><div id="rfc.iref.p.65"></div></td><td class="left">xml2rfc-ext-support-rfc2731<div id="rfc.iref.x.29"></div> <div id="rfc.iref.p.66"></div></td><td class="left">"yes"</td><td class="left">Decides whether the HTML transformation should generate META tags according <a href="#rfc2731.properties" title="Dublin Core (RFC2731) metadata">Section&nbsp;6.4</a>.</td></tr></tbody></table></div></section></section><hr class="noprint"><section id="anchors"><h2 id="rfc.section.4" class="np"><a href="#rfc.section.4">4.</a>&nbsp;<a href="#anchors">Anchors</a></h2><div id="rfc.section.4.p.1"><p>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).<a class="self" href="#rfc.section.4.p.1">&para;</a></p></div><div id="rfc.table.u.4"><p>The following anchors get auto-generated:</p><table class="tt full tcenter"><thead><tr><th>Anchor name</th><th>Description</th></tr></thead><tbody><tr><td class="left">rfc.abstract <div id="rfc.iref.r.3"></div><div id="rfc.iref.a.3"></div></td><td class="left">Abstract</td></tr><tr><td class="left">rfc.authors <div id="rfc.iref.r.4"></div><div id="rfc.iref.a.4"></div></td><td class="left">Authors section</td></tr><tr><td class="left">rfc.copyright <div id="rfc.iref.r.5"></div><div id="rfc.iref.a.5"></div></td><td class="left">Copyright section</td></tr><tr><td class="left">rfc.copyrightnotice <div id="rfc.iref.r.6"></div><div id="rfc.iref.a.6"></div></td><td class="left">Copyright notice</td></tr><tr><td class="left">rfc.figure.<em>n</em> <div id="rfc.iref.r.7"></div><div id="rfc.iref.a.7"></div></td><td class="left">Figures (titled)</td></tr><tr><td class="left">rfc.figure.u.<em>n</em> <div id="rfc.iref.r.8"></div><div id="rfc.iref.a.8"></div></td><td class="left">Figures (untitled)</td></tr><tr><td class="left">rfc.index <div id="rfc.iref.r.9"></div><div id="rfc.iref.a.9"></div></td><td class="left">Index</td></tr><tr><td class="left">rfc.ipr <div id="rfc.iref.r.10"></div><div id="rfc.iref.a.10"></div></td><td class="left">Intellectual Property</td></tr><tr><td class="left">rfc.iref.<em>n</em> <div id="rfc.iref.r.11"></div><div id="rfc.iref.a.11"></div></td><td class="left">Internal references</td></tr><tr><td class="left">rfc.note.<em>n</em> <div id="rfc.iref.r.12"></div><div id="rfc.iref.a.12"></div></td><td class="left">Notes (from front section)</td></tr><tr><td class="left">rfc.references <div id="rfc.iref.r.13"></div><div id="rfc.iref.a.13"></div></td><td class="left">References</td></tr><tr><td class="left">rfc.references.<em>n</em> <div id="rfc.iref.r.14"></div><div id="rfc.iref.a.14"></div></td><td class="left">Additional references</td></tr><tr><td class="left">rfc.section.<em>n</em> <div id="rfc.iref.r.15"></div><div id="rfc.iref.a.15"></div></td><td class="left">Section <em>n</em></td></tr><tr><td class="left">rfc.section.<em>n</em>.p.<em>m</em> <div id="rfc.iref.r.16"></div><div id="rfc.iref.a.16"></div></td><td class="left">Section <em>n</em>, paragraph <em>m</em></td></tr><tr><td class="left">rfc.status <div id="rfc.iref.r.17"></div><div id="rfc.iref.a.17"></div></td><td class="left">Status of memo</td></tr><tr><td class="left">rfc.table.<em>n</em> <div id="rfc.iref.r.18"></div><div id="rfc.iref.a.18"></div></td><td class="left">Tables (titled)</td></tr><tr><td class="left">rfc.table.u.<em>n</em> <div id="rfc.iref.r.19"></div><div id="rfc.iref.a.19"></div></td><td class="left">Tables (untitled)</td></tr><tr><td class="left">rfc.toc <div id="rfc.iref.r.20"></div><div id="rfc.iref.a.20"></div></td><td class="left">Table of contents</td></tr><tr><td class="left">rfc.xref.<em>name</em>.<em>n</em> <div id="rfc.iref.r.21"></div><div id="rfc.iref.a.21"></div></td><td class="left">References to reference <em>n</em> to <em>name</em></td></tr></tbody></table></div></section><hr class="noprint"><section id="xslt.engines"><h2 id="rfc.section.5" class="np"><a href="#rfc.section.5">5.</a>&nbsp;<a href="#xslt.engines">Supported XSLT engines</a></h2><div id="rfc.section.5.p.1"><p>The transformation requires a non-standard extension function (see <a href="http://www.exslt.org/exsl/functions/node-set/index.html">exsl:node-set</a>) 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.<a class="self" href="#rfc.section.5.p.1">&para;</a></p></div><div id="exsl-date-time"><div id="rfc.section.5.p.2"><p>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 <a href="http://www.exslt.org/date/functions/date-time/">exsl:date-time</a> extension function.<a class="self" href="#rfc.section.5.p.2">&para;</a></p></div></div><section><h3 id="rfc.section.5.1"><a href="#rfc.section.5.1">5.1</a>&nbsp;Standalone Engines</h3><div id="rfc.section.5.1.p.1"><p>The following XSLT engines are believed to work well: <a class="self" href="#rfc.section.5.1.p.1">&para;</a></p><ul><li>Windows: <span id="rfc.iref.m.1"></span><span id="rfc.iref.m.2"></span>MSXML3 and MSXML4 (&lt;<a href="http://msdn.microsoft.com/xml">http://msdn.microsoft.com/xml</a>&gt;; command line processor "msxsl" is available from <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=2FB55371-C94E-4373-B0E9-DB4816552E41">Microsoft Download Center</a>)</li><li>Java: <span id="rfc.iref.s.8"></span>Saxon (&lt;<a href="http://saxon.sourceforge.net/">http://saxon.sourceforge.net/</a>&gt;)</li><li>Java: <span id="rfc.iref.x.30"></span>Xalan (&lt;<a href="http://xml.apache.org/xalan-j/">http://xml.apache.org/xalan-j/</a>&gt;)</li><li>C/C++: <span id="rfc.iref.x.31"></span>xsltproc (libxslt) (&lt;<a href="http://xmlsoft.org/XSLT/">http://xmlsoft.org/XSLT/</a>&gt;, make sure that you have a current version)</li></ul></div></section><section id="xslt.engines.browser"><h3 id="rfc.section.5.2"><a href="#rfc.section.5.2">5.2</a>&nbsp;<a href="#xslt.engines.browser">In-Browser Engines</a></h3><div id="rfc.section.5.2.p.1"><p>The following browsers seem to work fine: <a class="self" href="#rfc.section.5.2.p.1">&para;</a></p><ul><li><p><span id="rfc.iref.i.7"></span>Internet Explorer 5.5 (Windows version, if MSXML3 is installed)</p></li><li><p><span id="rfc.iref.i.8"></span><span id="rfc.iref.i.9"></span><span id="rfc.iref.i.10"></span><span id="rfc.iref.i.11"></span>Internet Explorer 6 and newer</p></li><li><div id="firefox3"><p><span id="rfc.iref.m.3"></span><span id="rfc.iref.f.2"></span>Firefox 3.0 and newer</p></div><ul><li>Be aware that XSLT execution can be suppressed using <span id="rfc.iref.n.2"></span><a href="https://addons.mozilla.org/de/firefox/addon/722">NoScript</a></li><li>Firefox does not load external DTDs nor external entities, see <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=22942">Mozilla Bug 22942</a>, thus entities like &amp;nbsp; need to be declared in the internal subset (<a href="#examples.internalsubset" title="Using the 'Internal Subset'">Appendix&nbsp;C.1</a>)</li><li>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 &lt;<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=640390">https://bugzilla.mozilla.org/show_bug.cgi?id=640390</a>&gt;.</li><li>Date computation is available in Firefox starting with Firefox 6 (see &lt;<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=603159">https://bugzilla.mozilla.org/show_bug.cgi?id=603159</a>&gt;)</li></ul></li><li><p><span id="rfc.iref.s.9"></span><span id="rfc.iref.s.10"></span>Safari 3 (starting with version 3.0.4)</p><ul><li>Date computation not available (see &lt;<a href="https://bugs.webkit.org/show_bug.cgi?id=4079">https://bugs.webkit.org/show_bug.cgi?id=4079</a>&gt;)</li></ul></li><li><p><span id="rfc.iref.g.1"></span>Google Chrome</p><ul><li>Date computation not available (see &lt;<a href="https://bugs.webkit.org/show_bug.cgi?id=4079">https://bugs.webkit.org/show_bug.cgi?id=4079</a>&gt;)</li></ul></li><li><p><span id="rfc.iref.o.1"></span>Opera (starting with version 10)</p><ul><li>Date computation not available</li></ul></li></ul></div><div id="rfc.section.5.2.p.2"><p>The following browsers are known not to work properly: <a class="self" href="#rfc.section.5.2.p.2">&para;</a></p><ul><li><div id="firefox12"><p><span id="rfc.iref.m.4"></span><span id="rfc.iref.f.3"></span>Firefox 1.*/2.*: (missing extension function - see change request at Mozilla BugZilla <a href="http://bugzilla.mozilla.org/show_bug.cgi?id=193678">193678</a>)</p></div></li><li><div id="opera"><p><span id="rfc.iref.o.2"></span>Opera 9.21: execution fails, potentially to a somewhat complex XPath expression (reported to Opera as bug 245725).</p></div></li><li><p>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).</p></li><li><div id="safari"><p><span id="rfc.iref.s.11"></span>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 &lt;<a href="http://drakken.dbc.mtview.ca.us/pipermail/xml2rfc/2005-May/002073.html">http://drakken.dbc.mtview.ca.us/pipermail/xml2rfc/2005-May/002073.html</a>&gt; and &lt;<a href="http://bugs.webkit.org/show_bug.cgi?id=4079">http://bugs.webkit.org/show_bug.cgi?id=4079</a>&gt;.</p></div></li></ul></div></section></section><hr class="noprint"><section id="output.html"><h2 id="rfc.section.6" class="np"><a href="#rfc.section.6">6.</a>&nbsp;<a href="#output.html">Transforming to HTML</a></h2><div id="rfc.section.6.p.1" class="avoidbreakafter"><p>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:<a class="self" href="#rfc.section.6.p.1">&para;</a></p></div><div id="rfc.iref.x.32"></div><div id="rfc.figure.u.4"><pre class="text prettyprint">  &lt;?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?&gt;
     455</pre></div><div id="rfc.section.6.p.2"><p>(and ensure that <span class="tt">rfc2629.xslt</span> is present).<a class="self" href="#rfc.section.6.p.2">&para;</a></p></div><section><h3 id="rfc.section.6.1"><a href="#rfc.section.6.1">6.1</a>&nbsp;HTML compliance</h3><div id="rfc.section.6.1.p.1"><p>The transformation result is supposed to conform to HTML5 <a href="#HTML5" id="rfc.xref.HTML5.1"><cite title="HTML5">[HTML5]</cite></a>. This can be checked using the W3C's online validator at &lt;<a href="http://validator.w3.org">http://validator.w3.org</a>&gt;<span id="rfc.iref.h.3"></span>.<a class="self" href="#rfc.section.6.1.p.1">&para;</a></p></div><div id="rfc.section.6.1.p.2"><p>XSLT 1.0 is not capable to directly emit the HTML doctype declaration, thus uses the SYSTEM ID "about:legacy-compat" instead (see <a href="http://www.w3.org/TR/2014/REC-html5-20141028/syntax.html#the-doctype">Section 8.1.1</a> of <a href="#HTML5" id="rfc.xref.HTML5.2"><cite title="HTML5">[HTML5]</cite></a>).<a class="self" href="#rfc.section.6.1.p.2">&para;</a></p></div><div id="rfc.section.6.1.p.3" class="avoidbreakafter"><p>When not run in a browser, the doctype declaration can be adjusted using a small script, such as with:<a class="self" href="#rfc.section.6.1.p.3">&para;</a></p></div><div id="rfc.figure.u.5"><pre class="text">saxon test.xml rfc2629.xslt | awk -f html5doctype.awk
     456</pre></div><div id="rfc.section.6.1.p.4"><p>with<a class="self" href="#rfc.section.6.1.p.4">&para;</a></p></div><div id="rfc.figure.u.6"><pre class="text prettyprint">
     457#!/usr/bin/awk -f
     458
     459# waitfordoctype:
     460# 0: wait for line starting with DOCTYPE and eat empty lines
     461# 1: wait for line starting with &lt;html
     462# 2: afterwards
     463
     464BEGIN {
     465  waitfordoctype = 0;
     466}
     467
     468/&lt;!DOCTYPE .*/ {
     469  if (waitfordoctype == 0) {
     470    waitfordoctype = 1
     471  }
     472}
     473
     474/&lt;html.*/ {
     475  if (waitfordoctype == 1) {
     476    waitfordoctype = 2
     477    printf("&lt;!DOCTYPE html&gt;\n")
     478  }
     479  else {
     480    print
     481  }
     482}
     483
     484{
     485  if (waitfordoctype == 0 &amp;&amp; $0 != "") {
     486    print
     487  }
     488  else if (waitfordoctype == 2) {
     489    print
     490  }
     491}
     492
     493</pre></div></section><section id="html.link"><h3 id="rfc.section.6.2"><a href="#rfc.section.6.2">6.2</a>&nbsp;<a href="#html.link">Standard HTML LINK elements</a></h3><div id="rfc.section.6.2.p.1"><p>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 <a href="https://addons.mozilla.org/firefox/2933/">Link Widgets</a> extension.<a class="self" href="#rfc.section.6.2.p.1">&para;</a></p></div><div id="rfc.table.u.5"><p>The following LINK elements are produced:</p><table class="tt full tcenter"><thead><tr><th>LINK type</th><th>description</th></tr></thead><tbody><tr><td class="left">alternate<div id="rfc.iref.a.22"></div><div id="rfc.iref.h.4"></div></td><td class="left">for RFCs, a link to the authorative ASCII version on the IETF web site</td></tr><tr><td class="left">appendic<div id="rfc.iref.a.23"></div><div id="rfc.iref.h.5"></div></td><td class="left">pointer to all top-level appendics</td></tr><tr><td class="left">author<div id="rfc.iref.a.24"></div><div id="rfc.iref.h.6"></div></td><td class="left">pointer to "authors" section</td></tr><tr><td class="left">chapter<div id="rfc.iref.c.3"></div><div id="rfc.iref.h.7"></div></td><td class="left">pointer to all top-level sections</td></tr><tr><td class="left">contents<div id="rfc.iref.c.4"></div><div id="rfc.iref.h.8"></div></td><td class="left">pointer to table of contents</td></tr><tr><td class="left">copyright<div id="rfc.iref.c.5"></div><div id="rfc.iref.h.9"></div></td><td class="left">pointer to copyright statement</td></tr><tr><td class="left">index<div id="rfc.iref.i.12"></div><div id="rfc.iref.h.10"></div></td><td class="left">pointer to index</td></tr></tbody></table></div><div id="rfc.figure.u.7"><p>The figure below shows how Mozilla Firefox 1.0 displays the Site Navigation Bar for rfc2396.xml.</p><p><img src="rfc2629xslt-fig1.png" alt="&#xA;(LINK elements displayed in Mozilla Firefox for RFC2396.xml)&#xA;" width="509" height="235"></p></div></section><section><h3 id="rfc.section.6.3"><a href="#rfc.section.6.3">6.3</a>&nbsp;Standard HTML metadata</h3><div id="rfc.table.u.6"><p>The following standard HTML META elements are produced:</p><table class="tt full tcenter"><thead><tr><th>META name</th><th>description</th></tr></thead><tbody><tr><td class="left">generator<div id="rfc.iref.g.2"></div><div id="rfc.iref.h.11"></div></td><td class="left">from XSLT engine version and stylesheet version</td></tr><tr><td class="left">keywords<div id="rfc.iref.k.1"></div><div id="rfc.iref.h.12"></div></td><td class="left">from keyword elements in front section</td></tr></tbody></table></div></section><section id="rfc2731.properties"><h3 id="rfc.section.6.4"><a href="#rfc.section.6.4">6.4</a>&nbsp;<a href="#rfc2731.properties">Dublin Core (RFC2731) metadata</a></h3><div id="rfc.section.6.4.p.1"><p>Unless turned off using the "rfc-ext support-rfc2731" processing instruction, the transformation will generate metadata according to <a href="#RFC2731" id="rfc.xref.RFC2731.1"><cite title="Encoding Dublin Core Metadata in HTML">[RFC2731]</cite></a> and <a href="#DC-HTML" id="rfc.xref.DC-HTML.1"><cite title="Expressing Dublin Core metadata using HTML/XHTML meta and link elements">[DC-HTML]</cite></a>.<a class="self" href="#rfc.section.6.4.p.1">&para;</a></p></div><div id="rfc.table.u.7"><p>The following DCMI properties are produced:</p><table class="tt full tcenter"><thead><tr><th>META name</th><th>description</th></tr></thead><tbody><tr><td class="left">DC.Creator<div id="rfc.iref.c.6"></div><div id="rfc.iref.d.3"></div></td><td class="left">from author information in front section</td></tr><tr><td class="left">DC.Date.Issued<div id="rfc.iref.d.4"></div><div id="rfc.iref.d.5"></div></td><td class="left">from date information in front section</td></tr><tr><td class="left">DC.Description.Abstract<div id="rfc.iref.d.6"></div><div id="rfc.iref.d.7"></div></td><td class="left">from abstract</td></tr><tr><td class="left">DC.Identifier<div id="rfc.iref.i.13"></div><div id="rfc.iref.d.8"></div></td><td class="left">document URN <a href="#RFC2648" id="rfc.xref.RFC2648.1"><cite title="A URN Namespace for IETF Documents">[RFC2648]</cite></a> from "docName" attribute</td></tr><tr><td class="left">DC.isPartOf<div id="rfc.iref.i.14"></div><div id="rfc.iref.d.9"></div></td><td class="left">RFC ISSN (for RFCs)</td></tr><tr><td class="left">DC.Relation.Replaces<div id="rfc.iref.r.22"></div><div id="rfc.iref.d.10"></div></td><td class="left">from "obsoletes" attribute</td></tr></tbody></table></div></section></section><hr class="noprint"><section id="output.xhtml"><h2 id="rfc.section.7" class="np"><a href="#rfc.section.7">7.</a>&nbsp;<a href="#output.xhtml">Transforming to XHTML</a></h2><div id="rfc.section.7.p.1"><p>Transforming to XHTML requires slightly different XSLT output options and is implemented by the derived transformation script <span class="tt">rfc2629toXHTML.xslt</span>.<a class="self" href="#rfc.section.7.p.1">&para;</a></p></div><div id="rfc.section.7.p.2"><ul class="empty"><li><b>Note:</b> Microsoft Internet Explorer does <em>not</em> support XHTML. Therefore it usually makes more sense to generate plain old HTML.</li></ul></div></section><hr class="noprint"><section id="output.chm"><h2 id="rfc.section.8" class="np"><a href="#rfc.section.8">8.</a>&nbsp;<a href="#output.chm">Transforming to CHM (Microsoft Compiled Help)</a></h2><div id="rfc.section.8.p.1"><p><span id="rfc.iref.c.7"></span> <span id="rfc.iref.m.5"></span> To generate a CHM file using Microsoft's HTML Help Compiler (hhc), three files are required in addition to the HTML file. <a class="self" href="#rfc.section.8.p.1">&para;</a></p><ol><li>hhc - table of contents file (HTML)</li><li>hhk - index file (HTML)</li><li>hhp - project file (plain text)</li></ol></div><div id="rfc.section.8.p.2"><p>The three files are generated with three specific transformations, each requiring the additional XSLT parameter "basename" to specify the filename prefix.<a class="self" href="#rfc.section.8.p.2">&para;</a></p></div><div id="rfc.figure.u.8"><p>Example:</p><pre class="text">saxon rfc2616.xml rfc2629toHhp.xslt basename=rfc2616  &gt; rfc2616.hhp
    441494saxon rfc2616.xml rfc2629toHhc.xslt basename=rfc2616  &gt; rfc2616.hhc
    442495saxon rfc2616.xml rfc2629toHhk.xslt basename=rfc2616  &gt; rfc2616.hhk
    443496hhc rfc2616.hhp
    444 </pre></div></div><hr class="noprint"><div id="output.pdf"><h2 id="rfc.section.9" class="np"><a href="#rfc.section.9">9.</a>&nbsp;<a href="#output.pdf">Transforming to PDF</a></h2><div id="output.pdf.fop"><h3 id="rfc.section.9.1"><a href="#rfc.section.9.1">9.1</a>&nbsp;<a href="#output.pdf.fop">Via XSL-FO</a></h3><div id="rfc.section.9.1.p.1"><p>Transformation to XSL-FO <a href="#XSL-FO" id="rfc.xref.XSL-FO.1"><cite title="Extensible Stylesheet Language (XSL) Version 1.1">[XSL-FO]</cite></a> format is available through <tt>rfc2629toFO.xslt</tt> (which includes <tt>rfc2629.xslt</tt>, so keep both in the same folder).<a class="self" href="#rfc.section.9.1.p.1">&para;</a></p></div><div id="rfc.section.9.1.p.2"><p>Compared to HTML user agents, XSL-FO engines unfortunately either come as open source (for instance, <span id="rfc.iref.a.25"></span>Apache FOP) or feature-complete (for instance, <span id="rfc.iref.a.26"></span> AntennaHouse XSL Formatter), but not both at the same time.<a class="self" href="#rfc.section.9.1.p.2">&para;</a></p></div><div id="rfc.section.9.1.p.3"><p>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 <a href="#XSL-FO" id="rfc.xref.XSL-FO.2"><cite title="Extensible Stylesheet Language (XSL) Version 1.1">[XSL-FO]</cite></a>. Specific backends (<tt>xsl11toFop.xslt</tt>, <tt>xsl11toXep.xslt</tt>, <tt>xsl11toAn.xslt</tt>) then provide post-processing for the individual processors.<a class="self" href="#rfc.section.9.1.p.3">&para;</a></p></div><div class="note"><div id="rfc.section.9.1.p.4"><p><b>Note:</b> the output is currently targeted at Apache FOP 1.1.<a class="self" href="#rfc.section.9.1.p.4">&para;</a></p></div></div><div><h4 id="rfc.section.9.1.1"><a href="#rfc.section.9.1.1">9.1.1</a>&nbsp;Example: producing output for Apache FOP</h4><div id="rfc.figure.u.7"><p>Example:</p><pre class="text">saxon rfc2616.xml rfc2629toFo.xslt &gt; tmp.fo
     497</pre></div></section><hr class="noprint"><section id="output.pdf"><h2 id="rfc.section.9" class="np"><a href="#rfc.section.9">9.</a>&nbsp;<a href="#output.pdf">Transforming to PDF</a></h2><section id="output.pdf.fop"><h3 id="rfc.section.9.1"><a href="#rfc.section.9.1">9.1</a>&nbsp;<a href="#output.pdf.fop">Via XSL-FO</a></h3><div id="rfc.section.9.1.p.1"><p>Transformation to XSL-FO <a href="#XSL-FO" id="rfc.xref.XSL-FO.1"><cite title="Extensible Stylesheet Language (XSL) Version 1.1">[XSL-FO]</cite></a> format is available through <span class="tt">rfc2629toFO.xslt</span> (which includes <span class="tt">rfc2629.xslt</span>, so keep both in the same folder).<a class="self" href="#rfc.section.9.1.p.1">&para;</a></p></div><div id="rfc.section.9.1.p.2"><p>Compared to HTML user agents, XSL-FO engines unfortunately either come as open source (for instance, <span id="rfc.iref.a.25"></span>Apache FOP) or feature-complete (for instance, <span id="rfc.iref.a.26"></span> AntennaHouse XSL Formatter), but not both at the same time.<a class="self" href="#rfc.section.9.1.p.2">&para;</a></p></div><div id="rfc.section.9.1.p.3"><p>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 <a href="#XSL-FO" id="rfc.xref.XSL-FO.2"><cite title="Extensible Stylesheet Language (XSL) Version 1.1">[XSL-FO]</cite></a>. Specific backends (<span class="tt">xsl11toFop.xslt</span>, <span class="tt">xsl11toXep.xslt</span>, <span class="tt">xsl11toAn.xslt</span>) then provide post-processing for the individual processors.<a class="self" href="#rfc.section.9.1.p.3">&para;</a></p></div><aside><div id="rfc.section.9.1.p.4"><p><b>Note:</b> the output is currently targeted at Apache FOP 1.1.<a class="self" href="#rfc.section.9.1.p.4">&para;</a></p></div></aside><section><h4 id="rfc.section.9.1.1"><a href="#rfc.section.9.1.1">9.1.1</a>&nbsp;Example: producing output for Apache FOP</h4><div id="rfc.figure.u.9"><p>Example:</p><pre class="text">saxon rfc2616.xml rfc2629toFo.xslt &gt; tmp.fo
    445498saxon tmp.fo xsl11toFop.xslt &gt; rfc2629.fo
    446 </pre></div></div></div><div id="output.pdf.html"><h3 id="rfc.section.9.2"><a href="#rfc.section.9.2">9.2</a>&nbsp;<a href="#output.pdf.html">Via X(HTML)</a></h3><div id="rfc.section.9.2.p.1"><p>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.<a class="self" href="#rfc.section.9.2.p.1">&para;</a></p></div><div id="rfc.section.9.2.p.2"><p>An alternative is PrinceXML (see &lt;<a href="http://www.princexml.com/">http://www.princexml.com/</a>&gt;), which can produce PDF directly from (X)HTML input, based on the CSS printing information.<a class="self" href="#rfc.section.9.2.p.2">&para;</a></p></div><div id="rfc.figure.u.8"><p>For instance, PDF output with text justification turned on can be produced with:</p><pre class="text">saxon input.xml rfc2629toXHTML.xslt xml2rfc-ext-justification=print \
    447   &gt; output.xhtml
    448 prince output.xhtml output.pdf</pre></div></div></div><hr class="noprint"><div id="output.epub"><h2 id="rfc.section.10" class="np"><a href="#rfc.section.10">10.</a>&nbsp;<a href="#output.epub">Transforming to ePub</a></h2><div id="rfc.section.10.p.1"><p>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).<a class="self" href="#rfc.section.10.p.1">&para;</a></p></div><div id="rfc.figure.u.9"><p>For instance, an epub version of rfc2616.xml can be generated like this:</p><pre class="text">mkepub.sh rfc2616.xml
    449 </pre></div></div><hr class="noprint"><div id="extensions"><h2 id="rfc.section.11" class="np"><a href="#rfc.section.11">11.</a>&nbsp;<a href="#extensions">Generic Extensions</a></h2><div id="rfc.section.11.p.1"><p>This section documents extensions implemented in <tt>rfc2629.xslt</tt>, using the extension namespace "http://purl.org/net/xml2rfc/ext".<a class="self" href="#rfc.section.11.p.1">&para;</a></p></div><div id="ext.element.abnf-char-sequence"><h3 id="rfc.section.11.1"><a href="#rfc.section.11.1">11.1</a>&nbsp;<a href="#ext.element.abnf-char-sequence">&lt;abnf-char-sequence&gt; element</a></h3><div id="rfc.section.11.1.p.1"><p>Converts the contained quoted string into a hex-encoded character sequence, for use in case-sensitive ABNF productions.<a class="self" href="#rfc.section.11.1.p.1">&para;</a></p></div><div id="rfc.section.11.1.p.2"><p>For instance, "&lt;x:abnf-char-sequence&gt;"HTTP"&lt;/x:abnf-char-sequence&gt;" gets converted to "%x48.54.54.50".<a class="self" href="#rfc.section.11.1.p.2">&para;</a></p></div></div><div id="ext.element.anchor-alias"><h3 id="rfc.section.11.2"><a href="#rfc.section.11.2">11.2</a>&nbsp;<a href="#ext.element.anchor-alias">&lt;anchor-alias&gt; element</a></h3><div id="rfc.section.11.2.p.1"><p>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;<a href="#ext.element.ref" class="smpl">ref</a>&gt; element for intra-document references.<a class="self" href="#rfc.section.11.2.p.1">&para;</a></p></div><div id="rfc.section.11.2.p.2"><p>Note that the anchor alias is not subject to the naming constraints that apply to anchor elements (which are <a href="http://www.w3.org/TR/REC-xml/#NT-Name">XML names</a>).<a class="self" href="#rfc.section.11.2.p.2">&para;</a></p></div></div><div id="ext.element.bcp14"><h3 id="rfc.section.11.3"><a href="#rfc.section.11.3">11.3</a>&nbsp;<a href="#ext.element.bcp14">&lt;bcp14&gt; element</a></h3><div id="rfc.section.11.3.p.1"><p>This element marks the content as being one of the normative keywords defined in <a href="#RFC2119" id="rfc.xref.RFC2119.1"><cite title="Key words for use in RFCs to Indicate Requirement Levels">[RFC2119]</cite></a>.<a class="self" href="#rfc.section.11.3.p.1">&para;</a></p></div><div id="rfc.figure.u.10"><p>The DOCTYPE definition below allows using these keywords using XML entity expansion: such as in "...server &amp;MUST; accept...".</p><pre class="text">&lt;!DOCTYPE rfc [
     499</pre></div></section></section><section id="output.pdf.html"><h3 id="rfc.section.9.2"><a href="#rfc.section.9.2">9.2</a>&nbsp;<a href="#output.pdf.html">Via HTML</a></h3><div id="rfc.section.9.2.p.1"><p>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.<a class="self" href="#rfc.section.9.2.p.1">&para;</a></p></div><div id="rfc.section.9.2.p.2"><p>An alternative is PrinceXML (see &lt;<a href="http://www.princexml.com/">http://www.princexml.com/</a>&gt;), which can produce PDF directly from (X)HTML input, based on the CSS printing information.<a class="self" href="#rfc.section.9.2.p.2">&para;</a></p></div><div id="rfc.figure.u.10"><p>For instance, PDF output with text justification turned on can be produced with:</p><pre class="text">saxon input.xml rfc2629.xslt &gt; output.html
     500prince output.html output.pdf</pre></div></section></section><hr class="noprint"><section id="output.epub"><h2 id="rfc.section.10" class="np"><a href="#rfc.section.10">10.</a>&nbsp;<a href="#output.epub">Transforming to ePub</a></h2><div id="rfc.section.10.p.1"><p>Experimental transformation to ePub format is available through a set of stylesheets, and the Unix Shell script <span class="tt">mkepub.sh</span> (which requires that "zip" and either "saxon" or "xsltproc" are installed).<a class="self" href="#rfc.section.10.p.1">&para;</a></p></div><div id="rfc.figure.u.11"><p>For instance, an epub version of rfc2616.xml can be generated like this:</p><pre class="text">mkepub.sh rfc2616.xml
     501</pre></div></section><hr class="noprint"><section id="extensions"><h2 id="rfc.section.11" class="np"><a href="#rfc.section.11">11.</a>&nbsp;<a href="#extensions">Generic Extensions</a></h2><div id="rfc.section.11.p.1"><p>This section documents extensions implemented in <span class="tt">rfc2629.xslt</span>, using the extension namespace "http://purl.org/net/xml2rfc/ext".<a class="self" href="#rfc.section.11.p.1">&para;</a></p></div><section id="ext.element.abnf-char-sequence"><h3 id="rfc.section.11.1"><a href="#rfc.section.11.1">11.1</a>&nbsp;<a href="#ext.element.abnf-char-sequence">&lt;abnf-char-sequence&gt; element</a></h3><div id="rfc.section.11.1.p.1"><p>Converts the contained quoted string into a hex-encoded character sequence, for use in case-sensitive ABNF productions.<a class="self" href="#rfc.section.11.1.p.1">&para;</a></p></div><div id="rfc.section.11.1.p.2"><p>For instance, "&lt;x:abnf-char-sequence&gt;"HTTP"&lt;/x:abnf-char-sequence&gt;" gets converted to "%x48.54.54.50".<a class="self" href="#rfc.section.11.1.p.2">&para;</a></p></div></section><section id="ext.element.anchor-alias"><h3 id="rfc.section.11.2"><a href="#rfc.section.11.2">11.2</a>&nbsp;<a href="#ext.element.anchor-alias">&lt;anchor-alias&gt; element</a></h3><div id="rfc.section.11.2.p.1"><p>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;<a href="#ext.element.ref" class="smpl">ref</a>&gt; element for intra-document references.<a class="self" href="#rfc.section.11.2.p.1">&para;</a></p></div><div id="rfc.section.11.2.p.2"><p>Note that the anchor alias is not subject to the naming constraints that apply to anchor elements (which are <a href="http://www.w3.org/TR/REC-xml/#NT-Name">XML names</a>).<a class="self" href="#rfc.section.11.2.p.2">&para;</a></p></div></section><section id="ext.element.bcp14"><h3 id="rfc.section.11.3"><a href="#rfc.section.11.3">11.3</a>&nbsp;<a href="#ext.element.bcp14">&lt;bcp14&gt; element</a></h3><div id="rfc.section.11.3.p.1"><p>This element marks the content as being one of the normative keywords defined in <a href="#RFC2119" id="rfc.xref.RFC2119.1"><cite title="Key words for use in RFCs to Indicate Requirement Levels">[RFC2119]</cite></a>.<a class="self" href="#rfc.section.11.3.p.1">&para;</a></p></div><div id="rfc.figure.u.12"><p>The DOCTYPE definition below allows using these keywords using XML entity expansion: such as in "...server &amp;MUST; accept...".</p><pre class="text prettyprint">&lt;!DOCTYPE rfc [
    450502 &lt;!ENTITY MAY "&lt;bcp14 xmlns='http://purl.org/net/xml2rfc/ext'
    451503   &gt;MAY&lt;/bcp14&gt;"&gt;
     
    467519   &gt;SHOULD&lt;/bcp14&gt;"&gt;
    468520 &lt;!ENTITY SHOULD-NOT "&lt;bcp14 xmlns='http://purl.org/net/xml2rfc/ext'
    469    &gt;SHOULD NOT&lt;/bcp14&gt;"&gt;]&gt;</pre></div></div><div id="ext.element.bb"><h3 id="rfc.section.11.4"><a href="#rfc.section.11.4">11.4</a>&nbsp;<a href="#ext.element.bb">&lt;bb&gt; element</a></h3><div id="rfc.section.11.4.p.1"><p>Marking up a string as &lt;bb&gt; indicates that it represents the bottom line of a box drawing, replacing the "+" and "-" characters accordingly.<a class="self" href="#rfc.section.11.4.p.1">&para;</a></p></div></div><div id="ext.element.bc"><h3 id="rfc.section.11.5"><a href="#rfc.section.11.5">11.5</a>&nbsp;<a href="#ext.element.bc">&lt;bc&gt; element</a></h3><div id="rfc.section.11.5.p.1"><p>Marking up a string as &lt;bc&gt; indicates that it represents a center line of a box drawing, replacing the "|" character accordingly.<a class="self" href="#rfc.section.11.5.p.1">&para;</a></p></div></div><div id="ext.element.blockquote"><h3 id="rfc.section.11.6"><a href="#rfc.section.11.6">11.6</a>&nbsp;<a href="#ext.element.blockquote">&lt;blockquote&gt; element</a></h3><div id="rfc.section.11.6.p.1"><p>This element is like the &lt;blockquote&gt; element defined in <a href="http://www.w3.org/TR/1999/REC-html401-19991224/struct/text.html#h-9.2.2">Section 9.2.2</a> of <a href="#HTML" id="rfc.xref.HTML.2"><cite title="HTML 4.01 Specification">[HTML]</cite></a> (note this is a block-level element!). It should contain one or more &lt;t&gt; child elements.<a class="self" href="#rfc.section.11.6.p.1">&para;</a></p></div></div><div id="ext.element.boilerplate"><h3 id="rfc.section.11.7"><a href="#rfc.section.11.7">11.7</a>&nbsp;<a href="#ext.element.boilerplate">&lt;boilerplate&gt; element</a></h3><div id="rfc.section.11.7.p.1"><p>Can be used to include boilerplate (status, copyright, ...) into the front or back section. &lt;section&gt; elements within &lt;x:boilerplate&gt; appear as unnumbered sections in the output.<a class="self" href="#rfc.section.11.7.p.1">&para;</a></p></div><div id="rfc.section.11.7.p.2"><p><em>This element currently can not be "down-translated" for use in xml2rfc!</em> <a class="self" href="#rfc.section.11.7.p.2">&para;</a></p></div></div><div id="ext.element.bt"><h3 id="rfc.section.11.8"><a href="#rfc.section.11.8">11.8</a>&nbsp;<a href="#ext.element.bt">&lt;bt&gt; element</a></h3><div id="rfc.section.11.8.p.1"><p>Marking up a string as &lt;bt&gt; indicates that it represents the top line of a box drawing, replacing the "+" and "-" characters accordingly.<a class="self" href="#rfc.section.11.8.p.1">&para;</a></p></div></div><div id="ext.element.dfn"><h3 id="rfc.section.11.9"><a href="#rfc.section.11.9">11.9</a>&nbsp;<a href="#ext.element.dfn">&lt;dfn&gt; element</a></h3><div id="rfc.section.11.9.p.1"><p>This element is like the &lt;dfn&gt; element defined in <a href="http://www.w3.org/TR/1999/REC-html401-19991224/struct/text.html#h-9.2.1">Section 9.2.1</a> of <a href="#HTML" id="rfc.xref.HTML.3"><cite title="HTML 4.01 Specification">[HTML]</cite></a>.<a class="self" href="#rfc.section.11.9.p.1">&para;</a></p></div></div><div id="ext.element.feedback"><h3 id="rfc.section.11.10"><a href="#rfc.section.11.10">11.10</a>&nbsp;<a href="#ext.element.feedback">&lt;feedback&gt; element</a></h3><div id="rfc.section.11.10.p.1" class="avoidbreakafter"><p>This elements allows declaring a feedback link for document reviewers. The template string takes the form of a URI template, such as:<a class="self" href="#rfc.section.11.10.p.1">&para;</a></p></div><div id="rfc.figure.u.11"><pre class="text">&lt;x:feedback template="mailto:ietf-http-wg@w3.org?subject={docname},%20%22{section}%22&amp;amp;body=&amp;lt;{ref}&amp;gt;:"/&gt;
    470 </pre></div><div id="rfc.section.11.10.p.2"><p>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.<a class="self" href="#rfc.section.11.10.p.2">&para;</a></p></div></div><div id="ext.element.h"><h3 id="rfc.section.11.11"><a href="#rfc.section.11.11">11.11</a>&nbsp;<a href="#ext.element.h">&lt;h&gt; element</a></h3><div id="rfc.section.11.11.p.1"><p>This element is like the "<a href="http://www.w3.org/TR/2006/WD-xhtml2-20060726/mod-structural.html#edef_structural_h">h</a>" element in <a href="#XHTML2" id="rfc.xref.XHTML2.1"><cite title="XHTML(tm) 2.0">[XHTML2]</cite></a>.<a class="self" href="#rfc.section.11.11.p.1">&para;</a></p></div></div><div id="ext.element.highlight"><h3 id="rfc.section.11.12"><a href="#rfc.section.11.12">11.12</a>&nbsp;<a href="#ext.element.highlight">&lt;highlight&gt; element</a></h3><div id="rfc.section.11.12.p.1"><p>Used to highlight text passages, currently only allowed in &lt;artwork&gt;.<a class="self" href="#rfc.section.11.12.p.1">&para;</a></p></div><div id="rfc.section.11.12.p.2"><p><b>Note:</b> this is stripped when generating input for xml2rfc, so please use with care.<a class="self" href="#rfc.section.11.12.p.2">&para;</a></p></div></div><div id="ext.element.length-of"><h3 id="rfc.section.11.13"><a href="#rfc.section.11.13">11.13</a>&nbsp;<a href="#ext.element.length-of">&lt;length-of&gt; element</a></h3><div id="rfc.section.11.13.p.1"><p>This element can be used to insert the length of another formatted section (in decimal).<a class="self" href="#rfc.section.11.13.p.1">&para;</a></p></div><div id="rfc.figure.u.12"><p>Example: computing the Content-Length header value</p><pre class="text">&lt;artwork&gt;
     521   &gt;SHOULD NOT&lt;/bcp14&gt;"&gt;]&gt;</pre></div></section><section id="ext.element.bb"><h3 id="rfc.section.11.4"><a href="#rfc.section.11.4">11.4</a>&nbsp;<a href="#ext.element.bb">&lt;bb&gt; element</a></h3><div id="rfc.section.11.4.p.1"><p>Marking up a string as &lt;bb&gt; indicates that it represents the bottom line of a box drawing, replacing the "+" and "-" characters accordingly.<a class="self" href="#rfc.section.11.4.p.1">&para;</a></p></div></section><section id="ext.element.bc"><h3 id="rfc.section.11.5"><a href="#rfc.section.11.5">11.5</a>&nbsp;<a href="#ext.element.bc">&lt;bc&gt; element</a></h3><div id="rfc.section.11.5.p.1"><p>Marking up a string as &lt;bc&gt; indicates that it represents a center line of a box drawing, replacing the "|" character accordingly.<a class="self" href="#rfc.section.11.5.p.1">&para;</a></p></div></section><section id="ext.element.blockquote"><h3 id="rfc.section.11.6"><a href="#rfc.section.11.6">11.6</a>&nbsp;<a href="#ext.element.blockquote">&lt;blockquote&gt; element</a></h3><div id="rfc.section.11.6.p.1"><p>This element is like the &lt;blockquote&gt; element defined in <a href="http://www.w3.org/TR/2014/REC-html5-20141028/grouping-content.html#the-blockquote-element">Section 4.4.4</a> of <a href="#HTML5" id="rfc.xref.HTML5.3"><cite title="HTML5">[HTML5]</cite></a> (note this is a block-level element!). It should contain one or more &lt;t&gt; child elements.<a class="self" href="#rfc.section.11.6.p.1">&para;</a></p></div></section><section id="ext.element.boilerplate"><h3 id="rfc.section.11.7"><a href="#rfc.section.11.7">11.7</a>&nbsp;<a href="#ext.element.boilerplate">&lt;boilerplate&gt; element</a></h3><div id="rfc.section.11.7.p.1"><p>Can be used to include boilerplate (status, copyright, ...) into the front or back section. &lt;section&gt; elements within &lt;x:boilerplate&gt; appear as unnumbered sections in the output.<a class="self" href="#rfc.section.11.7.p.1">&para;</a></p></div><div id="rfc.section.11.7.p.2"><p><em>This element currently can not be "down-translated" for use in xml2rfc!</em> <a class="self" href="#rfc.section.11.7.p.2">&para;</a></p></div></section><section id="ext.element.bt"><h3 id="rfc.section.11.8"><a href="#rfc.section.11.8">11.8</a>&nbsp;<a href="#ext.element.bt">&lt;bt&gt; element</a></h3><div id="rfc.section.11.8.p.1"><p>Marking up a string as &lt;bt&gt; indicates that it represents the top line of a box drawing, replacing the "+" and "-" characters accordingly.<a class="self" href="#rfc.section.11.8.p.1">&para;</a></p></div></section><section id="ext.element.dfn"><h3 id="rfc.section.11.9"><a href="#rfc.section.11.9">11.9</a>&nbsp;<a href="#ext.element.dfn">&lt;dfn&gt; element</a></h3><div id="rfc.section.11.9.p.1"><p>This element is like the &lt;dfn&gt; element defined in <a href="http://www.w3.org/TR/2014/REC-html5-20141028/text-level-semantics.html#the-dfn-element">Section 4.5.8</a> of <a href="#HTML5" id="rfc.xref.HTML5.4"><cite title="HTML5">[HTML5]</cite></a>.<a class="self" href="#rfc.section.11.9.p.1">&para;</a></p></div></section><section id="ext.element.feedback"><h3 id="rfc.section.11.10"><a href="#rfc.section.11.10">11.10</a>&nbsp;<a href="#ext.element.feedback">&lt;feedback&gt; element</a></h3><div id="rfc.section.11.10.p.1" class="avoidbreakafter"><p>This elements allows declaring a feedback link for document reviewers. The template string takes the form of a URI template, such as:<a class="self" href="#rfc.section.11.10.p.1">&para;</a></p></div><div id="rfc.figure.u.13"><pre class="text prettyprint">&lt;x:feedback template="mailto:ietf-http-wg@w3.org?subject={docname},%20%22{section}%22&amp;amp;body=&amp;lt;{ref}&amp;gt;:"/&gt;
     522</pre></div><div id="rfc.section.11.10.p.2"><p>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.<a class="self" href="#rfc.section.11.10.p.2">&para;</a></p></div></section><section id="ext.element.h"><h3 id="rfc.section.11.11"><a href="#rfc.section.11.11">11.11</a>&nbsp;<a href="#ext.element.h">&lt;h&gt; element</a></h3><div id="rfc.section.11.11.p.1"><p>This element is like the "<a href="http://www.w3.org/TR/2006/WD-xhtml2-20060726/mod-structural.html#edef_structural_h">h</a>" element in <a href="#XHTML2" id="rfc.xref.XHTML2.1"><cite title="XHTML(tm) 2.0">[XHTML2]</cite></a>.<a class="self" href="#rfc.section.11.11.p.1">&para;</a></p></div></section><section id="ext.element.highlight"><h3 id="rfc.section.11.12"><a href="#rfc.section.11.12">11.12</a>&nbsp;<a href="#ext.element.highlight">&lt;highlight&gt; element</a></h3><div id="rfc.section.11.12.p.1"><p>Used to highlight text passages, currently only allowed in &lt;artwork&gt;.<a class="self" href="#rfc.section.11.12.p.1">&para;</a></p></div><div id="rfc.section.11.12.p.2"><p><b>Note:</b> this is stripped when generating input for xml2rfc, so please use with care.<a class="self" href="#rfc.section.11.12.p.2">&para;</a></p></div></section><section id="ext.element.length-of"><h3 id="rfc.section.11.13"><a href="#rfc.section.11.13">11.13</a>&nbsp;<a href="#ext.element.length-of">&lt;length-of&gt; element</a></h3><div id="rfc.section.11.13.p.1"><p>This element can be used to insert the length of another formatted section (in decimal).<a class="self" href="#rfc.section.11.13.p.1">&para;</a></p></div><div id="rfc.figure.u.14"><p>Example: computing the Content-Length header value</p><pre class="text prettyprint">&lt;artwork&gt;
    471523...
    472524Content-Length: &lt;x:length-of target="req"/&gt;
     
    474526&lt;x:span anchor="req"&gt;123456789
    475527&lt;x:span&gt;&lt;artwork/&gt;
    476 </pre></div><div id="rfc.section.11.13.p.2"><p>The lenght computation counts line ends as two characters (CRLF).<a class="self" href="#rfc.section.11.13.p.2">&para;</a></p></div><div id="rfc.section.11.13.p.3"><p>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.<a class="self" href="#rfc.section.11.13.p.3">&para;</a></p></div></div><div id="ext.element.link"><h3 id="rfc.section.11.14"><a href="#rfc.section.11.14">11.14</a>&nbsp;<a href="#ext.element.link">&lt;link&gt; element</a></h3><div id="rfc.section.11.14.p.1"><p>This element can be added as a top-level child element below &lt;rfc&gt; to indicate additional link information. It's currently used only when generating HTML output, in which case an HTML <a href="http://www.w3.org/TR/html4/struct/links.html#edef-LINK">&lt;link&gt;</a> element with identical attributes gets generated.<a class="self" href="#rfc.section.11.14.p.1">&para;</a></p></div><div id="rfc.figure.u.13"><p>Example: generating HTML link element</p><pre class="text">        &lt;x:link xmlns:x="http://purl.org/net/xml2rfc/ext"
    477             rel="Bookmark"
    478             title="IETF WEBDAV Working Group"
    479             href="http://ftp.ics.uci.edu/pub/ietf/webdav/"/&gt;</pre></div><div id="rfc.section.11.14.p.2"><p>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.<a class="self" href="#rfc.section.11.14.p.2">&para;</a></p></div><div id="rfc.figure.u.14"><p>For instance:</p><pre class="text">        &lt;x:link xmlns:x="http://purl.org/net/xml2rfc/ext"
    480             rel="next"
    481             title="Part2"
    482             basename="draft-foobar-protocol-p2-latest"/&gt;</pre></div></div><div id="ext.element.lt"><h3 id="rfc.section.11.15"><a href="#rfc.section.11.15">11.15</a>&nbsp;<a href="#ext.element.lt">&lt;lt&gt; element</a></h3><div id="rfc.section.11.15.p.1"><p>Used for grouping multiple &lt;t&gt; elements into a single list item.<a class="self" href="#rfc.section.11.15.p.1">&para;</a></p></div></div><div id="ext.element.note"><h3 id="rfc.section.11.16"><a href="#rfc.section.11.16">11.16</a>&nbsp;<a href="#ext.element.note">&lt;note&gt; element</a></h3><div id="rfc.section.11.16.p.1"><p>Can be used to add a note, usually indented by a few characters. It should contain one or more &lt;t&gt; child elements.<a class="self" href="#rfc.section.11.16.p.1">&para;</a></p></div></div><div id="ext.element.parse-xml"><h3 id="rfc.section.11.17"><a href="#rfc.section.11.17">11.17</a>&nbsp;<a href="#ext.element.parse-xml">&lt;parse-xml&gt; element</a></h3><div id="rfc.section.11.17.p.1"><p>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).<a class="self" href="#rfc.section.11.17.p.1">&para;</a></p></div></div><div id="ext.element.prose"><h3 id="rfc.section.11.18"><a href="#rfc.section.11.18">11.18</a>&nbsp;<a href="#ext.element.prose">&lt;prose&gt; element</a></h3><div id="rfc.section.11.18.p.1"><p>This element can be used inside &lt;reference&gt; to add plain text (before the date, when present).<a class="self" href="#rfc.section.11.18.p.1">&para;</a></p></div><div id="rfc.section.11.18.p.2"><p><em>See also &lt;refcontent&gt; (<a href="#v3.refcontent" title="refcontent Element">Section&nbsp;12.13</a>).</em> <a class="self" href="#rfc.section.11.18.p.2">&para;</a></p></div></div><div id="ext.element.q"><h3 id="rfc.section.11.19"><a href="#rfc.section.11.19">11.19</a>&nbsp;<a href="#ext.element.q">&lt;q&gt; element</a></h3><div id="rfc.section.11.19.p.1"><p>This element is like the &lt;q&gt; element defined in <a href="http://www.w3.org/TR/1999/REC-html401-19991224/struct/text.html#h-9.2.2">Section 9.2.2</a> of <a href="#HTML" id="rfc.xref.HTML.4"><cite title="HTML 4.01 Specification">[HTML]</cite></a>.<a class="self" href="#rfc.section.11.19.p.1">&para;</a></p></div></div><div id="ext.element.ref"><h3 id="rfc.section.11.20"><a href="#rfc.section.11.20">11.20</a>&nbsp;<a href="#ext.element.ref">&lt;ref&gt; element</a></h3><div id="rfc.section.11.20.p.1"><p>This element is a simplified variant of the &lt;xref&gt; 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;<a href="#ext.element.anchor-alias" class="smpl">anchor-alias</a>&gt;, it allows referring to other parts of the document with minimal additional markup.<a class="self" href="#rfc.section.11.20.p.1">&para;</a></p></div><div id="rfc.section.11.20.p.2"><p>For instance, given an alias definition such as<a class="self" href="#rfc.section.11.20.p.2">&para;</a></p></div><div id="rfc.figure.u.15"><pre class="text">      &lt;section title="Test" anchor="test"&gt;
    483         &lt;x:anchor-alias value="alias1"/&gt;
    484         &lt;x:anchor-alias value="alias 2"/&gt;
    485         ...
    486       &lt;/section&gt;</pre></div><div id="rfc.section.11.20.p.3"><p>the following simple references<a class="self" href="#rfc.section.11.20.p.3">&para;</a></p></div><div id="rfc.figure.u.16"><pre class="text">      &lt;x:ref&gt;test&lt;/x:ref&gt;
    487       &lt;x:ref&gt;alias1&lt;/x:ref&gt;
    488       &lt;x:ref&gt;alias 2&lt;/x:ref&gt;</pre></div><div id="rfc.section.11.20.p.4" class="avoidbreakafter"><p>are equivalent to...:<a class="self" href="#rfc.section.11.20.p.4">&para;</a></p></div><div id="rfc.figure.u.17"><pre class="text">      &lt;xref target="test"&gt;test&lt;/xref&gt;
    489       &lt;xref target="test"&gt;alias1&lt;/xref&gt;
    490       &lt;xref target="test"&gt;alias 2&lt;/xref&gt;</pre></div></div><div id="ext.element.source"><h3 id="rfc.section.11.21"><a href="#rfc.section.11.21">11.21</a>&nbsp;<a href="#ext.element.source">&lt;source&gt; element</a></h3><div id="rfc.section.11.21.p.1"><p>Can be used to enhance a &lt;reference&gt; with information about the location for the XML source. This can be used by the &lt;xref&gt; processing code to automatically extract the target section number.<a class="self" href="#rfc.section.11.21.p.1">&para;</a></p></div><div id="rfc.figure.u.18"><p>For example:</p><pre class="text">      ...
    491       &lt;xref target="RFC2616" x:fmt="of" x:rel="#PUT" /&gt;
    492       ...
    493    
    494       &lt;reference target="RFC2616"/&gt;
    495         ...
    496         &lt;x:source href="rfc2616.xml"/&gt;
    497         ...
    498     </pre></div></div><div id="ext.element.sup"><h3 id="rfc.section.11.22"><a href="#rfc.section.11.22">11.22</a>&nbsp;<a href="#ext.element.sup">&lt;sup&gt; element</a></h3><div id="rfc.section.11.22.p.1"><p>This element is like the &lt;sup&gt; element in <a href="http://www.w3.org/TR/1999/REC-html401-19991224/struct/text.html#h-9.2.3">Section 9.2.3</a> of <a href="#HTML" id="rfc.xref.HTML.5"><cite title="HTML 4.01 Specification">[HTML]</cite></a>.<a class="self" href="#rfc.section.11.22.p.1">&para;</a></p></div><div id="rfc.section.11.22.p.2"><p>Note: the down conversion to RFC2629 format replaces "x<sup>y</sup>" by "x^y".<a class="self" href="#rfc.section.11.22.p.2">&para;</a></p></div><div id="rfc.section.11.22.p.3"><p><em>See also &lt;refcontent&gt; (<a href="#v3.sup" title="sup Element">Section&nbsp;12.18</a>).</em> <a class="self" href="#rfc.section.11.22.p.3">&para;</a></p></div></div><div id="ext-rfc2629.artwork"><h3 id="rfc.section.11.23"><a href="#rfc.section.11.23">11.23</a>&nbsp;<a href="#ext-rfc2629.artwork">Extensions to Xml2rfc &lt;artwork&gt; element</a></h3><div id="rfc.section.11.23.p.1"><p>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 <a href="#clean-for-dtd" title="Down-converting to RFC2629bis DTD">Section&nbsp;13.4</a>).<a class="self" href="#rfc.section.11.23.p.1">&para;</a></p></div><div id="rfc.section.11.23.p.2"><p>Furthermore, documents can contain code that might need to be marked as "code component" (&lt;<a href="http://www.ietf.org/iesg/statement/copyright.html">http://www.ietf.org/iesg/statement/copyright.html</a>&gt;). This can be done using "x:is-code-component".<a class="self" href="#rfc.section.11.23.p.2">&para;</a></p></div></div><div id="ext-rfc2629.iref"><h3 id="rfc.section.11.24"><a href="#rfc.section.11.24">11.24</a>&nbsp;<a href="#ext-rfc2629.iref">Extensions to Xml2rfc &lt;iref&gt; element</a></h3><div id="rfc.section.11.24.p.1"><p>The extension attribute below is allowed on the standard &lt;iref&gt; element: <a class="self" href="#rfc.section.11.24.p.1">&para;</a></p><ul><li>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.</li></ul></div></div><div id="ext-rfc2629.list"><h3 id="rfc.section.11.25"><a href="#rfc.section.11.25">11.25</a>&nbsp;<a href="#ext-rfc2629.list">Extensions to Xml2rfc &lt;list&gt; element</a></h3><div id="rfc.section.11.25.p.1"><p>The extension attribute below is allowed on the standard &lt;list&gt; element: <a class="self" href="#rfc.section.11.25.p.1">&para;</a></p><ul><li>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>.</li></ul></div><div id="rfc.section.11.25.p.2"><p>Also, the &lt;list&gt; element can take &lt;x:<a href="#ext.element.lt" class="smpl">lt</a>&gt; child elements instead of &lt;t&gt;, allowing to insert multiple paragraphs into a single list item.<a class="self" href="#rfc.section.11.25.p.2">&para;</a></p></div></div><div id="ext-rfc2629.rfc"><h3 id="rfc.section.11.26"><a href="#rfc.section.11.26">11.26</a>&nbsp;<a href="#ext-rfc2629.rfc">Extensions to Xml2rfc &lt;rfc&gt; element</a></h3><div id="rfc.section.11.26.p.1"><p>The extension attributes below are allowed on the standard &lt;rfc&gt; element: <a class="self" href="#rfc.section.11.26.p.1">&para;</a></p><ul><li>grddl:transformation can be used to reference a GRDDL transform.</li><li>x:maturity-level can be used to specify the IETF Standards Track Maturity Level of "proposed", "draft" or "internet" (see <a href="https://tools.ietf.org/html/rfc2026#section-4.1">Section 4.1</a> of <a href="#RFC2026" id="rfc.xref.RFC2026.1"><cite title="The Internet Standards Process -- Revision 3">[RFC2026]</cite></a>).</li></ul></div></div><div id="ext-rfc2629.section"><h3 id="rfc.section.11.27"><a href="#rfc.section.11.27">11.27</a>&nbsp;<a href="#ext-rfc2629.section">Extensions to Xml2rfc &lt;section&gt; element</a></h3><div id="rfc.section.11.27.p.1"><p>The extension attribute below is allowed on the standard &lt;list&gt; element: <a class="self" href="#rfc.section.11.27.p.1">&para;</a></p><ul><li>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.</li></ul></div></div><div id="ext-rfc2629.xref"><h3 id="rfc.section.11.28"><a href="#rfc.section.11.28">11.28</a>&nbsp;<a href="#ext-rfc2629.xref">Extensions to Xml2rfc &lt;xref&gt; element</a></h3><div id="rfc.section.11.28.p.1"><p>Three extension attributes are allowed on the standard &lt;xref&gt; element: <a class="self" href="#rfc.section.11.28.p.1">&para;</a></p><ol><li>x:sec can be specified to point to a specific section of the referenced document,</li><li>x:rel may specify a relative reference to use when linking into the referenced document (if linking by section number is not available),</li><li>x:fmt defines the text format to be used.</li></ol></div><div id="rfc.section.11.28.p.2"><p>The following formats are defined for the x:fmt attribute: <a class="self" href="#rfc.section.11.28.p.2">&para;</a></p><dl><dt>, (Comma)</dt><dd>[<em>reference</em>], Section <em>sec</em> </dd><dt>()</dt><dd>[<em>reference</em>] (Section <em>sec</em>)</dd><dt>of</dt><dd>Section <em>sec</em> of [<em>reference</em>]</dd><dt>number</dt><dd><em>sec</em> </dd><dt>none</dt><dd>No output (can be used to have xrefs to references without having them rendered as such)</dd><dt>sec</dt><dd>Section <em>sec</em> </dd></dl></div><div id="rfc.section.11.28.p.3"><p>These extensions are currently only supported for &lt;xref&gt; elements without child nodes.<a class="self" href="#rfc.section.11.28.p.3">&para;</a></p></div><div id="rfc.section.11.28.p.4"><p>If the processor knows how to reference the target section, it will generate a link directly to the target section, such as in <a href="#RFC2119" id="rfc.xref.RFC2119.2"><cite title="Key words for use in RFCs to Indicate Requirement Levels">[RFC2119]</cite></a>, <a href="https://tools.ietf.org/html/rfc2119#section-5">Section 5</a>.<a class="self" href="#rfc.section.11.28.p.4">&para;</a></p></div></div></div><hr class="noprint"><div id="v3"><h2 id="rfc.section.12" class="np"><a href="#rfc.section.12">12.</a>&nbsp;<a href="#v3">Experimental Support for XML2RFCv3 Vocabulary</a></h2><div id="rfc.section.12.p.1"><p><tt>rfc2629.xslt</tt> experimentally supports some elements from the "V3" vocabulary, defined in <a href="#XML2RFCV3" id="rfc.xref.XML2RFCV3.1"><cite title="The 'XML2RFC' version 3 Vocabulary">[XML2RFCV3]</cite></a>. <em>This support is experimental, as the "v3" vocabulary is still being developed.</em> <a class="self" href="#rfc.section.12.p.1">&para;</a></p></div><div id="v3.aside"><h3 id="rfc.section.12.1"><a href="#rfc.section.12.1">12.1</a>&nbsp;<a href="#v3.aside">aside Element</a></h3><div id="rfc.section.12.1.p.1"><p>See <a href="https://tools.ietf.org/html/draft-hoffman-xml2rfc-17#section-2.6">Section 2.6</a> of <a href="#XML2RFCV3" id="rfc.xref.XML2RFCV3.2"><cite title="The 'XML2RFC' version 3 Vocabulary">[XML2RFCV3]</cite></a>.<a class="self" href="#rfc.section.12.1.p.1">&para;</a></p></div></div><div id="v3.bcp14"><h3 id="rfc.section.12.2"><a href="#rfc.section.12.2">12.2</a>&nbsp;<a href="#v3.bcp14">bcp14 Element</a></h3><div id="rfc.section.12.2.p.1"><p>See <a href="https://tools.ietf.org/html/draft-hoffman-xml2rfc-17#section-2.9">Section 2.9</a> of <a href="#XML2RFCV3" id="rfc.xref.XML2RFCV3.3"><cite title="The 'XML2RFC' version 3 Vocabulary">[XML2RFCV3]</cite></a>.<a class="self" href="#rfc.section.12.2.p.1">&para;</a></p></div></div><div id="v3.blockquote"><h3 id="rfc.section.12.3"><a href="#rfc.section.12.3">12.3</a>&nbsp;<a href="#v3.blockquote">blockquote Element</a></h3><div id="rfc.section.12.3.p.1"><p>See <a href="https://tools.ietf.org/html/draft-hoffman-xml2rfc-17#section-2.10">Section 2.10</a> of <a href="#XML2RFCV3" id="rfc.xref.XML2RFCV3.4"><cite title="The 'XML2RFC' version 3 Vocabulary">[XML2RFCV3]</cite></a>.<a class="self" href="#rfc.section.12.3.p.1">&para;</a></p></div></div><div id="v3.displayreference"><h3 id="rfc.section.12.4"><a href="#rfc.section.12.4">12.4</a>&nbsp;<a href="#v3.displayreference">displayreference Element</a></h3><div id="rfc.section.12.4.p.1"><p>See <a href="https://tools.ietf.org/html/draft-hoffman-xml2rfc-17#section-2.19">Section 2.19</a> of <a href="#XML2RFCV3" id="rfc.xref.XML2RFCV3.5"><cite title="The 'XML2RFC' version 3 Vocabulary">[XML2RFCV3]</cite></a>.<a class="self" href="#rfc.section.12.4.p.1">&para;</a></p></div></div><div id="v3.dd"><h3 id="rfc.section.12.5"><a href="#rfc.section.12.5">12.5</a>&nbsp;<a href="#v3.dd">dd Element</a></h3><div id="rfc.section.12.5.p.1"><p>See <a href="https://tools.ietf.org/html/draft-hoffman-xml2rfc-17#section-2.18">Section 2.18</a> of <a href="#XML2RFCV3" id="rfc.xref.XML2RFCV3.6"><cite title="The 'XML2RFC' version 3 Vocabulary">[XML2RFCV3]</cite></a>.<a class="self" href="#rfc.section.12.5.p.1">&para;</a></p></div></div><div id="v3.dl"><h3 id="rfc.section.12.6"><a href="#rfc.section.12.6">12.6</a>&nbsp;<a href="#v3.dl">dl Element</a></h3><div id="rfc.section.12.6.p.1"><p>See <a href="https://tools.ietf.org/html/draft-hoffman-xml2rfc-17#section-2.20">Section 2.20</a> of <a href="#XML2RFCV3" id="rfc.xref.XML2RFCV3.7"><cite title="The 'XML2RFC' version 3 Vocabulary">[XML2RFCV3]</cite></a>.<a class="self" href="#rfc.section.12.6.p.1">&para;</a></p></div></div><div id="v3.dt"><h3 id="rfc.section.12.7"><a href="#rfc.section.12.7">12.7</a>&nbsp;<a href="#v3.dt">dt Element</a></h3><div id="rfc.section.12.7.p.1"><p>See <a href="https://tools.ietf.org/html/draft-hoffman-xml2rfc-17#section-2.21">Section 2.21</a> of <a href="#XML2RFCV3" id="rfc.xref.XML2RFCV3.8"><cite title="The 'XML2RFC' version 3 Vocabulary">[XML2RFCV3]</cite></a>.<a class="self" href="#rfc.section.12.7.p.1">&para;</a></p></div></div><div id="v3.em"><h3 id="rfc.section.12.8"><a href="#rfc.section.12.8">12.8</a>&nbsp;<a href="#v3.em">em Element</a></h3><div id="rfc.section.12.8.p.1"><p>See <a href="https://tools.ietf.org/html/draft-hoffman-xml2rfc-17#section-2.22">Section 2.22</a> of <a href="#XML2RFCV3" id="rfc.xref.XML2RFCV3.9"><cite title="The 'XML2RFC' version 3 Vocabulary">[XML2RFCV3]</cite></a>.<a class="self" href="#rfc.section.12.8.p.1">&para;</a></p></div></div><div id="v3.li"><h3 id="rfc.section.12.9"><a href="#rfc.section.12.9">12.9</a>&nbsp;<a href="#v3.li">li Element</a></h3><div id="rfc.section.12.9.p.1"><p>See <a href="https://tools.ietf.org/html/draft-hoffman-xml2rfc-17#section-2.29">Section 2.29</a> of <a href="#XML2RFCV3" id="rfc.xref.XML2RFCV3.10"><cite title="The 'XML2RFC' version 3 Vocabulary">[XML2RFCV3]</cite></a>.<a class="self" href="#rfc.section.12.9.p.1">&para;</a></p></div></div><div id="v3.name"><h3 id="rfc.section.12.10"><a href="#rfc.section.12.10">12.10</a>&nbsp;<a href="#v3.name">name Element</a></h3><div id="rfc.section.12.10.p.1"><p>See <a href="https://tools.ietf.org/html/draft-hoffman-xml2rfc-17#section-2.32">Section 2.32</a> of <a href="#XML2RFCV3" id="rfc.xref.XML2RFCV3.11"><cite title="The 'XML2RFC' version 3 Vocabulary">[XML2RFCV3]</cite></a>. <em>Currently only supported inside &lt;references&gt; and &lt;section&gt;</em>.<a class="self" href="#rfc.section.12.10.p.1">&para;</a></p></div></div><div id="v3.ol"><h3 id="rfc.section.12.11"><a href="#rfc.section.12.11">12.11</a>&nbsp;<a href="#v3.ol">ol Element</a></h3><div id="rfc.section.12.11.p.1"><p>See <a href="https://tools.ietf.org/html/draft-hoffman-xml2rfc-17#section-2.34">Section 2.34</a> of <a href="#XML2RFCV3" id="rfc.xref.XML2RFCV3.12"><cite title="The 'XML2RFC' version 3 Vocabulary">[XML2RFCV3]</cite></a>.<a class="self" href="#rfc.section.12.11.p.1">&para;</a></p></div></div><div id="v3.postalLine"><h3 id="rfc.section.12.12"><a href="#rfc.section.12.12">12.12</a>&nbsp;<a href="#v3.postalLine">postalLine Element</a></h3><div id="rfc.section.12.12.p.1"><p>See <a href="https://tools.ietf.org/html/draft-hoffman-xml2rfc-17#section-2.38">Section 2.38</a> of <a href="#XML2RFCV3" id="rfc.xref.XML2RFCV3.13"><cite title="The 'XML2RFC' version 3 Vocabulary">[XML2RFCV3]</cite></a>.<a class="self" href="#rfc.section.12.12.p.1">&para;</a></p></div></div><div id="v3.refcontent"><h3 id="rfc.section.12.13"><a href="#rfc.section.12.13">12.13</a>&nbsp;<a href="#v3.refcontent">refcontent Element</a></h3><div id="rfc.section.12.13.p.1"><p>See <a href="https://tools.ietf.org/html/draft-hoffman-xml2rfc-17#section-2.39">Section 2.39</a> of <a href="#XML2RFCV3" id="rfc.xref.XML2RFCV3.14"><cite title="The 'XML2RFC' version 3 Vocabulary">[XML2RFCV3]</cite></a>.<a class="self" href="#rfc.section.12.13.p.1">&para;</a></p></div></div><div id="v3.reference"><h3 id="rfc.section.12.14"><a href="#rfc.section.12.14">12.14</a>&nbsp;<a href="#v3.reference">Extensions to reference Element</a></h3><div id="rfc.section.12.14.p.1"><p>See <a href="https://tools.ietf.org/html/draft-hoffman-xml2rfc-17#section-2.40">Section 2.40</a> of <a href="#XML2RFCV3" id="rfc.xref.XML2RFCV3.15"><cite title="The 'XML2RFC' version 3 Vocabulary">[XML2RFCV3]</cite></a>.<a class="self" href="#rfc.section.12.14.p.1">&para;</a></p></div><div id="v3.reference.quoteTitle"><h4 id="rfc.section.12.14.1"><a href="#rfc.section.12.14.1">12.14.1</a>&nbsp;<a href="#v3.reference.quoteTitle">quoteTitle attribute</a></h4><div id="rfc.section.12.14.1.p.1"><p>See <a href="https://tools.ietf.org/html/draft-hoffman-xml2rfc-17#section-2.40.2">Section 2.40.2</a> of <a href="#XML2RFCV3" id="rfc.xref.XML2RFCV3.16"><cite title="The 'XML2RFC' version 3 Vocabulary">[XML2RFCV3]</cite></a>.<a class="self" href="#rfc.section.12.14.1.p.1">&para;</a></p></div></div></div><div id="v3.section"><h3 id="rfc.section.12.15"><a href="#rfc.section.12.15">12.15</a>&nbsp;<a href="#v3.section">Extensions to section Element</a></h3><div id="rfc.section.12.15.p.1"><p>See <a href="https://tools.ietf.org/html/draft-hoffman-xml2rfc-17#section-2.45">Section 2.45</a> of <a href="#XML2RFCV3" id="rfc.xref.XML2RFCV3.17"><cite title="The 'XML2RFC' version 3 Vocabulary">[XML2RFCV3]</cite></a>.<a class="self" href="#rfc.section.12.15.p.1">&para;</a></p></div><div id="v3.section.numbered"><h4 id="rfc.section.12.15.1"><a href="#rfc.section.12.15.1">12.15.1</a>&nbsp;<a href="#v3.section.numbered">numbered attribute</a></h4><div id="rfc.section.12.15.1.p.1"><p>See <a href="https://tools.ietf.org/html/draft-hoffman-xml2rfc-17#section-2.45.2">Section 2.45.2</a> of <a href="#XML2RFCV3" id="rfc.xref.XML2RFCV3.18"><cite title="The 'XML2RFC' version 3 Vocabulary">[XML2RFCV3]</cite></a>.<a class="self" href="#rfc.section.12.15.1.p.1">&para;</a></p></div></div><div id="v3.section.removeInRFC"><h4 id="rfc.section.12.15.2"><a href="#rfc.section.12.15.2">12.15.2</a>&nbsp;<a href="#v3.section.removeInRFC">removeInRFC attribute</a></h4><div id="rfc.section.12.15.2.p.1"><p>See <a href="https://tools.ietf.org/html/draft-hoffman-xml2rfc-17#section-2.45.4">Section 2.45.4</a> of <a href="#XML2RFCV3" id="rfc.xref.XML2RFCV3.19"><cite title="The 'XML2RFC' version 3 Vocabulary">[XML2RFCV3]</cite></a>.<a class="self" href="#rfc.section.12.15.2.p.1">&para;</a></p></div></div></div><div id="v3.strong"><h3 id="rfc.section.12.16"><a href="#rfc.section.12.16">12.16</a>&nbsp;<a href="#v3.strong">strong Element</a></h3><div id="rfc.section.12.16.p.1"><p>See <a href="https://tools.ietf.org/html/draft-hoffman-xml2rfc-17#section-2.49">Section 2.49</a> of <a href="#XML2RFCV3" id="rfc.xref.XML2RFCV3.20"><cite title="The 'XML2RFC' version 3 Vocabulary">[XML2RFCV3]</cite></a>.<a class="self" href="#rfc.section.12.16.p.1">&para;</a></p></div></div><div id="v3.sub"><h3 id="rfc.section.12.17"><a href="#rfc.section.12.17">12.17</a>&nbsp;<a href="#v3.sub">sub Element</a></h3><div id="rfc.section.12.17.p.1"><p>See <a href="https://tools.ietf.org/html/draft-hoffman-xml2rfc-17#section-2.50">Section 2.50</a> of <a href="#XML2RFCV3" id="rfc.xref.XML2RFCV3.21"><cite title="The 'XML2RFC' version 3 Vocabulary">[XML2RFCV3]</cite></a>.<a class="self" href="#rfc.section.12.17.p.1">&para;</a></p></div></div><div id="v3.sup"><h3 id="rfc.section.12.18"><a href="#rfc.section.12.18">12.18</a>&nbsp;<a href="#v3.sup">sup Element</a></h3><div id="rfc.section.12.18.p.1"><p>See <a href="https://tools.ietf.org/html/draft-hoffman-xml2rfc-17#section-2.51">Section 2.51</a> of <a href="#XML2RFCV3" id="rfc.xref.XML2RFCV3.22"><cite title="The 'XML2RFC' version 3 Vocabulary">[XML2RFCV3]</cite></a>.<a class="self" href="#rfc.section.12.18.p.1">&para;</a></p></div></div><div id="v3.tt"><h3 id="rfc.section.12.19"><a href="#rfc.section.12.19">12.19</a>&nbsp;<a href="#v3.tt">tt Element</a></h3><div id="rfc.section.12.19.p.1"><p>See <a href="https://tools.ietf.org/html/draft-hoffman-xml2rfc-17#section-2.61">Section 2.61</a> of <a href="#XML2RFCV3" id="rfc.xref.XML2RFCV3.23"><cite title="The 'XML2RFC' version 3 Vocabulary">[XML2RFCV3]</cite></a>.<a class="self" href="#rfc.section.12.19.p.1">&para;</a></p></div></div><div id="v3.ul"><h3 id="rfc.section.12.20"><a href="#rfc.section.12.20">12.20</a>&nbsp;<a href="#v3.ul">ul Element</a></h3><div id="rfc.section.12.20.p.1"><p>See <a href="https://tools.ietf.org/html/draft-hoffman-xml2rfc-17#section-2.62">Section 2.62</a> of <a href="#XML2RFCV3" id="rfc.xref.XML2RFCV3.24"><cite title="The 'XML2RFC' version 3 Vocabulary">[XML2RFCV3]</cite></a>.<a class="self" href="#rfc.section.12.20.p.1">&para;</a></p></div></div><div id="v3.xref"><h3 id="rfc.section.12.21"><a href="#rfc.section.12.21">12.21</a>&nbsp;<a href="#v3.xref">Extensions to xref Element</a></h3><div id="v3.xref.relative"><h4 id="rfc.section.12.21.1"><a href="#rfc.section.12.21.1">12.21.1</a>&nbsp;<a href="#v3.xref.relative">relative attribute</a></h4><div id="rfc.section.12.21.1.p.1"><p>See <a href="https://tools.ietf.org/html/draft-hoffman-xml2rfc-17#section-2.65.3">Section 2.65.3</a> of <a href="#XML2RFCV3" id="rfc.xref.XML2RFCV3.25"><cite title="The 'XML2RFC' version 3 Vocabulary">[XML2RFCV3]</cite></a>.<a class="self" href="#rfc.section.12.21.1.p.1">&para;</a></p></div></div><div id="v3.xref.section"><h4 id="rfc.section.12.21.2"><a href="#rfc.section.12.21.2">12.21.2</a>&nbsp;<a href="#v3.xref.section">section attribute</a></h4><div id="rfc.section.12.21.2.p.1"><p>See <a href="https://tools.ietf.org/html/draft-hoffman-xml2rfc-17#section-2.65.4">Section 2.65.4</a> of <a href="#XML2RFCV3" id="rfc.xref.XML2RFCV3.26"><cite title="The 'XML2RFC' version 3 Vocabulary">[XML2RFCV3]</cite></a>.<a class="self" href="#rfc.section.12.21.2.p.1">&para;</a></p></div></div><div id="v3.xref.sectionFormat"><h4 id="rfc.section.12.21.3"><a href="#rfc.section.12.21.3">12.21.3</a>&nbsp;<a href="#v3.xref.sectionFormat">sectionFormat attribute</a></h4><div id="rfc.section.12.21.3.p.1"><p>See <a href="https://tools.ietf.org/html/draft-hoffman-xml2rfc-17#section-2.65.5">Section 2.65.5</a> of <a href="#XML2RFCV3" id="rfc.xref.XML2RFCV3.27"><cite title="The 'XML2RFC' version 3 Vocabulary">[XML2RFCV3]</cite></a>.<a class="self" href="#rfc.section.12.21.3.p.1">&para;</a></p></div></div></div></div><hr class="noprint"><div id="utilities"><h2 id="rfc.section.13" class="np"><a href="#rfc.section.13">13.</a>&nbsp;<a href="#utilities">Utilities</a></h2><div id="checking-references"><h3 id="rfc.section.13.1"><a href="#rfc.section.13.1">13.1</a>&nbsp;<a href="#checking-references">Checking References</a></h3><div id="rfc.section.13.1.p.1"><p><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 &lt;<a href="ftp://ftp.isi.edu/in-notes/rfc-index.xml">ftp://ftp.isi.edu/in-notes/rfc-index.xml</a>&gt; and &lt;<a href="http://www.w3.org/2002/01/tr-automation/tr.rdf">http://www.w3.org/2002/01/tr-automation/tr.rdf</a>&gt; and will use the XML status information provided at &lt;<a href="http://tools.ietf.org/">http://tools.ietf.org/</a>&gt;).<a class="self" href="#rfc.section.13.1.p.1">&para;</a></p></div><div id="rfc.section.13.1.p.2"><p>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&gt; element (see <a href="#ext-rfc2629.rfc" title="Extensions to Xml2rfc <rfc&gt; element">Section&nbsp;11.26</a>).<a class="self" href="#rfc.section.13.1.p.2">&para;</a></p></div><div id="rfc.section.13.1.p.3"><p><b>Note:</b> Downward references should be annotated using the &lt;annotate&gt; element, containing an &lt;xref&gt; to <a href="#BCP97" id="rfc.xref.BCP97.1"><cite title="Handling Normative References to Standards-Track Documents">[BCP97]</cite></a>.<a class="self" href="#rfc.section.13.1.p.3">&para;</a></p></div><div id="rfc.section.13.1.p.4"><p>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/*.<a class="self" href="#rfc.section.13.1.p.4">&para;</a></p></div><div id="rfc.figure.u.19"><p>For instance, as of 2008-07-12, the script produces for &lt;<a href="http://greenbytes.de/tech/webdav/rfc2518.xml">http://greenbytes.de/tech/webdav/rfc2518.xml</a>&gt;:</p><pre class="text">&gt; saxon rfc2518.xml check-references.xslt intended-status=PROPOSED \
     528</pre></div><div id="rfc.section.11.13.p.2"><p>The lenght computation counts line ends as two characters (CRLF).<a class="self" href="#rfc.section.11.13.p.2">&para;</a></p></div><div id="rfc.section.11.13.p.3"><p>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.<a class="self" href="#rfc.section.11.13.p.3">&para;</a></p></div></section><section id="ext.element.link"><h3 id="rfc.section.11.14"><a href="#rfc.section.11.14">11.14</a>&nbsp;<a href="#ext.element.link">&lt;link&gt; element</a></h3><div id="rfc.section.11.14.p.1"><p>This element can be added as a top-level child element below &lt;rfc&gt; to indicate additional link information. It's currently used only when generating HTML output, in which case an HTML <a href="http://www.w3.org/TR/html4/struct/links.html#edef-LINK">&lt;link&gt;</a> element with identical attributes gets generated.<a class="self" href="#rfc.section.11.14.p.1">&para;</a></p></div><div id="rfc.figure.u.15"><p>Example: generating HTML link element</p><pre class="text prettyprint">&lt;x:link xmlns:x="http://purl.org/net/xml2rfc/ext"
     529    rel="Bookmark"
     530    title="IETF WEBDAV Working Group"
     531    href="http://ftp.ics.uci.edu/pub/ietf/webdav/"/&gt;</pre></div><div id="rfc.section.11.14.p.2"><p>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.<a class="self" href="#rfc.section.11.14.p.2">&para;</a></p></div><div id="rfc.figure.u.16"><p>For instance:</p><pre class="text prettyprint">&lt;x:link xmlns:x="http://purl.org/net/xml2rfc/ext"
     532    rel="next"
     533    title="Part2"
     534    basename="draft-foobar-protocol-p2-latest"/&gt;</pre></div></section><section id="ext.element.lt"><h3 id="rfc.section.11.15"><a href="#rfc.section.11.15">11.15</a>&nbsp;<a href="#ext.element.lt">&lt;lt&gt; element</a></h3><div id="rfc.section.11.15.p.1"><p>Used for grouping multiple &lt;t&gt; elements into a single list item.<a class="self" href="#rfc.section.11.15.p.1">&para;</a></p></div></section><section id="ext.element.note"><h3 id="rfc.section.11.16"><a href="#rfc.section.11.16">11.16</a>&nbsp;<a href="#ext.element.note">&lt;note&gt; element</a></h3><div id="rfc.section.11.16.p.1"><p>Can be used to add a note, usually indented by a few characters. It should contain one or more &lt;t&gt; child elements.<a class="self" href="#rfc.section.11.16.p.1">&para;</a></p></div></section><section id="ext.element.parse-xml"><h3 id="rfc.section.11.17"><a href="#rfc.section.11.17">11.17</a>&nbsp;<a href="#ext.element.parse-xml">&lt;parse-xml&gt; element</a></h3><div id="rfc.section.11.17.p.1"><p>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).<a class="self" href="#rfc.section.11.17.p.1">&para;</a></p></div></section><section id="ext.element.prose"><h3 id="rfc.section.11.18"><a href="#rfc.section.11.18">11.18</a>&nbsp;<a href="#ext.element.prose">&lt;prose&gt; element</a></h3><div id="rfc.section.11.18.p.1"><p>This element can be used inside &lt;reference&gt; to add plain text (before the date, when present).<a class="self" href="#rfc.section.11.18.p.1">&para;</a></p></div><div id="rfc.section.11.18.p.2"><p><em>See also &lt;refcontent&gt; (<a href="#v3.refcontent" title="refcontent Element">Section&nbsp;12.13</a>).</em> <a class="self" href="#rfc.section.11.18.p.2">&para;</a></p></div></section><section id="ext.element.q"><h3 id="rfc.section.11.19"><a href="#rfc.section.11.19">11.19</a>&nbsp;<a href="#ext.element.q">&lt;q&gt; element</a></h3><div id="rfc.section.11.19.p.1"><p>This element is like the &lt;q&gt; element defined in <a href="http://www.w3.org/TR/2014/REC-html5-20141028/text-level-semantics.html#the-q-element">Section 4.5.7</a> of <a href="#HTML5" id="rfc.xref.HTML5.5"><cite title="HTML5">[HTML5]</cite></a>.<a class="self" href="#rfc.section.11.19.p.1">&para;</a></p></div></section><section id="ext.element.ref"><h3 id="rfc.section.11.20"><a href="#rfc.section.11.20">11.20</a>&nbsp;<a href="#ext.element.ref">&lt;ref&gt; element</a></h3><div id="rfc.section.11.20.p.1"><p>This element is a simplified variant of the &lt;xref&gt; 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;<a href="#ext.element.anchor-alias" class="smpl">anchor-alias</a>&gt;, it allows referring to other parts of the document with minimal additional markup.<a class="self" href="#rfc.section.11.20.p.1">&para;</a></p></div><div id="rfc.section.11.20.p.2"><p>For instance, given an alias definition such as<a class="self" href="#rfc.section.11.20.p.2">&para;</a></p></div><div id="rfc.figure.u.17"><pre class="text prettyprint">&lt;section title="Test" anchor="test"&gt;
     535  &lt;x:anchor-alias value="alias1"/&gt;
     536  &lt;x:anchor-alias value="alias 2"/&gt;
     537  ...
     538&lt;/section&gt;</pre></div><div id="rfc.section.11.20.p.3"><p>the following simple references<a class="self" href="#rfc.section.11.20.p.3">&para;</a></p></div><div id="rfc.figure.u.18"><pre class="text prettyprint">&lt;x:ref&gt;test&lt;/x:ref&gt;
     539&lt;x:ref&gt;alias1&lt;/x:ref&gt;
     540&lt;x:ref&gt;alias 2&lt;/x:ref&gt;</pre></div><div id="rfc.section.11.20.p.4" class="avoidbreakafter"><p>are equivalent to...:<a class="self" href="#rfc.section.11.20.p.4">&para;</a></p></div><div id="rfc.figure.u.19"><pre class="text prettyprint">&lt;xref target="test"&gt;test&lt;/xref&gt;
     541&lt;xref target="test"&gt;alias1&lt;/xref&gt;
     542&lt;xref target="test"&gt;alias 2&lt;/xref&gt;</pre></div></section><section id="ext.element.source"><h3 id="rfc.section.11.21"><a href="#rfc.section.11.21">11.21</a>&nbsp;<a href="#ext.element.source">&lt;source&gt; element</a></h3><div id="rfc.section.11.21.p.1"><p>Can be used to enhance a &lt;reference&gt; with information about the location for the XML source. This can be used by the &lt;xref&gt; processing code to automatically extract the target section number.<a class="self" href="#rfc.section.11.21.p.1">&para;</a></p></div><div id="rfc.figure.u.20"><p>For example:</p><pre class="text">...
     543&lt;xref target="RFC2616" x:fmt="of" x:rel="#PUT" /&gt;
     544...