Changeset 227 for rfc2629xslt/rfc2629toXHTML.xslt
- Timestamp:
- 01/03/08 12:52:33 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
rfc2629xslt/rfc2629toXHTML.xslt
r213 r227 1 1 <?xml version="1.0" encoding="ISO-8859-1"?> 2 2 <!--Auto-generated from rfc2629.xslt through HTMLtoXHTML.xslt--> 3 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 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:saxon="http://icl.com/saxon" xmlns:x="http://purl.org/net/xml2rfc/ext" xmlns:xhtml="http://www.w3.org/1999/xhtml" version="1.0" exclude-result-prefixes="ed exslt msxsl myns saxon x xhtml">3 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ed="http://greenbytes.de/2002/rfcedit" xmlns:date="http://exslt.org/dates-and-times" xmlns:exslt="http://exslt.org/common" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:myns="mailto:julian.reschke@greenbytes.de?subject=rcf2629.xslt" xmlns:saxon="http://icl.com/saxon" xmlns:x="http://purl.org/net/xml2rfc/ext" xmlns:xhtml="http://www.w3.org/1999/xhtml" version="1.0" exclude-result-prefixes="date ed exslt msxsl myns saxon x xhtml"> 4 4 5 5 <xsl:strip-space elements="back front list middle rfc section"/> … … 115 115 <!-- choose whether or not to do mailto links --> 116 116 117 <xsl:param name="xml2rfc-linkmailto" select="substring-after( translate(/processing-instruction('rfc')[contains(.,'linkmailto=')], concat($quote-chars,' '), ''),'linkmailto=')"/>117 <xsl:param name="xml2rfc-linkmailto" select="substring-after( translate(/processing-instruction('rfc')[contains(.,'linkmailto=')], concat($quote-chars,' '), ''), 'linkmailto=')"/> 118 118 119 119 120 120 <!-- iprnotified switch --> 121 121 122 <xsl:param name="xml2rfc-iprnotified" select="substring-after( translate(/processing-instruction('rfc')[contains(.,'iprnotified=')], concat($quote-chars,' '), ''), 'iprnotified=')"/> 123 122 <xsl:param name="xml2rfc-iprnotified" select="substring-after( translate(/processing-instruction('rfc')[contains(.,'iprnotified=')], concat($quote-chars,' '), ''), 'iprnotified=')"/> 124 123 125 124 <!-- URL templates for RFCs and Internet Drafts. --> … … 168 167 <xsl:variable name="ipr-rfc3667" select="( /rfc/@number > 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) )"/> 169 168 170 <xsl:variable name="ipr-rfc4748" select="( $ipr-rfc3667 and ( (/rfc/@number > 4671) or (/rfc/front/date/@year > 2006) or (/rfc/front/date/@year > 2005 and (/rfc/front/date/@month='November' or /rfc/front/date/@month='December')) ) )"/> 169 <xsl:variable name="ipr-rfc4748" select="( $ipr-rfc3667 and ( (/rfc/@number > 4671) or ($xml2rfc-ext-pub-year > 2006) or ($xml2rfc-ext-pub-year > 2005 and $xml2rfc-ext-pub-month-numeric >= 11) ) )"/> 170 171 <xsl:variable name="ipr-2007-08" select="( $ipr-rfc4748 and ( (/rfc/@number > 5000 and /rfc/@number != 5020 and /rfc/@number != 5021 and /rfc/@number != 5034 and /rfc/@number != 5052 and /rfc/@number != 5065 and /rfc/@number != 5094) or ($xml2rfc-ext-pub-year > 2008) or (not(/rfc/@number) and $xml2rfc-ext-pub-year > 2007 and $xml2rfc-ext-pub-month-numeric >= 9) ) )"/> 172 173 <!-- funding switch --> 174 <xsl:variable name="funding0" select="( /rfc/@number > 2499) or (not(/rfc/@number) and /rfc/@docName and $xml2rfc-ext-pub-year >= 1999 )"/> 175 176 <xsl:variable name="funding1" select="( /rfc/@number > 4320) or (not(/rfc/@number) and /rfc/@docName and $xml2rfc-ext-pub-year >= 2006 )"/> 177 178 <xsl:variable name="funding2" select="$ipr-2007-08"/> 171 179 172 180 <!-- will document have an index --> … … 324 332 <xsl:when test="not(contains($content,'
'))"> 325 333 <xsl:if test="string-length($content) > 69"> 326 <xsl:message>artwork line too long: <xsl:value-of select="$content"/></xsl:message> 334 <xsl:call-template name="warning"> 335 <xsl:with-param name="inline" select="'no'"/> 336 <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> 337 </xsl:call-template> 327 338 </xsl:if> 328 339 </xsl:when> … … 331 342 <xsl:variable name="end" select="substring-after($content,'
')"/> 332 343 <xsl:if test="string-length($start) > 69"> 333 <xsl:message>WARNING: artwork line too long: <xsl:value-of select="$start"/><xsl:call-template name="lineno"/></xsl:message> 344 <xsl:call-template name="warning"> 345 <xsl:with-param name="inline" select="'no'"/> 346 <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> 347 </xsl:call-template> 334 348 </xsl:if> 335 349 <xsl:call-template name="check-artwork-width"> … … 1052 1066 <xsl:if test="front/date/@year != '' and front/date/@year != '???'"> 1053 1067 <xsl:text>, </xsl:text> 1054 <xsl:if test="front/date/@month and (front/date/@month!='???' and front/date/@month!='')"><xsl:value-of select="front/date/@month"/> </xsl:if>1068 <xsl:if test="front/date/@month!=''"><xsl:value-of select="front/date/@month"/> </xsl:if> 1055 1069 <xsl:value-of select="front/date/@year"/> 1056 1070 </xsl:if> … … 1232 1246 <xsl:otherwise/> 1233 1247 </xsl:choose> 1234 <xsl:variable name="month"><xsl:call-template name="get-month-as-num"/></xsl:variable> 1235 <meta name="DC.Date.Issued" scheme="ISO8601" content="{/rfc/front/date/@year}-{$month}"/> 1248 <meta name="DC.Date.Issued" scheme="ISO8601" content="{$xml2rfc-ext-pub-year}-{$xml2rfc-ext-pub-month-numeric}"/> 1236 1249 1237 1250 <xsl:if test="/rfc/@obsoletes!=''"> … … 1956 1969 </xsl:for-each> 1957 1970 <myns:item> 1958 <xsl:value-of select="concat(date/@month,' ',date/@year)"/> 1971 <xsl:if test="$xml2rfc-ext-pub-month!=''"> 1972 <xsl:value-of select="$xml2rfc-ext-pub-month"/> 1973 <xsl:if test="$xml2rfc-ext-pub-day!='' and /rfc/@ipr and not(/rfc/@number)"> 1974 <xsl:text> </xsl:text> 1975 <xsl:value-of select="$xml2rfc-ext-pub-day"/> 1976 <xsl:text>,</xsl:text> 1977 </xsl:if> 1978 </xsl:if> 1979 <xsl:value-of select="concat(' ',$xml2rfc-ext-pub-year)"/> 1959 1980 </myns:item> 1960 1981 </xsl:template> … … 2004 2025 2005 2026 <xsl:template name="expirydate"> 2006 <xsl:variable name="date" select="/rfc/front/date"/> 2007 <xsl:choose> 2008 <xsl:when test="$date/@month='January'">July <xsl:value-of select="$date/@year"/></xsl:when> 2009 <xsl:when test="$date/@month='February'">August <xsl:value-of select="$date/@year"/></xsl:when> 2010 <xsl:when test="$date/@month='March'">September <xsl:value-of select="$date/@year"/></xsl:when> 2011 <xsl:when test="$date/@month='April'">October <xsl:value-of select="$date/@year"/></xsl:when> 2012 <xsl:when test="$date/@month='May'">November <xsl:value-of select="$date/@year"/></xsl:when> 2013 <xsl:when test="$date/@month='June'">December <xsl:value-of select="$date/@year"/></xsl:when> 2014 <xsl:when test="$date/@month='July'">January <xsl:value-of select="$date/@year + 1"/></xsl:when> 2015 <xsl:when test="$date/@month='August'">February <xsl:value-of select="$date/@year + 1"/></xsl:when> 2016 <xsl:when test="$date/@month='September'">March <xsl:value-of select="$date/@year + 1"/></xsl:when> 2017 <xsl:when test="$date/@month='October'">April <xsl:value-of select="$date/@year + 1"/></xsl:when> 2018 <xsl:when test="$date/@month='November'">May <xsl:value-of select="$date/@year + 1"/></xsl:when> 2019 <xsl:when test="$date/@month='December'">June <xsl:value-of select="$date/@year + 1"/></xsl:when> 2020 <xsl:otherwise>WRONG SYNTAX FOR MONTH</xsl:otherwise> 2021 </xsl:choose> 2027 <xsl:choose> 2028 <xsl:when test="$xml2rfc-ext-pub-month='January'">July <xsl:value-of select="$xml2rfc-ext-pub-year"/></xsl:when> 2029 <xsl:when test="$xml2rfc-ext-pub-month='February'">August <xsl:value-of select="$xml2rfc-ext-pub-year"/></xsl:when> 2030 <xsl:when test="$xml2rfc-ext-pub-month='March'">September <xsl:value-of select="$xml2rfc-ext-pub-year"/></xsl:when> 2031 <xsl:when test="$xml2rfc-ext-pub-month='April'">October <xsl:value-of select="$xml2rfc-ext-pub-year"/></xsl:when> 2032 <xsl:when test="$xml2rfc-ext-pub-month='May'">November <xsl:value-of select="$xml2rfc-ext-pub-year"/></xsl:when> 2033 <xsl:when test="$xml2rfc-ext-pub-month='June'">December <xsl:value-of select="$xml2rfc-ext-pub-year"/></xsl:when> 2034 <xsl:when test="$xml2rfc-ext-pub-month='July'">January <xsl:value-of select="$xml2rfc-ext-pub-year + 1"/></xsl:when> 2035 <xsl:when test="$xml2rfc-ext-pub-month='August'">February <xsl:value-of select="$xml2rfc-ext-pub-year + 1"/></xsl:when> 2036 <xsl:when test="$xml2rfc-ext-pub-month='September'">March <xsl:value-of select="$xml2rfc-ext-pub-year + 1"/></xsl:when> 2037 <xsl:when test="$xml2rfc-ext-pub-month='October'">April <xsl:value-of select="$xml2rfc-ext-pub-year + 1"/></xsl:when> 2038 <xsl:when test="$xml2rfc-ext-pub-month='November'">May <xsl:value-of select="$xml2rfc-ext-pub-year + 1"/></xsl:when> 2039 <xsl:when test="$xml2rfc-ext-pub-month='December'">June <xsl:value-of select="$xml2rfc-ext-pub-year + 1"/></xsl:when> 2040 <xsl:otherwise>WRONG SYNTAX FOR MONTH</xsl:otherwise> 2041 </xsl:choose> 2022 2042 </xsl:template> 2023 2043 2024 2044 <xsl:template name="get-month-as-num"> 2025 <xsl:variable name="date" select="/rfc/front/date"/> 2026 <xsl:choose> 2027 <xsl:when test="$date/@month='January'">01</xsl:when> 2028 <xsl:when test="$date/@month='February'">02</xsl:when> 2029 <xsl:when test="$date/@month='March'">03</xsl:when> 2030 <xsl:when test="$date/@month='April'">04</xsl:when> 2031 <xsl:when test="$date/@month='May'">05</xsl:when> 2032 <xsl:when test="$date/@month='June'">06</xsl:when> 2033 <xsl:when test="$date/@month='July'">07</xsl:when> 2034 <xsl:when test="$date/@month='August'">08</xsl:when> 2035 <xsl:when test="$date/@month='September'">09</xsl:when> 2036 <xsl:when test="$date/@month='October'">10</xsl:when> 2037 <xsl:when test="$date/@month='November'">11</xsl:when> 2038 <xsl:when test="$date/@month='December'">12</xsl:when> 2039 <xsl:otherwise>WRONG SYNTAX FOR MONTH</xsl:otherwise> 2040 </xsl:choose> 2045 <xsl:param name="month"/> 2046 <xsl:choose> 2047 <xsl:when test="$month='January'">01</xsl:when> 2048 <xsl:when test="$month='February'">02</xsl:when> 2049 <xsl:when test="$month='March'">03</xsl:when> 2050 <xsl:when test="$month='April'">04</xsl:when> 2051 <xsl:when test="$month='May'">05</xsl:when> 2052 <xsl:when test="$month='June'">06</xsl:when> 2053 <xsl:when test="$month='July'">07</xsl:when> 2054 <xsl:when test="$month='August'">08</xsl:when> 2055 <xsl:when test="$month='September'">09</xsl:when> 2056 <xsl:when test="$month='October'">10</xsl:when> 2057 <xsl:when test="$month='November'">11</xsl:when> 2058 <xsl:when test="$month='December'">12</xsl:when> 2059 <xsl:otherwise>WRONG SYNTAX FOR MONTH</xsl:otherwise> 2060 </xsl:choose> 2061 </xsl:template> 2062 2063 <xsl:template name="get-month-as-name"> 2064 <xsl:param name="month"/> 2065 <xsl:choose> 2066 <xsl:when test="$month=1">January</xsl:when> 2067 <xsl:when test="$month=2">February</xsl:when> 2068 <xsl:when test="$month=3">March</xsl:when> 2069 <xsl:when test="$month=4">April</xsl:when> 2070 <xsl:when test="$month=5">May</xsl:when> 2071 <xsl:when test="$month=6">June</xsl:when> 2072 <xsl:when test="$month=7">July</xsl:when> 2073 <xsl:when test="$month=8">August</xsl:when> 2074 <xsl:when test="$month=9">September</xsl:when> 2075 <xsl:when test="$month=10">October</xsl:when> 2076 <xsl:when test="$month=11">November</xsl:when> 2077 <xsl:when test="$month=12">December</xsl:when> 2078 <xsl:otherwise>WRONG SYNTAX FOR MONTH</xsl:otherwise> 2079 </xsl:choose> 2041 2080 </xsl:template> 2042 2081 … … 2086 2125 <t> 2087 2126 <xsl:choose> 2127 <xsl:when test="$ipr-2007-08"/> 2088 2128 <xsl:when test="$ipr-rfc4748"> 2089 Copyright © The IETF Trust (<xsl:value-of select=" /rfc/front/date/@year"/>).2129 Copyright © The IETF Trust (<xsl:value-of select="$xml2rfc-ext-pub-year"/>). 2090 2130 </xsl:when> 2091 2131 <xsl:otherwise> 2092 Copyright © The Internet Society (<xsl:value-of select=" /rfc/front/date/@year"/>).2132 Copyright © The Internet Society (<xsl:value-of select="$xml2rfc-ext-pub-year"/>). 2093 2133 </xsl:otherwise> 2094 2134 </xsl:choose> … … 2131 2171 <section title="Full Copyright Statement" anchor="{$anchor-prefix}.copyright" myns:unnumbered="unnumbered" myns:notoclink="notoclink"> 2132 2172 <t> 2133 Copyright © The Internet Society (<xsl:value-of select=" /rfc/front/date/@year"/>). All Rights Reserved.2173 Copyright © The Internet Society (<xsl:value-of select="$xml2rfc-ext-pub-year"/>). All Rights Reserved. 2134 2174 </t> 2135 2175 <t> … … 2229 2269 </section> 2230 2270 2231 <section title="Acknowledgement" myns:unnumbered="unnumbered" myns:notoclink="notoclink"> 2232 <t> 2233 Funding for the RFC Editor function is provided by the IETF 2234 Administrative Support Activity (IASA). 2235 </t> 2236 </section> 2271 <xsl:choose> 2272 <xsl:when test="$funding2"/> 2273 <xsl:when test="$funding1 and /rfc/@number"> 2274 <section title="Acknowledgement" myns:unnumbered="unnumbered" myns:notoclink="notoclink"> 2275 <t> 2276 Funding for the RFC Editor function is provided by the IETF 2277 Administrative Support Activity (IASA). 2278 </t> 2279 </section> 2280 </xsl:when> 2281 <xsl:when test="$funding0 and /rfc/@number"> 2282 <section title="Acknowledgement" myns:unnumbered="unnumbered" myns:notoclink="notoclink"> 2283 <t> 2284 Funding for the RFC Editor function is currently provided by 2285 the Internet Society. 2286 </t> 2287 </section> 2288 </xsl:when> 2289 <xsl:otherwise/> 2290 </xsl:choose> 2237 2291 2238 2292 </xsl:template> … … 2435 2489 background-color: gray; 2436 2490 width: 50%; 2437 } 2491 }<xsl:if test="/rfc/@obsoletes | /rfc/@updates"> 2492 td.header a { 2493 color: white; 2494 }</xsl:if> 2438 2495 td.reference { 2439 2496 vertical-align: top; … … 3199 3256 </section> 3200 3257 3201 <section title="Copyright Notice" myns:unnumbered="unnumbered" myns:notoclink="notoclink" anchor="{$anchor-prefix}.copyrightnotice"> 3202 <t> 3203 <xsl:choose> 3204 <xsl:when test="$ipr-rfc4748"> 3205 Copyright © The IETF Trust (<xsl:value-of select="/rfc/front/date/@year"/>). All Rights Reserved. 3206 </xsl:when> 3207 <xsl:otherwise> 3208 Copyright © The Internet Society (<xsl:value-of select="/rfc/front/date/@year"/>). All Rights Reserved. 3209 </xsl:otherwise> 3210 </xsl:choose> 3211 </t> 3212 </section> 3258 <xsl:choose> 3259 <xsl:when test="$ipr-2007-08"/> 3260 <xsl:when test="$ipr-rfc4748"> 3261 <section title="Copyright Notice" myns:unnumbered="unnumbered" myns:notoclink="notoclink" anchor="{$anchor-prefix}.copyrightnotice"> 3262 <t> 3263 Copyright © The IETF Trust (<xsl:value-of select="$xml2rfc-ext-pub-year"/>). All Rights Reserved. 3264 </t> 3265 </section> 3266 </xsl:when> 3267 <xsl:otherwise> 3268 <section title="Copyright Notice" myns:unnumbered="unnumbered" myns:notoclink="notoclink" anchor="{$anchor-prefix}.copyrightnotice"> 3269 <t> 3270 Copyright © The Internet Society (<xsl:value-of select="$xml2rfc-ext-pub-year"/>). All Rights Reserved. 3271 </t> 3272 </section> 3273 </xsl:otherwise> 3274 </xsl:choose> 3213 3275 3214 3276 </xsl:template> … … 4543 4605 <xsl:text>http://greenbytes.de/tech/webdav/rfc2629.xslt, </xsl:text> 4544 4606 <!-- when RCS keyword substitution in place, add version info --> 4545 <xsl:if test="contains('$Revision: 1.3 58$',':')">4546 <xsl:value-of select="concat('Revision ',normalize-space(translate(substring-after('$Revision: 1.3 58$', 'Revision: '),'$','')),', ')"/>4607 <xsl:if test="contains('$Revision: 1.362 $',':')"> 4608 <xsl:value-of select="concat('Revision ',normalize-space(translate(substring-after('$Revision: 1.362 $', 'Revision: '),'$','')),', ')"/> 4547 4609 </xsl:if> 4548 <xsl:if test="contains('$Date: 2008-02- 17 16:03:10$',':')">4549 <xsl:value-of select="concat(normalize-space(translate(substring-after('$Date: 2008-02- 17 16:03:10$', 'Date: '),'$','')),', ')"/>4610 <xsl:if test="contains('$Date: 2008-02-29 17:10:19 $',':')"> 4611 <xsl:value-of select="concat(normalize-space(translate(substring-after('$Date: 2008-02-29 17:10:19 $', 'Date: '),'$','')),', ')"/> 4550 4612 </xsl:if> 4551 4613 <xsl:value-of select="concat('XSLT vendor: ',system-property('xsl:vendor'),' ',system-property('xsl:vendor-url'))"/> … … 4555 4617 4556 4618 <xsl:template name="get-header-right"> 4557 <xsl:value-of select="concat( /rfc/front/date/@month,' ',/rfc/front/date/@year)"/>4619 <xsl:value-of select="concat($xml2rfc-ext-pub-month, ' ', $xml2rfc-ext-pub-year)"/> 4558 4620 </xsl:template> 4559 4621 … … 4712 4774 </xsl:template> 4713 4775 4776 <!-- date handling --> 4777 4778 <msxsl:script language="JScript" implements-prefix="date"> 4779 this['year'] = function (x) { 4780 if (x) {throw "not supported"}; 4781 return (new Date()).getFullYear(); 4782 } 4783 4784 this['month-in-year'] = function (x) { 4785 if (x) {throw "not supported"}; 4786 return 1 + (new Date()).getMonth(); 4787 } 4788 4789 this['day-in-month'] = function (x) { 4790 if (x) {throw "not supported"}; 4791 return (new Date()).getDate(); 4792 } 4793 </msxsl:script> 4794 4795 <xsl:variable name="may-default-dates"> 4796 <xsl:choose> 4797 <xsl:when test="function-available('date:year') and function-available('date:month-in-year') and date:day-in-month()"> 4798 <xsl:variable name="year-specified" select="/rfc/front/date/@year and /rfc/front/date/@year!=''"/> 4799 <xsl:variable name="month-specified" select="/rfc/front/date/@month and /rfc/front/date/@month!=''"/> 4800 <xsl:variable name="day-specified" select="/rfc/front/date/@day and /rfc/front/date/@day!=''"/> 4801 <xsl:variable name="system-month"> 4802 <xsl:call-template name="get-month-as-name"> 4803 <xsl:with-param name="month" select="date:month-in-year()"/> 4804 </xsl:call-template> 4805 </xsl:variable> 4806 <xsl:choose> 4807 <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> 4808 <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> 4809 <xsl:when test="$day-specified and /rfc/front/date/@day!=date:day-in-month()">Specified day does not match system date</xsl:when> 4810 <xsl:when test="not($year-specified) and ($month-specified or $day-specified)">Can't default year when month or day is specified</xsl:when> 4811 <xsl:when test="not($month-specified) and $day-specified">Can't default month when day is specified</xsl:when> 4812 <xsl:otherwise>yes</xsl:otherwise> 4813 </xsl:choose> 4814 </xsl:when> 4815 <!-- may, but won't --> 4816 <xsl:otherwise>yes</xsl:otherwise> 4817 </xsl:choose> 4818 </xsl:variable> 4819 4820 <xsl:param name="xml2rfc-ext-pub-year"> 4821 <xsl:choose> 4822 <xsl:when test="/rfc/front/date/@year and /rfc/front/date/@year!=''"> 4823 <xsl:value-of select="/rfc/front/date/@year"/> 4824 </xsl:when> 4825 <xsl:when test="function-available('date:year')"> 4826 <xsl:if test="/rfc/front/date/@month and /rfc/front/date/@month!=''"> 4827 <xsl:call-template name="error"> 4828 <xsl:with-param name="msg" select="'defaulting publication year although month was specified'"/> 4829 </xsl:call-template> 4830 </xsl:if> 4831 <xsl:if test="/rfc/front/date/@day and /rfc/front/date/@day!=''"> 4832 <xsl:call-template name="error"> 4833 <xsl:with-param name="msg" select="'defaulting publication year although day was specified'"/> 4834 </xsl:call-template> 4835 </xsl:if> 4836 <xsl:value-of select="date:year()"/> 4837 </xsl:when> 4838 <xsl:otherwise> 4839 <xsl:call-template name="error"> 4840 <xsl:with-param name="msg" select="'/rfc/front/date/@year missing (and XSLT processor cannot compute the system date)'"/> 4841 </xsl:call-template> 4842 </xsl:otherwise> 4843 </xsl:choose> 4844 </xsl:param> 4845 4846 <xsl:param name="xml2rfc-ext-pub-month"> 4847 <xsl:choose> 4848 <xsl:when test="/rfc/front/date/@month and /rfc/front/date/@month!=''"> 4849 <xsl:value-of select="/rfc/front/date/@month"/> 4850 </xsl:when> 4851 <xsl:when test="function-available('date:month-in-year') and $may-default-dates='yes'"> 4852 <xsl:call-template name="get-month-as-name"> 4853 <xsl:with-param name="month" select="date:month-in-year()"/> 4854 </xsl:call-template> 4855 </xsl:when> 4856 <xsl:when test="function-available('date:month-in-year') and $may-default-dates!='yes'"> 4857 <xsl:call-template name="warning"> 4858 <xsl:with-param name="inline" select="'no'"/> 4859 <xsl:with-param name="msg" select="$may-default-dates"/> 4860 </xsl:call-template> 4861 </xsl:when> 4862 <xsl:otherwise> 4863 <xsl:call-template name="error"> 4864 <xsl:with-param name="msg" select="'/rfc/front/date/@month missing (and XSLT processor cannot compute the system date)'"/> 4865 </xsl:call-template> 4866 </xsl:otherwise> 4867 </xsl:choose> 4868 </xsl:param> 4869 4870 <xsl:param name="xml2rfc-ext-pub-month-numeric"> 4871 <xsl:call-template name="get-month-as-num"> 4872 <xsl:with-param name="month" select="$xml2rfc-ext-pub-month"/> 4873 </xsl:call-template> 4874 </xsl:param> 4875 4876 <xsl:param name="xml2rfc-ext-pub-day"> 4877 <xsl:choose> 4878 <xsl:when test="/rfc/front/date/@day and /rfc/front/date/@day!=''"> 4879 <xsl:value-of select="/rfc/front/date/@day"/> 4880 </xsl:when> 4881 <xsl:when test="function-available('date:day-in-month') and $may-default-dates='yes'"> 4882 <xsl:value-of select="date:day-in-month()"/> 4883 </xsl:when> 4884 <xsl:otherwise/> <!-- harmless, we just don't have it --> 4885 </xsl:choose> 4886 </xsl:param> 4887 4714 4888 </xsl:stylesheet>
Note: See TracChangeset
for help on using the changeset viewer.