Ignore:
Timestamp:
Nov 1, 2010, 12:18:16 AM (9 years ago)
Author:
julian.reschke@…
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • rfc2629xslt/rfc2629toXHTML.xslt

    r1019 r1072  
    16941694      </xsl:for-each>
    16951695      <xsl:if test="@number">
    1696         <xsl:variable name="number">
    1697           <xsl:choose>
    1698             <xsl:when test="string-length(@number) &lt; 2">000<xsl:value-of select="@number"/></xsl:when>
    1699             <xsl:when test="string-length(@number) &lt; 3">00<xsl:value-of select="@number"/></xsl:when>
    1700             <xsl:when test="string-length(@number) &lt; 4">0<xsl:value-of select="@number"/></xsl:when>
    1701             <xsl:otherwise><xsl:value-of select="@number"/></xsl:otherwise>
    1702           </xsl:choose>
    1703         </xsl:variable>
    17041696        <link rel="Alternate" title="Authorative ASCII Version" href="http://www.ietf.org/rfc/rfc{@number}.txt"/>
    1705         <link rel="Help" title="Additional Information on tools.ietf.org" href="http://tools.ietf.org/html/rfc{$number}"/>
     1697        <link rel="Help" title="RFC-Editor's Status Page" href="http://www.rfc-editor.org/info/rfc{@number}"/>
     1698        <link rel="Help" title="Additional Information on tools.ietf.org" href="http://tools.ietf.org/html/rfc{@number}"/>
    17061699      </xsl:if>
    17071700
     
    19191912  </xsl:variable>
    19201913 
    1921   <!-- process irefs immediadetely following the section so that their anchor
     1914  <!-- process irefs immediately following the section so that their anchor
    19221915  actually is the section heading -->
    19231916  <xsl:apply-templates select="iref[count(preceding-sibling::*[not(self::iref)])=0]"/>
     
    26392632      <xsl:if test="$xml2rfc-ext-pub-day!='' and /rfc/@ipr and not(/rfc/@number)">
    26402633        <xsl:text> </xsl:text>
    2641         <xsl:value-of select="$xml2rfc-ext-pub-day"/>
     2634        <xsl:value-of select="number($xml2rfc-ext-pub-day)"/>
    26422635        <xsl:text>,</xsl:text>
    26432636      </xsl:if>
     
    32633256  display:table-header-group;
    32643257}
    3265 ul.toc {
     3258ul.toc, ul.toc ul {
    32663259  list-style: none;
    32673260  margin-left: 1.5em;
     
    32693262  padding-left: 0em;
    32703263}
    3271 li.tocline0 {
     3264ul.toc li {
    32723265  line-height: 150%;
    32733266  font-weight: bold;
     
    32763269  margin-right: 0em;
    32773270}
    3278 li.tocline1 {
     3271ul.toc li li {
    32793272  line-height: normal;
    32803273  font-weight: normal;
     
    32833276  margin-right: 0em;
    32843277}
    3285 li.tocline2 {
     3278li.excluded {
    32863279  font-size: 0pt;
    32873280}
     
    32963289  page-break-before: avoid;
    32973290}
    3298 li.indline0 {
     3291ul.ind li {
    32993292  font-weight: bold;
    33003293  line-height: 200%;
     
    33023295  margin-right: 0em;
    33033296}
    3304 li.indline1 {
     3297ul.ind li li {
    33053298  font-weight: normal;
    33063299  line-height: 150%;
     
    34603453  }
    34613454 
    3462   a.iref {
     3455  ul.ind li li a {<!-- links in the leaf nodes of the index should go to page numbers -->
    34633456    content: target-counter(attr(href), page);
    34643457  }
     
    36143607        </xsl:choose>
    36153608      </xsl:variable>
    3616       <a xmlns="http://www.w3.org/1999/xhtml" class="iref" href="{$backlink}">
     3609      <a xmlns="http://www.w3.org/1999/xhtml" href="{$backlink}">
    36173610        <xsl:call-template name="insertInsDelClass"/>
    36183611        <xsl:choose>
     
    36403633  <xsl:choose>
    36413634    <xsl:when test="self::reference">
    3642       <a xmlns="http://www.w3.org/1999/xhtml" class="iref" href="#{@anchor}">
     3635      <a xmlns="http://www.w3.org/1999/xhtml" href="#{@anchor}">
    36433636        <xsl:call-template name="insertInsDelClass"/>
    36443637        <b><xsl:value-of select="$n"/></b>
     
    36483641      <xsl:variable name="target" select="@target"/>
    36493642      <xsl:variable name="backlink">#<xsl:value-of select="$anchor-prefix"/>.xref.<xsl:value-of select="$target"/>.<xsl:number level="any" count="xref[@target=$target]"/></xsl:variable>
    3650       <a xmlns="http://www.w3.org/1999/xhtml" class="iref" href="{$backlink}">
     3643      <a xmlns="http://www.w3.org/1999/xhtml" href="{$backlink}">
    36513644        <xsl:call-template name="insertInsDelClass"/>
    36523645        <xsl:value-of select="$n"/>
     
    36803673      <xsl:if test="translate($letter,concat($lcase,$ucase,'0123456789'),'')=''">
    36813674     
    3682         <xsl:variable name="showit">
    3683           <xsl:choose>
    3684             <xsl:when test="$xml2rfc-ext-include-references-in-index!='yes'">
    3685               <xsl:if test="$irefs[starts-with(translate(@item,$lcase,$ucase),$letter)]">
    3686                 <xsl:text>yes</xsl:text>
    3687               </xsl:if>
    3688             </xsl:when>
    3689             <xsl:otherwise>
    3690               <xsl:text>yes</xsl:text>
    3691             </xsl:otherwise>
    3692           </xsl:choose>
    3693         </xsl:variable>
     3675        <xsl:variable name="showit" select="$xml2rfc-ext-include-references-in-index='yes' or $irefs[starts-with(translate(@item,$lcase,$ucase),$letter)]"/>
    36943676       
    3695         <xsl:if test="$showit='yes'">
     3677        <xsl:if test="$showit">
    36963678          <a href="#{$anchor-prefix}.index.{$letter}">
    36973679            <xsl:value-of select="$letter"/>
     
    37153697      <xsl:variable name="letter" select="translate(substring(concat(@item,@anchor),1,1),$lcase,$ucase)"/>
    37163698           
    3717       <xsl:variable name="showit">
    3718         <xsl:choose>
    3719           <xsl:when test="$xml2rfc-ext-include-references-in-index!='yes'">
    3720             <xsl:if test="$irefs2[starts-with(translate(@item,$lcase,$ucase),$letter)]">
    3721               <xsl:text>yes</xsl:text>
    3722             </xsl:if>
    3723           </xsl:when>
    3724           <xsl:otherwise>
    3725             <xsl:text>yes</xsl:text>
    3726           </xsl:otherwise>
    3727         </xsl:choose>
    3728       </xsl:variable>
    3729 
    3730       <xsl:if test="$showit='yes'">
    3731         <li class="indline0">
     3699      <xsl:variable name="showit" select="$xml2rfc-ext-include-references-in-index='yes' or $irefs2[starts-with(translate(@item,$lcase,$ucase),$letter)]"/>
     3700
     3701      <xsl:if test="$showit">
     3702        <li>
    37323703         
    37333704          <!-- make letters and digits stand out -->
     
    37433714          </xsl:choose>
    37443715       
    3745           <ul class="ind"
     3716          <ul
    37463717            <xsl:for-each select="key('index-first-letter',translate(substring(concat(@item,@anchor),1,1),$lcase,$ucase))">
    37473718       
     
    37513722                  <xsl:when test="self::reference">
    37523723                    <xsl:if test="$xml2rfc-ext-include-references-in-index='yes' and not(starts-with(@anchor,'deleted-'))">
    3753                       <li class="indline1">
     3724                      <li>
    37543725                        <em>
    37553726                          <xsl:value-of select="@anchor"/>
     
    37663737
    37673738                        <xsl:if test="$rs2">
    3768                           <ul class="ind"
     3739                          <ul
    37693740                            <xsl:for-each select="$rs2">
    37703741                              <xsl:sort select="substring-before(concat(@x:sec,'.'),'.')" data-type="number"/>
    37713742                              <xsl:sort select="substring(@x:sec,2+string-length(substring-before(@x:sec,'.')))" data-type="number"/>
    37723743                              <xsl:if test="generate-id(.) = generate-id(key('index-xref-by-sec',concat(@target,'..',@x:sec)))">
    3773                                 <li class="indline1">
     3744                                <li>
    37743745                                  <em>
    37753746                                    <xsl:choose>
     
    37973768                          <xsl:variable name="doc" select="document(current()/x:source/@href)"/>
    37983769                          <xsl:if test="$rs3">
    3799                             <ul class="ind"
     3770                            <ul
    38003771                              <xsl:for-each select="$rs3">
    38013772                                <xsl:sort select="count($doc//*[@anchor and following::*/@anchor=substring-after(current()/@x:rel,'#')])" order="ascending" data-type="number"/>
    38023773                                <xsl:if test="generate-id(.) = generate-id(key('index-xref-by-anchor',concat(@target,'..',@x:rel)))">
    3803                                   <li class="indline1">
     3774                                  <li>
    38043775                                    <em>
    38053776                                      <xsl:variable name="sec">
     
    38373808                      <xsl:variable name="in-artwork" select="key('index-item',$item)[@primary='true' and ancestor::artwork]"/>
    38383809                         
    3839                       <li class="indline1">
     3810                      <li>
    38403811                        <xsl:choose>
    38413812                          <xsl:when test="$in-artwork">
     
    38593830                        <xsl:variable name="s2" select="key('index-item',@item)[@subitem and @subitem!='']"/>
    38603831                        <xsl:if test="$s2">
    3861                           <ul class="ind"
     3832                          <ul
    38623833                            <xsl:for-each select="$s2">
    38633834                              <xsl:sort select="translate(@subitem,$lcase,$ucase)"/>
     
    38673838                                <xsl:variable name="in-artwork2" select="key('index-item-subitem',concat(@item,'..',@subitem))[@primary='true' and ancestor::artwork]"/>
    38683839                 
    3869                                 <li class="indline1">
     3840                                <li>
    38703841             
    38713842                                  <xsl:choose>
     
    43994370    <xsl:when test="($tocparam='' or $tocparam='default') and string-length(translate($number,'.ABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890§','.')) &gt;= $parsedTocDepth">
    44004371      <!-- dropped entry because excluded -->
    4401       <xsl:attribute name="class">tocline2</xsl:attribute>
     4372      <xsl:attribute name="class">excluded</xsl:attribute>
    44024373    </xsl:when>
    44034374    <xsl:when test="$tocparam='exclude'">
    44044375      <!-- dropped entry because excluded -->
    4405       <xsl:attribute name="class">tocline2</xsl:attribute>
     4376      <xsl:attribute name="class">excluded</xsl:attribute>
    44064377    </xsl:when>
    44074378    <xsl:otherwise>
     
    44144385        </xsl:when>
    44154386        <xsl:otherwise>
    4416           <xsl:choose>
    4417             <xsl:when test="not(contains($number,'.'))">
    4418               <xsl:attribute name="class">tocline0</xsl:attribute>
    4419             </xsl:when>
    4420             <xsl:otherwise>
    4421               <xsl:attribute name="class">tocline1</xsl:attribute>
    4422             </xsl:otherwise>
    4423           </xsl:choose>
    44244387          <xsl:if test="$number != '' and not(contains($number,'unnumbered-'))">
    44254388            <xsl:call-template name="emit-section-number">
     
    45514514        </xsl:call-template>
    45524515 
    4553         <ul class="toc">
     4516        <ul>
    45544517          <!-- ...with subsections... -->   
    45554518          <xsl:for-each select="$refsecs">
     
    46074570      </xsl:call-template>
    46084571   
    4609       <ul class="toc">
     4572      <ul>
    46104573        <xsl:apply-templates mode="toc"/>
    46114574      </ul>
     
    46264589      <!-- obtain nested content, just to check whether we need to recurse at all -->
    46274590      <xsl:variable name="nested-content">
    4628         <ul class="toc">
     4591        <ul>
    46294592          <xsl:apply-templates mode="toc"/>
    46304593        </ul>
     
    46334596      <!-- only recurse if we need to (do not produce useless list container) -->     
    46344597      <xsl:if test="$nested-content!=''">
    4635         <ul class="toc">
     4598        <ul>
    46364599          <xsl:apply-templates mode="toc"/>
    46374600        </ul>
     
    46614624 
    46624625  <xsl:if test="//figure[@title!='' or @anchor!='']">
    4663     <ul xmlns="http://www.w3.org/1999/xhtml" class="toc">
     4626    <ul xmlns="http://www.w3.org/1999/xhtml">
    46644627      <xsl:for-each select="//figure[@title!='' or @anchor!='']">
    46654628        <xsl:variable name="title">Figure <xsl:value-of select="position()"/><xsl:if test="@title">: <xsl:value-of select="@title"/></xsl:if>
     
    60626025    <xsl:text>http://greenbytes.de/tech/webdav/rfc2629.xslt, </xsl:text>
    60636026    <!-- when RCS keyword substitution in place, add version info -->
    6064     <xsl:if test="contains('$Revision: 1.524 $',':')">
    6065       <xsl:value-of select="concat('Revision ',normalize-space(translate(substring-after('$Revision: 1.524 $', 'Revision: '),'$','')),', ')"/>
     6027    <xsl:if test="contains('$Revision: 1.531 $',':')">
     6028      <xsl:value-of select="concat('Revision ',normalize-space(translate(substring-after('$Revision: 1.531 $', 'Revision: '),'$','')),', ')"/>
    60666029    </xsl:if>
    6067     <xsl:if test="contains('$Date: 2010-09-14 12:37:11 $',':')">
    6068       <xsl:value-of select="concat(normalize-space(translate(substring-after('$Date: 2010-09-14 12:37:11 $', 'Date: '),'$','')),', ')"/>
     6030    <xsl:if test="contains('$Date: 2010-10-31 21:50:52 $',':')">
     6031      <xsl:value-of select="concat(normalize-space(translate(substring-after('$Date: 2010-10-31 21:50:52 $', 'Date: '),'$','')),', ')"/>
    60696032    </xsl:if>
    60706033    <xsl:value-of select="concat('XSLT vendor: ',system-property('xsl:vendor'),' ',system-property('xsl:vendor-url'))"/>
     
    65876550
    65886551<msxsl:script language="JScript" implements-prefix="date">
    6589   this['year'] = function (x) {
    6590     if (x) {throw "not supported"};
    6591     return (new Date()).getFullYear();
     6552  function twodigits(s) {
     6553    return s &lt; 10 ? "0" + s : s;
    65926554  }
    65936555
    6594   this['month-in-year'] = function (x) {
    6595     if (x) {throw "not supported"};
    6596     return 1 + (new Date()).getMonth();
    6597   }
    6598 
    6599   this['day-in-month'] = function (x) {
    6600     if (x) {throw "not supported"};
    6601     return (new Date()).getDate();
     6556  this['date-time'] = function (x) {
     6557    var now = new Date();
     6558    var offs = now.getTimezoneOffset();
     6559    return now.getFullYear() + "-"
     6560      + twodigits(1 + now.getMonth()) + "-"
     6561      + twodigits(now.getDate()) + "T"
     6562      + twodigits(now.getHours()) + ":"
     6563      + twodigits(now.getMinutes()) + ":"
     6564      + twodigits(now.getSeconds())
     6565      + (offs &gt;= 0 ? "-" : "+")
     6566      + twodigits(Math.abs(offs) / 60) + ":"
     6567      + twodigits(Math.abs(offs) % 60);
    66026568  }
    66036569</msxsl:script>
    66046570
     6571<xsl:variable name="current-year">
     6572  <xsl:choose>
     6573    <xsl:when test="function-available('date:date-time')">
     6574      <xsl:value-of select="substring-before(date:date-time(),'-')"/>
     6575    </xsl:when>
     6576    <xsl:otherwise/>
     6577  </xsl:choose>
     6578</xsl:variable>
     6579
     6580<xsl:variable name="current-month">
     6581  <xsl:choose>
     6582    <xsl:when test="function-available('date:date-time')">
     6583      <xsl:value-of select="substring-before(substring-after(date:date-time(),'-'),'-')"/>
     6584    </xsl:when>
     6585    <xsl:otherwise/>
     6586  </xsl:choose>
     6587</xsl:variable>
     6588
     6589<xsl:variable name="current-day">
     6590  <xsl:choose>
     6591    <xsl:when test="function-available('date:date-time')">
     6592      <xsl:value-of select="substring-after(substring-after(substring-before(date:date-time(),'T'),'-'),'-')"/>
     6593    </xsl:when>
     6594    <xsl:otherwise/>
     6595  </xsl:choose>
     6596</xsl:variable>
     6597
    66056598<xsl:variable name="may-default-dates">
    66066599  <xsl:choose>
    6607     <xsl:when test="function-available('date:year') and function-available('date:month-in-year') and function-available('date:day-in-month')">
     6600    <xsl:when test="$current-year!='' and $current-month!='' and $current-day!=''">
    66086601      <xsl:variable name="year-specified" select="/rfc/front/date/@year and /rfc/front/date/@year!=''"/>
    66096602      <xsl:variable name="month-specified" select="/rfc/front/date/@month and /rfc/front/date/@month!=''"/>
     
    66116604      <xsl:variable name="system-month">
    66126605        <xsl:call-template name="get-month-as-name">
    6613           <xsl:with-param name="month" select="date:month-in-year()"/>
     6606          <xsl:with-param name="month" select="$current-month"/>
    66146607        </xsl:call-template>
    66156608      </xsl:variable>
    66166609      <xsl:choose>
    6617         <xsl:when test="$year-specified and /rfc/front/date/@year!=date:year()">Specified year <xsl:value-of select="/rfc/front/date/@year"/> does not match system date (<xsl:value-of select="date:year()"/>)</xsl:when>
     6610        <xsl:when test="$year-specified and /rfc/front/date/@year!=$current-year">Specified year <xsl:value-of select="/rfc/front/date/@year"/> does not match system date (<xsl:value-of select="$current-year"/>)</xsl:when>
    66186611        <xsl:when test="$month-specified and /rfc/front/date/@month!=$system-month">Specified month <xsl:value-of select="/rfc/front/date/@month"/> does not match system date (<xsl:value-of select="$system-month"/>)</xsl:when>
    6619         <xsl:when test="$day-specified and /rfc/front/date/@day!=date:day-in-month()">Specified day does not match system date</xsl:when>
     6612        <xsl:when test="$day-specified and /rfc/front/date/@day!=$current-day">Specified day does not match system date</xsl:when>
    66206613        <xsl:when test="not($year-specified) and ($month-specified or $day-specified)">Can't default year when month or day is specified</xsl:when>
    66216614        <xsl:when test="not($month-specified) and $day-specified">Can't default month when day is specified</xsl:when>
     
    66336626      <xsl:value-of select="/rfc/front/date/@year"/>
    66346627    </xsl:when>
    6635     <xsl:when test="function-available('date:year') and $may-default-dates='yes'">
    6636       <xsl:value-of select="date:year()"/>
    6637     </xsl:when>
    6638     <xsl:when test="function-available('date:year') and $may-default-dates!='yes'">
     6628    <xsl:when test="$current-year!='' and $may-default-dates='yes'">
     6629      <xsl:value-of select="$current-year"/>
     6630    </xsl:when>
     6631    <xsl:when test="$current-year!='' and $may-default-dates!='yes'">
    66396632      <xsl:call-template name="warning">
    66406633        <xsl:with-param name="inline" select="'no'"/>
     
    66556648      <xsl:value-of select="/rfc/front/date/@month"/>
    66566649    </xsl:when>
    6657     <xsl:when test="function-available('date:month-in-year') and $may-default-dates='yes'">
     6650    <xsl:when test="$current-month!='' and $may-default-dates='yes'">
    66586651      <xsl:call-template name="get-month-as-name">
    6659         <xsl:with-param name="month" select="date:month-in-year()"/>
     6652        <xsl:with-param name="month" select="$current-month"/>
    66606653      </xsl:call-template>
    66616654    </xsl:when>
    6662     <xsl:when test="function-available('date:month-in-year') and $may-default-dates!='yes'">
     6655    <xsl:when test="$current-month!='' and $may-default-dates!='yes'">
    66636656      <xsl:call-template name="warning">
    66646657        <xsl:with-param name="inline" select="'no'"/>
     
    66856678      <xsl:value-of select="/rfc/front/date/@day"/>
    66866679    </xsl:when>
    6687     <xsl:when test="function-available('date:day-in-month') and $may-default-dates='yes'">
    6688       <xsl:value-of select="date:day-in-month()"/>
     6680    <xsl:when test="$current-day!='' and $may-default-dates='yes'">
     6681      <xsl:value-of select="$current-day"/>
    66896682    </xsl:when>
    66906683    <xsl:otherwise/> <!-- harmless, we just don't have it -->
Note: See TracChangeset for help on using the changeset viewer.