Changeset 2272


Ignore:
Timestamp:
May 24, 2013, 6:41:50 AM (6 years ago)
Author:
julian.reschke@…
Message:

upgrade to newest version of rfc2629.xslt

Location:
rfc2629xslt
Files:
56 edited

Legend:

Unmodified
Added
Removed
  • rfc2629xslt/rfc2629.xslt

    r2232 r2272  
    3232<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    3333                version="2.0"
    34                
     34
    3535                xmlns:date="http://exslt.org/dates-and-times"
    3636                xmlns:ed="http://greenbytes.de/2002/rfcedit"
     
    4747                >
    4848
    49 <xsl:strip-space elements="back figure front list middle reference references rfc section"/>               
    50                
     49<xsl:strip-space elements="abstract author back figure front list middle note postal reference references rfc section texttable"/>
     50
    5151<xsl:output method="html" encoding="iso-8859-1" version="4.0" doctype-public="-//W3C//DTD HTML 4.01//EN" indent="no"/>
    5252
     
    329329</xsl:param>
    330330
    331 <!-- choose whether or not to do mailto links --> 
    332  
     331<!-- choose whether or not to do mailto links -->
     332
    333333<xsl:param name="xml2rfc-linkmailto">
    334334  <xsl:call-template name="parse-pis">
     
    339339</xsl:param>
    340340
    341 <!-- iprnotified switch --> 
    342  
     341<!-- iprnotified switch -->
     342
    343343<xsl:param name="xml2rfc-iprnotified">
    344344  <xsl:call-template name="parse-pis">
     
    376376<!-- character translation tables -->
    377377<xsl:variable name="lcase" select="'abcdefghijklmnopqrstuvwxyz'" />
    378 <xsl:variable name="ucase" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'" />       
     378<xsl:variable name="ucase" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'" />
    379379<xsl:variable name="digits" select="'0123456789'" />
    380380
     
    427427  )" />
    428428
    429 <xsl:variable name="rfcno" select="/rfc/@number"/> 
     429<xsl:variable name="rfcno" select="/rfc/@number"/>
    430430
    431431<xsl:variable name="submissionType">
     
    443443    </xsl:otherwise>
    444444  </xsl:choose>
    445  
     445
    446446  <!-- sanity check on @consensus -->
    447447  <xsl:if test="/rfc/@consensus and /rfc/@submissionType='independent'">
     
    473473      >2010</xsl:when>
    474474    <xsl:otherwise/>
    475   </xsl:choose>   
     475  </xsl:choose>
    476476</xsl:variable>
    477477
     
    483483      >2010</xsl:when>
    484484    <xsl:otherwise/>
    485   </xsl:choose>   
     485  </xsl:choose>
    486486</xsl:variable>
    487487
     
    492492      >2010</xsl:when>
    493493    <xsl:otherwise/>
    494   </xsl:choose>   
     494  </xsl:choose>
    495495</xsl:variable>
    496496
     
    537537  )" />
    538538
    539 <!-- this makes the Sep 2009 TLP text depend on the publication date to be >= 2009-11 
     539<!-- this makes the Sep 2009 TLP text depend on the publication date to be >= 2009-11
    540540     for IDs, and around 2009-09 for RFCs-->
    541541<xsl:variable name="ipr-2009-09" select="(
     
    544544    (
    545545      /rfc/@number and $pub-yearmonth >= 200909 and
    546       $rfcno!=5582 and $rfcno!=5621 and $rfcno!=5632 and $rfcno!=5645 and $rfcno!=5646 and $rfcno!=5681 
     546      $rfcno!=5582 and $rfcno!=5621 and $rfcno!=5632 and $rfcno!=5645 and $rfcno!=5646 and $rfcno!=5681
    547547    )
    548548  )" />
     
    555555    (
    556556      /rfc/@number and ($pub-yearmonth >= 201001 or
    557       $rfcno=5741 or $rfcno=5742 or $rfcno=5743) 
     557      $rfcno=5741 or $rfcno=5742 or $rfcno=5743)
    558558    )
    559559  )" />
     
    567567  )" />
    568568
    569 <!-- funding switch --> 
     569<!-- funding switch -->
    570570<xsl:variable name="funding0" select="(
    571571  $rfcno &gt; 2499) or
    572572  (not(/rfc/@number) and /rfc/@docName and $xml2rfc-ext-pub-year &gt;= 1999
    573573  )" />
    574  
     574
    575575<xsl:variable name="funding1" select="(
    576576  $rfcno &gt; 4320) or
     
    584584<!-- will document have an index -->
    585585<xsl:variable name="has-index" select="(//iref or (//xref and $xml2rfc-ext-include-references-in-index='yes')) and $xml2rfc-ext-include-index!='no'" />
    586          
     586
    587587<!-- does the document contain edits? -->
    588588<xsl:variable name="has-edits" select="//ed:ins | //ed:del | //ed:replace" />
    589              
     589
    590590<xsl:template match="text()[not(ancestor::artwork)]">
    591591  <xsl:variable name="ws" select="'&#9;&#10;&#13;&#32;'"/>
     
    603603  </xsl:if>
    604604</xsl:template>
    605              
    606              
     605
     606
    607607<xsl:template match="abstract">
     608  <xsl:call-template name="check-no-text-content"/>
    608609  <h1 id="{$anchor-prefix}.abstract"><a href="#{$anchor-prefix}.abstract">Abstract</a></h1>
    609610  <xsl:apply-templates />
     
    664665  <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')">
    665666    <xsl:if test="contains(.,'&lt;?xml')">
    666       <xsl:variable name="body" select="substring-after(substring-after(.,'&lt;?xml'),'?>')" /> 
     667      <xsl:variable name="body" select="substring-after(substring-after(.,'&lt;?xml'),'?>')" />
    667668      <xsl:if test="$body!='' and myns:parseXml($body)!=''">
    668669        <table style="background-color: red; border-width: thin; border-style: solid; border-color: black;">
     
    698699      </xsl:otherwise>
    699700    </xsl:choose>
    700   </xsl:variable> 
     701  </xsl:variable>
    701702  <xsl:choose>
    702703    <xsl:when test="@align='right'">
     
    707708          <xsl:call-template name="insertInsDelClass"/>
    708709          <xsl:copy-of select="$display"/>
    709         </pre>         
     710        </pre>
    710711        <xsl:call-template name="insert-end-code"/>
    711712      </div>
     
    718719          <xsl:call-template name="insertInsDelClass"/>
    719720          <xsl:copy-of select="$display"/>
    720         </pre>         
     721        </pre>
    721722        <xsl:call-template name="insert-end-code"/>
    722723      </div>
     
    767768    </xsl:when>
    768769    <xsl:otherwise>
    769       <xsl:variable name="start" select="substring-before($content,'&#10;')"/> 
     770      <xsl:variable name="start" select="substring-before($content,'&#10;')"/>
    770771      <xsl:variable name="end" select="substring-after($content,'&#10;')"/>
    771772      <xsl:variable name="max">
     
    773774          <xsl:when test="$indent!=''"><xsl:value-of select="69 + $indent"/></xsl:when>
    774775          <xsl:otherwise>69</xsl:otherwise>
    775         </xsl:choose>         
     776        </xsl:choose>
    776777      </xsl:variable>
    777778      <xsl:if test="string-length($start) > $max">
     
    834835
    835836<xsl:template match="author">
    836 
    837     <address class="vcard">
    838       <span class="vcardline">
    839         <span class="fn">
    840           <xsl:value-of select="@fullname" />
    841         </span>
    842         <xsl:if test="@role">
    843           (<xsl:value-of select="@role" />)
     837  <xsl:call-template name="check-no-text-content"/>
     838
     839  <address class="vcard">
     840    <span class="vcardline">
     841      <span class="fn">
     842        <xsl:value-of select="@fullname" />
     843      </span>
     844      <xsl:if test="@role">
     845        (<xsl:value-of select="@role" />)
     846      </xsl:if>
     847      <!-- annotation support for Martin "uuml" Duerst -->
     848      <xsl:if test="@x:annotation">
     849        <xsl:text> </xsl:text>
     850        <i><xsl:value-of select="@x:annotation"/></i>
     851      </xsl:if>
     852      <!-- components of name (hidden from display -->
     853      <span class="n hidden">
     854        <span class="family-name"><xsl:value-of select="@surname"/></span>
     855        <!-- given-name family-name -->
     856        <xsl:if test="@surname=substring(@fullname,1 + string-length(@fullname) - string-length(@surname))">
     857          <span class="given-name"><xsl:value-of select="normalize-space(substring(@fullname,1,string-length(@fullname) - string-length(@surname)))"/></span>
    844858        </xsl:if>
    845         <!-- annotation support for Martin "uuml" Duerst -->
    846         <xsl:if test="@x:annotation">
    847           <xsl:text> </xsl:text>
    848           <i><xsl:value-of select="@x:annotation"/></i>
     859        <!-- family-name given-name -->
     860        <xsl:if test="starts-with(@fullname,@surname)">
     861          <span class="given-name"><xsl:value-of select="normalize-space(substring-after(@fullname,@surname))"/></span>
    849862        </xsl:if>
    850         <!-- components of name (hidden from display -->
    851         <span class="n hidden">
    852           <span class="family-name"><xsl:value-of select="@surname"/></span>
    853           <!-- given-name family-name -->
    854           <xsl:if test="@surname=substring(@fullname,1 + string-length(@fullname) - string-length(@surname))">
    855             <span class="given-name"><xsl:value-of select="normalize-space(substring(@fullname,1,string-length(@fullname) - string-length(@surname)))"/></span>
     863      </span>
     864    </span>
     865    <xsl:if test="normalize-space(organization) != ''">
     866      <span class="org vcardline">
     867        <xsl:value-of select="organization" />
     868      </span>
     869    </xsl:if>
     870    <xsl:if test="address/postal">
     871      <span class="adr">
     872        <xsl:if test="address/postal/street">
     873          <xsl:for-each select="address/postal/street">
     874            <xsl:variable name="street">
     875              <xsl:call-template name="extract-normalized">
     876                <xsl:with-param name="node" select="."/>
     877                <xsl:with-param name="name" select="'street'"/>
     878              </xsl:call-template>
     879            </xsl:variable>
     880            <xsl:if test="$street!=''">
     881              <span class="street-address vcardline">
     882                <xsl:value-of select="$street"/>
     883              </span>
     884            </xsl:if>
     885          </xsl:for-each>
     886        </xsl:if>
     887        <xsl:if test="address/postal/city|address/postal/region|address/postal/code">
     888          <span class="vcardline">
     889            <xsl:if test="address/postal/city">
     890              <xsl:variable name="city">
     891                <xsl:call-template name="extract-normalized">
     892                  <xsl:with-param name="node" select="address/postal/city"/>
     893                  <xsl:with-param name="name" select="'address/postal/city'"/>
     894                </xsl:call-template>
     895              </xsl:variable>
     896              <xsl:if test="$city!=''">
     897                <span class="locality">
     898                  <xsl:value-of select="$city"/>
     899                </span>
     900                <xsl:text>, </xsl:text>
     901              </xsl:if>
     902            </xsl:if>
     903            <xsl:if test="address/postal/region">
     904              <xsl:variable name="region">
     905                <xsl:call-template name="extract-normalized">
     906                  <xsl:with-param name="node" select="address/postal/region"/>
     907                  <xsl:with-param name="name" select="'address/postal/region'"/>
     908                </xsl:call-template>
     909              </xsl:variable>
     910              <xsl:if test="$region!=''">
     911                <span class="region">
     912                  <xsl:value-of select="$region"/>
     913                </span>
     914                <xsl:text>&#160;</xsl:text>
     915              </xsl:if>
     916            </xsl:if>
     917            <xsl:if test="address/postal/code">
     918              <xsl:variable name="code">
     919                <xsl:call-template name="extract-normalized">
     920                  <xsl:with-param name="node" select="address/postal/code"/>
     921                  <xsl:with-param name="name" select="'address/postal/code'"/>
     922                </xsl:call-template>
     923              </xsl:variable>
     924              <xsl:if test="$code!=''">
     925                <span class="postal-code">
     926                  <xsl:value-of select="$code"/>
     927                </span>
     928              </xsl:if>
     929            </xsl:if>
     930          </span>
     931        </xsl:if>
     932        <xsl:if test="address/postal/country">
     933          <xsl:variable name="country">
     934            <xsl:call-template name="extract-normalized">
     935              <xsl:with-param name="node" select="address/postal/country"/>
     936              <xsl:with-param name="name" select="'address/postal/country'"/>
     937            </xsl:call-template>
     938          </xsl:variable>
     939          <xsl:if test="$country!=''">
     940            <span class="country-name vcardline">
     941              <xsl:value-of select="$country"/>
     942            </span>
    856943          </xsl:if>
    857           <!-- family-name given-name -->
    858           <xsl:if test="starts-with(@fullname,@surname)">
    859             <span class="given-name"><xsl:value-of select="normalize-space(substring-after(@fullname,@surname))"/></span>
    860           </xsl:if>
    861         </span>
     944        </xsl:if>
    862945      </span>
    863       <xsl:if test="normalize-space(organization) != ''">
    864         <span class="org vcardline">
    865           <xsl:value-of select="organization" />
     946    </xsl:if>
     947    <xsl:if test="address/phone">
     948      <xsl:variable name="phone">
     949        <xsl:call-template name="extract-normalized">
     950          <xsl:with-param name="node" select="address/phone"/>
     951          <xsl:with-param name="name" select="'address/phone'"/>
     952        </xsl:call-template>
     953      </xsl:variable>
     954      <xsl:if test="$phone!=''">
     955        <span class="vcardline tel">
     956          <xsl:text>Phone: </xsl:text>
     957          <a href="tel:{translate($phone,' ','')}"><span class="value"><xsl:value-of select="$phone" /></span></a>
    866958        </span>
    867959      </xsl:if>
    868       <xsl:if test="address/postal">
    869         <span class="adr">
    870           <xsl:if test="address/postal/street">
    871             <xsl:for-each select="address/postal/street">
    872               <xsl:variable name="street">
    873                 <xsl:call-template name="extract-normalized">
    874                   <xsl:with-param name="node" select="."/>
    875                   <xsl:with-param name="name" select="'street'"/>
    876                 </xsl:call-template>
    877               </xsl:variable>
    878               <xsl:if test="$street!=''">
    879                 <span class="street-address vcardline">
    880                   <xsl:value-of select="$street"/>
    881                 </span>
    882               </xsl:if>
    883             </xsl:for-each>
     960    </xsl:if>
     961    <xsl:if test="address/facsimile">
     962      <xsl:variable name="facsimile">
     963        <xsl:call-template name="extract-normalized">
     964          <xsl:with-param name="node" select="address/facsimile"/>
     965          <xsl:with-param name="name" select="'address/facsimile'"/>
     966        </xsl:call-template>
     967      </xsl:variable>
     968      <xsl:if test="$facsimile!=''">
     969        <span class="vcardline tel">
     970          <span class="type">Fax</span><xsl:text>: </xsl:text>
     971          <a href="fax:{translate($facsimile,' ','')}"><span class="value"><xsl:value-of select="$facsimile" /></span></a>
     972        </span>
     973      </xsl:if>
     974    </xsl:if>
     975    <xsl:for-each select="address/email">
     976      <xsl:variable name="email">
     977        <xsl:call-template name="extract-email"/>
     978      </xsl:variable>
     979
     980      <span class="vcardline">
     981        <xsl:choose>
     982          <xsl:when test="$xml2rfc-rfcedstyle='yes'">Email: </xsl:when>
     983          <xsl:otherwise>EMail: </xsl:otherwise>
     984        </xsl:choose>
     985        <a>
     986          <xsl:if test="$xml2rfc-linkmailto!='no'">
     987            <xsl:attribute name="href">mailto:<xsl:value-of select="$email" /></xsl:attribute>
    884988          </xsl:if>
    885           <xsl:if test="address/postal/city|address/postal/region|address/postal/code">
    886             <span class="vcardline">
    887               <xsl:if test="address/postal/city">
    888                 <xsl:variable name="city">
    889                   <xsl:call-template name="extract-normalized">
    890                     <xsl:with-param name="node" select="address/postal/city"/>
    891                     <xsl:with-param name="name" select="'address/postal/city'"/>
    892                   </xsl:call-template>
    893                 </xsl:variable>
    894                 <xsl:if test="$city!=''">
    895                   <span class="locality">
    896                     <xsl:value-of select="$city"/>
    897                   </span>
    898                   <xsl:text>, </xsl:text>
    899                 </xsl:if>
    900               </xsl:if>
    901               <xsl:if test="address/postal/region">
    902                 <xsl:variable name="region">
    903                   <xsl:call-template name="extract-normalized">
    904                     <xsl:with-param name="node" select="address/postal/region"/>
    905                     <xsl:with-param name="name" select="'address/postal/region'"/>
    906                   </xsl:call-template>
    907                 </xsl:variable>
    908                 <xsl:if test="$region!=''">
    909                   <span class="region">
    910                     <xsl:value-of select="$region"/>
    911                   </span>
    912                   <xsl:text>&#160;</xsl:text>
    913                 </xsl:if>
    914               </xsl:if>
    915               <xsl:if test="address/postal/code">
    916                 <xsl:variable name="code">
    917                   <xsl:call-template name="extract-normalized">
    918                     <xsl:with-param name="node" select="address/postal/code"/>
    919                     <xsl:with-param name="name" select="'address/postal/code'"/>
    920                   </xsl:call-template>
    921                 </xsl:variable>
    922                 <xsl:if test="$code!=''">
    923                   <span class="postal-code">
    924                     <xsl:value-of select="$code"/>
    925                   </span>
    926                 </xsl:if>
    927               </xsl:if>
    928             </span>
    929           </xsl:if>
    930           <xsl:if test="address/postal/country">
    931             <xsl:variable name="country">
    932               <xsl:call-template name="extract-normalized">
    933                 <xsl:with-param name="node" select="address/postal/country"/>
    934                 <xsl:with-param name="name" select="'address/postal/country'"/>
    935               </xsl:call-template>
    936             </xsl:variable>
    937             <xsl:if test="$country!=''">
    938               <span class="country-name vcardline">
    939                 <xsl:value-of select="$country"/>
    940               </span>
    941             </xsl:if>
     989          <span class="email"><xsl:value-of select="$email" /></span>
     990        </a>
     991      </span>
     992    </xsl:for-each>
     993    <xsl:for-each select="address/uri">
     994      <xsl:variable name="uri">
     995        <xsl:call-template name="extract-uri"/>
     996      </xsl:variable>
     997      <xsl:if test="$uri!=''">
     998        <span class="vcardline">
     999          <xsl:text>URI: </xsl:text>
     1000          <a href="{$uri}" class="url"><xsl:value-of select="$uri" /></a>
     1001          <xsl:if test="@x:annotation">
     1002            <xsl:text> </xsl:text>
     1003            <i><xsl:value-of select="@x:annotation"/></i>
    9421004          </xsl:if>
    9431005        </span>
    9441006      </xsl:if>
    945       <xsl:if test="address/phone">
    946         <xsl:variable name="phone">
    947           <xsl:call-template name="extract-normalized">
    948             <xsl:with-param name="node" select="address/phone"/>
    949             <xsl:with-param name="name" select="'address/phone'"/>
    950           </xsl:call-template>
    951         </xsl:variable>
    952         <xsl:if test="$phone!=''">
    953           <span class="vcardline tel">
    954             <xsl:text>Phone: </xsl:text>
    955             <a href="tel:{translate($phone,' ','')}"><span class="value"><xsl:value-of select="$phone" /></span></a>
    956           </span>
    957         </xsl:if>
    958       </xsl:if>
    959       <xsl:if test="address/facsimile">
    960         <xsl:variable name="facsimile">
    961           <xsl:call-template name="extract-normalized">
    962             <xsl:with-param name="node" select="address/facsimile"/>
    963             <xsl:with-param name="name" select="'address/facsimile'"/>
    964           </xsl:call-template>
    965         </xsl:variable>
    966         <xsl:if test="$facsimile!=''">
    967           <span class="vcardline tel">
    968             <span class="type">Fax</span><xsl:text>: </xsl:text>
    969             <a href="fax:{translate($facsimile,' ','')}"><span class="value"><xsl:value-of select="$facsimile" /></span></a>
    970           </span>
    971         </xsl:if>
    972       </xsl:if>
    973       <xsl:for-each select="address/email">
    974         <xsl:variable name="email">
    975           <xsl:call-template name="extract-email"/>
    976         </xsl:variable>
    977        
    978         <span class="vcardline">
    979           <xsl:choose>
    980             <xsl:when test="$xml2rfc-rfcedstyle='yes'">Email: </xsl:when>
    981             <xsl:otherwise>EMail: </xsl:otherwise>
    982           </xsl:choose>
    983           <a>
    984             <xsl:if test="$xml2rfc-linkmailto!='no'">
    985               <xsl:attribute name="href">mailto:<xsl:value-of select="$email" /></xsl:attribute>
    986             </xsl:if>
    987             <span class="email"><xsl:value-of select="$email" /></span>
    988           </a>
    989         </span>
    990       </xsl:for-each>
    991       <xsl:for-each select="address/uri">
    992         <xsl:variable name="uri">
    993           <xsl:call-template name="extract-uri"/>
    994         </xsl:variable>
    995         <xsl:if test="$uri!=''">
    996           <span class="vcardline">
    997             <xsl:text>URI: </xsl:text>
    998             <a href="{$uri}" class="url"><xsl:value-of select="$uri" /></a>
    999             <xsl:if test="@x:annotation">
    1000               <xsl:text> </xsl:text>
    1001               <i><xsl:value-of select="@x:annotation"/></i>
    1002             </xsl:if>
    1003           </span>
    1004         </xsl:if>
    1005       </xsl:for-each>
    1006     </address>
    1007 
     1007    </xsl:for-each>
     1008  </address>
    10081009</xsl:template>
    10091010
     
    10161017    <xsl:call-template name="insertComments" />
    10171018  </xsl:if>
    1018  
     1019
    10191020  <!-- next, add information about the document's authors -->
    10201021  <xsl:if test="$xml2rfc-ext-authors-section!='end'">
    10211022    <xsl:call-template name="insertAuthors" />
    10221023  </xsl:if>
    1023      
     1024
    10241025  <!-- add all other top-level sections under <back> -->
    10251026  <xsl:apply-templates select="back/*[not(self::references) and not(self::ed:replace and .//references)]" />
     
    10391040    <!-- copyright statements -->
    10401041    <xsl:variable name="copyright"><xsl:call-template name="insertCopyright" /></xsl:variable>
    1041  
     1042
    10421043    <!-- emit it -->
    10431044    <xsl:choose>
     
    10521053    </xsl:choose>
    10531054  </xsl:if>
    1054  
     1055
    10551056</xsl:template>
    10561057
     
    10581059  <a href="{@target}"><xsl:apply-templates /></a>
    10591060</xsl:template>
    1060                
     1061
    10611062<xsl:template match="eref[not(node())]">
    10621063  <xsl:text>&lt;</xsl:text>
     
    10861087  <xsl:if test="$xml2rfc-topblock!='no'">
    10871088    <!-- collect information for left column -->
    1088      
     1089
    10891090    <xsl:variable name="leftColumn">
    1090       <xsl:call-template name="collectLeftHeaderColumn" />   
     1091      <xsl:call-template name="collectLeftHeaderColumn" />
    10911092    </xsl:variable>
    1092  
     1093
    10931094    <!-- collect information for right column -->
    1094      
     1095
    10951096    <xsl:variable name="rightColumn">
    1096       <xsl:call-template name="collectRightHeaderColumn" />   
     1097      <xsl:call-template name="collectRightHeaderColumn" />
    10971098    </xsl:variable>
    1098      
     1099
    10991100    <!-- insert the collected information -->
    11001101    <table class="header">
     
    11021103        <xsl:when test="function-available('exslt:node-set')">
    11031104          <xsl:call-template name="emitheader">
    1104             <xsl:with-param name="lc" select="exslt:node-set($leftColumn)" />   
    1105             <xsl:with-param name="rc" select="exslt:node-set($rightColumn)" />   
     1105            <xsl:with-param name="lc" select="exslt:node-set($leftColumn)" />
     1106            <xsl:with-param name="rc" select="exslt:node-set($rightColumn)" />
    11061107          </xsl:call-template>
    1107         </xsl:when>   
     1108        </xsl:when>
    11081109        <xsl:otherwise>
    11091110          <xsl:call-template name="error">
     
    11141115    </table>
    11151116  </xsl:if>
    1116    
     1117
    11171118  <p class="title">
    11181119    <!-- main title -->
     
    11241125      <br/>
    11251126      <span class="filename"><xsl:value-of select="$docname"/></span>
    1126      
     1127
    11271128      <xsl:variable name="docname-noext">
    11281129        <xsl:choose>
     
    11381139        </xsl:choose>
    11391140      </xsl:variable>
    1140      
     1141
    11411142      <!-- more name checks -->
    11421143      <xsl:variable name="offending" select="translate($docname,concat($lcase,$digits,'-.'),'')"/>
     
    11461147        </xsl:call-template>
    11471148      </xsl:if>
    1148      
    1149      
     1149
     1150
    11501151      <xsl:if test="contains($docname,'--')">
    11511152        <xsl:call-template name="warning">
     
    11591160        </xsl:call-template>
    11601161      </xsl:if>
    1161      
     1162
    11621163      <!-- sequence number -->
    11631164      <xsl:variable name="seq">
     
    11801181        </xsl:call-template>
    11811182      </xsl:if>
    1182      
    1183     </xsl:if> 
     1183
     1184    </xsl:if>
    11841185  </p>
    1185  
     1186
    11861187  <!-- insert notice about update -->
    11871188  <xsl:variable name="published-as" select="/*/x:link[@rel='Alternate' and starts-with(@title,'RFC')]"/>
     
    11911192    </p>
    11921193  </xsl:if>
    1193    
     1194
    11941195  <!-- check for conforming ipr attribute -->
    11951196  <xsl:choose>
     
    12161217        <xsl:with-param name="msg" select="concat('Unknown value for /rfc/@ipr: ', /rfc/@ipr)"/>
    12171218      </xsl:call-template>
    1218     </xsl:otherwise>       
    1219   </xsl:choose>           
     1219    </xsl:otherwise>
     1220  </xsl:choose>
    12201221
    12211222  <xsl:if test="$xml2rfc-private='' and not($abstract-first)">
    12221223    <xsl:call-template name="emit-ietf-preamble"/>
    12231224  </xsl:if>
    1224  
     1225
    12251226  <xsl:apply-templates select="x:boilerplate"/>
    12261227  <xsl:apply-templates select="abstract" />
    1227  
     1228
    12281229  <!-- Notes except IESG Notes -->
    12291230  <xsl:apply-templates select="note[@title!='IESG Note' or $xml2rfc-private!='']" />
    12301231  <!-- show notes inside change tracking as well -->
    12311232  <xsl:apply-templates select="ed:replace[.//note[@title!='IESG Note' or $xml2rfc-private!='']]" />
    1232    
     1233
    12331234  <xsl:if test="$xml2rfc-private='' and $abstract-first">
    12341235    <xsl:call-template name="emit-ietf-preamble"/>
     
    12471248    <xsl:call-template name="insertPreamble" />
    12481249  </xsl:variable>
    1249  
     1250
    12501251  <!-- emit it -->
    12511252  <xsl:choose>
     
    13601361  </ol>
    13611362</xsl:template>
    1362    
     1363
    13631364<xsl:template match="list[@style='symbols']">
    13641365  <xsl:call-template name="check-no-text-content"/>
     
    15041505
    15051506<xsl:template match="note">
     1507  <xsl:call-template name="check-no-text-content"/>
    15061508  <xsl:variable name="num"><xsl:number/></xsl:variable>
    15071509    <h1 id="{$anchor-prefix}.note.{$num}">
     
    15921594    </xsl:when>
    15931595    <xsl:otherwise />
    1594   </xsl:choose> 
    1595  
     1596  </xsl:choose>
     1597
    15961598</xsl:template>
    15971599
     
    16121614      </xsl:call-template>
    16131615    </xsl:otherwise>
    1614   </xsl:choose> 
    1615  
     1616  </xsl:choose>
     1617
    16161618</xsl:template>
    16171619
     
    16641666    </xsl:choose>
    16651667  </xsl:variable>
    1666  
     1668
    16671669  <tr>
    16681670    <td class="reference">
     
    16821684      </b>
    16831685    </td>
    1684    
     1686
    16851687    <td class="top">
    16861688      <xsl:call-template name="insertInsDelClass"/>
     
    16901692        </xsl:variable>
    16911693        <xsl:variable name="truncated-initials" select="concat(substring-before($initials,'.'),'.')"/>
    1692      
     1694
    16931695        <xsl:choose>
    16941696          <xsl:when test="@surname and @surname!=''">
     
    17231725              </xsl:otherwise>
    17241726            </xsl:choose>
    1725            
     1727
    17261728            <xsl:choose>
    17271729              <xsl:when test="position()=last() - 1">
     
    17431745              </xsl:otherwise>
    17441746            </xsl:choose>
    1745            
     1747
    17461748            <xsl:choose>
    17471749              <xsl:when test="position()=last() - 1">
     
    17571759        </xsl:choose>
    17581760      </xsl:for-each>
    1759          
     1761
    17601762      <xsl:if test="not(front/title/@x:quotes='false')">&#8220;</xsl:if>
    17611763      <xsl:choose>
     
    17681770      </xsl:choose>
    17691771      <xsl:if test="not(front/title/@x:quotes='false')">&#8221;</xsl:if>
    1770      
     1772
    17711773      <xsl:variable name="rfcs" select="count(seriesInfo[@name='RFC'])"/>
    1772            
     1774
    17731775      <xsl:for-each select="seriesInfo">
    17741776        <xsl:text>, </xsl:text>
     
    17871789          </xsl:otherwise>
    17881790        </xsl:choose>
    1789        
     1791
    17901792        <!-- check that BCP FYI STD RFC are in the right order -->
    17911793        <xsl:if test="(@name='BCP' or @name='FYI' or @name='STD') and preceding-sibling::seriesInfo[@name='RFC']">
     
    17941796          </xsl:call-template>
    17951797        </xsl:if>
    1796        
     1798
    17971799      </xsl:for-each>
    1798      
     1800
    17991801      <!-- avoid hacks using seriesInfo when it's not really series information -->
    18001802      <xsl:for-each select="x:prose">
     
    18191821        <xsl:value-of select="front/date/@year" />
    18201822      </xsl:if>
    1821      
     1823
    18221824      <xsl:if test="string-length(normalize-space(@target)) &gt; 0">
    18231825        <xsl:text>, &lt;</xsl:text>
     
    18251827        <xsl:text>&gt;</xsl:text>
    18261828      </xsl:if>
    1827      
     1829
    18281830      <xsl:text>.</xsl:text>
    18291831
     
    18351837    </td>
    18361838  </tr>
    1837  
    1838  
     1839
     1840
    18391841</xsl:template>
    18401842
     
    18471849      <xsl:text>del-</xsl:text>
    18481850    </xsl:if>
    1849     <xsl:number level="any"/>     
     1851    <xsl:number level="any"/>
    18501852  </xsl:variable>
    1851  
     1853
    18521854  <xsl:variable name="refseccount" select="count(/rfc/back/references)+count(/rfc/back/ed:replace/ed:ins/references)"/>
    18531855
     
    18691871    </h1>
    18701872  </xsl:if>
    1871  
     1873
    18721874  <xsl:variable name="elemtype">
    18731875    <xsl:choose>
     
    18761878    </xsl:choose>
    18771879  </xsl:variable>
    1878  
     1880
    18791881  <xsl:variable name="title">
    18801882    <xsl:choose>
     
    18831885    </xsl:choose>
    18841886  </xsl:variable>
    1885  
    1886   <xsl:element name="{$elemtype}"> 
     1887
     1888  <xsl:element name="{$elemtype}">
    18871889    <xsl:if test="$name='1'">
    18881890      <xsl:call-template name="insert-conditional-pagebreak"/>
     
    19061908    <xsl:value-of select="$title"/>
    19071909  </xsl:element>
    1908  
     1910
    19091911  <table>
    19101912    <xsl:choose>
     
    19541956      <xsl:call-template name="insertCss" />
    19551957      <!-- <link rel="alternate stylesheet" type="text/css" media="screen" title="Plain (typewriter)" href="rfc2629tty.css" /> -->
    1956            
     1958
    19571959      <!-- link elements -->
    19581960      <xsl:if test="$xml2rfc-toc='yes'">
     
    20002002      </xsl:variable>
    20012003      <meta name="generator" content="{$gen}" />
    2002      
     2004
    20032005      <!-- keywords -->
    20042006      <xsl:if test="front/keyword">
     
    20122014        <!-- Dublin Core Metadata -->
    20132015        <link rel="schema.dct" href="http://purl.org/dc/terms/" />
    2014              
     2016
    20152017        <!-- DC creator, see RFC2731 -->
    20162018        <xsl:for-each select="front/author">
     
    20202022          <meta name="dct.creator" content="{concat(@surname,', ',$initials)}" />
    20212023        </xsl:for-each>
    2022        
     2024
    20232025        <xsl:if test="$xml2rfc-private=''">
    20242026          <xsl:choose>
     
    20392041            </xsl:attribute>
    20402042          </meta>
    2041  
     2043
    20422044          <xsl:if test="@obsoletes!=''">
    20432045            <xsl:call-template name="rfclist-for-dcmeta">
     
    20462048          </xsl:if>
    20472049        </xsl:if>
    2048  
     2050
    20492051        <xsl:if test="front/abstract">
    20502052          <meta name="dct.abstract" content="{normalize-space(front/abstract)}" />
    2051         </xsl:if>     
     2053        </xsl:if>
    20522054
    20532055        <xsl:if test="@number">
    20542056          <meta name="dct.isPartOf" content="urn:issn:2070-1721" />
    2055         </xsl:if>     
     2057        </xsl:if>
    20562058
    20572059      </xsl:if>
    2058      
     2060
    20592061      <!-- this replicates dct.abstract, but is used by Google & friends -->
    20602062      <xsl:if test="front/abstract">
    20612063        <meta name="description" content="{normalize-space(front/abstract)}" />
    20622064      </xsl:if>
    2063      
     2065
    20642066    </head>
    20652067    <body>
     
    20672069        <xsl:attribute name="onload">init();</xsl:attribute>
    20682070      </xsl:if>
    2069    
     2071
    20702072      <!-- insert diagnostics -->
    20712073      <xsl:call-template name="insert-diagnostics"/>
     
    20762078    </body>
    20772079  </html>
    2078 </xsl:template>               
     2080</xsl:template>
    20792081
    20802082
     
    21012103  <xsl:apply-templates select="." />
    21022104  <xsl:apply-templates select="following-sibling::node()[1]" mode="t-content" />
    2103 </xsl:template>               
    2104                
     2105</xsl:template>
     2106
    21052107<!-- ... otherwise group into p elements -->
    21062108<xsl:template mode="t-content" match="*|node()">
     
    21092111  </xsl:variable>
    21102112
    2111   <!-- do not open a new p element if this is a whitespace-only text node and no siblings follow --> 
     2113  <!-- do not open a new p element if this is a whitespace-only text node and no siblings follow -->
    21122114  <xsl:if test="not(self::text() and normalize-space(.)='' and not(following-sibling::node()))">
    21132115    <p>
     
    21212123  </xsl:if>
    21222124  <xsl:apply-templates mode="t-content" select="following-sibling::*[self::list or self::figure or self::texttable][1]" />
    2123 </xsl:template>               
    2124                
     2125</xsl:template>
     2126
    21252127<xsl:template mode="t-content2" match="*">
    21262128  <xsl:apply-templates select="." />
     
    21282130    <xsl:apply-templates select="following-sibling::node()[1]" mode="t-content2" />
    21292131  </xsl:if>
    2130 </xsl:template>       
     2132</xsl:template>
    21312133
    21322134<xsl:template mode="t-content2" match="text()">
     
    21352137    <xsl:apply-templates select="following-sibling::node()[1]" mode="t-content2" />
    21362138  </xsl:if>
    2137 </xsl:template>               
     2139</xsl:template>
    21382140
    21392141<xsl:template mode="t-content2" match="comment()|processing-instruction()">
     
    21422144    <xsl:apply-templates select="following-sibling::node()[1]" mode="t-content2" />
    21432145  </xsl:if>
    2144 </xsl:template>               
     2146</xsl:template>
    21452147
    21462148<xsl:template match="title">
     
    21982200    </xsl:choose>
    21992201  </xsl:variable>
    2200    
     2202
    22012203  <xsl:if test="not(ancestor::section) and not(ancestor::x:boilerplate) and not(@myns:notoclink)">
    22022204    <xsl:call-template name="insert-conditional-hrule"/>
    22032205  </xsl:if>
    2204  
     2206
    22052207  <xsl:variable name="elemtype">
    22062208    <xsl:choose>
     
    22092211    </xsl:choose>
    22102212  </xsl:variable>
    2211  
     2213
    22122214  <!-- process irefs immediately following the section so that their anchor
    22132215  actually is the section heading -->
     
    22282230      <xsl:otherwise/>
    22292231    </xsl:choose>
    2230    
     2232
    22312233    <xsl:call-template name="insertInsDelClass" />
    2232        
     2234
    22332235    <xsl:if test="$sectionNumber!='' and not(contains($sectionNumber,'unnumbered-'))">
    22342236      <a href="#{$anchor-prefix}.section.{$sectionNumber}">
     
    22392241      <xsl:text>&#0160;</xsl:text>
    22402242    </xsl:if>
    2241    
     2243
    22422244    <!-- issue tracking? -->
    22432245    <xsl:if test="@ed:resolves">
    22442246      <xsl:call-template name="insert-issue-pointer"/>
    22452247    </xsl:if>
    2246    
     2248
    22472249    <xsl:choose>
    22482250      <xsl:when test="@anchor">
     
    23732375      </xsl:choose>
    23742376    </xsl:when>
    2375  
     2377
    23762378    <!-- Other x:fmt values than "none": unsupported -->
    23772379    <xsl:when test="@x:fmt and @x:fmt!='none'">
     
    23802382      </xsl:call-template>
    23812383    </xsl:when>
    2382    
     2384
    23832385    <!-- Section links -->
    23842386    <xsl:when test="$node/self::section or $node/self::appendix">
     
    24242426        </xsl:if>
    24252427      </xsl:if>
    2426      
     2428
    24272429      <a href="#{$target}">
    24282430        <xsl:if test="@format='none'">
     
    24502452
    24512453</xsl:template>
    2452                
    2453 <xsl:key name="iref-xanch" match="iref[@x:for-anchor]" use="@x:for-anchor"/>           
    2454                
     2454
     2455<xsl:key name="iref-xanch" match="iref[@x:for-anchor]" use="@x:for-anchor"/>
     2456
    24552457<xsl:template match="xref[not(node())]">
    24562458
     
    24712473
    24722474    <xsl:choose>
    2473    
     2475
    24742476      <!-- Section links -->
    24752477      <xsl:when test="$node/self::section or $node/self::appendix">
     
    24852487        </a>
    24862488      </xsl:when>
    2487  
     2489
    24882490      <!-- Figure links -->
    24892491      <xsl:when test="$node/self::figure">
     
    25072509        </a>
    25082510      </xsl:when>
    2509      
     2511
    25102512      <!-- Table links -->
    25112513      <xsl:when test="$node/self::texttable">
     
    25292531        </a>
    25302532      </xsl:when>
    2531      
     2533
    25322534      <!-- Paragraph links -->
    25332535      <xsl:when test="$node/self::t">
     
    25382540            </xsl:for-each>
    25392541          </xsl:variable>
     2542          <xsl:variable name="pparent" select="$node/.."/>
     2543          <xsl:variable name="listtype">
     2544            <xsl:choose>
     2545              <xsl:when test="$pparent/self::list">
     2546                <xsl:value-of select="$pparent/@style"/>
     2547              </xsl:when>
     2548              <xsl:otherwise></xsl:otherwise>
     2549            </xsl:choose>
     2550          </xsl:variable>
     2551          <xsl:variable name="listindex">
     2552            <xsl:choose>
     2553              <xsl:when test="$listtype='numbers'">
     2554                <xsl:for-each select="$node">
     2555                  <xsl:number/>
     2556                </xsl:for-each>
     2557              </xsl:when>
     2558              <xsl:when test="$listtype='letters'">
     2559                <xsl:for-each select="$node">
     2560                  <xsl:number format="a"/>
     2561                </xsl:for-each>
     2562              </xsl:when>
     2563              <xsl:otherwise/>
     2564            </xsl:choose>
     2565          </xsl:variable>
    25402566          <xsl:choose>
    25412567            <xsl:when test="$xref/@format='counter'">
    2542               <xsl:value-of select="$tcnt" />
     2568              <xsl:choose>
     2569                <xsl:when test="$listtype!='' and $listindex!=''">
     2570                  <xsl:value-of select="$listindex"/>
     2571                </xsl:when>
     2572                <xsl:when test="$listtype!='' and $listindex=''">
     2573                  <xsl:call-template name="warning">
     2574                    <xsl:with-param name="msg" select="concat('Use of format=counter for unsupported list type ',$listtype)"/>
     2575                  </xsl:call-template>
     2576                  <xsl:value-of select="$tcnt"/>             
     2577                </xsl:when>
     2578                <xsl:otherwise>
     2579                  <xsl:value-of select="$tcnt"/>             
     2580                </xsl:otherwise>
     2581              </xsl:choose>
    25432582            </xsl:when>
    25442583            <xsl:when test="$xref/@format='title'">
     
    25512590        </a>
    25522591      </xsl:when>
    2553  
     2592
    25542593      <!-- Comment links -->
    25552594      <xsl:when test="$node/self::cref">
     
    25732612        </a>
    25742613      </xsl:when>
    2575  
     2614
    25762615      <!-- Reference links -->
    25772616      <xsl:when test="$node/self::reference">
    2578  
     2617
    25792618        <!-- check normative/informative -->
    25802619        <xsl:variable name="t-is-normative" select="$xref/ancestor-or-self::*[@x:nrm][1]"/>
     
    25912630          </xsl:if>
    25922631        </xsl:if>
    2593      
     2632
    25942633        <xsl:variable name="href">
    25952634          <xsl:call-template name="computed-target">
     
    25982637          </xsl:call-template>
    25992638        </xsl:variable>
    2600        
     2639
    26012640        <xsl:variable name="sec">
    26022641          <xsl:choose>
     
    26232662          </xsl:choose>
    26242663        </xsl:variable>
    2625        
     2664
    26262665        <xsl:variable name="secterm">
    26272666          <xsl:choose>
     
    26312670          </xsl:choose>
    26322671        </xsl:variable>
    2633  
     2672
    26342673        <xsl:variable name="fmt">
    26352674          <xsl:choose>
     
    26392678          </xsl:choose>
    26402679        </xsl:variable>
    2641  
     2680
    26422681        <xsl:variable name="title">
    26432682          <xsl:choose>
     
    26572696          </xsl:choose>
    26582697        </xsl:variable>
    2659  
     2698
    26602699        <!--
    26612700        Formats:
    2662        
     2701
    26632702          ()      [XXXX] (Section SS)
    26642703          ,       [XXXX], Section SS
     
    26672706          number  SS
    26682707        -->
    2669        
     2708
    26702709        <xsl:if test="$fmt and not($fmt='()' or $fmt=',' or $fmt='of' or $fmt='sec' or $fmt='anchor' or $fmt='number')">
    26712710          <xsl:call-template name="error">
     
    26732712          </xsl:call-template>
    26742713        </xsl:if>
    2675  
     2714
    26762715        <xsl:if test="$sec!=''">
    2677                
     2716
    26782717          <xsl:choose>
    26792718            <xsl:when test="$fmt='of' or $fmt='sec'">
     
    27172756          </xsl:choose>
    27182757        </xsl:if>
    2719  
     2758
    27202759        <xsl:if test="$sec='' or ($fmt!='sec' and $fmt!='number')">
    27212760          <a href="#{$xref/@target}">
     
    27412780          </a>
    27422781        </xsl:if>
    2743        
     2782
    27442783        <xsl:if test="$sec!=''">
    27452784          <xsl:choose>
     
    27742813        </xsl:if>
    27752814      </xsl:when>
    2776      
     2815
    27772816      <xsl:otherwise>
    27782817        <xsl:if test="$node">
     
    28922931    </xsl:if>
    28932932  </xsl:if>
    2894    
     2933
    28952934  <!-- private case -->
    28962935  <xsl:if test="$xml2rfc-private!=''">
    28972936    <myns:item><xsl:value-of select="$xml2rfc-private" /></myns:item>
    28982937  </xsl:if>
    2899  
     2938
    29002939  <xsl:if test="$header-format='2010' and /rfc/@number">
    29012940    <myns:item>ISSN: 2070-1721</myns:item>
     
    29663005    <xsl:for-each select="$lc/myns:item | $rc/myns:item">
    29673006      <xsl:variable name="pos" select="position()" />
    2968       <xsl:if test="$pos &lt; count($lc/myns:item) + 1 or $pos &lt; count($rc/myns:item) + 1"> 
     3007      <xsl:if test="$pos &lt; count($lc/myns:item) + 1 or $pos &lt; count($rc/myns:item) + 1">
    29693008        <tr>
    29703009          <td class="left"><xsl:call-template name="copynodes"><xsl:with-param name="nodes" select="$lc/myns:item[$pos]/node()" /></xsl:call-template></td>
     
    30493088    <xsl:value-of select="concat($year,' ',$month,' ',$day)"/>
    30503089  </xsl:message>-->
    3051  
     3090
    30523091  <xsl:variable name="dim">
    30533092    <xsl:choose>
     
    30583097    </xsl:choose>
    30593098  </xsl:variable>
    3060  
     3099
    30613100  <xsl:choose>
    30623101    <xsl:when test="$day > $dim and $month=12">
     
    30833122
    30843123</xsl:template>
    3085  
     3124
    30863125<xsl:template name="get-month-as-num">
    30873126  <xsl:param name="month" />
     
    31413180    <xsl:call-template name="get-authors-section-number"/>
    31423181  </xsl:variable>
    3143    
     3182
    31443183  <xsl:if test="$number!='suppress'">
    31453184    <xsl:call-template name="insert-conditional-hrule"/>
    3146    
     3185
    31473186    <div class="avoidbreak">
    31483187      <h1 id="{$anchor-prefix}.authors">
     
    31543193        <a href="#{$anchor-prefix}.authors"><xsl:call-template name="get-authors-section-title"/></a>
    31553194      </h1>
    3156    
     3195
    31573196      <xsl:apply-templates select="/rfc/front/author" />
    31583197    </div>
     
    32323271      </xsl:choose>
    32333272    </section>
    3234    
     3273
    32353274    <section title="Intellectual Property" anchor="{$anchor-prefix}.ipr" myns:unnumbered="unnumbered">
    32363275      <xsl:choose>
     
    32453284            on the procedures with respect to rights in RFC documents
    32463285            can be found in BCP 78 and BCP 79.
    3247           </t>       
     3286          </t>
    32483287          <t>
    32493288            Copies of IPR disclosures made to the IETF Secretariat and any
     
    32513290            attempt made to obtain a general license or permission for the use
    32523291            of such proprietary rights by implementers or users of this
    3253             specification can be obtained from the IETF on-line IPR repository 
     3292            specification can be obtained from the IETF on-line IPR repository
    32543293            at <eref target="http://www.ietf.org/ipr">http://www.ietf.org/ipr</eref>.
    3255           </t>       
     3294          </t>
    32563295          <t>
    32573296            The IETF invites any interested party to bring to its attention any
     
    32603299            this standard. Please address the information to the IETF at
    32613300            <eref target="mailto:ietf-ipr@ietf.org">ietf-ipr@ietf.org</eref>.
    3262           </t>       
     3301          </t>
    32633302        </xsl:when>
    32643303        <xsl:otherwise>
     
    32973336      </xsl:choose>
    32983337    </section>
    3299    
     3338
    33003339    <xsl:choose>
    33013340      <xsl:when test="$no-funding"/>
     
    33553394  toggleButtonsToElementsByName("h3");
    33563395  toggleButtonsToElementsByName("h4");
    3357  
     3396
    33583397  buttonsAdded = !buttonsAdded;
    33593398}
     
    33683407function toggleButton(node) {
    33693408  if (! buttonsAdded) {
    3370  
     3409
    33713410    // docname
    33723411    var template = "<xsl:call-template name="replace-substring">
     
    33953434      ref += "#" + id;
    33963435    }
    3397    
     3436
    33983437    // docname
    33993438    var docname = "<xsl:value-of select="/rfc/@docName"/>";
     
    34023441    var section = node.textContent;
    34033442    section = section.replace("\u00a0", " ");
    3404    
     3443
    34053444    // build URI from template
    34063445    var uri = template.replace("{docname}", encodeURIComponent(docname));
    34073446    uri = uri.replace("{section}", encodeURIComponent(section));
    34083447    uri = uri.replace("{ref}", encodeURIComponent(ref));
    3409  
     3448
    34103449    var button = document.createElement("a");
    34113450    button.className = "fbbutton noprint";
     
    36413680td.topnowrap {
    36423681  vertical-align: top;
    3643   white-space: nowrap; 
     3682  white-space: nowrap;
    36443683}
    36453684table.header td {
     
    37913830  border-style: solid;
    37923831  border-color: gray;
    3793   color: gray; 
     3832  color: gray;
    37943833}
    37953834thead th {
     
    38493888    display: none;
    38503889  }
    3851  
     3890
    38523891  a {
    38533892    color: black;
     
    38703909    content: leader('.') target-counter(attr(href), page);
    38713910  }
    3872  
     3911
    38733912  ul.ind li li a {<!-- links in the leaf nodes of the index should go to page numbers -->
    38743913    content: target-counter(attr(href), page);
    38753914  }
    3876  
     3915
    38773916  .print2col {
    38783917    column-count: 2;
     
    38883927@page:right {
    38893928  @top-left {
    3890        content: "<xsl:call-template name="get-header-left"/>"; 
    3891   } 
     3929       content: "<xsl:call-template name="get-header-left"/>";
     3930  }
    38923931  @top-right {
    3893        content: "<xsl:call-template name="get-header-right"/>"; 
    3894   } 
     3932       content: "<xsl:call-template name="get-header-right"/>";
     3933  }
    38953934  @top-center {
    3896        content: "<xsl:call-template name="get-header-center"/>"; 
    3897   } 
     3935       content: "<xsl:call-template name="get-header-center"/>";
     3936  }
    38983937  @bottom-left {
    3899        content: "<xsl:call-template name="get-author-summary"/>"; 
    3900   } 
     3938       content: "<xsl:call-template name="get-author-summary"/>";
     3939  }
    39013940  @bottom-center {
    3902        content: "<xsl:call-template name="get-bottom-center"/>"; 
    3903   } 
     3941       content: "<xsl:call-template name="get-bottom-center"/>";
     3942  }
    39043943  @bottom-right {
    3905        content: "[Page " counter(page) "]"; 
    3906   } 
     3944       content: "[Page " counter(page) "]";
     3945  }
    39073946}
    39083947@page:left {
    39093948  @top-left {
    3910        content: "<xsl:call-template name="get-header-right"/>"; 
    3911   } 
     3949       content: "<xsl:call-template name="get-header-right"/>";
     3950  }
    39123951  @top-right {
    3913        content: "<xsl:call-template name="get-header-left"/>"; 
    3914   } 
     3952       content: "<xsl:call-template name="get-header-left"/>";
     3953  }
    39153954  @top-center {
    3916        content: "<xsl:call-template name="get-header-center"/>"; 
    3917   } 
     3955       content: "<xsl:call-template name="get-header-center"/>";
     3956  }
    39183957  @bottom-left {
    3919        content: "[Page " counter(page) "]"; 
    3920   } 
     3958       content: "[Page " counter(page) "]";
     3959  }
    39213960  @bottom-center {
    3922        content: "<xsl:call-template name="get-bottom-center"/>"; 
    3923   } 
     3961       content: "<xsl:call-template name="get-bottom-center"/>";
     3962  }
    39243963  @bottom-right {
    3925        content: "<xsl:call-template name="get-author-summary"/>"; 
    3926   } 
     3964       content: "<xsl:call-template name="get-author-summary"/>";
     3965  }
    39273966}
    39283967</xsl:when><xsl:otherwise>
    39293968@page {
    39303969  @top-left {
    3931        content: "<xsl:call-template name="get-header-left"/>"; 
    3932   } 
     3970       content: "<xsl:call-template name="get-header-left"/>";
     3971  }
    39333972  @top-right {
    3934        content: "<xsl:call-template name="get-header-right"/>"; 
    3935   } 
     3973       content: "<xsl:call-template name="get-header-right"/>";
     3974  }
    39363975  @top-center {
    3937        content: "<xsl:call-template name="get-header-center"/>"; 
    3938   } 
     3976       content: "<xsl:call-template name="get-header-center"/>";
     3977  }
    39393978  @bottom-left {
    3940        content: "<xsl:call-template name="get-author-summary"/>"; 
    3941   } 
     3979       content: "<xsl:call-template name="get-author-summary"/>";
     3980  }
    39423981  @bottom-center {
    3943        content: "<xsl:call-template name="get-bottom-center"/>"; 
    3944   } 
     3982       content: "<xsl:call-template name="get-bottom-center"/>";
     3983  }
    39453984  @bottom-right {
    3946        content: "[Page " counter(page) "]"; 
    3947   } 
     3985       content: "[Page " counter(page) "]";
     3986  }
    39483987}
    39493988</xsl:otherwise></xsl:choose>
    3950 @page:first { 
     3989@page:first {
    39513990    @top-left {
    39523991      content: normal;
     
    39764015        <xsl:if test="$htmluri">
    39774016          <xsl:attribute name="href"><xsl:value-of select="concat($htmluri,'#',@ed:frag)"/></xsl:attribute>
    3978         </xsl:if>       
     4017        </xsl:if>
    39794018        <xsl:choose>
    39804019          <xsl:when test="@primary='true'"><b><xsl:value-of select="@ed:label" /></b></xsl:when>
     
    40744113    <a href="#{$anchor-prefix}.index">Index</a>
    40754114  </h1>
    4076  
     4115
    40774116  <!-- generate navigation links to index subsections -->
    40784117  <p class="noprint">
    40794118    <xsl:variable name="irefs" select="//iref[generate-id(.) = generate-id(key('index-first-letter',translate(substring(@item,1,1),$lcase,$ucase))[1])]"/>
    40804119    <xsl:variable name="xrefs" select="//reference[not(starts-with(@anchor,'deleted-'))][generate-id(.) = generate-id(key('index-first-letter',translate(substring(@anchor,1,1),$lcase,$ucase))[1])]"/>
    4081  
     4120
    40824121    <xsl:for-each select="$irefs | $xrefs">
    4083    
     4122
    40844123      <xsl:sort select="translate(concat(@item,@anchor),$lcase,$ucase)" />
    4085          
     4124
    40864125      <xsl:variable name="letter" select="translate(substring(concat(@item,@anchor),1,1),$lcase,$ucase)"/>
    40874126
    40884127      <!-- character? -->
    40894128      <xsl:if test="translate($letter,concat($lcase,$ucase,'0123456789'),'')=''">
    4090      
     4129
    40914130        <xsl:variable name="showit" select="$xml2rfc-ext-include-references-in-index='yes' or $irefs[starts-with(translate(@item,$lcase,$ucase),$letter)]"/>
    4092        
     4131
    40934132        <xsl:if test="$showit">
    40944133          <a href="#{$anchor-prefix}.index.{$letter}">
     
    40974136          <xsl:text> </xsl:text>
    40984137        </xsl:if>
    4099      
     4138
    41004139      </xsl:if>
    41014140
     
    41084147    <xsl:variable name="irefs2" select="//iref[generate-id(.) = generate-id(key('index-first-letter',translate(substring(@item,1,1),$lcase,$ucase))[1])]"/>
    41094148    <xsl:variable name="xrefs2" select="//reference[not(starts-with(@anchor,'deleted-'))][generate-id(.) = generate-id(key('index-first-letter',translate(substring(@anchor,1,1),$lcase,$ucase))[1])]"/>
    4110  
     4149
    41114150    <xsl:for-each select="$irefs2 | $xrefs2">
    41124151      <xsl:sort select="translate(concat(@item,@anchor),$lcase,$ucase)" />
    41134152      <xsl:variable name="letter" select="translate(substring(concat(@item,@anchor),1,1),$lcase,$ucase)"/>
    4114            
     4153
    41154154      <xsl:variable name="showit" select="$xml2rfc-ext-include-references-in-index='yes' or $irefs2[starts-with(translate(@item,$lcase,$ucase),$letter)]"/>
    41164155
    41174156      <xsl:if test="$showit">
    41184157        <li>
    4119          
     4158
    41204159          <!-- make letters and digits stand out -->
    41214160          <xsl:choose>
     
    41294168            </xsl:otherwise>
    41304169          </xsl:choose>
    4131        
    4132           <ul> 
     4170
     4171          <ul>
    41334172            <xsl:for-each select="key('index-first-letter',translate(substring(concat(@item,@anchor),1,1),$lcase,$ucase))">
    4134        
     4173
    41354174              <xsl:sort select="translate(concat(@item,@anchor),$lcase,$ucase)" />
    4136              
     4175
    41374176                <xsl:choose>
    41384177                  <xsl:when test="self::reference">
     
    41434182                        </em>
    41444183                        <xsl:text>&#160;&#160;</xsl:text>
    4145                        
     4184
    41464185                        <xsl:variable name="rs" select="key('xref-item',current()/@anchor) | . | key('anchor-item',concat('deleted-',current()/@anchor))"/>
    4147                        
     4186
    41484187                        <xsl:for-each select="$rs">
    41494188                          <xsl:call-template name="insertSingleXref" />
     
    41534192
    41544193                        <xsl:if test="$rs2">
    4155                           <ul> 
     4194                          <ul>
    41564195                            <xsl:for-each select="$rs2">
    41574196                              <xsl:sort select="substring-before(concat(@x:sec,'.'),'.')" data-type="number"/>
     
    41844223                          <xsl:variable name="doc" select="document(current()/x:source/@href)"/>
    41854224                          <xsl:if test="$rs3">
    4186                             <ul> 
     4225                            <ul>
    41874226                              <xsl:for-each select="$rs3">
    41884227                                <xsl:sort select="count($doc//*[@anchor and following::*/@anchor=substring-after(current()/@x:rel,'#')])" order="ascending" data-type="number"/>
     
    42234262                      <xsl:variable name="item" select="@item"/>
    42244263                      <xsl:variable name="in-artwork" select="key('index-item',$item)[@primary='true' and ancestor::artwork]"/>
    4225                          
     4264
    42264265                      <li>
    42274266                        <xsl:choose>
     
    42344273                        </xsl:choose>
    42354274                        <xsl:text>&#160;&#160;</xsl:text>
    4236                        
     4275
    42374276                        <xsl:variable name="irefs3" select="key('index-item',@item)[not(@subitem) or @subitem='']"/>
    42384277                        <xsl:variable name="xrefs3" select="key('xref-item',$irefs3[@x:for-anchor='']/../@anchor) | key('xref-item',$irefs3/@x:for-anchor)"/>
     
    42434282                          <xsl:call-template name="insertSingleIref" />
    42444283                        </xsl:for-each>
    4245          
     4284
    42464285                        <xsl:variable name="s2" select="key('index-item',@item)[@subitem and @subitem!='']"/>
    42474286                        <xsl:if test="$s2">
    4248                           <ul> 
     4287                          <ul>
    42494288                            <xsl:for-each select="$s2">
    42504289                              <xsl:sort select="translate(@subitem,$lcase,$ucase)" />
    4251                              
     4290
    42524291                              <xsl:if test="generate-id(.) = generate-id(key('index-item-subitem',concat(@item,'..',@subitem))[1])">
    4253                  
     4292
    42544293                                <xsl:variable name="in-artwork2" select="key('index-item-subitem',concat(@item,'..',@subitem))[@primary='true' and ancestor::artwork]" />
    4255                  
     4294
    42564295                                <li>
    4257              
     4296
    42584297                                  <xsl:choose>
    42594298                                    <xsl:when test="$in-artwork2">
     
    42654304                                  </xsl:choose>
    42664305                                  <xsl:text>&#160;&#160;</xsl:text>
    4267                                    
     4306
    42684307                                  <xsl:variable name="irefs4" select="key('index-item-subitem',concat(@item,'..',@subitem))"/>
    42694308                                  <xsl:variable name="xrefs4" select="key('xref-item',$irefs4[@x:for-anchor='']/../@anchor) | key('xref-item',$irefs4/@x:for-anchor)"/>
     
    42714310
    42724311                                  <xsl:for-each select="$irefs4|$xrefs4|$extrefs4">
    4273                                     <!--<xsl:sort select="translate(@item,$lcase,$ucase)" />-->                   
     4312                                    <!--<xsl:sort select="translate(@item,$lcase,$ucase)" />-->
    42744313                                    <xsl:call-template name="insertSingleIref" />
    42754314                                  </xsl:for-each>
    4276                
     4315
    42774316                                </li>
    42784317                              </xsl:if>
     
    42844323                  </xsl:otherwise>
    42854324                </xsl:choose>
    4286              
    4287                      
    4288             </xsl:for-each>           
     4325
     4326
     4327            </xsl:for-each>
    42894328          </ul>
    42904329        </li>
    42914330      </xsl:if>
    4292      
     4331
    42934332    </xsl:for-each>
    42944333  </ul>
    42954334  </div>
    4296  
     4335
    42974336</xsl:template>
    42984337
     
    43104349    other than English.
    43114350  </xsl:variable>
    4312  
     4351
    43134352  <!-- TLP1, Section 6.c.i -->
    43144353  <xsl:variable name="noModificationTrust200811Clause">
     
    43434382      <t>
    43444383        <xsl:choose>
    4345          
     4384
    43464385          <!-- RFC2026 -->
    43474386          <xsl:when test="/rfc/@ipr = 'full2026'">
    4348             This document is an Internet-Draft and is 
    4349             in full conformance with all provisions of Section 10 of RFC2026.   
     4387            This document is an Internet-Draft and is
     4388            in full conformance with all provisions of Section 10 of RFC2026.
    43504389          </xsl:when>
    43514390          <xsl:when test="/rfc/@ipr = 'noDerivativeWorks2026'">
    4352             This document is an Internet-Draft and is 
     4391            This document is an Internet-Draft and is
    43534392            in full conformance with all provisions of Section 10 of RFC2026
    4354             except that the right to produce derivative works is not granted.   
     4393            except that the right to produce derivative works is not granted.
    43554394          </xsl:when>
    43564395          <xsl:when test="/rfc/@ipr = 'noDerivativeWorksNow'">
    4357             This document is an Internet-Draft and is 
     4396            This document is an Internet-Draft and is
    43584397            in full conformance with all provisions of Section 10 of RFC2026
    43594398            except that the right to produce derivative works is not granted.
    43604399            (If this document becomes part of an IETF working group activity,
    4361             then it will be brought into full compliance with Section 10 of RFC2026.) 
     4400            then it will be brought into full compliance with Section 10 of RFC2026.)
    43624401          </xsl:when>
    43634402          <xsl:when test="/rfc/@ipr = 'none'">
    4364             This document is an Internet-Draft and is 
     4403            This document is an Internet-Draft and is
    43654404            NOT offered in accordance with Section 10 of RFC2026,
    43664405            and the author does not provide the IETF with any rights other
    43674406            than to publish as an Internet-Draft.
    43684407          </xsl:when>
    4369          
     4408
    43704409          <!-- RFC3667 -->
    43714410          <xsl:when test="/rfc/@ipr = 'full3667'">
     
    43924431            This document is an Internet-Draft and is subject to all provisions
    43934432            of section 3 of RFC 3667 except for the right to produce derivative
    4394             works.  By submitting this Internet-Draft, each author represents 
     4433            works.  By submitting this Internet-Draft, each author represents
    43954434            that any applicable patent or other IPR claims of which he or she
    43964435            is aware have been or will be disclosed, and any of which he or she
     
    44004439            <xref target="{/rfc/@iprExtract}"/> as-is for separate use</xsl:if>.
    44014440          </xsl:when>
    4402          
     4441
    44034442          <!-- RFC3978 -->
    44044443          <xsl:when test="/rfc/@ipr = 'full3978'">
     
    44214460          </xsl:when>
    44224461          <xsl:when test="/rfc/@ipr = 'noDerivatives3978'">
    4423             By submitting this Internet-Draft, each author represents 
     4462            By submitting this Internet-Draft, each author represents
    44244463            that any applicable patent or other IPR claims of which he or she
    44254464            is aware have been or will be disclosed, and any of which he or she
     
    44294468            <xref target="{/rfc/@iprExtract}"/> as-is for separate use</xsl:if>.
    44304469          </xsl:when>
    4431  
     4470
    44324471          <!-- as of Jan 2010, TLP 4.0 -->
    44334472          <xsl:when test="$ipr-2010-01 and (/rfc/@ipr = 'trust200902'
     
    44384477            the provisions of BCP 78 and BCP 79.
    44394478          </xsl:when>
    4440  
     4479
    44414480          <!-- as of Nov 2008, Feb 2009 and Sep 2009 -->
    44424481          <xsl:when test="/rfc/@ipr = 'trust200811'
     
    44544493          </xsl:otherwise>
    44554494        </xsl:choose>
    4456        
     4495
    44574496        <!-- warn about iprExtract without effect -->
    44584497        <xsl:if test="/rfc/@iprExtract and (/rfc/@ipr != 'noModification3667' and /rfc/@ipr != 'noDerivatives3667' and /rfc/@ipr != 'noModification3978' and /rfc/@ipr != 'noDerivatives3978')">
     
    44614500          </xsl:call-template>
    44624501        </xsl:if>
    4463        
     4502
    44644503        <!-- restrictions -->
    44654504        <xsl:choose>
     
    45994638    </xsl:otherwise>
    46004639  </xsl:choose>
    4601    
     4640
    46024641  <!-- 2nd and 3rd paragraph -->
    46034642  <xsl:if test="$rfc-boilerplate='2010' and /rfc/@number">
     
    46844723            </xsl:when>
    46854724            <xsl:otherwise>
    4686               Not all documents approved by the IESG are a candidate for any 
     4725              Not all documents approved by the IESG are a candidate for any
    46874726              level of Internet Standard; see Section 2 of RFC 5741.
    46884727            </xsl:otherwise>
     
    46974736            </xsl:choose>
    46984737          </xsl:variable>
    4699        
     4738
    47004739          Documents approved for publication by the
    47014740          <xsl:value-of select="$approver"/> are not a candidate for any level
     
    47104749    </t>
    47114750  </xsl:if>
    4712    
     4751
    47134752  </section>
    4714  
     4753
    47154754  <!-- IESG Note goes here; see http://www.rfc-editor.org/rfc-style-guide/rfc-style -->
    47164755  <xsl:copy-of select="/rfc/front/note[@title='IESG Note']"/>
    4717  
     4756
    47184757  <xsl:choose>
    47194758    <xsl:when test="$ipr-2008-11">
     
    47724811          </xsl:otherwise>
    47734812        </xsl:choose>
    4774        
     4813
    47754814        <!-- add warning for incpmpatible IPR attribute on RFCs -->
    47764815        <xsl:variable name="stds-rfc-compatible-ipr"
    47774816                      select="/rfc/@ipr='pre5378Trust200902' or /rfc/@ipr='trust200902' or /rfc/@ipr='trust200811' or /rfc/@ipr='full3978' or /rfc/@ipr='full3667' or /rfc/@ipr='full2026'"/>
    4778        
     4817
    47794818        <xsl:variable name="rfc-compatible-ipr"
    47804819                      select="$stds-rfc-compatible-ipr or /rfc/@ipr='noModificationTrust200902' or /rfc/@ipr='noDerivativesTrust200902' or /rfc/@ipr='noModificationTrust200811' or /rfc/@ipr='noDerivativesTrust200811'"/>
    47814820                      <!-- TODO: may want to add more historic variants -->
    4782                      
     4821
    47834822        <xsl:variable name="is-stds-track"
    47844823                      select="$submissionType='IETF' and /rfc/@category='std'"/>
    4785        
     4824
    47864825        <xsl:variable name="status-diags">
    47874826          <xsl:choose>
     
    48484887          </xsl:otherwise>
    48494888        </xsl:choose>
    4850        
     4889
    48514890      </section>
    48524891    </xsl:when>
     
    48694908    </xsl:otherwise>
    48704909  </xsl:choose>
    4871  
     4910
    48724911</xsl:template>
    48734912
     
    49775016    </li>
    49785017  </xsl:if>
    4979  
     5018
    49805019</xsl:template>
    49815020
    49825021<xsl:template match="front" mode="toc">
    4983  
     5022
    49845023  <xsl:variable name="authors-title">
    49855024    <xsl:call-template name="get-authors-section-title"/>
     
    50085047
    50095048  <xsl:variable name="refsecs" select="/rfc/back/references|/rfc/back/ed:replace/ed:ins/references"/>
    5010    
     5049
    50115050  <xsl:choose>
    50125051    <xsl:when test="count($refsecs) = 0">
     
    50215060          </xsl:choose>
    50225061        </xsl:variable>
    5023      
     5062
    50245063        <li>
    50255064          <xsl:call-template name="insert-toc-line">
     
    50355074    <xsl:otherwise>
    50365075      <li>
    5037         <!-- insert pseudo container -->   
     5076        <!-- insert pseudo container -->
    50385077        <xsl:call-template name="insert-toc-line">
    50395078          <xsl:with-param name="number">
     
    50435082          <xsl:with-param name="title" select="$xml2rfc-refparent"/>
    50445083        </xsl:call-template>
    5045  
     5084
    50465085        <ul>
    5047           <!-- ...with subsections... -->   
     5086          <!-- ...with subsections... -->
    50485087          <xsl:for-each select="$refsecs">
    50495088            <xsl:variable name="title">
     
    50535092              </xsl:choose>
    50545093            </xsl:variable>
    5055          
     5094
    50565095            <xsl:variable name="sectionNumber">
    50575096              <xsl:call-template name="get-section-number" />
    50585097            </xsl:variable>
    5059    
     5098
    50605099            <xsl:variable name="num">
    50615100              <xsl:number level="any"/>
    50625101            </xsl:variable>
    5063    
     5102
    50645103            <li>
    50655104              <xsl:call-template name="insert-toc-line">
     
    50995138        <xsl:with-param name="waschanged" select="@ed:resolves"/>
    51005139      </xsl:call-template>
    5101    
     5140
    51025141      <ul>
    51035142        <xsl:apply-templates mode="toc" />
     
    51055144    </li>
    51065145  </xsl:variable>
    5107  
     5146
    51085147  <xsl:if test="$content!=''">
    51095148    <li>
     
    51165155        <xsl:with-param name="waschanged" select="@ed:resolves"/>
    51175156      </xsl:call-template>
    5118    
     5157
    51195158      <!-- obtain nested content, just to check whether we need to recurse at all -->
    51205159      <xsl:variable name="nested-content">
     
    51235162        </ul>
    51245163      </xsl:variable>
    5125      
    5126       <!-- only recurse if we need to (do not produce useless list container) -->     
     5164
     5165      <!-- only recurse if we need to (do not produce useless list container) -->
    51275166      <xsl:if test="$nested-content!=''">
    51285167        <ul>
     
    51525191
    51535192<xsl:template name="insertTocAppendix">
    5154  
     5193
    51555194  <xsl:if test="//figure[@title!='' or @anchor!='']">
    51565195    <ul class="toc">
     
    51715210    </ul>
    51725211  </xsl:if>
    5173  
     5212
    51745213  <!-- experimental -->
    51755214  <xsl:if test="//ed:issue">
     
    51815220<xsl:template name="referencename">
    51825221  <xsl:param name="node" />
    5183  
     5222
    51845223  <xsl:for-each select="$node">
    51855224    <xsl:choose>
     
    52045243      <xsl:otherwise>[<xsl:number level="any" count="reference[not(ancestor::ed:del)]"/>]</xsl:otherwise>
    52055244    </xsl:choose>
    5206   </xsl:for-each> 
     5245  </xsl:for-each>
    52075246</xsl:template>
    52085247
     
    52305269<xsl:template name="rfc-or-id-link">
    52315270  <xsl:param name="name" />
    5232  
     5271
    52335272  <xsl:choose>
    52345273    <xsl:when test="starts-with($name,'draft-')">
     
    56225661<xsl:template name="to-abnf-char-sequence">
    56235662  <xsl:param name="chars"/>
    5624  
     5663
    56255664  <xsl:variable name="c" select="substring($chars,1,1)"/>
    56265665  <xsl:variable name="r" select="substring($chars,2)"/>
    5627    
     5666
    56285667  <xsl:choose>
    56295668    <xsl:when test="$c='-'">2D</xsl:when>
     
    57055744    </xsl:call-template>
    57065745  </xsl:if>
    5707  
     5746
    57085747</xsl:template>
    57095748
     
    57415780  <xsl:variable name="content" select="substring(.,2,string-length(.)-2)"/>
    57425781  <xsl:variable name="is-delimiter" select="translate($content,'-','')=''"/>
    5743  
     5782
    57445783  <xsl:choose>
    57455784    <xsl:when test="$is-delimiter">
     
    57715810    </xsl:otherwise>
    57725811  </xsl:choose>
    5773  
     5812
    57745813</xsl:template>
    57755814
     
    58235862    </xsl:choose>
    58245863  </xsl:variable>
    5825  
     5864
    58265865  <table class="{$class}">
    58275866    <tr>
     
    58845923    </xsl:if>
    58855924  </table>
    5886    
     5925
    58875926</xsl:template>
    58885927
     
    59916030    </tbody>
    59926031  </table>
    5993  
     6032
    59946033</xsl:template>
    59956034
    59966035<xsl:template name="insert-diagnostics">
    5997  
     6036
    59986037  <!-- check anchor names -->
    59996038  <xsl:variable name="badAnchors"
    60006039    select="//*[starts-with(@anchor,concat($anchor-prefix,'.'))][@anchor!=concat($anchor-prefix,'.authors') and /*/x:assign-section-number[@number='suppress' and @builtin-target='authors']]" />
    6001  
     6040
    60026041  <xsl:if test="$badAnchors">
    60036042    <xsl:variable name="text">
     
    60116050    </xsl:call-template>
    60126051  </xsl:if>
    6013  
     6052
    60146053  <!-- check ABNF syntax references -->
    60156054  <xsl:if test="//artwork[@type='abnf2616']">
     
    60276066    </xsl:if>
    60286067  </xsl:if>
    6029  
     6068
    60306069  <!-- check IDs -->
    60316070  <xsl:variable name="badTargets" select="//xref[not(@target=//@anchor) and not(ancestor::ed:del)]" />
     
    60466085    </xsl:call-template>
    60476086  </xsl:if>
    6048  
    6049  
     6087
     6088
    60506089</xsl:template>
    60516090
     
    63396378
    63406379<xsl:template match="texttable">
     6380  <xsl:call-template name="check-no-text-content"/>
    63416381
    63426382  <xsl:variable name="anch">
     
    64066446                  <xsl:otherwise>
    64076447                    <xsl:call-template name="warning">
    6408                       <xsl:with-param name="msg">Unknown align attribute on ttcol: <xsl:value-of select="$col/@align"/></xsl:with-param>                     
     6448                      <xsl:with-param name="msg">Unknown align attribute on ttcol: <xsl:value-of select="$col/@align"/></xsl:with-param>
    64096449                    </xsl:call-template>
    64106450                  </xsl:otherwise>
     
    64196459    <xsl:apply-templates select="postamble" />
    64206460  </div>
    6421  
     6461
    64226462</xsl:template>
    64236463
    64246464<xsl:template match="ttcol">
    64256465  <th>
    6426    
     6466
    64276467    <xsl:choose>
    64286468      <xsl:when test="@align='right' or @align='center' or @align='left'">
     
    64366476      </xsl:otherwise>
    64376477    </xsl:choose>
    6438    
     6478
    64396479    <xsl:if test="@width">
    64406480      <xsl:attribute name="style">width: <xsl:value-of select="@width" />;</xsl:attribute>
     
    64656505      <xsl:call-template name="get-comment-name"/>
    64666506    </xsl:variable>
    6467    
     6507
    64686508    <span class="comment">
    64696509      <xsl:choose>
     
    65036543
    65046544  <xsl:call-template name="insert-conditional-hrule"/>
    6505    
     6545
    65066546  <h1>
    65076547    <xsl:call-template name="insert-conditional-pagebreak"/>
     
    66536693    <xsl:text>http://greenbytes.de/tech/webdav/rfc2629.xslt, </xsl:text>
    66546694    <!-- when RCS keyword substitution in place, add version info -->
    6655     <xsl:if test="contains('$Revision: 1.594 $',':')">
    6656       <xsl:value-of select="concat('Revision ',normalize-space(translate(substring-after('$Revision: 1.594 $', 'Revision: '),'$','')),', ')" />
     6695    <xsl:if test="contains('$Revision: 1.596 $',':')">
     6696      <xsl:value-of select="concat('Revision ',normalize-space(translate(substring-after('$Revision: 1.596 $', 'Revision: '),'$','')),', ')" />
    66576697    </xsl:if>
    6658     <xsl:if test="contains('$Date: 2013/04/30 16:11:28 $',':')">
    6659       <xsl:value-of select="concat(normalize-space(translate(substring-after('$Date: 2013/04/30 16:11:28 $', 'Date: '),'$','')),', ')" />
     6698    <xsl:if test="contains('$Date: 2013/05/16 08:38:33 $',':')">
     6699      <xsl:value-of select="concat(normalize-space(translate(substring-after('$Date: 2013/05/16 08:38:33 $', 'Date: '),'$','')),', ')" />
    66606700    </xsl:if>
    66616701    <xsl:value-of select="concat('XSLT vendor: ',system-property('xsl:vendor'),' ',system-property('xsl:vendor-url'))" />
     
    67916831    </xsl:call-template>
    67926832  </xsl:variable>
    6793  
     6833
    67946834  <xsl:if test="$r!=@initials">
    67956835    <xsl:call-template name="warning">
     
    67976837    </xsl:call-template>
    67986838  </xsl:if>
    6799  
     6839
    68006840  <xsl:value-of select="$r"/>
    68016841</xsl:template>
     
    68046844  <xsl:param name="have"/>
    68056845  <xsl:param name="remainder"/>
    6806  
     6846
    68076847  <xsl:variable name="first" select="substring($remainder,1,1)"/>
    68086848  <xsl:variable name="prev" select="substring($have,string-length($have))"/>
     
    68506890    </xsl:otherwise>
    68516891  </xsl:choose>
    6852  
     6892
    68536893</xsl:template>
    68546894
     
    68786918    </xsl:call-template>
    68796919  </xsl:if>
    6880  
     6920
    68816921  <xsl:variable name="email2">
    68826922    <xsl:choose>
     
    68926932    </xsl:choose>
    68936933  </xsl:variable>
    6894  
     6934
    68956935  <xsl:value-of select="$email2"/>
    68966936</xsl:template>
     
    69096949    </xsl:call-template>
    69106950  </xsl:if>
    6911  
     6951
    69126952  <xsl:value-of select="$uri"/>
    69136953</xsl:template>
     
    69456985  <xsl:param name="ret"/>
    69466986  <xsl:param name="default"/>
    6947  
     6987
    69486988  <xsl:choose>
    69496989    <xsl:when test="count($nodes)=0">
     
    69546994        <xsl:otherwise>
    69556995          <xsl:value-of select="$default"/>
    6956         </xsl:otherwise>   
     6996        </xsl:otherwise>
    69576997      </xsl:choose>
    69586998    </xsl:when>
     
    69687008        </xsl:for-each>
    69697009      </xsl:variable>
    6970      
     7010
    69717011      <xsl:call-template name="parse-pis">
    69727012        <xsl:with-param name="nodes" select="$nodes[position()!=1]"/>
     
    69767016        <xsl:with-param name="default" select="$default"/>
    69777017      </xsl:call-template>
    6978      
     7018
    69797019    </xsl:otherwise>
    69807020  </xsl:choose>
     
    69937033    </xsl:call-template>
    69947034  </xsl:variable>
    6995  
     7035
    69967036  <xsl:choose>
    69977037    <xsl:when test="$str2=''">
     
    70017041    <xsl:otherwise>
    70027042      <xsl:variable name="attrname" select="substring-before($str2,'=')"/>
    7003      
     7043
    70047044      <xsl:choose>
    70057045        <xsl:when test="$attrname=''">
     
    70647104                    </xsl:choose>
    70657105                  </xsl:if>
    7066                  
     7106
    70677107                  <xsl:if test="name()='rfc' and $attr='SANITYCHECK'">
    70687108                    <xsl:choose>
     
    71077147                        <xsl:with-param name="sep" select="$sep"/>
    71087148                        <xsl:with-param name="ret">
    7109                           <xsl:choose> 
     7149                          <xsl:choose>
    71107150                            <xsl:when test="$ret!=''">
    71117151                              <xsl:value-of select="concat($ret,$sep,$value)"/>
     
    71177157                        </xsl:with-param>
    71187158                      </xsl:call-template>
    7119                     </xsl:otherwise>                 
    7120                  
     7159                    </xsl:otherwise>
     7160
    71217161                  </xsl:choose>
    7122                  
     7162
    71237163                </xsl:otherwise>
    71247164              </xsl:choose>
     
    71297169    </xsl:otherwise>
    71307170  </xsl:choose>
    7131  
     7171
    71327172</xsl:template>
    71337173
     
    71477187    </xsl:otherwise>
    71487188  </xsl:choose>
    7149  
     7189
    71507190</xsl:template>
    71517191
     
    71907230</xsl:template>
    71917231
    7192 <!-- define exslt:node-set for msxml -->       
     7232<!-- define exslt:node-set for msxml -->
    71937233<msxsl:script language="JScript" implements-prefix="exslt">
    71947234  this['node-set'] = function (x) {
     
    72767316    </xsl:when>
    72777317    <!-- may, but won't -->
    7278     <xsl:otherwise>yes</xsl:otherwise> 
     7318    <xsl:otherwise>yes</xsl:otherwise>
    72797319  </xsl:choose>
    72807320</xsl:variable>
  • rfc2629xslt/rfc2629toFO.xslt

    r1845 r2272  
    13521352          </xsl:for-each>
    13531353        </xsl:variable>
     1354        <xsl:variable name="pparent" select="$node/.."/>
     1355        <xsl:variable name="listtype">
     1356          <xsl:choose>
     1357            <xsl:when test="$pparent/self::list">
     1358              <xsl:value-of select="$pparent/@style"/>
     1359            </xsl:when>
     1360            <xsl:otherwise></xsl:otherwise>
     1361          </xsl:choose>
     1362        </xsl:variable>
     1363        <xsl:variable name="listindex">
     1364          <xsl:choose>
     1365            <xsl:when test="$listtype='numbers'">
     1366              <xsl:for-each select="$node">
     1367                <xsl:number/>
     1368              </xsl:for-each>
     1369            </xsl:when>
     1370            <xsl:when test="$listtype='letters'">
     1371              <xsl:for-each select="$node">
     1372                <xsl:number format="a"/>
     1373              </xsl:for-each>
     1374            </xsl:when>
     1375            <xsl:otherwise/>
     1376          </xsl:choose>
     1377        </xsl:variable>
    13541378        <xsl:choose>
    13551379          <xsl:when test="@format='counter'">
    1356             <xsl:value-of select="$tcnt" />
     1380            <xsl:choose>
     1381              <xsl:when test="$listtype!='' and $listindex!=''">
     1382                <xsl:value-of select="$listindex"/>
     1383              </xsl:when>
     1384              <xsl:when test="$listtype!='' and $listindex=''">
     1385                <xsl:call-template name="warning">
     1386                  <xsl:with-param name="msg" select="concat('Use of format=counter for unsupported list type ',$listtype)"/>
     1387                </xsl:call-template>
     1388                <xsl:value-of select="$tcnt"/>             
     1389              </xsl:when>
     1390              <xsl:otherwise>
     1391                <xsl:value-of select="$tcnt"/>             
     1392              </xsl:otherwise>
     1393            </xsl:choose>
    13571394          </xsl:when>
    13581395          <xsl:when test="@format='title'">
  • rfc2629xslt/rfc2629toHhc.xslt

    r230 r2272  
    5454  <head>
    5555    <!-- generator -->
    56     <meta name="generator" content="rfc2629toHhc.xslt $Id: rfc2629toHhc.xslt,v 1.14 2008-03-01 14:27:31 jre Exp $" />
     56    <meta name="generator" content="rfc2629toHhc.xslt $Id: rfc2629toHhc.xslt,v 1.15 2013/05/02 15:44:09 jre Exp $" />
    5757  </head>
    5858  <body>
  • rfc2629xslt/rfc2629toHhk.xslt

    r1276 r2272  
    2424<html>
    2525  <head>
    26     <meta name="generator" content="rfc2629toHhk.xslt $Id: rfc2629toHhk.xslt,v 1.6 2003-11-16 14:52:40 jre Exp $" />
     26    <meta name="generator" content="rfc2629toHhk.xslt $Id: rfc2629toHhk.xslt,v 1.7 2013/05/02 15:44:09 jre Exp $" />
    2727  </head>
    2828  <body>
  • rfc2629xslt/rfc2629toXHTML.xslt

    r2232 r2272  
    33<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">
    44
    5 <xsl:strip-space elements="back figure front list middle reference references rfc section"/>               
    6                
     5<xsl:strip-space elements="abstract author back figure front list middle note postal reference references rfc section texttable"/>
     6
    77<xsl:output doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" encoding="UTF-8" method="xml"/>
    88
     
    285285</xsl:param>
    286286
    287 <!-- choose whether or not to do mailto links --> 
    288  
     287<!-- choose whether or not to do mailto links -->
     288
    289289<xsl:param name="xml2rfc-linkmailto">
    290290  <xsl:call-template name="parse-pis">
     
    295295</xsl:param>
    296296
    297 <!-- iprnotified switch --> 
    298  
     297<!-- iprnotified switch -->
     298
    299299<xsl:param name="xml2rfc-iprnotified">
    300300  <xsl:call-template name="parse-pis">
     
    332332<!-- character translation tables -->
    333333<xsl:variable name="lcase" select="'abcdefghijklmnopqrstuvwxyz'"/>
    334 <xsl:variable name="ucase" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'"/>       
     334<xsl:variable name="ucase" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'"/>
    335335<xsl:variable name="digits" select="'0123456789'"/>
    336336
     
    358358<xsl:variable name="ipr-rfc3667" select="(   /rfc/@number &gt; 3708) or   not(     (/rfc/@ipr = 'full2026') or     (/rfc/@ipr = 'noDerivativeWorks2026') or     (/rfc/@ipr = 'noDerivativeWorksNow') or     (/rfc/@ipr = 'none') or     (/rfc/@ipr = '') or     not(/rfc/@ipr)   )"/>
    359359
    360 <xsl:variable name="rfcno" select="/rfc/@number"/> 
     360<xsl:variable name="rfcno" select="/rfc/@number"/>
    361361
    362362<xsl:variable name="submissionType">
     
    374374    </xsl:otherwise>
    375375  </xsl:choose>
    376  
     376
    377377  <!-- sanity check on @consensus -->
    378378  <xsl:if test="/rfc/@consensus and /rfc/@submissionType='independent'">
     
    402402    <xsl:when test="$pub-yearmonth &gt;= 201001 or       ($rfcno=5741 or $rfcno=5742 or $rfcno=5743)">2010</xsl:when>
    403403    <xsl:otherwise/>
    404   </xsl:choose>   
     404  </xsl:choose>
    405405</xsl:variable>
    406406
     
    410410    <xsl:when test="$pub-yearmonth &gt;= 201001 or       ($rfcno=5741 or $rfcno=5742 or $rfcno=5743)">2010</xsl:when>
    411411    <xsl:otherwise/>
    412   </xsl:choose>   
     412  </xsl:choose>
    413413</xsl:variable>
    414414
     
    418418    <xsl:when test="$pub-yearmonth &gt;= 201004">2010</xsl:when>
    419419    <xsl:otherwise/>
    420   </xsl:choose>   
     420  </xsl:choose>
    421421</xsl:variable>
    422422
     
    429429<xsl:variable name="ipr-2009-02" select="(     $ipr-2008-11 and $pub-yearmonth &gt;= 200902   )"/>
    430430
    431 <!-- this makes the Sep 2009 TLP text depend on the publication date to be >= 2009-11 
     431<!-- this makes the Sep 2009 TLP text depend on the publication date to be >= 2009-11
    432432     for IDs, and around 2009-09 for RFCs-->
    433 <xsl:variable name="ipr-2009-09" select="(     ( not(/rfc/@number) and $pub-yearmonth &gt;= 200911 )     or     (       /rfc/@number and $pub-yearmonth &gt;= 200909 and       $rfcno!=5582 and $rfcno!=5621 and $rfcno!=5632 and $rfcno!=5645 and $rfcno!=5646 and $rfcno!=5681      )   )"/>
     433<xsl:variable name="ipr-2009-09" select="(     ( not(/rfc/@number) and $pub-yearmonth &gt;= 200911 )     or     (       /rfc/@number and $pub-yearmonth &gt;= 200909 and       $rfcno!=5582 and $rfcno!=5621 and $rfcno!=5632 and $rfcno!=5645 and $rfcno!=5646 and $rfcno!=5681     )   )"/>
    434434
    435435<!-- this makes the Jan 2010 TLP text depend on the publication date to be >= 2010-04
    436436     for IDs, and around 2010-01 for RFCs-->
    437 <xsl:variable name="ipr-2010-01" select="(     ( not(/rfc/@number) and $pub-yearmonth &gt;= 201004 )     or     (       /rfc/@number and ($pub-yearmonth &gt;= 201001 or       $rfcno=5741 or $rfcno=5742 or $rfcno=5743)      )   )"/>
     437<xsl:variable name="ipr-2010-01" select="(     ( not(/rfc/@number) and $pub-yearmonth &gt;= 201004 )     or     (       /rfc/@number and ($pub-yearmonth &gt;= 201001 or       $rfcno=5741 or $rfcno=5742 or $rfcno=5743)     )   )"/>
    438438
    439439<!-- see http://mailman.rfc-editor.org/pipermail/rfc-interest/2009-June/001373.html -->
     
    441441<xsl:variable name="abstract-first" select="(     (/rfc/@number and $pub-yearmonth &gt;= 200907)     or     (not(/rfc/@number) and $pub-yearmonth &gt;= 200911)   )"/>
    442442
    443 <!-- funding switch --> 
     443<!-- funding switch -->
    444444<xsl:variable name="funding0" select="(   $rfcno &gt; 2499) or   (not(/rfc/@number) and /rfc/@docName and $xml2rfc-ext-pub-year &gt;= 1999   )"/>
    445  
     445
    446446<xsl:variable name="funding1" select="(   $rfcno &gt; 4320) or   (not(/rfc/@number) and /rfc/@docName and $xml2rfc-ext-pub-year &gt;= 2006   )"/>
    447447
     
    452452<!-- will document have an index -->
    453453<xsl:variable name="has-index" select="(//iref or (//xref and $xml2rfc-ext-include-references-in-index='yes')) and $xml2rfc-ext-include-index!='no'"/>
    454          
     454
    455455<!-- does the document contain edits? -->
    456456<xsl:variable name="has-edits" select="//ed:ins | //ed:del | //ed:replace"/>
    457              
     457
    458458<xsl:template match="text()[not(ancestor::artwork)]">
    459459  <xsl:variable name="ws" select="'&#x9;&#xA;&#xD; '"/>
     
    471471  </xsl:if>
    472472</xsl:template>
    473              
    474              
     473
     474
    475475<xsl:template match="abstract">
     476  <xsl:call-template name="check-no-text-content"/>
    476477  <h1 xmlns="http://www.w3.org/1999/xhtml" id="{$anchor-prefix}.abstract"><a href="#{$anchor-prefix}.abstract">Abstract</a></h1>
    477478  <xsl:apply-templates/>
     
    532533  <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')">
    533534    <xsl:if test="contains(.,'&lt;?xml')">
    534       <xsl:variable name="body" select="substring-after(substring-after(.,'&lt;?xml'),'?&gt;')"/> 
     535      <xsl:variable name="body" select="substring-after(substring-after(.,'&lt;?xml'),'?&gt;')"/>
    535536      <xsl:if test="$body!='' and myns:parseXml($body)!=''">
    536537        <table xmlns="http://www.w3.org/1999/xhtml" style="background-color: red; border-width: thin; border-style: solid; border-color: black;">
     
    566567      </xsl:otherwise>
    567568    </xsl:choose>
    568   </xsl:variable> 
     569  </xsl:variable>
    569570  <xsl:choose>
    570571    <xsl:when test="@align='right'">
     
    575576          <xsl:call-template name="insertInsDelClass"/>
    576577          <xsl:copy-of select="$display"/>
    577         </pre>         
     578        </pre>
    578579        <xsl:call-template name="insert-end-code"/>
    579580      </div>
     
    586587          <xsl:call-template name="insertInsDelClass"/>
    587588          <xsl:copy-of select="$display"/>
    588         </pre>         
     589        </pre>
    589590        <xsl:call-template name="insert-end-code"/>
    590591      </div>
     
    635636    </xsl:when>
    636637    <xsl:otherwise>
    637       <xsl:variable name="start" select="substring-before($content,'&#xA;')"/> 
     638      <xsl:variable name="start" select="substring-before($content,'&#xA;')"/>
    638639      <xsl:variable name="end" select="substring-after($content,'&#xA;')"/>
    639640      <xsl:variable name="max">
     
    641642          <xsl:when test="$indent!=''"><xsl:value-of select="69 + $indent"/></xsl:when>
    642643          <xsl:otherwise>69</xsl:otherwise>
    643         </xsl:choose>         
     644        </xsl:choose>
    644645      </xsl:variable>
    645646      <xsl:if test="string-length($start) &gt; $max">
     
    702703
    703704<xsl:template match="author">
    704 
    705     <address xmlns="http://www.w3.org/1999/xhtml" class="vcard">
    706       <span class="vcardline">
    707         <span class="fn">
    708           <xsl:value-of select="@fullname"/>
    709         </span>
    710         <xsl:if test="@role">
    711           (<xsl:value-of select="@role"/>)
     705  <xsl:call-template name="check-no-text-content"/>
     706
     707  <address xmlns="http://www.w3.org/1999/xhtml" class="vcard">
     708    <span class="vcardline">
     709      <span class="fn">
     710        <xsl:value-of select="@fullname"/>
     711      </span>
     712      <xsl:if test="@role">
     713        (<xsl:value-of select="@role"/>)
     714      </xsl:if>
     715      <!-- annotation support for Martin "uuml" Duerst -->
     716      <xsl:if test="@x:annotation">
     717        <xsl:text> </xsl:text>
     718        <i><xsl:value-of select="@x:annotation"/></i>
     719      </xsl:if>
     720      <!-- components of name (hidden from display -->
     721      <span class="n hidden">
     722        <span class="family-name"><xsl:value-of select="@surname"/></span>
     723        <!-- given-name family-name -->
     724        <xsl:if test="@surname=substring(@fullname,1 + string-length(@fullname) - string-length(@surname))">
     725          <span class="given-name"><xsl:value-of select="normalize-space(substring(@fullname,1,string-length(@fullname) - string-length(@surname)))"/></span>
    712726        </xsl:if>
    713         <!-- annotation support for Martin "uuml" Duerst -->
    714         <xsl:if test="@x:annotation">
    715           <xsl:text> </xsl:text>
    716           <i><xsl:value-of select="@x:annotation"/></i>
     727        <!-- family-name given-name -->
     728        <xsl:if test="starts-with(@fullname,@surname)">
     729          <span class="given-name"><xsl:value-of select="normalize-space(substring-after(@fullname,@surname))"/></span>
    717730        </xsl:if>
    718         <!-- components of name (hidden from display -->
    719         <span class="n hidden">
    720           <span class="family-name"><xsl:value-of select="@surname"/></span>
    721           <!-- given-name family-name -->
    722           <xsl:if test="@surname=substring(@fullname,1 + string-length(@fullname) - string-length(@surname))">
    723             <span class="given-name"><xsl:value-of select="normalize-space(substring(@fullname,1,string-length(@fullname) - string-length(@surname)))"/></span>
     731      </span>
     732    </span>
     733    <xsl:if test="normalize-space(organization) != ''">
     734      <span class="org vcardline">
     735        <xsl:value-of select="organization"/>
     736      </span>
     737    </xsl:if>
     738    <xsl:if test="address/postal">
     739      <span class="adr">
     740        <xsl:if test="address/postal/street">
     741          <xsl:for-each select="address/postal/street">
     742            <xsl:variable name="street">
     743              <xsl:call-template name="extract-normalized">
     744                <xsl:with-param name="node" select="."/>
     745                <xsl:with-param name="name" select="'street'"/>
     746              </xsl:call-template>
     747            </xsl:variable>
     748            <xsl:if test="$street!=''">
     749              <span class="street-address vcardline">
     750                <xsl:value-of select="$street"/>
     751              </span>
     752            </xsl:if>
     753          </xsl:for-each>
     754        </xsl:if>
     755        <xsl:if test="address/postal/city|address/postal/region|address/postal/code">
     756          <span class="vcardline">
     757            <xsl:if test="address/postal/city">
     758              <xsl:variable name="city">
     759                <xsl:call-template name="extract-normalized">
     760                  <xsl:with-param name="node" select="address/postal/city"/>
     761                  <xsl:with-param name="name" select="'address/postal/city'"/>
     762                </xsl:call-template>
     763              </xsl:variable>
     764              <xsl:if test="$city!=''">
     765                <span class="locality">
     766                  <xsl:value-of select="$city"/>
     767                </span>
     768                <xsl:text>, </xsl:text>
     769              </xsl:if>
     770            </xsl:if>
     771            <xsl:if test="address/postal/region">
     772              <xsl:variable name="region">
     773                <xsl:call-template name="extract-normalized">
     774                  <xsl:with-param name="node" select="address/postal/region"/>
     775                  <xsl:with-param name="name" select="'address/postal/region'"/>
     776                </xsl:call-template>
     777              </xsl:variable>
     778              <xsl:if test="$region!=''">
     779                <span class="region">
     780                  <xsl:value-of select="$region"/>
     781                </span>
     782                <xsl:text> </xsl:text>
     783              </xsl:if>
     784            </xsl:if>
     785            <xsl:if test="address/postal/code">
     786              <xsl:variable name="code">
     787                <xsl:call-template name="extract-normalized">
     788                  <xsl:with-param name="node" select="address/postal/code"/>
     789                  <xsl:with-param name="name" select="'address/postal/code'"/>
     790                </xsl:call-template>
     791              </xsl:variable>
     792              <xsl:if test="$code!=''">
     793                <span class="postal-code">
     794                  <xsl:value-of select="$code"/>
     795                </span>
     796              </xsl:if>
     797            </xsl:if>
     798          </span>
     799        </xsl:if>
     800        <xsl:if test="address/postal/country">
     801          <xsl:variable name="country">
     802            <xsl:call-template name="extract-normalized">
     803              <xsl:with-param name="node" select="address/postal/country"/>
     804              <xsl:with-param name="name" select="'address/postal/country'"/>
     805            </xsl:call-template>
     806          </xsl:variable>
     807          <xsl:if test="$country!=''">
     808            <span class="country-name vcardline">
     809              <xsl:value-of select="$country"/>
     810            </span>
    724811          </xsl:if>
    725           <!-- family-name given-name -->
    726           <xsl:if test="starts-with(@fullname,@surname)">
    727             <span class="given-name"><xsl:value-of select="normalize-space(substring-after(@fullname,@surname))"/></span>
    728           </xsl:if>
    729         </span>
     812        </xsl:if>
    730813      </span>
    731       <xsl:if test="normalize-space(organization) != ''">
    732         <span class="org vcardline">
    733           <xsl:value-of select="organization"/>
     814    </xsl:if>
     815    <xsl:if test="address/phone">
     816      <xsl:variable name="phone">
     817        <xsl:call-template name="extract-normalized">
     818          <xsl:with-param name="node" select="address/phone"/>
     819          <xsl:with-param name="name" select="'address/phone'"/>
     820        </xsl:call-template>
     821      </xsl:variable>
     822      <xsl:if test="$phone!=''">
     823        <span class="vcardline tel">
     824          <xsl:text>Phone: </xsl:text>
     825          <a href="tel:{translate($phone,' ','')}"><span class="value"><xsl:value-of select="$phone"/></span></a>
    734826        </span>
    735827      </xsl:if>
    736       <xsl:if test="address/postal">
    737         <span class="adr">
    738           <xsl:if test="address/postal/street">
    739             <xsl:for-each select="address/postal/street">
    740               <xsl:variable name="street">
    741                 <xsl:call-template name="extract-normalized">
    742                   <xsl:with-param name="node" select="."/>
    743                   <xsl:with-param name="name" select="'street'"/>
    744                 </xsl:call-template>
    745               </xsl:variable>
    746               <xsl:if test="$street!=''">
    747                 <span class="street-address vcardline">
    748                   <xsl:value-of select="$street"/>
    749                 </span>
    750               </xsl:if>
    751             </xsl:for-each>
     828    </xsl:if>
     829    <xsl:if test="address/facsimile">
     830      <xsl:variable name="facsimile">
     831        <xsl:call-template name="extract-normalized">
     832          <xsl:with-param name="node" select="address/facsimile"/>
     833          <xsl:with-param name="name" select="'address/facsimile'"/>
     834        </xsl:call-template>
     835      </xsl:variable>
     836      <xsl:if test="$facsimile!=''">
     837        <span class="vcardline tel">
     838          <span class="type">Fax</span><xsl:text>: </xsl:text>
     839          <a href="fax:{translate($facsimile,' ','')}"><span class="value"><xsl:value-of select="$facsimile"/></span></a>
     840        </span>
     841      </xsl:if>
     842    </xsl:if>
     843    <xsl:for-each select="address/email">
     844      <xsl:variable name="email">
     845        <xsl:call-template name="extract-email"/>
     846      </xsl:variable>
     847
     848      <span class="vcardline">
     849        <xsl:choose>
     850          <xsl:when test="$xml2rfc-rfcedstyle='yes'">Email: </xsl:when>
     851          <xsl:otherwise>EMail: </xsl:otherwise>
     852        </xsl:choose>
     853        <a>
     854          <xsl:if test="$xml2rfc-linkmailto!='no'">
     855            <xsl:attribute name="href">mailto:<xsl:value-of select="$email"/></xsl:attribute>
    752856          </xsl:if>
    753           <xsl:if test="address/postal/city|address/postal/region|address/postal/code">
    754             <span class="vcardline">
    755               <xsl:if test="address/postal/city">
    756                 <xsl:variable name="city">
    757                   <xsl:call-template name="extract-normalized">
    758                     <xsl:with-param name="node" select="address/postal/city"/>
    759                     <xsl:with-param name="name" select="'address/postal/city'"/>
    760                   </xsl:call-template>
    761                 </xsl:variable>
    762                 <xsl:if test="$city!=''">
    763                   <span class="locality">
    764                     <xsl:value-of select="$city"/>
    765                   </span>
    766                   <xsl:text>, </xsl:text>
    767                 </xsl:if>
    768               </xsl:if>
    769               <xsl:if test="address/postal/region">
    770                 <xsl:variable name="region">
    771                   <xsl:call-template name="extract-normalized">
    772                     <xsl:with-param name="node" select="address/postal/region"/>
    773                     <xsl:with-param name="name" select="'address/postal/region'"/>
    774                   </xsl:call-template>
    775                 </xsl:variable>
    776                 <xsl:if test="$region!=''">
    777                   <span class="region">
    778                     <xsl:value-of select="$region"/>
    779                   </span>
    780                   <xsl:text> </xsl:text>
    781                 </xsl:if>
    782               </xsl:if>
    783               <xsl:if test="address/postal/code">
    784                 <xsl:variable name="code">
    785                   <xsl:call-template name="extract-normalized">
    786                     <xsl:with-param name="node" select="address/postal/code"/>
    787                     <xsl:with-param name="name" select="'address/postal/code'"/>
    788                   </xsl:call-template>
    789                 </xsl:variable>
    790                 <xsl:if test="$code!=''">
    791                   <span class="postal-code">
    792                     <xsl:value-of select="$code"/>
    793                   </span>
    794                 </xsl:if>
    795               </xsl:if>
    796             </span>
    797           </xsl:if>
    798           <xsl:if test="address/postal/country">
    799             <xsl:variable name="country">
    800               <xsl:call-template name="extract-normalized">
    801                 <xsl:with-param name="node" select="address/postal/country"/>
    802                 <xsl:with-param name="name" select="'address/postal/country'"/>
    803               </xsl:call-template>
    804             </xsl:variable>
    805             <xsl:if test="$country!=''">
    806               <span class="country-name vcardline">
    807                 <xsl:value-of select="$country"/>
    808               </span>
    809             </xsl:if>
     857          <span class="email"><xsl:value-of select="$email"/></span>
     858        </a>
     859      </span>
     860    </xsl:for-each>
     861    <xsl:for-each select="address/uri">
     862      <xsl:variable name="uri">
     863        <xsl:call-template name="extract-uri"/>
     864      </xsl:variable>
     865      <xsl:if test="$uri!=''">
     866        <span class="vcardline">
     867          <xsl:text>URI: </xsl:text>
     868          <a href="{$uri}" class="url"><xsl:value-of select="$uri"/></a>
     869          <xsl:if test="@x:annotation">
     870            <xsl:text> </xsl:text>
     871            <i><xsl:value-of select="@x:annotation"/></i>
    810872          </xsl:if>
    811873        </span>
    812874      </xsl:if>
    813       <xsl:if test="address/phone">
    814         <xsl:variable name="phone">
    815           <xsl:call-template name="extract-normalized">
    816             <xsl:with-param name="node" select="address/phone"/>
    817             <xsl:with-param name="name" select="'address/phone'"/>
    818           </xsl:call-template>
    819         </xsl:variable>
    820         <xsl:if test="$phone!=''">
    821           <span class="vcardline tel">
    822             <xsl:text>Phone: </xsl:text>
    823             <a href="tel:{translate($phone,' ','')}"><span class="value"><xsl:value-of select="$phone"/></span></a>
    824           </span>
    825         </xsl:if>
    826       </xsl:if>
    827       <xsl:if test="address/facsimile">
    828         <xsl:variable name="facsimile">
    829           <xsl:call-template name="extract-normalized">
    830             <xsl:with-param name="node" select="address/facsimile"/>
    831             <xsl:with-param name="name" select="'address/facsimile'"/>
    832           </xsl:call-template>
    833         </xsl:variable>
    834         <xsl:if test="$facsimile!=''">
    835           <span class="vcardline tel">
    836             <span class="type">Fax</span><xsl:text>: </xsl:text>
    837             <a href="fax:{translate($facsimile,' ','')}"><span class="value"><xsl:value-of select="$facsimile"/></span></a>
    838           </span>
    839         </xsl:if>
    840       </xsl:if>
    841       <xsl:for-each select="address/email">
    842         <xsl:variable name="email">
    843           <xsl:call-template name="extract-email"/>
    844         </xsl:variable>
    845        
    846         <span class="vcardline">
    847           <xsl:choose>
    848             <xsl:when test="$xml2rfc-rfcedstyle='yes'">Email: </xsl:when>
    849             <xsl:otherwise>EMail: </xsl:otherwise>
    850           </xsl:choose>
    851           <a>
    852             <xsl:if test="$xml2rfc-linkmailto!='no'">
    853               <xsl:attribute name="href">mailto:<xsl:value-of select="$email"/></xsl:attribute>
    854             </xsl:if>
    855             <span class="email"><xsl:value-of select="$email"/></span>
    856           </a>
    857         </span>
    858       </xsl:for-each>
    859       <xsl:for-each select="address/uri">
    860         <xsl:variable name="uri">
    861           <xsl:call-template name="extract-uri"/>
    862         </xsl:variable>
    863         <xsl:if test="$uri!=''">
    864           <span class="vcardline">
    865             <xsl:text>URI: </xsl:text>
    866             <a href="{$uri}" class="url"><xsl:value-of select="$uri"/></a>
    867             <xsl:if test="@x:annotation">
    868               <xsl:text> </xsl:text>
    869               <i><xsl:value-of select="@x:annotation"/></i>
    870             </xsl:if>
    871           </span>
    872         </xsl:if>
    873       </xsl:for-each>
    874     </address>
    875 
     875    </xsl:for-each>
     876  </address>
    876877</xsl:template>
    877878
     
    884885    <xsl:call-template name="insertComments"/>
    885886  </xsl:if>
    886  
     887
    887888  <!-- next, add information about the document's authors -->
    888889  <xsl:if test="$xml2rfc-ext-authors-section!='end'">
    889890    <xsl:call-template name="insertAuthors"/>
    890891  </xsl:if>
    891      
     892
    892893  <!-- add all other top-level sections under <back> -->
    893894  <xsl:apply-templates select="back/*[not(self::references) and not(self::ed:replace and .//references)]"/>
     
    907908    <!-- copyright statements -->
    908909    <xsl:variable name="copyright"><xsl:call-template name="insertCopyright"/></xsl:variable>
    909  
     910
    910911    <!-- emit it -->
    911912    <xsl:choose>
     
    920921    </xsl:choose>
    921922  </xsl:if>
    922  
     923
    923924</xsl:template>
    924925
     
    926927  <a xmlns="http://www.w3.org/1999/xhtml" href="{@target}"><xsl:apply-templates/></a>
    927928</xsl:template>
    928                
     929
    929930<xsl:template match="eref[not(node())]">
    930931  <xsl:text>&lt;</xsl:text>
     
    954955  <xsl:if test="$xml2rfc-topblock!='no'">
    955956    <!-- collect information for left column -->
    956      
     957
    957958    <xsl:variable name="leftColumn">
    958       <xsl:call-template name="collectLeftHeaderColumn"/>   
     959      <xsl:call-template name="collectLeftHeaderColumn"/>
    959960    </xsl:variable>
    960  
     961
    961962    <!-- collect information for right column -->
    962      
     963
    963964    <xsl:variable name="rightColumn">
    964       <xsl:call-template name="collectRightHeaderColumn"/>   
     965      <xsl:call-template name="collectRightHeaderColumn"/>
    965966    </xsl:variable>
    966      
     967
    967968    <!-- insert the collected information -->
    968969    <table xmlns="http://www.w3.org/1999/xhtml" class="header">
     
    970971        <xsl:when test="function-available('exslt:node-set')">
    971972          <xsl:call-template name="emitheader">
    972             <xsl:with-param name="lc" select="exslt:node-set($leftColumn)"/>   
    973             <xsl:with-param name="rc" select="exslt:node-set($rightColumn)"/>   
     973            <xsl:with-param name="lc" select="exslt:node-set($leftColumn)"/>
     974            <xsl:with-param name="rc" select="exslt:node-set($rightColumn)"/>
    974975          </xsl:call-template>
    975         </xsl:when>   
     976        </xsl:when>
    976977        <xsl:otherwise>
    977978          <xsl:call-template name="error">
     
    982983    </table>
    983984  </xsl:if>
    984    
     985
    985986  <p xmlns="http://www.w3.org/1999/xhtml" class="title">
    986987    <!-- main title -->
     
    992993      <br/>
    993994      <span class="filename"><xsl:value-of select="$docname"/></span>
    994      
     995
    995996      <xsl:variable name="docname-noext">
    996997        <xsl:choose>
     
    10061007        </xsl:choose>
    10071008      </xsl:variable>
    1008      
     1009
    10091010      <!-- more name checks -->
    10101011      <xsl:variable name="offending" select="translate($docname,concat($lcase,$digits,'-.'),'')"/>
     
    10141015        </xsl:call-template>
    10151016      </xsl:if>
    1016      
    1017      
     1017
     1018
    10181019      <xsl:if test="contains($docname,'--')">
    10191020        <xsl:call-template name="warning">
     
    10271028        </xsl:call-template>
    10281029      </xsl:if>
    1029      
     1030
    10301031      <!-- sequence number -->
    10311032      <xsl:variable name="seq">
     
    10481049        </xsl:call-template>
    10491050      </xsl:if>
    1050      
    1051     </xsl:if> 
     1051
     1052    </xsl:if>
    10521053  </p>
    1053  
     1054
    10541055  <!-- insert notice about update -->
    10551056  <xsl:variable name="published-as" select="/*/x:link[@rel='Alternate' and starts-with(@title,'RFC')]"/>
     
    10591060    </p>
    10601061  </xsl:if>
    1061    
     1062
    10621063  <!-- check for conforming ipr attribute -->
    10631064  <xsl:choose>
     
    10841085        <xsl:with-param name="msg" select="concat('Unknown value for /rfc/@ipr: ', /rfc/@ipr)"/>
    10851086      </xsl:call-template>
    1086     </xsl:otherwise>       
    1087   </xsl:choose>           
     1087    </xsl:otherwise>
     1088  </xsl:choose>
    10881089
    10891090  <xsl:if test="$xml2rfc-private='' and not($abstract-first)">
    10901091    <xsl:call-template name="emit-ietf-preamble"/>
    10911092  </xsl:if>
    1092  
     1093
    10931094  <xsl:apply-templates select="x:boilerplate"/>
    10941095  <xsl:apply-templates select="abstract"/>
    1095  
     1096
    10961097  <!-- Notes except IESG Notes -->
    10971098  <xsl:apply-templates select="note[@title!='IESG Note' or $xml2rfc-private!='']"/>
    10981099  <!-- show notes inside change tracking as well -->
    10991100  <xsl:apply-templates select="ed:replace[.//note[@title!='IESG Note' or $xml2rfc-private!='']]"/>
    1100    
     1101
    11011102  <xsl:if test="$xml2rfc-private='' and $abstract-first">
    11021103    <xsl:call-template name="emit-ietf-preamble"/>
     
    11151116    <xsl:call-template name="insertPreamble"/>
    11161117  </xsl:variable>
    1117  
     1118
    11181119  <!-- emit it -->
    11191120  <xsl:choose>
     
    12281229  </ol>
    12291230</xsl:template>
    1230    
     1231
    12311232<xsl:template match="list[@style='symbols']">
    12321233  <xsl:call-template name="check-no-text-content"/>
     
    13721373
    13731374<xsl:template match="note">
     1375  <xsl:call-template name="check-no-text-content"/>
    13741376  <xsl:variable name="num"><xsl:number/></xsl:variable>
    13751377    <h1 xmlns="http://www.w3.org/1999/xhtml" id="{$anchor-prefix}.note.{$num}">
     
    14601462    </xsl:when>
    14611463    <xsl:otherwise/>
    1462   </xsl:choose> 
    1463  
     1464  </xsl:choose>
     1465
    14641466</xsl:template>
    14651467
     
    14801482      </xsl:call-template>
    14811483    </xsl:otherwise>
    1482   </xsl:choose> 
    1483  
     1484  </xsl:choose>
     1485
    14841486</xsl:template>
    14851487
     
    15321534    </xsl:choose>
    15331535  </xsl:variable>
    1534  
     1536
    15351537  <tr xmlns="http://www.w3.org/1999/xhtml">
    15361538    <td class="reference">
     
    15501552      </b>
    15511553    </td>
    1552    
     1554
    15531555    <td class="top">
    15541556      <xsl:call-template name="insertInsDelClass"/>
     
    15581560        </xsl:variable>
    15591561        <xsl:variable name="truncated-initials" select="concat(substring-before($initials,'.'),'.')"/>
    1560      
     1562
    15611563        <xsl:choose>
    15621564          <xsl:when test="@surname and @surname!=''">
     
    15911593              </xsl:otherwise>
    15921594            </xsl:choose>
    1593            
     1595
    15941596            <xsl:choose>
    15951597              <xsl:when test="position()=last() - 1">
     
    16111613              </xsl:otherwise>
    16121614            </xsl:choose>
    1613            
     1615
    16141616            <xsl:choose>
    16151617              <xsl:when test="position()=last() - 1">
     
    16251627        </xsl:choose>
    16261628      </xsl:for-each>
    1627          
     1629
    16281630      <xsl:if test="not(front/title/@x:quotes='false')">&#8220;</xsl:if>
    16291631      <xsl:choose>
     
    16361638      </xsl:choose>
    16371639      <xsl:if test="not(front/title/@x:quotes='false')">&#8221;</xsl:if>
    1638      
     1640
    16391641      <xsl:variable name="rfcs" select="count(seriesInfo[@name='RFC'])"/>
    1640            
     1642
    16411643      <xsl:for-each select="seriesInfo">
    16421644        <xsl:text>, </xsl:text>
     
    16551657          </xsl:otherwise>
    16561658        </xsl:choose>
    1657        
     1659
    16581660        <!-- check that BCP FYI STD RFC are in the right order -->
    16591661        <xsl:if test="(@name='BCP' or @name='FYI' or @name='STD') and preceding-sibling::seriesInfo[@name='RFC']">
     
    16621664          </xsl:call-template>
    16631665        </xsl:if>
    1664        
     1666
    16651667      </xsl:for-each>
    1666      
     1668
    16671669      <!-- avoid hacks using seriesInfo when it's not really series information -->
    16681670      <xsl:for-each select="x:prose">
     
    16871689        <xsl:value-of select="front/date/@year"/>
    16881690      </xsl:if>
    1689      
     1691
    16901692      <xsl:if test="string-length(normalize-space(@target)) &gt; 0">
    16911693        <xsl:text>, &lt;</xsl:text>
     
    16931695        <xsl:text>&gt;</xsl:text>
    16941696      </xsl:if>
    1695      
     1697
    16961698      <xsl:text>.</xsl:text>
    16971699
     
    17031705    </td>
    17041706  </tr>
    1705  
    1706  
     1707
     1708
    17071709</xsl:template>
    17081710
     
    17151717      <xsl:text>del-</xsl:text>
    17161718    </xsl:if>
    1717     <xsl:number level="any"/>     
     1719    <xsl:number level="any"/>
    17181720  </xsl:variable>
    1719  
     1721
    17201722  <xsl:variable name="refseccount" select="count(/rfc/back/references)+count(/rfc/back/ed:replace/ed:ins/references)"/>
    17211723
     
    17371739    </h1>
    17381740  </xsl:if>
    1739  
     1741
    17401742  <xsl:variable name="elemtype">
    17411743    <xsl:choose>
     
    17441746    </xsl:choose>
    17451747  </xsl:variable>
    1746  
     1748
    17471749  <xsl:variable name="title">
    17481750    <xsl:choose>
     
    17511753    </xsl:choose>
    17521754  </xsl:variable>
    1753  
    1754   <xsl:element namespace="http://www.w3.org/1999/xhtml" name="{$elemtype}"> 
     1755
     1756  <xsl:element namespace="http://www.w3.org/1999/xhtml" name="{$elemtype}">
    17551757    <xsl:if test="$name='1'">
    17561758      <xsl:call-template name="insert-conditional-pagebreak"/>
     
    17741776    <xsl:value-of select="$title"/>
    17751777  </xsl:element>
    1776  
     1778
    17771779  <table xmlns="http://www.w3.org/1999/xhtml">
    17781780    <xsl:choose>
     
    18221824      <xsl:call-template name="insertCss"/>
    18231825      <!-- <link rel="alternate stylesheet" type="text/css" media="screen" title="Plain (typewriter)" href="rfc2629tty.css" /> -->
    1824            
     1826
    18251827      <!-- link elements -->
    18261828      <xsl:if test="$xml2rfc-toc='yes'">
     
    18681870      </xsl:variable>
    18691871      <meta name="generator" content="{$gen}"/>
    1870      
     1872
    18711873      <!-- keywords -->
    18721874      <xsl:if test="front/keyword">
     
    18801882        <!-- Dublin Core Metadata -->
    18811883        <link rel="schema.dct" href="http://purl.org/dc/terms/"/>
    1882              
     1884
    18831885        <!-- DC creator, see RFC2731 -->
    18841886        <xsl:for-each select="front/author">
     
    18881890          <meta name="dct.creator" content="{concat(@surname,', ',$initials)}"/>
    18891891        </xsl:for-each>
    1890        
     1892
    18911893        <xsl:if test="$xml2rfc-private=''">
    18921894          <xsl:choose>
     
    19071909            </xsl:attribute>
    19081910          </meta>
    1909  
     1911
    19101912          <xsl:if test="@obsoletes!=''">
    19111913            <xsl:call-template name="rfclist-for-dcmeta">
     
    19141916          </xsl:if>
    19151917        </xsl:if>
    1916  
     1918
    19171919        <xsl:if test="front/abstract">
    19181920          <meta name="dct.abstract" content="{normalize-space(front/abstract)}"/>
    1919         </xsl:if>     
     1921        </xsl:if>
    19201922
    19211923        <xsl:if test="@number">
    19221924          <meta name="dct.isPartOf" content="urn:issn:2070-1721"/>
    1923         </xsl:if>     
     1925        </xsl:if>
    19241926
    19251927      </xsl:if>
    1926      
     1928
    19271929      <!-- this replicates dct.abstract, but is used by Google & friends -->
    19281930      <xsl:if test="front/abstract">
    19291931        <meta name="description" content="{normalize-space(front/abstract)}"/>
    19301932      </xsl:if>
    1931      
     1933
    19321934    </head>
    19331935    <body>
     
    19351937        <xsl:attribute name="onload">init();</xsl:attribute>
    19361938      </xsl:if>
    1937    
     1939
    19381940      <!-- insert diagnostics -->
    19391941      <xsl:call-template name="insert-diagnostics"/>
     
    19441946    </body>
    19451947  </html>
    1946 </xsl:template>               
     1948</xsl:template>
    19471949
    19481950
     
    19691971  <xsl:apply-templates select="."/>
    19701972  <xsl:apply-templates select="following-sibling::node()[1]" mode="t-content"/>
    1971 </xsl:template>               
    1972                
     1973</xsl:template>
     1974
    19731975<!-- ... otherwise group into p elements -->
    19741976<xsl:template mode="t-content" match="*|node()">
     
    19771979  </xsl:variable>
    19781980
    1979   <!-- do not open a new p element if this is a whitespace-only text node and no siblings follow --> 
     1981  <!-- do not open a new p element if this is a whitespace-only text node and no siblings follow -->
    19801982  <xsl:if test="not(self::text() and normalize-space(.)='' and not(following-sibling::node()))">
    19811983    <p xmlns="http://www.w3.org/1999/xhtml">
     
    19891991  </xsl:if>
    19901992  <xsl:apply-templates mode="t-content" select="following-sibling::*[self::list or self::figure or self::texttable][1]"/>
    1991 </xsl:template>               
    1992                
     1993</xsl:template>
     1994
    19931995<xsl:template mode="t-content2" match="*">
    19941996  <xsl:apply-templates select="."/>
     
    19961998    <xsl:apply-templates select="following-sibling::node()[1]" mode="t-content2"/>
    19971999  </xsl:if>
    1998 </xsl:template>       
     2000</xsl:template>
    19992001
    20002002<xsl:template mode="t-content2" match="text()">
     
    20032005    <xsl:apply-templates select="following-sibling::node()[1]" mode="t-content2"/>
    20042006  </xsl:if>
    2005 </xsl:template>               
     2007</xsl:template>
    20062008
    20072009<xsl:template mode="t-content2" match="comment()|processing-instruction()">
     
    20102012    <xsl:apply-templates select="following-sibling::node()[1]" mode="t-content2"/>
    20112013  </xsl:if>
    2012 </xsl:template>               
     2014</xsl:template>
    20132015
    20142016<xsl:template match="title">
     
    20662068    </xsl:choose>
    20672069  </xsl:variable>
    2068    
     2070
    20692071  <xsl:if test="not(ancestor::section) and not(ancestor::x:boilerplate) and not(@myns:notoclink)">
    20702072    <xsl:call-template name="insert-conditional-hrule"/>
    20712073  </xsl:if>
    2072  
     2074
    20732075  <xsl:variable name="elemtype">
    20742076    <xsl:choose>
     
    20772079    </xsl:choose>
    20782080  </xsl:variable>
    2079  
     2081
    20802082  <!-- process irefs immediately following the section so that their anchor
    20812083  actually is the section heading -->
     
    20962098      <xsl:otherwise/>
    20972099    </xsl:choose>
    2098    
     2100
    20992101    <xsl:call-template name="insertInsDelClass"/>
    2100        
     2102
    21012103    <xsl:if test="$sectionNumber!='' and not(contains($sectionNumber,'unnumbered-'))">
    21022104      <a xmlns="http://www.w3.org/1999/xhtml" href="#{$anchor-prefix}.section.{$sectionNumber}">
     
    21072109      <xsl:text> </xsl:text>
    21082110    </xsl:if>
    2109    
     2111
    21102112    <!-- issue tracking? -->
    21112113    <xsl:if test="@ed:resolves">
    21122114      <xsl:call-template name="insert-issue-pointer"/>
    21132115    </xsl:if>
    2114    
     2116
    21152117    <xsl:choose>
    21162118      <xsl:when test="@anchor">
     
    22412243      </xsl:choose>
    22422244    </xsl:when>
    2243  
     2245
    22442246    <!-- Other x:fmt values than "none": unsupported -->
    22452247    <xsl:when test="@x:fmt and @x:fmt!='none'">
     
    22482250      </xsl:call-template>
    22492251    </xsl:when>
    2250    
     2252
    22512253    <!-- Section links -->
    22522254    <xsl:when test="$node/self::section or $node/self::appendix">
     
    22922294        </xsl:if>
    22932295      </xsl:if>
    2294      
     2296
    22952297      <a xmlns="http://www.w3.org/1999/xhtml" href="#{$target}">
    22962298        <xsl:if test="@format='none'">
     
    23182320
    23192321</xsl:template>
    2320                
    2321 <xsl:key name="iref-xanch" match="iref[@x:for-anchor]" use="@x:for-anchor"/>           
    2322                
     2322
     2323<xsl:key name="iref-xanch" match="iref[@x:for-anchor]" use="@x:for-anchor"/>
     2324
    23232325<xsl:template match="xref[not(node())]">
    23242326
     
    23392341
    23402342    <xsl:choose>
    2341    
     2343
    23422344      <!-- Section links -->
    23432345      <xsl:when test="$node/self::section or $node/self::appendix">
     
    23532355        </a>
    23542356      </xsl:when>
    2355  
     2357
    23562358      <!-- Figure links -->
    23572359      <xsl:when test="$node/self::figure">
     
    23752377        </a>
    23762378      </xsl:when>
    2377      
     2379
    23782380      <!-- Table links -->
    23792381      <xsl:when test="$node/self::texttable">
     
    23972399        </a>
    23982400      </xsl:when>
    2399      
     2401
    24002402      <!-- Paragraph links -->
    24012403      <xsl:when test="$node/self::t">
     
    24062408            </xsl:for-each>
    24072409          </xsl:variable>
     2410          <xsl:variable name="pparent" select="$node/.."/>
     2411          <xsl:variable name="listtype">
     2412            <xsl:choose>
     2413              <xsl:when test="$pparent/self::list">
     2414                <xsl:value-of select="$pparent/@style"/>
     2415              </xsl:when>
     2416              <xsl:otherwise/>
     2417            </xsl:choose>
     2418          </xsl:variable>
     2419          <xsl:variable name="listindex">
     2420            <xsl:choose>
     2421              <xsl:when test="$listtype='numbers'">
     2422                <xsl:for-each select="$node">
     2423                  <xsl:number/>
     2424                </xsl:for-each>
     2425              </xsl:when>
     2426              <xsl:when test="$listtype='letters'">
     2427                <xsl:for-each select="$node">
     2428                  <xsl:number format="a"/>
     2429                </xsl:for-each>
     2430              </xsl:when>
     2431              <xsl:otherwise/>
     2432            </xsl:choose>
     2433          </xsl:variable>
    24082434          <xsl:choose>
    24092435            <xsl:when test="$xref/@format='counter'">
    2410               <xsl:value-of select="$tcnt"/>
     2436              <xsl:choose>
     2437                <xsl:when test="$listtype!='' and $listindex!=''">
     2438                  <xsl:value-of select="$listindex"/>
     2439                </xsl:when>
     2440                <xsl:when test="$listtype!='' and $listindex=''">
     2441                  <xsl:call-template name="warning">
     2442                    <xsl:with-param name="msg" select="concat('Use of format=counter for unsupported list type ',$listtype)"/>
     2443                  </xsl:call-template>
     2444                  <xsl:value-of select="$tcnt"/>             
     2445                </xsl:when>
     2446                <xsl:otherwise>
     2447                  <xsl:value-of select="$tcnt"/>             
     2448                </xsl:otherwise>
     2449              </xsl:choose>
    24112450            </xsl:when>
    24122451            <xsl:when test="$xref/@format='title'">
     
    24192458        </a>
    24202459      </xsl:when>
    2421  
     2460
    24222461      <!-- Comment links -->
    24232462      <xsl:when test="$node/self::cref">
     
    24412480        </a>
    24422481      </xsl:when>
    2443  
     2482
    24442483      <!-- Reference links -->
    24452484      <xsl:when test="$node/self::reference">
    2446  
     2485
    24472486        <!-- check normative/informative -->
    24482487        <xsl:variable name="t-is-normative" select="$xref/ancestor-or-self::*[@x:nrm][1]"/>
     
    24592498          </xsl:if>
    24602499        </xsl:if>
    2461      
     2500
    24622501        <xsl:variable name="href">
    24632502          <xsl:call-template name="computed-target">
     
    24662505          </xsl:call-template>
    24672506        </xsl:variable>
    2468        
     2507
    24692508        <xsl:variable name="sec">
    24702509          <xsl:choose>
     
    24912530          </xsl:choose>
    24922531        </xsl:variable>
    2493        
     2532
    24942533        <xsl:variable name="secterm">
    24952534          <xsl:choose>
     
    24992538          </xsl:choose>
    25002539        </xsl:variable>
    2501  
     2540
    25022541        <xsl:variable name="fmt">
    25032542          <xsl:choose>
     
    25072546          </xsl:choose>
    25082547        </xsl:variable>
    2509  
     2548
    25102549        <xsl:variable name="title">
    25112550          <xsl:choose>
     
    25252564          </xsl:choose>
    25262565        </xsl:variable>
    2527  
     2566
    25282567        <!--
    25292568        Formats:
    2530        
     2569
    25312570          ()      [XXXX] (Section SS)
    25322571          ,       [XXXX], Section SS
     
    25352574          number  SS
    25362575        -->
    2537        
     2576
    25382577        <xsl:if test="$fmt and not($fmt='()' or $fmt=',' or $fmt='of' or $fmt='sec' or $fmt='anchor' or $fmt='number')">
    25392578          <xsl:call-template name="error">
     
    25412580          </xsl:call-template>
    25422581        </xsl:if>
    2543  
     2582
    25442583        <xsl:if test="$sec!=''">
    2545                
     2584
    25462585          <xsl:choose>
    25472586            <xsl:when test="$fmt='of' or $fmt='sec'">
     
    25852624          </xsl:choose>
    25862625        </xsl:if>
    2587  
     2626
    25882627        <xsl:if test="$sec='' or ($fmt!='sec' and $fmt!='number')">
    25892628          <a xmlns="http://www.w3.org/1999/xhtml" href="#{$xref/@target}">
     
    26092648          </a>
    26102649        </xsl:if>
    2611        
     2650
    26122651        <xsl:if test="$sec!=''">
    26132652          <xsl:choose>
     
    26422681        </xsl:if>
    26432682      </xsl:when>
    2644      
     2683
    26452684      <xsl:otherwise>
    26462685        <xsl:if test="$node">
     
    27602799    </xsl:if>
    27612800  </xsl:if>
    2762    
     2801
    27632802  <!-- private case -->
    27642803  <xsl:if test="$xml2rfc-private!=''">
    27652804    <myns:item><xsl:value-of select="$xml2rfc-private"/></myns:item>
    27662805  </xsl:if>
    2767  
     2806
    27682807  <xsl:if test="$header-format='2010' and /rfc/@number">
    27692808    <myns:item>ISSN: 2070-1721</myns:item>
     
    28342873    <xsl:for-each select="$lc/myns:item | $rc/myns:item">
    28352874      <xsl:variable name="pos" select="position()"/>
    2836       <xsl:if test="$pos &lt; count($lc/myns:item) + 1 or $pos &lt; count($rc/myns:item) + 1"> 
     2875      <xsl:if test="$pos &lt; count($lc/myns:item) + 1 or $pos &lt; count($rc/myns:item) + 1">
    28372876        <tr>
    28382877          <td class="left"><xsl:call-template name="copynodes"><xsl:with-param name="nodes" select="$lc/myns:item[$pos]/node()"/></xsl:call-template></td>
     
    29172956    <xsl:value-of select="concat($year,' ',$month,' ',$day)"/>
    29182957  </xsl:message>-->
    2919  
     2958
    29202959  <xsl:variable name="dim">
    29212960    <xsl:choose>
     
    29262965    </xsl:choose>
    29272966  </xsl:variable>
    2928  
     2967
    29292968  <xsl:choose>
    29302969    <xsl:when test="$day &gt; $dim and $month=12">
     
    29512990
    29522991</xsl:template>
    2953  
     2992
    29542993<xsl:template name="get-month-as-num">
    29552994  <xsl:param name="month"/>
     
    30093048    <xsl:call-template name="get-authors-section-number"/>
    30103049  </xsl:variable>
    3011    
     3050
    30123051  <xsl:if test="$number!='suppress'">
    30133052    <xsl:call-template name="insert-conditional-hrule"/>
    3014    
     3053
    30153054    <div xmlns="http://www.w3.org/1999/xhtml" class="avoidbreak">
    30163055      <h1 id="{$anchor-prefix}.authors">
     
    30223061        <a href="#{$anchor-prefix}.authors"><xsl:call-template name="get-authors-section-title"/></a>
    30233062      </h1>
    3024    
     3063
    30253064      <xsl:apply-templates select="/rfc/front/author"/>
    30263065    </div>
     
    31003139      </xsl:choose>
    31013140    </section>
    3102    
     3141
    31033142    <section title="Intellectual Property" anchor="{$anchor-prefix}.ipr" myns:unnumbered="unnumbered">
    31043143      <xsl:choose>
     
    31133152            on the procedures with respect to rights in RFC documents
    31143153            can be found in BCP 78 and BCP 79.
    3115           </t>       
     3154          </t>
    31163155          <t>
    31173156            Copies of IPR disclosures made to the IETF Secretariat and any
     
    31193158            attempt made to obtain a general license or permission for the use
    31203159            of such proprietary rights by implementers or users of this
    3121             specification can be obtained from the IETF on-line IPR repository 
     3160            specification can be obtained from the IETF on-line IPR repository
    31223161            at <eref target="http://www.ietf.org/ipr">http://www.ietf.org/ipr</eref>.
    3123           </t>       
     3162          </t>
    31243163          <t>
    31253164            The IETF invites any interested party to bring to its attention any
     
    31283167            this standard. Please address the information to the IETF at
    31293168            <eref target="mailto:ietf-ipr@ietf.org">ietf-ipr@ietf.org</eref>.
    3130           </t>       
     3169          </t>
    31313170        </xsl:when>
    31323171        <xsl:otherwise>
     
    31653204      </xsl:choose>
    31663205    </section>
    3167    
     3206
    31683207    <xsl:choose>
    31693208      <xsl:when test="$no-funding"/>
     
    32233262  toggleButtonsToElementsByName("h3");
    32243263  toggleButtonsToElementsByName("h4");
    3225  
     3264
    32263265  buttonsAdded = !buttonsAdded;
    32273266}
     
    32363275function toggleButton(node) {
    32373276  if (! buttonsAdded) {
    3238  
     3277
    32393278    // docname
    32403279    var template = "<xsl:call-template name="replace-substring">
     
    32633302      ref += "#" + id;
    32643303    }
    3265    
     3304
    32663305    // docname
    32673306    var docname = "<xsl:value-of select="/rfc/@docName"/>";
     
    32703309    var section = node.textContent;
    32713310    section = section.replace("\u00a0", " ");
    3272    
     3311
    32733312    // build URI from template
    32743313    var uri = template.replace("{docname}", encodeURIComponent(docname));
    32753314    uri = uri.replace("{section}", encodeURIComponent(section));
    32763315    uri = uri.replace("{ref}", encodeURIComponent(ref));
    3277  
     3316
    32783317    var button = document.createElement("a");
    32793318    button.className = "fbbutton noprint";
     
    35093548td.topnowrap {
    35103549  vertical-align: top;
    3511   white-space: nowrap; 
     3550  white-space: nowrap;
    35123551}
    35133552table.header td {
     
    36593698  border-style: solid;
    36603699  border-color: gray;
    3661   color: gray; 
     3700  color: gray;
    36623701}
    36633702thead th {
     
    37173756    display: none;
    37183757  }
    3719  
     3758
    37203759  a {
    37213760    color: black;
     
    37383777    content: leader('.') target-counter(attr(href), page);
    37393778  }
    3740  
     3779
    37413780  ul.ind li li a {<!-- links in the leaf nodes of the index should go to page numbers -->
    37423781    content: target-counter(attr(href), page);
    37433782  }
    3744  
     3783
    37453784  .print2col {
    37463785    column-count: 2;
     
    37563795@page:right {
    37573796  @top-left {
    3758        content: "<xsl:call-template name="get-header-left"/>"; 
    3759   } 
     3797       content: "<xsl:call-template name="get-header-left"/>";
     3798  }
    37603799  @top-right {
    3761        content: "<xsl:call-template name="get-header-right"/>"; 
    3762   } 
     3800       content: "<xsl:call-template name="get-header-right"/>";
     3801  }
    37633802  @top-center {
    3764        content: "<xsl:call-template name="get-header-center"/>"; 
    3765   } 
     3803       content: "<xsl:call-template name="get-header-center"/>";
     3804  }
    37663805  @bottom-left {
    3767        content: "<xsl:call-template name="get-author-summary"/>"; 
    3768   } 
     3806       content: "<xsl:call-template name="get-author-summary"/>";
     3807  }
    37693808  @bottom-center {
    3770        content: "<xsl:call-template name="get-bottom-center"/>"; 
    3771   } 
     3809       content: "<xsl:call-template name="get-bottom-center"/>";
     3810  }
    37723811  @bottom-right {
    3773        content: "[Page " counter(page) "]"; 
    3774   } 
     3812       content: "[Page " counter(page) "]";
     3813  }
    37753814}
    37763815@page:left {
    37773816  @top-left {
    3778        content: "<xsl:call-template name="get-header-right"/>"; 
    3779   } 
     3817       content: "<xsl:call-template name="get-header-right"/>";
     3818  }
    37803819  @top-right {
    3781        content: "<xsl:call-template name="get-header-left"/>"; 
    3782   } 
     3820       content: "<xsl:call-template name="get-header-left"/>";
     3821  }
    37833822  @top-center {
    3784        content: "<xsl:call-template name="get-header-center"/>"; 
    3785   } 
     3823       content: "<xsl:call-template name="get-header-center"/>";
     3824  }
    37863825  @bottom-left {
    3787        content: "[Page " counter(page) "]"; 
    3788   } 
     3826       content: "[Page " counter(page) "]";
     3827  }
    37893828  @bottom-center {
    3790        content: "<xsl:call-template name="get-bottom-center"/>"; 
    3791   } 
     3829       content: "<xsl:call-template name="get-bottom-center"/>";
     3830  }
    37923831  @bottom-right {
    3793        content: "<xsl:call-template name="get-author-summary"/>"; 
    3794   } 
     3832       content: "<xsl:call-template name="get-author-summary"/>";
     3833  }
    37953834}
    37963835</xsl:when><xsl:otherwise>
    37973836@page {
    37983837  @top-left {
    3799        content: "<xsl:call-template name="get-header-left"/>"; 
    3800   } 
     3838       content: "<xsl:call-template name="get-header-left"/>";
     3839  }
    38013840  @top-right {
    3802        content: "<xsl:call-template name="get-header-right"/>"; 
    3803   } 
     3841       content: "<xsl:call-template name="get-header-right"/>";
     3842  }
    38043843  @top-center {
    3805        content: "<xsl:call-template name="get-header-center"/>"; 
    3806   } 
     3844       content: "<xsl:call-template name="get-header-center"/>";
     3845  }
    38073846  @bottom-left {
    3808        content: "<xsl:call-template name="get-author-summary"/>"; 
    3809   } 
     3847       content: "<xsl:call-template name="get-author-summary"/>";
     3848  }
    38103849  @bottom-center {
    3811        content: "<xsl:call-template name="get-bottom-center"/>"; 
    3812   } 
     3850       content: "<xsl:call-template name="get-bottom-center"/>";
     3851  }
    38133852  @bottom-right {
    3814        content: "[Page " counter(page) "]"; 
    3815   } 
     3853       content: "[Page " counter(page) "]";
     3854  }
    38163855}
    38173856</xsl:otherwise></xsl:choose>
    3818 @page:first { 
     3857@page:first {
    38193858    @top-left {
    38203859      content: normal;
     
    38443883        <xsl:if test="$htmluri">
    38453884          <xsl:attribute name="href"><xsl:value-of select="concat($htmluri,'#',@ed:frag)"/></xsl:attribute>
    3846         </xsl:if>       
     3885        </xsl:if>
    38473886        <xsl:choose>
    38483887          <xsl:when test="@primary='true'"><b><xsl:value-of select="@ed:label"/></b></xsl:when>
     
    39423981    <a href="#{$anchor-prefix}.index">Index</a>
    39433982  </h1>
    3944  
     3983
    39453984  <!-- generate navigation links to index subsections -->
    39463985  <p xmlns="http://www.w3.org/1999/xhtml" class="noprint">
    39473986    <xsl:variable name="irefs" select="//iref[generate-id(.) = generate-id(key('index-first-letter',translate(substring(@item,1,1),$lcase,$ucase))[1])]"/>
    39483987    <xsl:variable name="xrefs" select="//reference[not(starts-with(@anchor,'deleted-'))][generate-id(.) = generate-id(key('index-first-letter',translate(substring(@anchor,1,1),$lcase,$ucase))[1])]"/>
    3949  
     3988
    39503989    <xsl:for-each select="$irefs | $xrefs">
    3951    
     3990
    39523991      <xsl:sort select="translate(concat(@item,@anchor),$lcase,$ucase)"/>
    3953          
     3992
    39543993      <xsl:variable name="letter" select="translate(substring(concat(@item,@anchor),1,1),$lcase,$ucase)"/>
    39553994
    39563995      <!-- character? -->
    39573996      <xsl:if test="translate($letter,concat($lcase,$ucase,'0123456789'),'')=''">
    3958      
     3997
    39593998        <xsl:variable name="showit" select="$xml2rfc-ext-include-references-in-index='yes' or $irefs[starts-with(translate(@item,$lcase,$ucase),$letter)]"/>
    3960        
     3999
    39614000        <xsl:if test="$showit">
    39624001          <a href="#{$anchor-prefix}.index.{$letter}">
     
    39654004          <xsl:text> </xsl:text>
    39664005        </xsl:if>
    3967      
     4006
    39684007      </xsl:if>
    39694008
     
    39764015    <xsl:variable name="irefs2" select="//iref[generate-id(.) = generate-id(key('index-first-letter',translate(substring(@item,1,1),$lcase,$ucase))[1])]"/>
    39774016    <xsl:variable name="xrefs2" select="//reference[not(starts-with(@anchor,'deleted-'))][generate-id(.) = generate-id(key('index-first-letter',translate(substring(@anchor,1,1),$lcase,$ucase))[1])]"/>
    3978  
     4017
    39794018    <xsl:for-each select="$irefs2 | $xrefs2">
    39804019      <xsl:sort select="translate(concat(@item,@anchor),$lcase,$ucase)"/>
    39814020      <xsl:variable name="letter" select="translate(substring(concat(@item,@anchor),1,1),$lcase,$ucase)"/>
    3982            
     4021
    39834022      <xsl:variable name="showit" select="$xml2rfc-ext-include-references-in-index='yes' or $irefs2[starts-with(translate(@item,$lcase,$ucase),$letter)]"/>
    39844023
    39854024      <xsl:if test="$showit">
    39864025        <li>
    3987          
     4026
    39884027          <!-- make letters and digits stand out -->
    39894028          <xsl:choose>
     
    39974036            </xsl:otherwise>
    39984037          </xsl:choose>
    3999        
    4000           <ul> 
     4038
     4039          <ul>
    40014040            <xsl:for-each select="key('index-first-letter',translate(substring(concat(@item,@anchor),1,1),$lcase,$ucase))">
    4002        
     4041
    40034042              <xsl:sort select="translate(concat(@item,@anchor),$lcase,$ucase)"/>
    4004              
     4043
    40054044                <xsl:choose>
    40064045                  <xsl:when test="self::reference">
     
    40114050                        </em>
    40124051                        <xsl:text>  </xsl:text>
    4013                        
     4052
    40144053                        <xsl:variable name="rs" select="key('xref-item',current()/@anchor) | . | key('anchor-item',concat('deleted-',current()/@anchor))"/>
    4015                        
     4054
    40164055                        <xsl:for-each select="$rs">
    40174056                          <xsl:call-template name="insertSingleXref"/>
     
    40214060
    40224061                        <xsl:if test="$rs2">
    4023                           <ul> 
     4062                          <ul>
    40244063                            <xsl:for-each select="$rs2">
    40254064                              <xsl:sort select="substring-before(concat(@x:sec,'.'),'.')" data-type="number"/>
     
    40524091                          <xsl:variable name="doc" select="document(current()/x:source/@href)"/>
    40534092                          <xsl:if test="$rs3">
    4054                             <ul> 
     4093                            <ul>
    40554094                              <xsl:for-each select="$rs3">
    40564095                                <xsl:sort select="count($doc//*[@anchor and following::*/@anchor=substring-after(current()/@x:rel,'#')])" order="ascending" data-type="number"/>
     
    40914130                      <xsl:variable name="item" select="@item"/>
    40924131                      <xsl:variable name="in-artwork" select="key('index-item',$item)[@primary='true' and ancestor::artwork]"/>
    4093                          
     4132
    40944133                      <li>
    40954134                        <xsl:choose>
     
    41024141                        </xsl:choose>
    41034142                        <xsl:text>  </xsl:text>
    4104                        
     4143
    41054144                        <xsl:variable name="irefs3" select="key('index-item',@item)[not(@subitem) or @subitem='']"/>
    41064145                        <xsl:variable name="xrefs3" select="key('xref-item',$irefs3[@x:for-anchor='']/../@anchor) | key('xref-item',$irefs3/@x:for-anchor)"/>
     
    41114150                          <xsl:call-template name="insertSingleIref"/>
    41124151                        </xsl:for-each>
    4113          
     4152
    41144153                        <xsl:variable name="s2" select="key('index-item',@item)[@subitem and @subitem!='']"/>
    41154154                        <xsl:if test="$s2">
    4116                           <ul> 
     4155                          <ul>
    41174156                            <xsl:for-each select="$s2">
    41184157                              <xsl:sort select="translate(@subitem,$lcase,$ucase)"/>
    4119                              
     4158
    41204159                              <xsl:if test="generate-id(.) = generate-id(key('index-item-subitem',concat(@item,'..',@subitem))[1])">
    4121                  
     4160
    41224161                                <xsl:variable name="in-artwork2" select="key('index-item-subitem',concat(@item,'..',@subitem))[@primary='true' and ancestor::artwork]"/>
    4123                  
     4162
    41244163                                <li>
    4125              
     4164
    41264165                                  <xsl:choose>
    41274166                                    <xsl:when test="$in-artwork2">
     
    41334172                                  </xsl:choose>
    41344173                                  <xsl:text>  </xsl:text>
    4135                                    
     4174
    41364175                                  <xsl:variable name="irefs4" select="key('index-item-subitem',concat(@item,'..',@subitem))"/>
    41374176                                  <xsl:variable name="xrefs4" select="key('xref-item',$irefs4[@x:for-anchor='']/../@anchor) | key('xref-item',$irefs4/@x:for-anchor)"/>
     
    41394178
    41404179                                  <xsl:for-each select="$irefs4|$xrefs4|$extrefs4">
    4141                                     <!--<xsl:sort select="translate(@item,$lcase,$ucase)" />-->                   
     4180                                    <!--<xsl:sort select="translate(@item,$lcase,$ucase)" />-->
    41424181                                    <xsl:call-template name="insertSingleIref"/>
    41434182                                  </xsl:for-each>
    4144                
     4183
    41454184                                </li>
    41464185                              </xsl:if>
     
    41524191                  </xsl:otherwise>
    41534192                </xsl:choose>
    4154              
    4155                      
    4156             </xsl:for-each>           
     4193
     4194
     4195            </xsl:for-each>
    41574196          </ul>
    41584197        </li>
    41594198      </xsl:if>
    4160      
     4199
    41614200    </xsl:for-each>
    41624201  </ul>
    41634202  </div>
    4164  
     4203
    41654204</xsl:template>
    41664205
     
    41784217    other than English.
    41794218  </xsl:variable>
    4180  
     4219
    41814220  <!-- TLP1, Section 6.c.i -->
    41824221  <xsl:variable name="noModificationTrust200811Clause">
     
    42114250      <t>
    42124251        <xsl:choose>
    4213          
     4252
    42144253          <!-- RFC2026 -->
    42154254          <xsl:when test="/rfc/@ipr = 'full2026'">
    4216             This document is an Internet-Draft and is 
    4217             in full conformance with all provisions of Section 10 of RFC2026.   
     4255            This document is an Internet-Draft and is
     4256            in full conformance with all provisions of Section 10 of RFC2026.
    42184257          </xsl:when>
    42194258          <xsl:when test="/rfc/@ipr = 'noDerivativeWorks2026'">
    4220             This document is an Internet-Draft and is 
     4259            This document is an Internet-Draft and is
    42214260            in full conformance with all provisions of Section 10 of RFC2026
    4222             except that the right to produce derivative works is not granted.   
     4261            except that the right to produce derivative works is not granted.
    42234262          </xsl:when>
    42244263          <xsl:when test="/rfc/@ipr = 'noDerivativeWorksNow'">
    4225             This document is an Internet-Draft and is 
     4264            This document is an Internet-Draft and is
    42264265            in full conformance with all provisions of Section 10 of RFC2026
    42274266            except that the right to produce derivative works is not granted.
    42284267            (If this document becomes part of an IETF working group activity,
    4229             then it will be brought into full compliance with Section 10 of RFC2026.) 
     4268            then it will be brought into full compliance with Section 10 of RFC2026.)
    42304269          </xsl:when>
    42314270          <xsl:when test="/rfc/@ipr = 'none'">
    4232             This document is an Internet-Draft and is 
     4271            This document is an Internet-Draft and is
    42334272            NOT offered in accordance with Section 10 of RFC2026,
    42344273            and the author does not provide the IETF with any rights other
    42354274            than to publish as an Internet-Draft.
    42364275          </xsl:when>
    4237          
     4276
    42384277          <!-- RFC3667 -->
    42394278          <xsl:when test="/rfc/@ipr = 'full3667'">
     
    42604299            This document is an Internet-Draft and is subject to all provisions
    42614300            of section 3 of RFC 3667 except for the right to produce derivative
    4262             works.  By submitting this Internet-Draft, each author represents 
     4301            works.  By submitting this Internet-Draft, each author represents
    42634302            that any applicable patent or other IPR claims of which he or she
    42644303            is aware have been or will be disclosed, and any of which he or she
     
    42684307            <xref target="{/rfc/@iprExtract}"/> as-is for separate use</xsl:if>.
    42694308          </xsl:when>
    4270          
     4309
    42714310          <!-- RFC3978 -->
    42724311          <xsl:when test="/rfc/@ipr = 'full3978'">
     
    42894328          </xsl:when>
    42904329          <xsl:when test="/rfc/@ipr = 'noDerivatives3978'">
    4291             By submitting this Internet-Draft, each author represents 
     4330            By submitting this Internet-Draft, each author represents
    42924331            that any applicable patent or other IPR claims of which he or she
    42934332            is aware have been or will be disclosed, and any of which he or she
     
    42974336            <xref target="{/rfc/@iprExtract}"/> as-is for separate use</xsl:if>.
    42984337          </xsl:when>
    4299  
     4338
    43004339          <!-- as of Jan 2010, TLP 4.0 -->
    43014340          <xsl:when test="$ipr-2010-01 and (/rfc/@ipr = 'trust200902'                           or /rfc/@ipr = 'noModificationTrust200902'                           or /rfc/@ipr = 'noDerivativesTrust200902'                           or /rfc/@ipr = 'pre5378Trust200902')">
     
    43034342            the provisions of BCP 78 and BCP 79.
    43044343          </xsl:when>
    4305  
     4344
    43064345          <!-- as of Nov 2008, Feb 2009 and Sep 2009 -->
    43074346          <xsl:when test="/rfc/@ipr = 'trust200811'                           or /rfc/@ipr = 'noModificationTrust200811'                           or /rfc/@ipr = 'noDerivativesTrust200811'                           or /rfc/@ipr = 'trust200902'                           or /rfc/@ipr = 'noModificationTrust200902'                           or /rfc/@ipr = 'noDerivativesTrust200902'                           or /rfc/@ipr = 'pre5378Trust200902'">
     
    43134352          </xsl:otherwise>
    43144353        </xsl:choose>
    4315        
     4354
    43164355        <!-- warn about iprExtract without effect -->
    43174356        <xsl:if test="/rfc/@iprExtract and (/rfc/@ipr != 'noModification3667' and /rfc/@ipr != 'noDerivatives3667' and /rfc/@ipr != 'noModification3978' and /rfc/@ipr != 'noDerivatives3978')">
     
    43204359          </xsl:call-template>
    43214360        </xsl:if>
    4322        
     4361
    43234362        <!-- restrictions -->
    43244363        <xsl:choose>
     
    44584497    </xsl:otherwise>
    44594498  </xsl:choose>
    4460    
     4499
    44614500  <!-- 2nd and 3rd paragraph -->
    44624501  <xsl:if test="$rfc-boilerplate='2010' and /rfc/@number">
     
    45434582            </xsl:when>
    45444583            <xsl:otherwise>
    4545               Not all documents approved by the IESG are a candidate for any 
     4584              Not all documents approved by the IESG are a candidate for any
    45464585              level of Internet Standard; see Section 2 of RFC 5741.
    45474586            </xsl:otherwise>
     
    45564595            </xsl:choose>
    45574596          </xsl:variable>
    4558        
     4597
    45594598          Documents approved for publication by the
    45604599          <xsl:value-of select="$approver"/> are not a candidate for any level
     
    45694608    </t>
    45704609  </xsl:if>
    4571    
     4610
    45724611  </section>
    4573  
     4612
    45744613  <!-- IESG Note goes here; see http://www.rfc-editor.org/rfc-style-guide/rfc-style -->
    45754614  <xsl:copy-of select="/rfc/front/note[@title='IESG Note']"/>
    4576  
     4615
    45774616  <xsl:choose>
    45784617    <xsl:when test="$ipr-2008-11">
     
    46314670          </xsl:otherwise>
    46324671        </xsl:choose>
    4633        
     4672
    46344673        <!-- add warning for incpmpatible IPR attribute on RFCs -->
    46354674        <xsl:variable name="stds-rfc-compatible-ipr" select="/rfc/@ipr='pre5378Trust200902' or /rfc/@ipr='trust200902' or /rfc/@ipr='trust200811' or /rfc/@ipr='full3978' or /rfc/@ipr='full3667' or /rfc/@ipr='full2026'"/>
    4636        
     4675
    46374676        <xsl:variable name="rfc-compatible-ipr" select="$stds-rfc-compatible-ipr or /rfc/@ipr='noModificationTrust200902' or /rfc/@ipr='noDerivativesTrust200902' or /rfc/@ipr='noModificationTrust200811' or /rfc/@ipr='noDerivativesTrust200811'"/>
    46384677                      <!-- TODO: may want to add more historic variants -->
    4639                      
     4678
    46404679        <xsl:variable name="is-stds-track" select="$submissionType='IETF' and /rfc/@category='std'"/>
    4641        
     4680
    46424681        <xsl:variable name="status-diags">
    46434682          <xsl:choose>
     
    47044743          </xsl:otherwise>
    47054744        </xsl:choose>
    4706        
     4745
    47074746      </section>
    47084747    </xsl:when>
     
    47254764    </xsl:otherwise>
    47264765  </xsl:choose>
    4727  
     4766
    47284767</xsl:template>
    47294768
     
    48334872    </li>
    48344873  </xsl:if>
    4835  
     4874
    48364875</xsl:template>
    48374876
    48384877<xsl:template match="front" mode="toc">
    4839  
     4878
    48404879  <xsl:variable name="authors-title">
    48414880    <xsl:call-template name="get-authors-section-title"/>
     
    48644903
    48654904  <xsl:variable name="refsecs" select="/rfc/back/references|/rfc/back/ed:replace/ed:ins/references"/>
    4866    
     4905
    48674906  <xsl:choose>
    48684907    <xsl:when test="count($refsecs) = 0">
     
    48774916          </xsl:choose>
    48784917        </xsl:variable>
    4879      
     4918
    48804919        <li xmlns="http://www.w3.org/1999/xhtml">
    48814920          <xsl:call-template name="insert-toc-line">
     
    48914930    <xsl:otherwise>
    48924931      <li xmlns="http://www.w3.org/1999/xhtml">
    4893         <!-- insert pseudo container -->   
     4932        <!-- insert pseudo container -->
    48944933        <xsl:call-template name="insert-toc-line">
    48954934          <xsl:with-param name="number">
     
    48994938          <xsl:with-param name="title" select="$xml2rfc-refparent"/>
    49004939        </xsl:call-template>
    4901  
     4940
    49024941        <ul>
    4903           <!-- ...with subsections... -->   
     4942          <!-- ...with subsections... -->
    49044943          <xsl:for-each select="$refsecs">
    49054944            <xsl:variable name="title">
     
    49094948              </xsl:choose>
    49104949            </xsl:variable>
    4911          
     4950
    49124951            <xsl:variable name="sectionNumber">
    49134952              <xsl:call-template name="get-section-number"/>
    49144953            </xsl:variable>
    4915    
     4954
    49164955            <xsl:variable name="num">
    49174956              <xsl:number level="any"/>
    49184957            </xsl:variable>
    4919    
     4958
    49204959            <li>
    49214960              <xsl:call-template name="insert-toc-line">
     
    49554994        <xsl:with-param name="waschanged" select="@ed:resolves"/>
    49564995      </xsl:call-template>
    4957    
     4996
    49584997      <ul>
    49594998        <xsl:apply-templates mode="toc"/>
     
    49615000    </li>
    49625001  </xsl:variable>
    4963  
     5002
    49645003  <xsl:if test="$content!=''">
    49655004    <li xmlns="http://www.w3.org/1999/xhtml">
     
    49725011        <xsl:with-param name="waschanged" select="@ed:resolves"/>
    49735012      </xsl:call-template>
    4974    
     5013
    49755014      <!-- obtain nested content, just to check whether we need to recurse at all -->
    49765015      <xsl:variable name="nested-content">
     
    49795018        </ul>
    49805019      </xsl:variable>
    4981      
    4982       <!-- only recurse if we need to (do not produce useless list container) -->     
     5020
     5021      <!-- only recurse if we need to (do not produce useless list container) -->
    49835022      <xsl:if test="$nested-content!=''">
    49845023        <ul>
     
    50085047
    50095048<xsl:template name="insertTocAppendix">
    5010  
     5049
    50115050  <xsl:if test="//figure[@title!='' or @anchor!='']">
    50125051    <ul xmlns="http://www.w3.org/1999/xhtml" class="toc">
     
    50275066    </ul>
    50285067  </xsl:if>
    5029  
     5068
    50305069  <!-- experimental -->
    50315070  <xsl:if test="//ed:issue">
     
    50375076<xsl:template name="referencename">
    50385077  <xsl:param name="node"/>
    5039  
     5078
    50405079  <xsl:for-each select="$node">
    50415080    <xsl:choose>
     
    50605099      <xsl:otherwise>[<xsl:number level="any" count="reference[not(ancestor::ed:del)]"/>]</xsl:otherwise>
    50615100    </xsl:choose>
    5062   </xsl:for-each> 
     5101  </xsl:for-each>
    50635102</xsl:template>
    50645103
     
    50865125<xsl:template name="rfc-or-id-link">
    50875126  <xsl:param name="name"/>
    5088  
     5127
    50895128  <xsl:choose>
    50905129    <xsl:when test="starts-with($name,'draft-')">
     
    54805519<xsl:template name="to-abnf-char-sequence">
    54815520  <xsl:param name="chars"/>
    5482  
     5521
    54835522  <xsl:variable name="c" select="substring($chars,1,1)"/>
    54845523  <xsl:variable name="r" select="substring($chars,2)"/>
    5485    
     5524
    54865525  <xsl:choose>
    54875526    <xsl:when test="$c='-'">2D</xsl:when>
     
    55635602    </xsl:call-template>
    55645603  </xsl:if>
    5565  
     5604
    55665605</xsl:template>
    55675606
     
    55995638  <xsl:variable name="content" select="substring(.,2,string-length(.)-2)"/>
    56005639  <xsl:variable name="is-delimiter" select="translate($content,'-','')=''"/>
    5601  
     5640
    56025641  <xsl:choose>
    56035642    <xsl:when test="$is-delimiter">
     
    56295668    </xsl:otherwise>
    56305669  </xsl:choose>
    5631  
     5670
    56325671</xsl:template>
    56335672
     
    56815720    </xsl:choose>
    56825721  </xsl:variable>
    5683  
     5722
    56845723  <table xmlns="http://www.w3.org/1999/xhtml" class="{$class}">
    56855724    <tr>
     
    57425781    </xsl:if>
    57435782  </table>
    5744    
     5783
    57455784</xsl:template>
    57465785
     
    58495888    </tbody>
    58505889  </table>
    5851  
     5890
    58525891</xsl:template>
    58535892
    58545893<xsl:template name="insert-diagnostics">
    5855  
     5894
    58565895  <!-- check anchor names -->
    58575896  <xsl:variable name="badAnchors" select="//*[starts-with(@anchor,concat($anchor-prefix,'.'))][@anchor!=concat($anchor-prefix,'.authors') and /*/x:assign-section-number[@number='suppress' and @builtin-target='authors']]"/>
    5858  
     5897
    58595898  <xsl:if test="$badAnchors">
    58605899    <xsl:variable name="text">
     
    58685907    </xsl:call-template>
    58695908  </xsl:if>
    5870  
     5909
    58715910  <!-- check ABNF syntax references -->
    58725911  <xsl:if test="//artwork[@type='abnf2616']">
     
    58845923    </xsl:if>
    58855924  </xsl:if>
    5886  
     5925
    58875926  <!-- check IDs -->
    58885927  <xsl:variable name="badTargets" select="//xref[not(@target=//@anchor) and not(ancestor::ed:del)]"/>
     
    59035942    </xsl:call-template>
    59045943  </xsl:if>
    5905  
    5906  
     5944
     5945
    59075946</xsl:template>
    59085947
     
    61966235
    61976236<xsl:template match="texttable">
     6237  <xsl:call-template name="check-no-text-content"/>
    61986238
    61996239  <xsl:variable name="anch">
     
    62636303                  <xsl:otherwise>
    62646304                    <xsl:call-template name="warning">
    6265                       <xsl:with-param name="msg">Unknown align attribute on ttcol: <xsl:value-of select="$col/@align"/></xsl:with-param>                     
     6305                      <xsl:with-param name="msg">Unknown align attribute on ttcol: <xsl:value-of select="$col/@align"/></xsl:with-param>
    62666306                    </xsl:call-template>
    62676307                  </xsl:otherwise>
     
    62766316    <xsl:apply-templates select="postamble"/>
    62776317  </div>
    6278  
     6318
    62796319</xsl:template>
    62806320
    62816321<xsl:template match="ttcol">
    62826322  <th xmlns="http://www.w3.org/1999/xhtml">
    6283    
     6323
    62846324    <xsl:choose>
    62856325      <xsl:when test="@align='right' or @align='center' or @align='left'">
     
    62936333      </xsl:otherwise>
    62946334    </xsl:choose>
    6295    
     6335
    62966336    <xsl:if test="@width">
    62976337      <xsl:attribute name="style">width: <xsl:value-of select="@width"/>;</xsl:attribute>
     
    63226362      <xsl:call-template name="get-comment-name"/>
    63236363    </xsl:variable>
    6324    
     6364
    63256365    <span xmlns="http://www.w3.org/1999/xhtml" class="comment">
    63266366      <xsl:choose>
     
    63606400
    63616401  <xsl:call-template name="insert-conditional-hrule"/>
    6362    
     6402
    63636403  <h1 xmlns="http://www.w3.org/1999/xhtml">
    63646404    <xsl:call-template name="insert-conditional-pagebreak"/>
     
    65106550    <xsl:text>http://greenbytes.de/tech/webdav/rfc2629.xslt, </xsl:text>
    65116551    <!-- when RCS keyword substitution in place, add version info -->
    6512     <xsl:if test="contains('$Revision: 1.594 $',':')">
    6513       <xsl:value-of select="concat('Revision ',normalize-space(translate(substring-after('$Revision: 1.594 $', 'Revision: '),'$','')),', ')"/>
     6552    <xsl:if test="contains('$Revision: 1.596 $',':')">
     6553      <xsl:value-of select="concat('Revision ',normalize-space(translate(substring-after('$Revision: 1.596 $', 'Revision: '),'$','')),', ')"/>
    65146554    </xsl:if>
    6515     <xsl:if test="contains('$Date: 2013/04/30 16:11:28 $',':')">
    6516       <xsl:value-of select="concat(normalize-space(translate(substring-after('$Date: 2013/04/30 16:11:28 $', 'Date: '),'$','')),', ')"/>
     6555    <xsl:if test="contains('$Date: 2013/05/16 08:38:33 $',':')">
     6556      <xsl:value-of select="concat(normalize-space(translate(substring-after('$Date: 2013/05/16 08:38:33 $', 'Date: '),'$','')),', ')"/>
    65176557    </xsl:if>
    65186558    <xsl:value-of select="concat('XSLT vendor: ',system-property('xsl:vendor'),' ',system-property('xsl:vendor-url'))"/>
     
    66486688    </xsl:call-template>
    66496689  </xsl:variable>
    6650  
     6690
    66516691  <xsl:if test="$r!=@initials">
    66526692    <xsl:call-template name="warning">
     
    66546694    </xsl:call-template>
    66556695  </xsl:if>
    6656  
     6696
    66576697  <xsl:value-of select="$r"/>
    66586698</xsl:template>
     
    66616701  <xsl:param name="have"/>
    66626702  <xsl:param name="remainder"/>
    6663  
     6703
    66646704  <xsl:variable name="first" select="substring($remainder,1,1)"/>
    66656705  <xsl:variable name="prev" select="substring($have,string-length($have))"/>
     
    67076747    </xsl:otherwise>
    67086748  </xsl:choose>
    6709  
     6749
    67106750</xsl:template>
    67116751
     
    67356775    </xsl:call-template>
    67366776  </xsl:if>
    6737  
     6777
    67386778  <xsl:variable name="email2">
    67396779    <xsl:choose>
     
    67496789    </xsl:choose>
    67506790  </xsl:variable>
    6751  
     6791
    67526792  <xsl:value-of select="$email2"/>
    67536793</xsl:template>
     
    67666806    </xsl:call-template>
    67676807  </xsl:if>
    6768  
     6808
    67696809  <xsl:value-of select="$uri"/>
    67706810</xsl:template>
     
    68026842  <xsl:param name="ret"/>
    68036843  <xsl:param name="default"/>
    6804  
     6844
    68056845  <xsl:choose>
    68066846    <xsl:when test="count($nodes)=0">
     
    68116851        <xsl:otherwise>
    68126852          <xsl:value-of select="$default"/>
    6813         </xsl:otherwise>   
     6853        </xsl:otherwise>
    68146854      </xsl:choose>
    68156855    </xsl:when>
     
    68256865        </xsl:for-each>
    68266866      </xsl:variable>
    6827      
     6867
    68286868      <xsl:call-template name="parse-pis">
    68296869        <xsl:with-param name="nodes" select="$nodes[position()!=1]"/>
     
    68336873        <xsl:with-param name="default" select="$default"/>
    68346874      </xsl:call-template>
    6835      
     6875
    68366876    </xsl:otherwise>
    68376877  </xsl:choose>
     
    68506890    </xsl:call-template>
    68516891  </xsl:variable>
    6852  
     6892
    68536893  <xsl:choose>
    68546894    <xsl:when test="$str2=''">
     
    68586898    <xsl:otherwise>
    68596899      <xsl:variable name="attrname" select="substring-before($str2,'=')"/>
    6860      
     6900
    68616901      <xsl:choose>
    68626902        <xsl:when test="$attrname=''">
     
    69216961                    </xsl:choose>
    69226962                  </xsl:if>
    6923                  
     6963
    69246964                  <xsl:if test="name()='rfc' and $attr='SANITYCHECK'">
    69256965                    <xsl:choose>
     
    69647004                        <xsl:with-param name="sep" select="$sep"/>
    69657005                        <xsl:with-param name="ret">
    6966                           <xsl:choose> 
     7006                          <xsl:choose>
    69677007                            <xsl:when test="$ret!=''">
    69687008                              <xsl:value-of select="concat($ret,$sep,$value)"/>
     
    69747014                        </xsl:with-param>
    69757015                      </xsl:call-template>
    6976                     </xsl:otherwise>                 
    6977                  
     7016                    </xsl:otherwise>
     7017
    69787018                  </xsl:choose>
    6979                  
     7019
    69807020                </xsl:otherwise>
    69817021              </xsl:choose>
     
    69867026    </xsl:otherwise>
    69877027  </xsl:choose>
    6988  
     7028
    69897029</xsl:template>
    69907030
     
    70047044    </xsl:otherwise>
    70057045  </xsl:choose>
    7006  
     7046
    70077047</xsl:template>
    70087048
     
    70477087</xsl:template>
    70487088
    7049 <!-- define exslt:node-set for msxml -->       
     7089<!-- define exslt:node-set for msxml -->
    70507090<msxsl:script language="JScript" implements-prefix="exslt">
    70517091  this['node-set'] = function (x) {
     
    71337173    </xsl:when>
    71347174    <!-- may, but won't -->
    7135     <xsl:otherwise>yes</xsl:otherwise> 
     7175    <xsl:otherwise>yes</xsl:otherwise>
    71367176  </xsl:choose>
    71377177</xsl:variable>
  • rfc2629xslt/rfc2629xslt.html

    r2232 r2272  
    191191td.topnowrap {
    192192  vertical-align: top;
    193   white-space: nowrap; 
     193  white-space: nowrap;
    194194}
    195195table.header td {
     
    307307    display: none;
    308308  }
    309  
     309
    310310  a {
    311311    color: black;
     
    328328    content: leader('.') target-counter(attr(href), page);
    329329  }
    330  
     330
    331331  ul.ind li li a {
    332332    content: target-counter(attr(href), page);
    333333  }
    334  
     334
    335335  .print2col {
    336336    column-count: 2;
     
    342342@page {
    343343  @top-left {
    344        content: "Documentation"; 
    345   } 
     344       content: "Documentation";
     345  }
    346346  @top-right {
    347        content: "November 2012"; 
    348   } 
     347       content: "November 2012";
     348  }
    349349  @top-center {
    350        content: "RFC2629 through XSLT"; 
    351   } 
     350       content: "RFC2629 through XSLT";
     351  }
    352352  @bottom-left {
    353        content: "Reschke"; 
    354   } 
     353       content: "Reschke";
     354  }
    355355  @bottom-center {
    356        content: ""; 
    357   } 
     356       content: "";
     357  }
    358358  @bottom-right {
    359        content: "[Page " counter(page) "]"; 
    360   } 
    361 }
    362 
    363 @page:first { 
     359       content: "[Page " counter(page) "]";
     360  }
     361}
     362
     363@page:first {
    364364    @top-left {
    365365      content: normal;
     
    372372    }
    373373}
    374 </style><link rel="Contents" href="#rfc.toc"><link rel="Author" href="#rfc.authors"><link rel="Index" href="#rfc.index"><link rel="Chapter" title="1 Introduction" href="#rfc.section.1"><link rel="Chapter" title="2 Supported RFC2629 elements" href="#rfc.section.2"><link rel="Chapter" title="3 Processing Instructions" href="#rfc.section.3"><link rel="Chapter" title="4 Anchors" href="#rfc.section.4"><link rel="Chapter" title="5 Supported XSLT engines" href="#rfc.section.5"><link rel="Chapter" title="6 Transforming to HTML" href="#rfc.section.6"><link rel="Chapter" title="7 Transforming to XHTML" href="#rfc.section.7"><link rel="Chapter" title="8 Transforming to CHM (Microsoft Compiled Help)" href="#rfc.section.8"><link rel="Chapter" title="9 Transforming to PDF" href="#rfc.section.9"><link rel="Chapter" title="10 Transforming to ePub" href="#rfc.section.10"><link rel="Chapter" title="11 Generic Extensions" href="#rfc.section.11"><link rel="Chapter" title="12 Utilities" href="#rfc.section.12"><link rel="Chapter" href="#rfc.section.13" title="13 Informative References"><link rel="Appendix" title="A RELAX NG Compact Schema" href="#rfc.section.A"><link rel="Appendix" title="B Implementation Notes" href="#rfc.section.B"><link rel="Appendix" title="C Examples" href="#rfc.section.C"><link rel="Appendix" title="D Producing the IETF 'Boilerplate'" href="#rfc.section.D"><link rel="Appendix" title="E License" href="#rfc.section.E"><link rel="Appendix" title="F Change Logs" href="#rfc.section.F"><meta name="generator" content="http://greenbytes.de/tech/webdav/rfc2629.xslt, Revision 1.594, 2013/04/30 16:11:28, XSLT vendor: SAXON 6.5.5 from Michael Kay http://saxon.sf.net/"><meta name="keywords" content="RFC2629, xml2rfc, XSLT, hCard, XSL-FO, PDF, GRDDL, epub, Dublin Core"><link rel="schema.dct" href="http://purl.org/dc/terms/"><meta name="dct.creator" content="Reschke, J. F."></head><body><table class="header"><tbody><tr><td class="left">RFC2629 through XSLT</td><td class="right">J. Reschke</td></tr><tr><td class="left"></td><td class="right">greenbytes</td></tr><tr><td class="left"></td><td class="right">November 2012</td></tr></tbody></table><p class="title">Transforming RFC2629-formatted XML through XSLT</p><hr class="noprint"><h1 class="np" id="rfc.toc"><a href="#rfc.toc">Table of Contents</a></h1><ul class="toc"><li><a href="#rfc.section.1">1.</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.1">Introduction</a></li><li><a href="#rfc.section.2">2.</a>&nbsp;&nbsp;&nbsp;<a href="#supported.elements">Supported RFC2629 elements</a><ul><li><a href="#rfc.section.2.1">2.1</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.2.1">Extension elements</a></li></ul></li><li><a href="#rfc.section.3">3.</a>&nbsp;&nbsp;&nbsp;<a href="#processing.instructions">Processing Instructions</a><ul><li><a href="#rfc.section.3.1">3.1</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.3.1">Supported xml2rfc-compatible PIs</a></li><li><a href="#rfc.section.3.2">3.2</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.3.2">Unsupported xml2rfc-compatible PIs</a></li><li><a href="#rfc.section.3.3">3.3</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.3.3">Extension PIs</a></li></ul></li><li><a href="#rfc.section.4">4.</a>&nbsp;&nbsp;&nbsp;<a href="#anchors">Anchors</a></li><li><a href="#rfc.section.5">5.</a>&nbsp;&nbsp;&nbsp;<a href="#xslt.engines">Supported XSLT engines</a><ul><li><a href="#rfc.section.5.1">5.1</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.5.1">Standalone Engines</a></li><li><a href="#rfc.section.5.2">5.2</a>&nbsp;&nbsp;&nbsp;<a href="#xslt.engines.browser">In-Browser Engines</a></li></ul></li><li><a href="#rfc.section.6">6.</a>&nbsp;&nbsp;&nbsp;<a href="#output.html">Transforming to HTML</a><ul><li><a href="#rfc.section.6.1">6.1</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.6.1">HTML compliance</a></li><li><a href="#rfc.section.6.2">6.2</a>&nbsp;&nbsp;&nbsp;<a href="#html.link">Standard HTML LINK elements</a></li><li><a href="#rfc.section.6.3">6.3</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.6.3">Standard HTML metadata</a></li><li><a href="#rfc.section.6.4">6.4</a>&nbsp;&nbsp;&nbsp;<a href="#rfc2731.properties">Dublin Core (RFC2731) metadata</a></li><li><a href="#rfc.section.6.5">6.5</a>&nbsp;&nbsp;&nbsp;<a href="#hcard">Experimental hCard support</a></li></ul></li><li><a href="#rfc.section.7">7.</a>&nbsp;&nbsp;&nbsp;<a href="#output.xhtml">Transforming to XHTML</a></li><li><a href="#rfc.section.8">8.</a>&nbsp;&nbsp;&nbsp;<a href="#output.chm">Transforming to CHM (Microsoft Compiled Help)</a></li><li><a href="#rfc.section.9">9.</a>&nbsp;&nbsp;&nbsp;<a href="#output.pdf">Transforming to PDF</a><ul><li><a href="#rfc.section.9.1">9.1</a>&nbsp;&nbsp;&nbsp;<a href="#output.pdf.fop">Via XSL-FO</a><ul><li><a href="#rfc.section.9.1.1">9.1.1</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.9.1.1">Extension feature matrix</a></li><li><a href="#rfc.section.9.1.2">9.1.2</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.9.1.2">Example: producing output for Apache FOP</a></li></ul></li><li><a href="#rfc.section.9.2">9.2</a>&nbsp;&nbsp;&nbsp;<a href="#output.pdf.html">Via X(HTML)</a></li></ul></li><li><a href="#rfc.section.10">10.</a>&nbsp;&nbsp;&nbsp;<a href="#output.epub">Transforming to ePub</a></li><li><a href="#rfc.section.11">11.</a>&nbsp;&nbsp;&nbsp;<a href="#extensions">Generic Extensions</a><ul><li><a href="#rfc.section.11.1">11.1</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.abnf-char-sequence">&lt;abnf-char-sequence&gt; element</a></li><li><a href="#rfc.section.11.2">11.2</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.anchor-alias">&lt;anchor-alias&gt; element</a></li><li><a href="#rfc.section.11.3">11.3</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.bcp14">&lt;bcp14&gt; element</a></li><li><a href="#rfc.section.11.4">11.4</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.bb">&lt;bb&gt; element</a></li><li><a href="#rfc.section.11.5">11.5</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.bc">&lt;bc&gt; element</a></li><li><a href="#rfc.section.11.6">11.6</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.blockquote">&lt;blockquote&gt; element</a></li><li><a href="#rfc.section.11.7">11.7</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.boilerplate">&lt;boilerplate&gt; element</a></li><li><a href="#rfc.section.11.8">11.8</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.bt">&lt;bt&gt; element</a></li><li><a href="#rfc.section.11.9">11.9</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.dfn">&lt;dfn&gt; element</a></li><li><a href="#rfc.section.11.10">11.10</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.feedback">&lt;feedback&gt; element</a></li><li><a href="#rfc.section.11.11">11.11</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.h">&lt;h&gt; element</a></li><li><a href="#rfc.section.11.12">11.12</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.highlight">&lt;highlight&gt; element</a></li><li><a href="#rfc.section.11.13">11.13</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.length-of">&lt;length-of&gt; element</a></li><li><a href="#rfc.section.11.14">11.14</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.link">&lt;link&gt; element</a></li><li><a href="#rfc.section.11.15">11.15</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.lt">&lt;lt&gt; element</a></li><li><a href="#rfc.section.11.16">11.16</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.note">&lt;note&gt; element</a></li><li><a href="#rfc.section.11.17">11.17</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.parse-xml">&lt;parse-xml&gt; element</a></li><li><a href="#rfc.section.11.18">11.18</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.prose">&lt;prose&gt; element</a></li><li><a href="#rfc.section.11.19">11.19</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.q">&lt;q&gt; element</a></li><li><a href="#rfc.section.11.20">11.20</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.ref">&lt;ref&gt; element</a></li><li><a href="#rfc.section.11.21">11.21</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.source">&lt;source&gt; element</a></li><li><a href="#rfc.section.11.22">11.22</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.sup">&lt;sup&gt; element</a></li><li><a href="#rfc.section.11.23">11.23</a>&nbsp;&nbsp;&nbsp;<a href="#ext-rfc2629.artwork">Extensions to Xml2rfc &lt;artwork&gt; element</a></li><li><a href="#rfc.section.11.24">11.24</a>&nbsp;&nbsp;&nbsp;<a href="#ext-rfc2629.iref">Extensions to Xml2rfc &lt;iref&gt; element</a></li><li><a href="#rfc.section.11.25">11.25</a>&nbsp;&nbsp;&nbsp;<a href="#ext-rfc2629.list">Extensions to Xml2rfc &lt;list&gt; element</a></li><li><a href="#rfc.section.11.26">11.26</a>&nbsp;&nbsp;&nbsp;<a href="#ext-rfc2629.rfc">Extensions to Xml2rfc &lt;rfc&gt; element</a></li><li><a href="#rfc.section.11.27">11.27</a>&nbsp;&nbsp;&nbsp;<a href="#ext-rfc2629.section">Extensions to Xml2rfc &lt;section&gt; element</a></li><li><a href="#rfc.section.11.28">11.28</a>&nbsp;&nbsp;&nbsp;<a href="#ext-rfc2629.xref">Extensions to Xml2rfc &lt;xref&gt; element</a></li></ul></li><li><a href="#rfc.section.12">12.</a>&nbsp;&nbsp;&nbsp;<a href="#utilities">Utilities</a><ul><li><a href="#rfc.section.12.1">12.1</a>&nbsp;&nbsp;&nbsp;<a href="#checking-references">Checking References</a></li><li><a href="#rfc.section.12.2">12.2</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.12.2">Generating Graphs from References</a></li><li><a href="#rfc.section.12.3">12.3</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.12.3">Producing reference entries for books</a></li><li><a href="#rfc.section.12.4">12.4</a>&nbsp;&nbsp;&nbsp;<a href="#clean-for-dtd">Down-converting to RFC2629bis DTD</a></li><li><a href="#rfc.section.12.5">12.5</a>&nbsp;&nbsp;&nbsp;<a href="#extract-artwork">Extracting artwork</a></li><li><a href="#rfc.section.12.6">12.6</a>&nbsp;&nbsp;&nbsp;<a href="#grddl">GRRDL</a></li></ul></li><li><a href="#rfc.section.13">13.</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.references">Informative References</a></li><li><a href="#rfc.authors">Author's Address</a></li><li><a href="#rfc.section.A">A.</a>&nbsp;&nbsp;&nbsp;<a href="#grammar">RELAX NG Compact Schema</a></li><li><a href="#rfc.section.B">B.</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.B">Implementation Notes</a><ul><li><a href="#rfc.section.B.1">B.1</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.B.1">Recognized type attributes for &lt;artwork&gt; element</a></li></ul></li><li><a href="#rfc.section.C">C.</a>&nbsp;&nbsp;&nbsp;<a href="#examples">Examples</a><ul><li><a href="#rfc.section.C.1">C.1</a>&nbsp;&nbsp;&nbsp;<a href="#examples.internalsubset">Using the 'Internal Subset'</a></li><li><a href="#rfc.section.C.2">C.2</a>&nbsp;&nbsp;&nbsp;<a href="#examples.customizing">Customization</a></li></ul></li><li><a href="#rfc.section.D">D.</a>&nbsp;&nbsp;&nbsp;<a href="#boilerplate">Producing the IETF 'Boilerplate'</a><ul><li><a href="#rfc.section.D.1">D.1</a>&nbsp;&nbsp;&nbsp;<a href="#attribute-ipr">The /rfc/@ipr Attribute</a><ul><li><a href="#rfc.section.D.1.1">D.1.1</a>&nbsp;&nbsp;&nbsp;<a href="#attribute-ipr-current">Current Values: '*trust200902'</a><ul><li><a href="#rfc.section.D.1.1.1">D.1.1.1</a>&nbsp;&nbsp;&nbsp;<a href="#attribute-ipr-trust200902">trust200902</a></li><li><a href="#rfc.section.D.1.1.2">D.1.1.2</a>&nbsp;&nbsp;&nbsp;<a href="#attribute-ipr-noModificationTrust200902">noModificationTrust200902</a></li><li><a href="#rfc.section.D.1.1.3">D.1.1.3</a>&nbsp;&nbsp;&nbsp;<a href="#attribute-ipr-noDerivativesTrust200902">noDerivativesTrust200902</a></li><li><a href="#rfc.section.D.1.1.4">D.1.1.4</a>&nbsp;&nbsp;&nbsp;<a href="#attribute-ipr-pre5378Trust200902">pre5378Trust200902</a></li></ul></li><li><a href="#rfc.section.D.1.2">D.1.2</a>&nbsp;&nbsp;&nbsp;<a href="#attribute-ipr-historic">Historic Values</a><ul><li><a href="#rfc.section.D.1.2.1">D.1.2.1</a>&nbsp;&nbsp;&nbsp;<a href="#attribute-ipr-200811">Historic Values: '*trust200811'</a></li><li><a href="#rfc.section.D.1.2.2">D.1.2.2</a>&nbsp;&nbsp;&nbsp;<a href="#attribute-ipr-3978">Historic Values: '*3978'</a></li><li><a href="#rfc.section.D.1.2.3">D.1.2.3</a>&nbsp;&nbsp;&nbsp;<a href="#attribute-ipr-3667">Historic Values: '*3667'</a></li><li><a href="#rfc.section.D.1.2.4">D.1.2.4</a>&nbsp;&nbsp;&nbsp;<a href="#attribute-ipr-2026">Historic Values: '*2026'</a></li></ul></li></ul></li><li><a href="#rfc.section.D.2">D.2</a>&nbsp;&nbsp;&nbsp;<a href="#attribute-category">The /rfc/@category Attribute</a></li><li><a href="#rfc.section.D.3">D.3</a>&nbsp;&nbsp;&nbsp;<a href="#attribute-submissiontype">The /rfc/@submissionType Attribute</a></li><li><a href="#rfc.section.D.4">D.4</a>&nbsp;&nbsp;&nbsp;<a href="#attribute-consensus">The /rfc/@consensus Attribute</a></li><li><a href="#rfc.section.D.5">D.5</a>&nbsp;&nbsp;&nbsp;<a href="#attribute-number">The /rfc/@number Attribute</a></li><li><a href="#rfc.section.D.6">D.6</a>&nbsp;&nbsp;&nbsp;<a href="#attribute-docname">The /rfc/@docName Attribute</a></li><li><a href="#rfc.section.D.7">D.7</a>&nbsp;&nbsp;&nbsp;<a href="#attribute-obsoletes">The /rfc/@obsoletes Attribute</a></li><li><a href="#rfc.section.D.8">D.8</a>&nbsp;&nbsp;&nbsp;<a href="#attribute-updates">The /rfc/@updates Attribute</a></li></ul></li><li><a href="#rfc.section.E">E.</a>&nbsp;&nbsp;&nbsp;<a href="#license">License</a></li><li><a href="#rfc.section.F">F.</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.F">Change Logs</a><ul><li><a href="#rfc.section.F.1">F.1</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.F.1">Package</a></li><li><a href="#rfc.section.F.2">F.2</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.F.2">amazon-asin.xslt</a></li><li><a href="#rfc.section.F.3">F.3</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.F.3">check-references.xslt</a></li><li><a href="#rfc.section.F.4">F.4</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.F.4">gen-reference-graph.xslt</a></li><li><a href="#rfc.section.F.5">F.5</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.F.5">rfc2629.xslt</a></li><li><a href="#rfc.section.F.6">F.6</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.F.6">rfc2629toFO.xslt</a></li><li><a href="#rfc.section.F.7">F.7</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.F.7">xsl11toAn.xslt</a></li><li><a href="#rfc.section.F.8">F.8</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.F.8">xsl11toFop.xslt</a></li><li><a href="#rfc.section.F.9">F.9</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.F.9">xsl11toXep.xslt</a></li></ul></li><li><a href="#rfc.index">Index</a></li></ul><hr class="noprint"><h1 id="rfc.section.1" class="np"><a href="#rfc.section.1">1.</a>&nbsp;Introduction</h1><p id="rfc.section.1.p.1">This document describes a set of XSLT transformations that can be used to transform RFC2629-compliant XML (see <a href="#RFC2629" id="rfc.xref.RFC2629.1"><cite title="Writing I-Ds and RFCs using XML">[RFC2629]</cite></a>) to various output formats, such as HTML and PDF. The main topics are </p><ul><li>compliance to the xml2rfc XML element set (<a href="#supported.elements" title="Supported RFC2629 elements">Section&nbsp;2</a>),</li><li>support for xml2rfc processing instructions (<a href="#processing.instructions" title="Processing Instructions">Section&nbsp;3</a>),</li><li>the names of anchor elements generated in HTML and PDF output (<a href="#anchors" title="Anchors">Section&nbsp;4</a>),</li><li>various XSLT engines that can be used (<a href="#xslt.engines" title="Supported XSLT engines">Section&nbsp;5</a>),</li><li>outputting HTML (<a href="#output.html" title="Transforming to HTML">Section&nbsp;6</a>) and XHTML (<a href="#output.xhtml" title="Transforming to XHTML">Section&nbsp;7</a>),</li><li>outputting CHM (Compiled Microsoft Help, <a href="#output.chm" title="Transforming to CHM (Microsoft Compiled Help)">Section&nbsp;8</a>),</li><li>outputting PDF (<a href="#output.pdf" title="Transforming to PDF">Section&nbsp;9</a>),</li><li>outputting ePub (<a href="#output.epub" title="Transforming to ePub">Section&nbsp;10</a>),</li><li>extensions to the xml2rfc vocabulary (<a href="#extensions" title="Generic Extensions">Section&nbsp;11</a>).</li><li>various utilities (<a href="#utilities" title="Utilities">Section&nbsp;12</a>).</li></ul><p id="rfc.section.1.p.2">The full distribution is available at &lt;<a href="http://greenbytes.de/tech/webdav/rfc2629xslt.zip">http://greenbytes.de/tech/webdav/rfc2629xslt.zip</a>&gt;.</p><hr class="noprint"><h1 id="rfc.section.2" class="np"><a href="#rfc.section.2">2.</a>&nbsp;<a id="supported.elements" href="#supported.elements">Supported RFC2629 elements</a></h1><p id="rfc.section.2.p.1"> <samp>rfc2629.xslt</samp> supports both all RFC2629 grammar elements and the extensions implemented in xml2rfc 1.36.</p><h2 id="rfc.section.2.1"><a href="#rfc.section.2.1">2.1</a>&nbsp;Extension elements</h2><p id="rfc.section.2.1.p.1"> <samp>rfc2629.xslt</samp> supports two kind of extension elements, using different XML namespaces.</p><p id="rfc.section.2.1.p.2">The first set contains (hopefully) generally useful extensions, see <a href="#extensions" title="Generic Extensions">Section&nbsp;11</a>.</p><p id="rfc.section.2.1.p.3">The second set is used for change and issue tracking and currently is not documented here. Please email the author in case you're interested in using these extensions.</p><hr class="noprint"><h1 id="rfc.section.3" class="np"><a href="#rfc.section.3">3.</a>&nbsp;<a id="processing.instructions" href="#processing.instructions">Processing Instructions</a></h1><p id="rfc.section.3.p.1">All PIs can be set as XSLT parameter as well, overriding any value that is found in the source file to be transformed.</p><div id="rfc.figure.u.1"></div><p>Using processing instructions:</p><pre class="text">&lt;?rfc toc="yes"?&gt;
     374</style><link rel="Contents" href="#rfc.toc"><link rel="Author" href="#rfc.authors"><link rel="Index" href="#rfc.index"><link rel="Chapter" title="1 Introduction" href="#rfc.section.1"><link rel="Chapter" title="2 Supported RFC2629 elements" href="#rfc.section.2"><link rel="Chapter" title="3 Processing Instructions" href="#rfc.section.3"><link rel="Chapter" title="4 Anchors" href="#rfc.section.4"><link rel="Chapter" title="5 Supported XSLT engines" href="#rfc.section.5"><link rel="Chapter" title="6 Transforming to HTML" href="#rfc.section.6"><link rel="Chapter" title="7 Transforming to XHTML" href="#rfc.section.7"><link rel="Chapter" title="8 Transforming to CHM (Microsoft Compiled Help)" href="#rfc.section.8"><link rel="Chapter" title="9 Transforming to PDF" href="#rfc.section.9"><link rel="Chapter" title="10 Transforming to ePub" href="#rfc.section.10"><link rel="Chapter" title="11 Generic Extensions" href="#rfc.section.11"><link rel="Chapter" title="12 Utilities" href="#rfc.section.12"><link rel="Chapter" href="#rfc.section.13" title="13 Informative References"><link rel="Appendix" title="A RELAX NG Compact Schema" href="#rfc.section.A"><link rel="Appendix" title="B Implementation Notes" href="#rfc.section.B"><link rel="Appendix" title="C Examples" href="#rfc.section.C"><link rel="Appendix" title="D Producing the IETF 'Boilerplate'" href="#rfc.section.D"><link rel="Appendix" title="E License" href="#rfc.section.E"><link rel="Appendix" title="F Change Logs" href="#rfc.section.F"><meta name="generator" content="http://greenbytes.de/tech/webdav/rfc2629.xslt, Revision 1.596, 2013/05/16 08:38:33, XSLT vendor: SAXON 6.5.5 from Michael Kay http://saxon.sf.net/"><meta name="keywords" content="RFC2629, xml2rfc, XSLT, hCard, XSL-FO, PDF, GRDDL, epub, Dublin Core"><link rel="schema.dct" href="http://purl.org/dc/terms/"><meta name="dct.creator" content="Reschke, J. F."></head><body><table class="header"><tbody><tr><td class="left">RFC2629 through XSLT</td><td class="right">J. Reschke</td></tr><tr><td class="left"></td><td class="right">greenbytes</td></tr><tr><td class="left"></td><td class="right">November 2012</td></tr></tbody></table><p class="title">Transforming RFC2629-formatted XML through XSLT</p><hr class="noprint"><h1 class="np" id="rfc.toc"><a href="#rfc.toc">Table of Contents</a></h1><ul class="toc"><li><a href="#rfc.section.1">1.</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.1">Introduction</a></li><li><a href="#rfc.section.2">2.</a>&nbsp;&nbsp;&nbsp;<a href="#supported.elements">Supported RFC2629 elements</a><ul><li><a href="#rfc.section.2.1">2.1</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.2.1">Extension elements</a></li></ul></li><li><a href="#rfc.section.3">3.</a>&nbsp;&nbsp;&nbsp;<a href="#processing.instructions">Processing Instructions</a><ul><li><a href="#rfc.section.3.1">3.1</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.3.1">Supported xml2rfc-compatible PIs</a></li><li><a href="#rfc.section.3.2">3.2</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.3.2">Unsupported xml2rfc-compatible PIs</a></li><li><a href="#rfc.section.3.3">3.3</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.3.3">Extension PIs</a></li></ul></li><li><a href="#rfc.section.4">4.</a>&nbsp;&nbsp;&nbsp;<a href="#anchors">Anchors</a></li><li><a href="#rfc.section.5">5.</a>&nbsp;&nbsp;&nbsp;<a href="#xslt.engines">Supported XSLT engines</a><ul><li><a href="#rfc.section.5.1">5.1</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.5.1">Standalone Engines</a></li><li><a href="#rfc.section.5.2">5.2</a>&nbsp;&nbsp;&nbsp;<a href="#xslt.engines.browser">In-Browser Engines</a></li></ul></li><li><a href="#rfc.section.6">6.</a>&nbsp;&nbsp;&nbsp;<a href="#output.html">Transforming to HTML</a><ul><li><a href="#rfc.section.6.1">6.1</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.6.1">HTML compliance</a></li><li><a href="#rfc.section.6.2">6.2</a>&nbsp;&nbsp;&nbsp;<a href="#html.link">Standard HTML LINK elements</a></li><li><a href="#rfc.section.6.3">6.3</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.6.3">Standard HTML metadata</a></li><li><a href="#rfc.section.6.4">6.4</a>&nbsp;&nbsp;&nbsp;<a href="#rfc2731.properties">Dublin Core (RFC2731) metadata</a></li><li><a href="#rfc.section.6.5">6.5</a>&nbsp;&nbsp;&nbsp;<a href="#hcard">Experimental hCard support</a></li></ul></li><li><a href="#rfc.section.7">7.</a>&nbsp;&nbsp;&nbsp;<a href="#output.xhtml">Transforming to XHTML</a></li><li><a href="#rfc.section.8">8.</a>&nbsp;&nbsp;&nbsp;<a href="#output.chm">Transforming to CHM (Microsoft Compiled Help)</a></li><li><a href="#rfc.section.9">9.</a>&nbsp;&nbsp;&nbsp;<a href="#output.pdf">Transforming to PDF</a><ul><li><a href="#rfc.section.9.1">9.1</a>&nbsp;&nbsp;&nbsp;<a href="#output.pdf.fop">Via XSL-FO</a><ul><li><a href="#rfc.section.9.1.1">9.1.1</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.9.1.1">Extension feature matrix</a></li><li><a href="#rfc.section.9.1.2">9.1.2</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.9.1.2">Example: producing output for Apache FOP</a></li></ul></li><li><a href="#rfc.section.9.2">9.2</a>&nbsp;&nbsp;&nbsp;<a href="#output.pdf.html">Via X(HTML)</a></li></ul></li><li><a href="#rfc.section.10">10.</a>&nbsp;&nbsp;&nbsp;<a href="#output.epub">Transforming to ePub</a></li><li><a href="#rfc.section.11">11.</a>&nbsp;&nbsp;&nbsp;<a href="#extensions">Generic Extensions</a><ul><li><a href="#rfc.section.11.1">11.1</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.abnf-char-sequence">&lt;abnf-char-sequence&gt; element</a></li><li><a href="#rfc.section.11.2">11.2</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.anchor-alias">&lt;anchor-alias&gt; element</a></li><li><a href="#rfc.section.11.3">11.3</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.bcp14">&lt;bcp14&gt; element</a></li><li><a href="#rfc.section.11.4">11.4</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.bb">&lt;bb&gt; element</a></li><li><a href="#rfc.section.11.5">11.5</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.bc">&lt;bc&gt; element</a></li><li><a href="#rfc.section.11.6">11.6</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.blockquote">&lt;blockquote&gt; element</a></li><li><a href="#rfc.section.11.7">11.7</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.boilerplate">&lt;boilerplate&gt; element</a></li><li><a href="#rfc.section.11.8">11.8</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.bt">&lt;bt&gt; element</a></li><li><a href="#rfc.section.11.9">11.9</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.dfn">&lt;dfn&gt; element</a></li><li><a href="#rfc.section.11.10">11.10</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.feedback">&lt;feedback&gt; element</a></li><li><a href="#rfc.section.11.11">11.11</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.h">&lt;h&gt; element</a></li><li><a href="#rfc.section.11.12">11.12</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.highlight">&lt;highlight&gt; element</a></li><li><a href="#rfc.section.11.13">11.13</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.length-of">&lt;length-of&gt; element</a></li><li><a href="#rfc.section.11.14">11.14</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.link">&lt;link&gt; element</a></li><li><a href="#rfc.section.11.15">11.15</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.lt">&lt;lt&gt; element</a></li><li><a href="#rfc.section.11.16">11.16</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.note">&lt;note&gt; element</a></li><li><a href="#rfc.section.11.17">11.17</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.parse-xml">&lt;parse-xml&gt; element</a></li><li><a href="#rfc.section.11.18">11.18</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.prose">&lt;prose&gt; element</a></li><li><a href="#rfc.section.11.19">11.19</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.q">&lt;q&gt; element</a></li><li><a href="#rfc.section.11.20">11.20</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.ref">&lt;ref&gt; element</a></li><li><a href="#rfc.section.11.21">11.21</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.source">&lt;source&gt; element</a></li><li><a href="#rfc.section.11.22">11.22</a>&nbsp;&nbsp;&nbsp;<a href="#ext.element.sup">&lt;sup&gt; element</a></li><li><a href="#rfc.section.11.23">11.23</a>&nbsp;&nbsp;&nbsp;<a href="#ext-rfc2629.artwork">Extensions to Xml2rfc &lt;artwork&gt; element</a></li><li><a href="#rfc.section.11.24">11.24</a>&nbsp;&nbsp;&nbsp;<a href="#ext-rfc2629.iref">Extensions to Xml2rfc &lt;iref&gt; element</a></li><li><a href="#rfc.section.11.25">11.25</a>&nbsp;&nbsp;&nbsp;<a href="#ext-rfc2629.list">Extensions to Xml2rfc &lt;list&gt; element</a></li><li><a href="#rfc.section.11.26">11.26</a>&nbsp;&nbsp;&nbsp;<a href="#ext-rfc2629.rfc">Extensions to Xml2rfc &lt;rfc&gt; element</a></li><li><a href="#rfc.section.11.27">11.27</a>&nbsp;&nbsp;&nbsp;<a href="#ext-rfc2629.section">Extensions to Xml2rfc &lt;section&gt; element</a></li><li><a href="#rfc.section.11.28">11.28</a>&nbsp;&nbsp;&nbsp;<a href="#ext-rfc2629.xref">Extensions to Xml2rfc &lt;xref&gt; element</a></li></ul></li><li><a href="#rfc.section.12">12.</a>&nbsp;&nbsp;&nbsp;<a href="#utilities">Utilities</a><ul><li><a href="#rfc.section.12.1">12.1</a>&nbsp;&nbsp;&nbsp;<a href="#checking-references">Checking References</a></li><li><a href="#rfc.section.12.2">12.2</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.12.2">Generating Graphs from References</a></li><li><a href="#rfc.section.12.3">12.3</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.12.3">Producing reference entries for books</a></li><li><a href="#rfc.section.12.4">12.4</a>&nbsp;&nbsp;&nbsp;<a href="#clean-for-dtd">Down-converting to RFC2629bis DTD</a></li><li><