Ignore:
Timestamp:
Mar 1, 2008, 4:52:33 AM (12 years ago)
Author:
julian.reschke@…
Message:

Update to latest version of rfc2629.xslt (matching xml2rfc 1.33).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • rfc2629xslt/rfc2629.xslt

    r213 r227  
    3434               
    3535                xmlns:ed="http://greenbytes.de/2002/rfcedit"
     36                xmlns:date="http://exslt.org/dates-and-times"
    3637                xmlns:exslt="http://exslt.org/common"
    3738                xmlns:msxsl="urn:schemas-microsoft-com:xslt"
     
    4142                xmlns:xhtml="http://www.w3.org/1999/xhtml"
    4243
    43                 exclude-result-prefixes="ed exslt msxsl myns saxon x xhtml"
     44                exclude-result-prefixes="date ed exslt msxsl myns saxon x xhtml"
    4445                >
    4546
     
    240241<!-- choose whether or not to do mailto links -->
    241242 
    242  <xsl:param name="xml2rfc-linkmailto"
    243    select="substring-after(
    244        translate(/processing-instruction('rfc')[contains(.,'linkmailto=')], concat($quote-chars,' '), ''),
    245          'linkmailto=')"
    246  />
     243<xsl:param name="xml2rfc-linkmailto"
     244  select="substring-after(
     245      translate(/processing-instruction('rfc')[contains(.,'linkmailto=')], concat($quote-chars,' '), ''),
     246        'linkmailto=')"
     247/>
    247248
    248249
    249250<!-- iprnotified switch -->
    250251 
    251  <xsl:param name="xml2rfc-iprnotified"
    252    select="substring-after(
    253        translate(/processing-instruction('rfc')[contains(.,'iprnotified=')], concat($quote-chars,' '), ''),
    254          'iprnotified=')"
    255  />
    256 
     252<xsl:param name="xml2rfc-iprnotified"
     253  select="substring-after(
     254      translate(/processing-instruction('rfc')[contains(.,'iprnotified=')], concat($quote-chars,' '), ''),
     255        'iprnotified=')"
     256/>
    257257
    258258<!-- URL templates for RFCs and Internet Drafts. -->
     
    324324    (
    325325      (/rfc/@number &gt; 4671) or
    326       (/rfc/front/date/@year &gt; 2006) or
    327       (/rfc/front/date/@year &gt; 2005 and (/rfc/front/date/@month='November' or /rfc/front/date/@month='December'))
     326      ($xml2rfc-ext-pub-year &gt; 2006) or
     327      ($xml2rfc-ext-pub-year &gt; 2005 and $xml2rfc-ext-pub-month-numeric >= 11)
    328328    )
    329329  )" />
     330
     331<xsl:variable name="ipr-2007-08" select="(
     332  $ipr-rfc4748 and
     333    (
     334      (/rfc/@number &gt; 5000
     335        and /rfc/@number != 5020
     336        and /rfc/@number != 5021
     337        and /rfc/@number != 5034
     338        and /rfc/@number != 5052
     339        and /rfc/@number != 5065
     340        and /rfc/@number != 5094) or
     341      ($xml2rfc-ext-pub-year &gt; 2008) or
     342      (not(/rfc/@number) and $xml2rfc-ext-pub-year &gt; 2007 and $xml2rfc-ext-pub-month-numeric >= 9)
     343    )
     344  )" />
     345
     346<!-- funding switch --> 
     347<xsl:variable name="funding0" select="(
     348  /rfc/@number &gt; 2499) or
     349  (not(/rfc/@number) and /rfc/@docName and $xml2rfc-ext-pub-year &gt;= 1999
     350  )" />
     351 
     352<xsl:variable name="funding1" select="(
     353  /rfc/@number &gt; 4320) or
     354  (not(/rfc/@number) and /rfc/@docName and $xml2rfc-ext-pub-year &gt;= 2006
     355  )" />
     356
     357<xsl:variable name="funding2" select="$ipr-2007-08"/>
    330358
    331359<!-- will document have an index -->
     
    483511    <xsl:when test="not(contains($content,'&#10;'))">
    484512      <xsl:if test="string-length($content) > 69">
    485         <xsl:message>artwork line too long: <xsl:value-of select="$content"/></xsl:message>
     513        <xsl:call-template name="warning">
     514          <xsl:with-param name="inline" select="'no'"/>
     515          <xsl:with-param name="msg">artwork line too long: '<xsl:value-of select="$content"/>' (<xsl:value-of select="string-length($content)"/> characters)</xsl:with-param>
     516        </xsl:call-template>
    486517      </xsl:if>
    487518    </xsl:when>
     
    490521      <xsl:variable name="end" select="substring-after($content,'&#10;')"/>
    491522      <xsl:if test="string-length($start) > 69">
    492         <xsl:message>WARNING: artwork line too long: <xsl:value-of select="$start"/><xsl:call-template name="lineno"/></xsl:message>
     523        <xsl:call-template name="warning">
     524          <xsl:with-param name="inline" select="'no'"/>
     525          <xsl:with-param name="msg">artwork line too long: '<xsl:value-of select="$start"/>' (<xsl:value-of select="string-length($start)"/> characters)</xsl:with-param>
     526        </xsl:call-template>
    493527      </xsl:if>
    494528      <xsl:call-template name="check-artwork-width">
     
    12111245      <xsl:if test="front/date/@year != '' and front/date/@year != '???'">
    12121246        <xsl:text>, </xsl:text>
    1213         <xsl:if test="front/date/@month and (front/date/@month!='???' and front/date/@month!='')"><xsl:value-of select="front/date/@month" />&#0160;</xsl:if>
     1247        <xsl:if test="front/date/@month!=''"><xsl:value-of select="front/date/@month" />&#0160;</xsl:if>
    12141248        <xsl:value-of select="front/date/@year" />
    12151249      </xsl:if>
     
    13911425            <xsl:otherwise/>
    13921426          </xsl:choose>
    1393           <xsl:variable name="month"><xsl:call-template name="get-month-as-num"/></xsl:variable>
    1394           <meta name="DC.Date.Issued" scheme="ISO8601" content="{/rfc/front/date/@year}-{$month}" />
     1427          <meta name="DC.Date.Issued" scheme="ISO8601" content="{$xml2rfc-ext-pub-year}-{$xml2rfc-ext-pub-month-numeric}" />
    13951428 
    13961429          <xsl:if test="/rfc/@obsoletes!=''">
     
    21152148  </xsl:for-each>
    21162149  <myns:item>
    2117     <xsl:value-of select="concat(date/@month,' ',date/@year)" />
     2150    <xsl:if test="$xml2rfc-ext-pub-month!=''">
     2151      <xsl:value-of select="$xml2rfc-ext-pub-month" />
     2152      <xsl:if test="$xml2rfc-ext-pub-day!='' and /rfc/@ipr and not(/rfc/@number)">
     2153        <xsl:text> </xsl:text>
     2154        <xsl:value-of select="$xml2rfc-ext-pub-day" />
     2155        <xsl:text>,</xsl:text>
     2156      </xsl:if>
     2157    </xsl:if>
     2158    <xsl:value-of select="concat(' ',$xml2rfc-ext-pub-year)" />
    21182159  </myns:item>
    21192160</xsl:template>
     
    21632204
    21642205<xsl:template name="expirydate">
    2165   <xsl:variable name="date" select="/rfc/front/date" />
    21662206  <xsl:choose>
    2167       <xsl:when test="$date/@month='January'">July <xsl:value-of select="$date/@year" /></xsl:when>
    2168       <xsl:when test="$date/@month='February'">August <xsl:value-of select="$date/@year" /></xsl:when>
    2169       <xsl:when test="$date/@month='March'">September <xsl:value-of select="$date/@year" /></xsl:when>
    2170       <xsl:when test="$date/@month='April'">October <xsl:value-of select="$date/@year" /></xsl:when>
    2171       <xsl:when test="$date/@month='May'">November <xsl:value-of select="$date/@year" /></xsl:when>
    2172       <xsl:when test="$date/@month='June'">December <xsl:value-of select="$date/@year" /></xsl:when>
    2173       <xsl:when test="$date/@month='July'">January <xsl:value-of select="$date/@year + 1" /></xsl:when>
    2174       <xsl:when test="$date/@month='August'">February <xsl:value-of select="$date/@year + 1" /></xsl:when>
    2175       <xsl:when test="$date/@month='September'">March <xsl:value-of select="$date/@year + 1" /></xsl:when>
    2176       <xsl:when test="$date/@month='October'">April <xsl:value-of select="$date/@year + 1" /></xsl:when>
    2177       <xsl:when test="$date/@month='November'">May <xsl:value-of select="$date/@year + 1" /></xsl:when>
    2178       <xsl:when test="$date/@month='December'">June <xsl:value-of select="$date/@year + 1" /></xsl:when>
    2179         <xsl:otherwise>WRONG SYNTAX FOR MONTH</xsl:otherwise>
    2180      </xsl:choose>
     2207    <xsl:when test="$xml2rfc-ext-pub-month='January'">July <xsl:value-of select="$xml2rfc-ext-pub-year" /></xsl:when>
     2208    <xsl:when test="$xml2rfc-ext-pub-month='February'">August <xsl:value-of select="$xml2rfc-ext-pub-year" /></xsl:when>
     2209    <xsl:when test="$xml2rfc-ext-pub-month='March'">September <xsl:value-of select="$xml2rfc-ext-pub-year" /></xsl:when>
     2210    <xsl:when test="$xml2rfc-ext-pub-month='April'">October <xsl:value-of select="$xml2rfc-ext-pub-year" /></xsl:when>
     2211    <xsl:when test="$xml2rfc-ext-pub-month='May'">November <xsl:value-of select="$xml2rfc-ext-pub-year" /></xsl:when>
     2212    <xsl:when test="$xml2rfc-ext-pub-month='June'">December <xsl:value-of select="$xml2rfc-ext-pub-year" /></xsl:when>
     2213    <xsl:when test="$xml2rfc-ext-pub-month='July'">January <xsl:value-of select="$xml2rfc-ext-pub-year + 1" /></xsl:when>
     2214    <xsl:when test="$xml2rfc-ext-pub-month='August'">February <xsl:value-of select="$xml2rfc-ext-pub-year + 1" /></xsl:when>
     2215    <xsl:when test="$xml2rfc-ext-pub-month='September'">March <xsl:value-of select="$xml2rfc-ext-pub-year + 1" /></xsl:when>
     2216    <xsl:when test="$xml2rfc-ext-pub-month='October'">April <xsl:value-of select="$xml2rfc-ext-pub-year + 1" /></xsl:when>
     2217    <xsl:when test="$xml2rfc-ext-pub-month='November'">May <xsl:value-of select="$xml2rfc-ext-pub-year + 1" /></xsl:when>
     2218    <xsl:when test="$xml2rfc-ext-pub-month='December'">June <xsl:value-of select="$xml2rfc-ext-pub-year + 1" /></xsl:when>
     2219      <xsl:otherwise>WRONG SYNTAX FOR MONTH</xsl:otherwise>
     2220   </xsl:choose>
    21812221</xsl:template>
    21822222
    21832223<xsl:template name="get-month-as-num">
    2184   <xsl:variable name="date" select="/rfc/front/date" />
     2224  <xsl:param name="month" />
    21852225  <xsl:choose>
    2186       <xsl:when test="$date/@month='January'">01</xsl:when>
    2187       <xsl:when test="$date/@month='February'">02</xsl:when>
    2188       <xsl:when test="$date/@month='March'">03</xsl:when>
    2189       <xsl:when test="$date/@month='April'">04</xsl:when>
    2190       <xsl:when test="$date/@month='May'">05</xsl:when>
    2191       <xsl:when test="$date/@month='June'">06</xsl:when>
    2192       <xsl:when test="$date/@month='July'">07</xsl:when>
    2193       <xsl:when test="$date/@month='August'">08</xsl:when>
    2194       <xsl:when test="$date/@month='September'">09</xsl:when>
    2195       <xsl:when test="$date/@month='October'">10</xsl:when>
    2196       <xsl:when test="$date/@month='November'">11</xsl:when>
    2197       <xsl:when test="$date/@month='December'">12</xsl:when>
    2198         <xsl:otherwise>WRONG SYNTAX FOR MONTH</xsl:otherwise>
    2199      </xsl:choose>
     2226    <xsl:when test="$month='January'">01</xsl:when>
     2227    <xsl:when test="$month='February'">02</xsl:when>
     2228    <xsl:when test="$month='March'">03</xsl:when>
     2229    <xsl:when test="$month='April'">04</xsl:when>
     2230    <xsl:when test="$month='May'">05</xsl:when>
     2231    <xsl:when test="$month='June'">06</xsl:when>
     2232    <xsl:when test="$month='July'">07</xsl:when>
     2233    <xsl:when test="$month='August'">08</xsl:when>
     2234    <xsl:when test="$month='September'">09</xsl:when>
     2235    <xsl:when test="$month='October'">10</xsl:when>
     2236    <xsl:when test="$month='November'">11</xsl:when>
     2237    <xsl:when test="$month='December'">12</xsl:when>
     2238    <xsl:otherwise>WRONG SYNTAX FOR MONTH</xsl:otherwise>
     2239  </xsl:choose>
     2240</xsl:template>
     2241
     2242<xsl:template name="get-month-as-name">
     2243  <xsl:param name="month"/>
     2244  <xsl:choose>
     2245    <xsl:when test="$month=1">January</xsl:when>
     2246    <xsl:when test="$month=2">February</xsl:when>
     2247    <xsl:when test="$month=3">March</xsl:when>
     2248    <xsl:when test="$month=4">April</xsl:when>
     2249    <xsl:when test="$month=5">May</xsl:when>
     2250    <xsl:when test="$month=6">June</xsl:when>
     2251    <xsl:when test="$month=7">July</xsl:when>
     2252    <xsl:when test="$month=8">August</xsl:when>
     2253    <xsl:when test="$month=9">September</xsl:when>
     2254    <xsl:when test="$month=10">October</xsl:when>
     2255    <xsl:when test="$month=11">November</xsl:when>
     2256    <xsl:when test="$month=12">December</xsl:when>
     2257    <xsl:otherwise>WRONG SYNTAX FOR MONTH</xsl:otherwise>
     2258   </xsl:choose>
    22002259</xsl:template>
    22012260
     
    22452304        <t>
    22462305          <xsl:choose>
     2306            <xsl:when test="$ipr-2007-08"/>
    22472307            <xsl:when test="$ipr-rfc4748">
    2248               Copyright &#169; The IETF Trust (<xsl:value-of select="/rfc/front/date/@year" />).
     2308              Copyright &#169; The IETF Trust (<xsl:value-of select="$xml2rfc-ext-pub-year" />).
    22492309            </xsl:when>
    22502310            <xsl:otherwise>
    2251               Copyright &#169; The Internet Society (<xsl:value-of select="/rfc/front/date/@year" />).
     2311              Copyright &#169; The Internet Society (<xsl:value-of select="$xml2rfc-ext-pub-year" />).
    22522312            </xsl:otherwise>
    22532313          </xsl:choose>
     
    22902350      <section title="Full Copyright Statement" anchor="{$anchor-prefix}.copyright" myns:unnumbered="unnumbered" myns:notoclink="notoclink">
    22912351        <t>
    2292           Copyright &#169; The Internet Society (<xsl:value-of select="/rfc/front/date/@year" />). All Rights Reserved.
     2352          Copyright &#169; The Internet Society (<xsl:value-of select="$xml2rfc-ext-pub-year" />). All Rights Reserved.
    22932353        </t>
    22942354        <t>
     
    23882448  </section>
    23892449 
    2390   <section title="Acknowledgement" myns:unnumbered="unnumbered" myns:notoclink="notoclink">
    2391     <t>
    2392       Funding for the RFC Editor function is provided by the IETF
    2393       Administrative Support Activity (IASA).
    2394     </t>
    2395   </section>
     2450  <xsl:choose>
     2451    <xsl:when test="$funding2"/>
     2452    <xsl:when test="$funding1 and /rfc/@number">
     2453      <section title="Acknowledgement" myns:unnumbered="unnumbered" myns:notoclink="notoclink">
     2454        <t>
     2455          Funding for the RFC Editor function is provided by the IETF
     2456          Administrative Support Activity (IASA).
     2457        </t>
     2458      </section>
     2459    </xsl:when>
     2460    <xsl:when test="$funding0 and /rfc/@number">
     2461      <section title="Acknowledgement" myns:unnumbered="unnumbered" myns:notoclink="notoclink">
     2462        <t>
     2463          Funding for the RFC Editor function is currently provided by
     2464          the Internet Society.
     2465        </t>
     2466      </section>
     2467    </xsl:when>
     2468    <xsl:otherwise/>
     2469  </xsl:choose>
    23962470
    23972471</xsl:template>
     
    25942668  background-color: gray;
    25952669  width: 50%;
    2596 }
     2670}<xsl:if test="/rfc/@obsoletes | /rfc/@updates">
     2671td.header a {
     2672  color: white;
     2673}</xsl:if>
    25972674td.reference {
    25982675  vertical-align: top;
     
    33583435  </section>
    33593436
    3360   <section title="Copyright Notice" myns:unnumbered="unnumbered" myns:notoclink="notoclink" anchor="{$anchor-prefix}.copyrightnotice">
    3361   <t>
    3362     <xsl:choose>
    3363       <xsl:when test="$ipr-rfc4748">
    3364         Copyright &#169; The IETF Trust (<xsl:value-of select="/rfc/front/date/@year" />).  All Rights Reserved.
    3365       </xsl:when>
    3366       <xsl:otherwise>
    3367         Copyright &#169; The Internet Society (<xsl:value-of select="/rfc/front/date/@year" />).  All Rights Reserved.
    3368       </xsl:otherwise>
    3369     </xsl:choose>
    3370   </t>
    3371   </section>
     3437  <xsl:choose>
     3438    <xsl:when test="$ipr-2007-08"/>
     3439    <xsl:when test="$ipr-rfc4748">
     3440      <section title="Copyright Notice" myns:unnumbered="unnumbered" myns:notoclink="notoclink" anchor="{$anchor-prefix}.copyrightnotice">
     3441        <t>
     3442          Copyright &#169; The IETF Trust (<xsl:value-of select="$xml2rfc-ext-pub-year" />).  All Rights Reserved.
     3443        </t>
     3444      </section>
     3445    </xsl:when>
     3446    <xsl:otherwise>
     3447      <section title="Copyright Notice" myns:unnumbered="unnumbered" myns:notoclink="notoclink" anchor="{$anchor-prefix}.copyrightnotice">
     3448        <t>
     3449          Copyright &#169; The Internet Society (<xsl:value-of select="$xml2rfc-ext-pub-year" />).  All Rights Reserved.
     3450      </t>
     3451      </section>
     3452    </xsl:otherwise>
     3453  </xsl:choose>
    33723454 
    33733455</xsl:template>
     
    47024784    <xsl:text>http://greenbytes.de/tech/webdav/rfc2629.xslt, </xsl:text>
    47034785    <!-- when RCS keyword substitution in place, add version info -->
    4704     <xsl:if test="contains('$Revision: 1.358 $',':')">
    4705       <xsl:value-of select="concat('Revision ',normalize-space(translate(substring-after('$Revision: 1.358 $', 'Revision: '),'$','')),', ')" />
     4786    <xsl:if test="contains('$Revision: 1.362 $',':')">
     4787      <xsl:value-of select="concat('Revision ',normalize-space(translate(substring-after('$Revision: 1.362 $', 'Revision: '),'$','')),', ')" />
    47064788    </xsl:if>
    4707     <xsl:if test="contains('$Date: 2008-02-17 16:03:10 $',':')">
    4708       <xsl:value-of select="concat(normalize-space(translate(substring-after('$Date: 2008-02-17 16:03:10 $', 'Date: '),'$','')),', ')" />
     4789    <xsl:if test="contains('$Date: 2008-02-29 17:10:19 $',':')">
     4790      <xsl:value-of select="concat(normalize-space(translate(substring-after('$Date: 2008-02-29 17:10:19 $', 'Date: '),'$','')),', ')" />
    47094791    </xsl:if>
    47104792    <xsl:value-of select="concat('XSLT vendor: ',system-property('xsl:vendor'),' ',system-property('xsl:vendor-url'))" />
     
    47144796
    47154797<xsl:template name="get-header-right">
    4716   <xsl:value-of select="concat(/rfc/front/date/@month,' ',/rfc/front/date/@year)" />
     4798  <xsl:value-of select="concat($xml2rfc-ext-pub-month, ' ', $xml2rfc-ext-pub-year)" />
    47174799</xsl:template>
    47184800
     
    48714953</xsl:template>
    48724954
     4955<!-- date handling -->
     4956
     4957<msxsl:script language="JScript" implements-prefix="date">
     4958  this['year'] = function (x) {
     4959    if (x) {throw "not supported"};
     4960    return (new Date()).getFullYear();
     4961  }
     4962
     4963  this['month-in-year'] = function (x) {
     4964    if (x) {throw "not supported"};
     4965    return 1 + (new Date()).getMonth();
     4966  }
     4967
     4968  this['day-in-month'] = function (x) {
     4969    if (x) {throw "not supported"};
     4970    return (new Date()).getDate();
     4971  }
     4972</msxsl:script>
     4973
     4974<xsl:variable name="may-default-dates">
     4975  <xsl:choose>
     4976    <xsl:when test="function-available('date:year') and function-available('date:month-in-year') and date:day-in-month()">
     4977      <xsl:variable name="year-specified" select="/rfc/front/date/@year and /rfc/front/date/@year!=''"/>
     4978      <xsl:variable name="month-specified" select="/rfc/front/date/@month and /rfc/front/date/@month!=''"/>
     4979      <xsl:variable name="day-specified" select="/rfc/front/date/@day and /rfc/front/date/@day!=''"/>
     4980      <xsl:variable name="system-month">
     4981        <xsl:call-template name="get-month-as-name">
     4982          <xsl:with-param name="month" select="date:month-in-year()"/>
     4983        </xsl:call-template>
     4984      </xsl:variable>
     4985      <xsl:choose>
     4986        <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>
     4987        <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>
     4988        <xsl:when test="$day-specified and /rfc/front/date/@day!=date:day-in-month()">Specified day does not match system date</xsl:when>
     4989        <xsl:when test="not($year-specified) and ($month-specified or $day-specified)">Can't default year when month or day is specified</xsl:when>
     4990        <xsl:when test="not($month-specified) and $day-specified">Can't default month when day is specified</xsl:when>
     4991        <xsl:otherwise>yes</xsl:otherwise>
     4992      </xsl:choose>
     4993    </xsl:when>
     4994    <!-- may, but won't -->
     4995    <xsl:otherwise>yes</xsl:otherwise>
     4996  </xsl:choose>
     4997</xsl:variable>
     4998
     4999<xsl:param name="xml2rfc-ext-pub-year">
     5000  <xsl:choose>
     5001    <xsl:when test="/rfc/front/date/@year and /rfc/front/date/@year!=''">
     5002      <xsl:value-of select="/rfc/front/date/@year"/>
     5003    </xsl:when>
     5004    <xsl:when test="function-available('date:year')">
     5005      <xsl:if test="/rfc/front/date/@month and /rfc/front/date/@month!=''">
     5006        <xsl:call-template name="error">
     5007          <xsl:with-param name="msg" select="'defaulting publication year although month was specified'"/>
     5008        </xsl:call-template>
     5009      </xsl:if>
     5010      <xsl:if test="/rfc/front/date/@day and /rfc/front/date/@day!=''">
     5011        <xsl:call-template name="error">
     5012          <xsl:with-param name="msg" select="'defaulting publication year although day was specified'"/>
     5013        </xsl:call-template>
     5014      </xsl:if>
     5015      <xsl:value-of select="date:year()"/>
     5016    </xsl:when>
     5017    <xsl:otherwise>
     5018      <xsl:call-template name="error">
     5019        <xsl:with-param name="msg" select="'/rfc/front/date/@year missing (and XSLT processor cannot compute the system date)'"/>
     5020      </xsl:call-template>
     5021    </xsl:otherwise>
     5022  </xsl:choose>
     5023</xsl:param>
     5024
     5025<xsl:param name="xml2rfc-ext-pub-month">
     5026  <xsl:choose>
     5027    <xsl:when test="/rfc/front/date/@month and /rfc/front/date/@month!=''">
     5028      <xsl:value-of select="/rfc/front/date/@month"/>
     5029    </xsl:when>
     5030    <xsl:when test="function-available('date:month-in-year') and $may-default-dates='yes'">
     5031      <xsl:call-template name="get-month-as-name">
     5032        <xsl:with-param name="month" select="date:month-in-year()"/>
     5033      </xsl:call-template>
     5034    </xsl:when>
     5035    <xsl:when test="function-available('date:month-in-year') and $may-default-dates!='yes'">
     5036      <xsl:call-template name="warning">
     5037        <xsl:with-param name="inline" select="'no'"/>
     5038        <xsl:with-param name="msg" select="$may-default-dates"/>
     5039      </xsl:call-template>
     5040    </xsl:when>
     5041    <xsl:otherwise>
     5042      <xsl:call-template name="error">
     5043        <xsl:with-param name="msg" select="'/rfc/front/date/@month missing (and XSLT processor cannot compute the system date)'"/>
     5044      </xsl:call-template>
     5045    </xsl:otherwise>
     5046  </xsl:choose>
     5047</xsl:param>
     5048
     5049<xsl:param name="xml2rfc-ext-pub-month-numeric">
     5050  <xsl:call-template name="get-month-as-num">
     5051    <xsl:with-param name="month" select="$xml2rfc-ext-pub-month" />
     5052  </xsl:call-template>
     5053</xsl:param>
     5054
     5055<xsl:param name="xml2rfc-ext-pub-day">
     5056  <xsl:choose>
     5057    <xsl:when test="/rfc/front/date/@day and /rfc/front/date/@day!=''">
     5058      <xsl:value-of select="/rfc/front/date/@day"/>
     5059    </xsl:when>
     5060    <xsl:when test="function-available('date:day-in-month') and $may-default-dates='yes'">
     5061      <xsl:value-of select="date:day-in-month()"/>
     5062    </xsl:when>
     5063    <xsl:otherwise /> <!-- harmless, we just don't have it -->
     5064  </xsl:choose>
     5065</xsl:param>
     5066
    48735067</xsl:stylesheet>
Note: See TracChangeset for help on using the changeset viewer.