Ignore:
Timestamp:
01/11/10 07:18:16 (10 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/samples/rfc2629.xslt

    r1019 r1072  
    18261826      </xsl:for-each>
    18271827      <xsl:if test="@number">
    1828         <xsl:variable name="number">
    1829           <xsl:choose>
    1830             <xsl:when test="string-length(@number) &lt; 2">000<xsl:value-of select="@number"/></xsl:when>
    1831             <xsl:when test="string-length(@number) &lt; 3">00<xsl:value-of select="@number"/></xsl:when>
    1832             <xsl:when test="string-length(@number) &lt; 4">0<xsl:value-of select="@number"/></xsl:when>
    1833             <xsl:otherwise><xsl:value-of select="@number"/></xsl:otherwise>
    1834           </xsl:choose>
    1835         </xsl:variable>
    18361828        <link rel="Alternate" title="Authorative ASCII Version" href="http://www.ietf.org/rfc/rfc{@number}.txt" />
    1837         <link rel="Help" title="Additional Information on tools.ietf.org" href="http://tools.ietf.org/html/rfc{$number}" />
     1829        <link rel="Help" title="RFC-Editor's Status Page" href="http://www.rfc-editor.org/info/rfc{@number}" />
     1830        <link rel="Help" title="Additional Information on tools.ietf.org" href="http://tools.ietf.org/html/rfc{@number}" />
    18381831      </xsl:if>
    18391832
     
    20512044  </xsl:variable>
    20522045 
    2053   <!-- process irefs immediadetely following the section so that their anchor
     2046  <!-- process irefs immediately following the section so that their anchor
    20542047  actually is the section heading -->
    20552048  <xsl:apply-templates select="iref[count(preceding-sibling::*[not(self::iref)])=0]"/>
     
    27712764      <xsl:if test="$xml2rfc-ext-pub-day!='' and /rfc/@ipr and not(/rfc/@number)">
    27722765        <xsl:text> </xsl:text>
    2773         <xsl:value-of select="$xml2rfc-ext-pub-day" />
     2766        <xsl:value-of select="number($xml2rfc-ext-pub-day)" />
    27742767        <xsl:text>,</xsl:text>
    27752768      </xsl:if>
     
    33953388  display:table-header-group;
    33963389}
    3397 ul.toc {
     3390ul.toc, ul.toc ul {
    33983391  list-style: none;
    33993392  margin-left: 1.5em;
     
    34013394  padding-left: 0em;
    34023395}
    3403 li.tocline0 {
     3396ul.toc li {
    34043397  line-height: 150%;
    34053398  font-weight: bold;
     
    34083401  margin-right: 0em;
    34093402}
    3410 li.tocline1 {
     3403ul.toc li li {
    34113404  line-height: normal;
    34123405  font-weight: normal;
     
    34153408  margin-right: 0em;
    34163409}
    3417 li.tocline2 {
     3410li.excluded {
    34183411  font-size: 0pt;
    34193412}
     
    34283421  page-break-before: avoid;
    34293422}
    3430 li.indline0 {
     3423ul.ind li {
    34313424  font-weight: bold;
    34323425  line-height: 200%;
     
    34343427  margin-right: 0em;
    34353428}
    3436 li.indline1 {
     3429ul.ind li li {
    34373430  font-weight: normal;
    34383431  line-height: 150%;
     
    35923585  }
    35933586 
    3594   a.iref {
     3587  ul.ind li li a {<!-- links in the leaf nodes of the index should go to page numbers -->
    35953588    content: target-counter(attr(href), page);
    35963589  }
     
    37463739        </xsl:choose>
    37473740      </xsl:variable>
    3748       <a class="iref" href="{$backlink}">
     3741      <a href="{$backlink}">
    37493742        <xsl:call-template name="insertInsDelClass"/>
    37503743        <xsl:choose>
     
    37723765  <xsl:choose>
    37733766    <xsl:when test="self::reference">
    3774       <a class="iref" href="#{@anchor}">
     3767      <a href="#{@anchor}">
    37753768        <xsl:call-template name="insertInsDelClass"/>
    37763769        <b><xsl:value-of select="$n"/></b>
     
    37803773      <xsl:variable name="target" select="@target"/>
    37813774      <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>
    3782       <a class="iref" href="{$backlink}">
     3775      <a href="{$backlink}">
    37833776        <xsl:call-template name="insertInsDelClass"/>
    37843777        <xsl:value-of select="$n"/>
     
    38123805      <xsl:if test="translate($letter,concat($lcase,$ucase,'0123456789'),'')=''">
    38133806     
    3814         <xsl:variable name="showit">
    3815           <xsl:choose>
    3816             <xsl:when test="$xml2rfc-ext-include-references-in-index!='yes'">
    3817               <xsl:if test="$irefs[starts-with(translate(@item,$lcase,$ucase),$letter)]">
    3818                 <xsl:text>yes</xsl:text>
    3819               </xsl:if>
    3820             </xsl:when>
    3821             <xsl:otherwise>
    3822               <xsl:text>yes</xsl:text>
    3823             </xsl:otherwise>
    3824           </xsl:choose>
    3825         </xsl:variable>
     3807        <xsl:variable name="showit" select="$xml2rfc-ext-include-references-in-index='yes' or $irefs[starts-with(translate(@item,$lcase,$ucase),$letter)]"/>
    38263808       
    3827         <xsl:if test="$showit='yes'">
     3809        <xsl:if test="$showit">
    38283810          <a href="#{$anchor-prefix}.index.{$letter}">
    38293811            <xsl:value-of select="$letter" />
     
    38473829      <xsl:variable name="letter" select="translate(substring(concat(@item,@anchor),1,1),$lcase,$ucase)"/>
    38483830           
    3849       <xsl:variable name="showit">
    3850         <xsl:choose>
    3851           <xsl:when test="$xml2rfc-ext-include-references-in-index!='yes'">
    3852             <xsl:if test="$irefs2[starts-with(translate(@item,$lcase,$ucase),$letter)]">
    3853               <xsl:text>yes</xsl:text>
    3854             </xsl:if>
    3855           </xsl:when>
    3856           <xsl:otherwise>
    3857             <xsl:text>yes</xsl:text>
    3858           </xsl:otherwise>
    3859         </xsl:choose>
    3860       </xsl:variable>
    3861 
    3862       <xsl:if test="$showit='yes'">
    3863         <li class="indline0">
     3831      <xsl:variable name="showit" select="$xml2rfc-ext-include-references-in-index='yes' or $irefs2[starts-with(translate(@item,$lcase,$ucase),$letter)]"/>
     3832
     3833      <xsl:if test="$showit">
     3834        <li>
    38643835         
    38653836          <!-- make letters and digits stand out -->
     
    38753846          </xsl:choose>
    38763847       
    3877           <ul class="ind"
     3848          <ul
    38783849            <xsl:for-each select="key('index-first-letter',translate(substring(concat(@item,@anchor),1,1),$lcase,$ucase))">
    38793850       
     
    38833854                  <xsl:when test="self::reference">
    38843855                    <xsl:if test="$xml2rfc-ext-include-references-in-index='yes' and not(starts-with(@anchor,'deleted-'))">
    3885                       <li class="indline1">
     3856                      <li>
    38863857                        <em>
    38873858                          <xsl:value-of select="@anchor"/>
     
    38983869
    38993870                        <xsl:if test="$rs2">
    3900                           <ul class="ind"
     3871                          <ul
    39013872                            <xsl:for-each select="$rs2">
    39023873                              <xsl:sort select="substring-before(concat(@x:sec,'.'),'.')" data-type="number"/>
    39033874                              <xsl:sort select="substring(@x:sec,2+string-length(substring-before(@x:sec,'.')))" data-type="number"/>
    39043875                              <xsl:if test="generate-id(.) = generate-id(key('index-xref-by-sec',concat(@target,'..',@x:sec)))">
    3905                                 <li class="indline1">
     3876                                <li>
    39063877                                  <em>
    39073878                                    <xsl:choose>
     
    39293900                          <xsl:variable name="doc" select="document(current()/x:source/@href)"/>
    39303901                          <xsl:if test="$rs3">
    3931                             <ul class="ind"
     3902                            <ul
    39323903                              <xsl:for-each select="$rs3">
    39333904                                <xsl:sort select="count($doc//*[@anchor and following::*/@anchor=substring-after(current()/@x:rel,'#')])" order="ascending" data-type="number"/>
    39343905                                <xsl:if test="generate-id(.) = generate-id(key('index-xref-by-anchor',concat(@target,'..',@x:rel)))">
    3935                                   <li class="indline1">
     3906                                  <li>
    39363907                                    <em>
    39373908                                      <xsl:variable name="sec">
     
    39693940                      <xsl:variable name="in-artwork" select="key('index-item',$item)[@primary='true' and ancestor::artwork]"/>
    39703941                         
    3971                       <li class="indline1">
     3942                      <li>
    39723943                        <xsl:choose>
    39733944                          <xsl:when test="$in-artwork">
     
    39913962                        <xsl:variable name="s2" select="key('index-item',@item)[@subitem and @subitem!='']"/>
    39923963                        <xsl:if test="$s2">
    3993                           <ul class="ind"
     3964                          <ul
    39943965                            <xsl:for-each select="$s2">
    39953966                              <xsl:sort select="translate(@subitem,$lcase,$ucase)" />
     
    39993970                                <xsl:variable name="in-artwork2" select="key('index-item-subitem',concat(@item,'..',@subitem))[@primary='true' and ancestor::artwork]" />
    40003971                 
    4001                                 <li class="indline1">
     3972                                <li>
    40023973             
    40033974                                  <xsl:choose>
     
    45404511    <xsl:when test="($tocparam='' or $tocparam='default') and string-length(translate($number,'.ABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890&#167;','.')) &gt;= $parsedTocDepth">
    45414512      <!-- dropped entry because excluded -->
    4542       <xsl:attribute name="class">tocline2</xsl:attribute>
     4513      <xsl:attribute name="class">excluded</xsl:attribute>
    45434514    </xsl:when>
    45444515    <xsl:when test="$tocparam='exclude'">
    45454516      <!-- dropped entry because excluded -->
    4546       <xsl:attribute name="class">tocline2</xsl:attribute>
     4517      <xsl:attribute name="class">excluded</xsl:attribute>
    45474518    </xsl:when>
    45484519    <xsl:otherwise>
     
    45554526        </xsl:when>
    45564527        <xsl:otherwise>
    4557           <xsl:choose>
    4558             <xsl:when test="not(contains($number,'.'))">
    4559               <xsl:attribute name="class">tocline0</xsl:attribute>
    4560             </xsl:when>
    4561             <xsl:otherwise>
    4562               <xsl:attribute name="class">tocline1</xsl:attribute>
    4563             </xsl:otherwise>
    4564           </xsl:choose>
    45654528          <xsl:if test="$number != '' and not(contains($number,'unnumbered-'))">
    45664529            <xsl:call-template name="emit-section-number">
     
    46924655        </xsl:call-template>
    46934656 
    4694         <ul class="toc">
     4657        <ul>
    46954658          <!-- ...with subsections... -->   
    46964659          <xsl:for-each select="$refsecs">
     
    47484711      </xsl:call-template>
    47494712   
    4750       <ul class="toc">
     4713      <ul>
    47514714        <xsl:apply-templates mode="toc" />
    47524715      </ul>
     
    47674730      <!-- obtain nested content, just to check whether we need to recurse at all -->
    47684731      <xsl:variable name="nested-content">
    4769         <ul class="toc">
     4732        <ul>
    47704733          <xsl:apply-templates mode="toc" />
    47714734        </ul>
     
    47744737      <!-- only recurse if we need to (do not produce useless list container) -->     
    47754738      <xsl:if test="$nested-content!=''">
    4776         <ul class="toc">
     4739        <ul>
    47774740          <xsl:apply-templates mode="toc" />
    47784741        </ul>
     
    48024765 
    48034766  <xsl:if test="//figure[@title!='' or @anchor!='']">
    4804     <ul class="toc">
     4767    <ul>
    48054768      <xsl:for-each select="//figure[@title!='' or @anchor!='']">
    48064769        <xsl:variable name="title">Figure <xsl:value-of select="position()"/><xsl:if test="@title">: <xsl:value-of select="@title"/></xsl:if>
     
    62046167    <xsl:text>http://greenbytes.de/tech/webdav/rfc2629.xslt, </xsl:text>
    62056168    <!-- when RCS keyword substitution in place, add version info -->
    6206     <xsl:if test="contains('$Revision: 1.524 $',':')">
    6207       <xsl:value-of select="concat('Revision ',normalize-space(translate(substring-after('$Revision: 1.524 $', 'Revision: '),'$','')),', ')" />
     6169    <xsl:if test="contains('$Revision: 1.531 $',':')">
     6170      <xsl:value-of select="concat('Revision ',normalize-space(translate(substring-after('$Revision: 1.531 $', 'Revision: '),'$','')),', ')" />
    62086171    </xsl:if>
    6209     <xsl:if test="contains('$Date: 2010-09-14 12:37:11 $',':')">
    6210       <xsl:value-of select="concat(normalize-space(translate(substring-after('$Date: 2010-09-14 12:37:11 $', 'Date: '),'$','')),', ')" />
     6172    <xsl:if test="contains('$Date: 2010-10-31 21:50:52 $',':')">
     6173      <xsl:value-of select="concat(normalize-space(translate(substring-after('$Date: 2010-10-31 21:50:52 $', 'Date: '),'$','')),', ')" />
    62116174    </xsl:if>
    62126175    <xsl:value-of select="concat('XSLT vendor: ',system-property('xsl:vendor'),' ',system-property('xsl:vendor-url'))" />
     
    67296692
    67306693<msxsl:script language="JScript" implements-prefix="date">
    6731   this['year'] = function (x) {
    6732     if (x) {throw "not supported"};
    6733     return (new Date()).getFullYear();
     6694  function twodigits(s) {
     6695    return s &lt; 10 ? "0" + s : s;
    67346696  }
    67356697
    6736   this['month-in-year'] = function (x) {
    6737     if (x) {throw "not supported"};
    6738     return 1 + (new Date()).getMonth();
    6739   }
    6740 
    6741   this['day-in-month'] = function (x) {
    6742     if (x) {throw "not supported"};
    6743     return (new Date()).getDate();
     6698  this['date-time'] = function (x) {
     6699    var now = new Date();
     6700    var offs = now.getTimezoneOffset();
     6701    return now.getFullYear() + "-"
     6702      + twodigits(1 + now.getMonth()) + "-"
     6703      + twodigits(now.getDate()) + "T"
     6704      + twodigits(now.getHours()) + ":"
     6705      + twodigits(now.getMinutes()) + ":"
     6706      + twodigits(now.getSeconds())
     6707      + (offs >= 0 ? "-" : "+")
     6708      + twodigits(Math.abs(offs) / 60) + ":"
     6709      + twodigits(Math.abs(offs) % 60);
    67446710  }
    67456711</msxsl:script>
    67466712
     6713<xsl:variable name="current-year">
     6714  <xsl:choose>
     6715    <xsl:when test="function-available('date:date-time')">
     6716      <xsl:value-of select="substring-before(date:date-time(),'-')"/>
     6717    </xsl:when>
     6718    <xsl:otherwise/>
     6719  </xsl:choose>
     6720</xsl:variable>
     6721
     6722<xsl:variable name="current-month">
     6723  <xsl:choose>
     6724    <xsl:when test="function-available('date:date-time')">
     6725      <xsl:value-of select="substring-before(substring-after(date:date-time(),'-'),'-')"/>
     6726    </xsl:when>
     6727    <xsl:otherwise/>
     6728  </xsl:choose>
     6729</xsl:variable>
     6730
     6731<xsl:variable name="current-day">
     6732  <xsl:choose>
     6733    <xsl:when test="function-available('date:date-time')">
     6734      <xsl:value-of select="substring-after(substring-after(substring-before(date:date-time(),'T'),'-'),'-')"/>
     6735    </xsl:when>
     6736    <xsl:otherwise/>
     6737  </xsl:choose>
     6738</xsl:variable>
     6739
    67476740<xsl:variable name="may-default-dates">
    67486741  <xsl:choose>
    6749     <xsl:when test="function-available('date:year') and function-available('date:month-in-year') and function-available('date:day-in-month')">
     6742    <xsl:when test="$current-year!='' and $current-month!='' and $current-day!=''">
    67506743      <xsl:variable name="year-specified" select="/rfc/front/date/@year and /rfc/front/date/@year!=''"/>
    67516744      <xsl:variable name="month-specified" select="/rfc/front/date/@month and /rfc/front/date/@month!=''"/>
     
    67536746      <xsl:variable name="system-month">
    67546747        <xsl:call-template name="get-month-as-name">
    6755           <xsl:with-param name="month" select="date:month-in-year()"/>
     6748          <xsl:with-param name="month" select="$current-month"/>
    67566749        </xsl:call-template>
    67576750      </xsl:variable>
    67586751      <xsl:choose>
    6759         <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>
     6752        <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>
    67606753        <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>
    6761         <xsl:when test="$day-specified and /rfc/front/date/@day!=date:day-in-month()">Specified day does not match system date</xsl:when>
     6754        <xsl:when test="$day-specified and /rfc/front/date/@day!=$current-day">Specified day does not match system date</xsl:when>
    67626755        <xsl:when test="not($year-specified) and ($month-specified or $day-specified)">Can't default year when month or day is specified</xsl:when>
    67636756        <xsl:when test="not($month-specified) and $day-specified">Can't default month when day is specified</xsl:when>
     
    67756768      <xsl:value-of select="/rfc/front/date/@year"/>
    67766769    </xsl:when>
    6777     <xsl:when test="function-available('date:year') and $may-default-dates='yes'">
    6778       <xsl:value-of select="date:year()"/>
    6779     </xsl:when>
    6780     <xsl:when test="function-available('date:year') and $may-default-dates!='yes'">
     6770    <xsl:when test="$current-year!='' and $may-default-dates='yes'">
     6771      <xsl:value-of select="$current-year"/>
     6772    </xsl:when>
     6773    <xsl:when test="$current-year!='' and $may-default-dates!='yes'">
    67816774      <xsl:call-template name="warning">
    67826775        <xsl:with-param name="inline" select="'no'"/>
     
    67976790      <xsl:value-of select="/rfc/front/date/@month"/>
    67986791    </xsl:when>
    6799     <xsl:when test="function-available('date:month-in-year') and $may-default-dates='yes'">
     6792    <xsl:when test="$current-month!='' and $may-default-dates='yes'">
    68006793      <xsl:call-template name="get-month-as-name">
    6801         <xsl:with-param name="month" select="date:month-in-year()"/>
     6794        <xsl:with-param name="month" select="$current-month"/>
    68026795      </xsl:call-template>
    68036796    </xsl:when>
    6804     <xsl:when test="function-available('date:month-in-year') and $may-default-dates!='yes'">
     6797    <xsl:when test="$current-month!='' and $may-default-dates!='yes'">
    68056798      <xsl:call-template name="warning">
    68066799        <xsl:with-param name="inline" select="'no'"/>
     
    68276820      <xsl:value-of select="/rfc/front/date/@day"/>
    68286821    </xsl:when>
    6829     <xsl:when test="function-available('date:day-in-month') and $may-default-dates='yes'">
    6830       <xsl:value-of select="date:day-in-month()"/>
     6822    <xsl:when test="$current-day!='' and $may-default-dates='yes'">
     6823      <xsl:value-of select="$current-day"/>
    68316824    </xsl:when>
    68326825    <xsl:otherwise /> <!-- harmless, we just don't have it -->
Note: See TracChangeset for help on using the changeset viewer.