Ignore:
Timestamp:
Jun 1, 2011, 2:03:44 AM (9 years ago)
Author:
julian.reschke@…
Message:

update rfc2629.xslt, bump up document dates

File:
1 edited

Legend:

Unmodified
Added
Removed
  • rfc2629xslt/rfc2629toXHTML.xslt

    r1276 r1303  
    184184    <xsl:with-param name="attr" select="'trace-parse-xml'"/>
    185185    <xsl:with-param name="default" select="'no'"/>
     186  </xsl:call-template>
     187</xsl:param>
     188
     189<!-- extension for excluding the index -->
     190
     191<xsl:param name="xml2rfc-ext-include-index">
     192  <xsl:call-template name="parse-pis">
     193    <xsl:with-param name="nodes" select="/processing-instruction('rfc-ext')"/>
     194    <xsl:with-param name="attr" select="'include-index'"/>
     195    <xsl:with-param name="default" select="'yes'"/>
    186196  </xsl:call-template>
    187197</xsl:param>
     
    356366    <xsl:call-template name="warning">
    357367      <xsl:with-param name="msg" select="concat('/rfc/@consensus meaningless with a /rfc/@submissionType value of ', /rfc/@submissionType)"/>
    358       <xsl:with-param name="inline" select="'no'"/>
    359368    </xsl:call-template>
    360369  </xsl:if>
     
    429438
    430439<!-- will document have an index -->
    431 <xsl:variable name="has-index" select="//iref or (//xref and $xml2rfc-ext-include-references-in-index='yes')"/>
     440<xsl:variable name="has-index" select="(//iref or (//xref and $xml2rfc-ext-include-references-in-index='yes')) and $xml2rfc-ext-include-index!='no'"/>
    432441         
    433442<!-- does the document contain edits? -->
     
    605614      <xsl:if test="string-length($content) &gt; 69 + $indent">
    606615        <xsl:call-template name="warning">
    607           <xsl:with-param name="inline" select="'no'"/>
    608616          <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>
    609617        </xsl:call-template>
     
    621629      <xsl:if test="string-length($start) &gt; $max">
    622630        <xsl:call-template name="warning">
    623           <xsl:with-param name="inline" select="'no'"/>
    624631          <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>
    625632        </xsl:call-template>
     
    931938            <xsl:call-template name="warning">
    932939              <xsl:with-param name="msg">The @docName attribute '<xsl:value-of select="$docname"/>' should contain the base name, not the filename (thus no file extension).</xsl:with-param>
    933               <xsl:with-param name="inline" select="'no'"/>
    934940            </xsl:call-template>
    935941            <xsl:value-of select="substring-before($docname,'.')"/>
     
    946952        <xsl:call-template name="warning">
    947953          <xsl:with-param name="msg">The @docName attribute '<xsl:value-of select="$docname"/>' should not contain the character '<xsl:value-of select="substring($offending,1,1)"/>'.</xsl:with-param>
    948           <xsl:with-param name="inline" select="'no'"/>
    949954        </xsl:call-template>
    950955      </xsl:if>
     
    954959        <xsl:call-template name="warning">
    955960          <xsl:with-param name="msg">The @docName attribute '<xsl:value-of select="$docname"/>' should not contain the character sequence '--'.</xsl:with-param>
    956           <xsl:with-param name="inline" select="'no'"/>
    957961        </xsl:call-template>
    958962      </xsl:if>
     
    961965        <xsl:call-template name="warning">
    962966          <xsl:with-param name="msg">The @docName attribute '<xsl:value-of select="$docname"/>' should start with 'draft-'.</xsl:with-param>
    963           <xsl:with-param name="inline" select="'no'"/>
    964967        </xsl:call-template>
    965968      </xsl:if>
     
    977980        <xsl:call-template name="warning">
    978981          <xsl:with-param name="msg">The @docName attribute '<xsl:value-of select="$docname"/>' should end with a two-digit sequence number or 'latest'.</xsl:with-param>
    979           <xsl:with-param name="inline" select="'no'"/>
    980982        </xsl:call-template>
    981983      </xsl:if>
     
    984986        <xsl:call-template name="warning">
    985987          <xsl:with-param name="msg">The @docName attribute '<xsl:value-of select="$docname"/>', excluding sequence number, should have less than 50 characters.</xsl:with-param>
    986           <xsl:with-param name="inline" select="'no'"/>
    987988        </xsl:call-template>
    988989      </xsl:if>
     
    13981399  <xsl:if test="not(ancestor::ed:del) and not(key('xref-item',$anchor))">
    13991400    <xsl:call-template name="warning">
    1400       <xsl:with-param name="inline" select="'no'"/>
    14011401      <xsl:with-param name="msg">unused reference '<xsl:value-of select="@anchor"/>'</xsl:with-param>
    14021402    </xsl:call-template>
     
    14161416    <xsl:if test="$tst=''">
    14171417      <xsl:call-template name="warning">
    1418         <xsl:with-param name="inline" select="'no'"/>
    14191418        <xsl:with-param name="msg">all references to the normative reference '<xsl:value-of select="@anchor"/>' appear to be informative</xsl:with-param>
    14201419      </xsl:call-template>
     
    15531552        <xsl:if test="(@name='BCP' or @name='FYI' or @name='STD') and preceding-sibling::seriesInfo[@name='RFC']">
    15541553          <xsl:call-template name="warning">
    1555             <xsl:with-param name="inline" select="'no'"/>
    15561554            <xsl:with-param name="msg">RFC number preceding <xsl:value-of select="@name"/> number in reference '<xsl:value-of select="../@anchor"/>'</xsl:with-param>
    15571555          </xsl:call-template>
     
    15691567        <xsl:if test="string(number(front/date/@year)) = 'NaN'">
    15701568          <xsl:call-template name="warning">
    1571             <xsl:with-param name="inline" select="'no'"/>
    15721569            <xsl:with-param name="msg">date/@year should be a number: '<xsl:value-of select="front/date/@year"/>' in reference '<xsl:value-of select="@anchor"/>'</xsl:with-param>
    15731570          </xsl:call-template>
     
    18211818<xsl:template match="t">
    18221819  <xsl:if test="preceding-sibling::section or preceding-sibling::appendix">
    1823     <xsl:call-template name="warning">
     1820    <xsl:call-template name="inline-warning">
    18241821      <xsl:with-param name="msg">The paragraph below is misplaced; maybe a section is closed in the wrong place: </xsl:with-param>
    18251822      <xsl:with-param name="msg2"><xsl:value-of select="."/></xsl:with-param>
     
    18871884  <xsl:if test="@abbrev and string-length(@abbrev) &gt; 40">
    18881885    <xsl:call-template name="warning">
    1889       <xsl:with-param name="inline" select="'no'"/>
    18901886      <xsl:with-param name="msg">title/@abbrev too long (max 40 characters)</xsl:with-param>
    18911887    </xsl:call-template>
     
    18941890  <xsl:if test="string-length(.) &gt; 40 and (not(@abbrev) or @abbrev='')">
    18951891    <xsl:call-template name="warning">
    1896       <xsl:with-param name="inline" select="'no'"/>
    18971892      <xsl:with-param name="msg">title too long, should supply title/@abbrev attribute with less than 40 characters</xsl:with-param>
    18981893    </xsl:call-template>
     
    19281923  <xsl:if test="self::appendix">
    19291924    <xsl:call-template name="warning">
    1930       <xsl:with-param name="inline" select="'no'"/>
    19311925      <xsl:with-param name="msg">The "appendix" element is deprecated, use "section" inside "back" instead.</xsl:with-param>
    19321926    </xsl:call-template>
     
    21622156        <xsl:if test="not($r-is-normative)">
    21632157          <xsl:call-template name="warning">
    2164             <xsl:with-param name="inline" select="'no'"/>
    21652158            <xsl:with-param name="msg" select="concat('Potentially normative reference to ',@target,' not referenced normatively')"/>
    21662159          </xsl:call-template>
     
    23292322            <xsl:for-each select="$xref">
    23302323              <xsl:call-template name="warning">
    2331                 <xsl:with-param name="inline" select="'no'"/>
    23322324                <xsl:with-param name="msg" select="concat('Potentially normative reference to ',$xref/@target,' not referenced normatively')"/>
    23332325              </xsl:call-template>
     
    25372529
    25382530<xsl:template match="/">
     2531  <xsl:apply-templates select="*" mode="validate"/>
    25392532  <xsl:apply-templates select="*"/>
    25402533</xsl:template>
     
    26822675      <xsl:call-template name="warning">
    26832676        <xsl:with-param name="msg" select="concat('/rfc/front/date/@day appears to be missing for a historic draft dated ', $pub-yearmonth)"/>
    2684         <xsl:with-param name="inline" select="'no'"/>
    26852677      </xsl:call-template>
    26862678    </xsl:if>
     
    48484840      <xsl:value-of select="$name"/>
    48494841      <xsl:call-template name="warning">
    4850         <xsl:with-param name="inline" select="'no'"/>
    48514842        <xsl:with-param name="msg" select="concat('In metadata obsoletes/updates, RFC number of draft name is expected - found: ',$name)"/>
    48524843      </xsl:call-template>
     
    48834874      <xsl:if test="not(//references//reference/seriesInfo[@name='Internet-Draft' and @value=$name])">
    48844875        <xsl:call-template name="warning">
    4885           <xsl:with-param name="inline" select="'no'"/>
    48864876          <xsl:with-param name="msg" select="concat('front matter mentions I-D ',$name,' for which there is no reference element')"/>
    48874877        </xsl:call-template>
     
    48914881      <xsl:if test="not(//references//reference/seriesInfo[@name='RFC' and @value=$name])">
    48924882        <xsl:call-template name="warning">
    4893           <xsl:with-param name="inline" select="'no'"/>
    48944883          <xsl:with-param name="msg" select="concat('front matter mentions RFC ',$name,' for which there is no reference element')"/>
    48954884        </xsl:call-template>
     
    49714960    <xsl:otherwise>
    49724961      <xsl:call-template name="warning">
    4973         <xsl:with-param name="inline" select="'no'"/>
    49744962        <xsl:with-param name="msg">internal link target for '<xsl:value-of select="."/>' does not exist.</xsl:with-param>
    49754963      </xsl:call-template>
     
    55565544    <xsl:if test="not(//reference/seriesInfo[@name='RFC' and (@value='2068' or @value='2616')])">
    55575545      <xsl:call-template name="warning">
    5558         <xsl:with-param name="inline">no</xsl:with-param>
    55595546        <xsl:with-param name="msg">document uses HTTP-style ABNF syntax, but doesn't reference RFC 2068 or 2616.</xsl:with-param>
    55605547      </xsl:call-template>
     
    55645551    <xsl:if test="not(//reference/seriesInfo[@name='RFC' and (@value='2234' or @value='4234' or @value='5234')])">
    55655552      <xsl:call-template name="warning">
    5566         <xsl:with-param name="inline">no</xsl:with-param>
    55675553        <xsl:with-param name="msg">document uses ABNF syntax, but doesn't reference RFC 2234, 4234 or 5234.</xsl:with-param>
    55685554      </xsl:call-template>
     
    58085794</xsl:template>
    58095795
     5796<xsl:template name="inline-warning">
     5797  <xsl:param name="msg"/>
     5798  <xsl:param name="msg2"/>
     5799  <xsl:call-template name="emit-message">
     5800    <xsl:with-param name="level">WARNING</xsl:with-param>
     5801    <xsl:with-param name="msg" select="$msg"/>
     5802    <xsl:with-param name="msg2" select="$msg2"/>
     5803    <xsl:with-param name="inline" select="'yes'"/>
     5804  </xsl:call-template>
     5805</xsl:template>
     5806
    58105807<xsl:template name="warning">
    58115808  <xsl:param name="msg"/>
     
    58165813    <xsl:with-param name="msg" select="$msg"/>
    58175814    <xsl:with-param name="msg2" select="$msg2"/>
    5818     <xsl:with-param name="inline" select="$inline"/>
     5815    <xsl:with-param name="inline" select="'no'"/>
    58195816  </xsl:call-template>
    58205817</xsl:template>
     
    59265923                  <xsl:otherwise>
    59275924                    <xsl:call-template name="warning">
    5928                       <xsl:with-param name="inline" select="'no'"/>
    59295925                      <xsl:with-param name="msg">Unknown align attribute on ttcol: <xsl:value-of select="$col/@align"/></xsl:with-param>                     
    59305926                    </xsl:call-template>
     
    61746170    <xsl:text>http://greenbytes.de/tech/webdav/rfc2629.xslt, </xsl:text>
    61756171    <!-- when RCS keyword substitution in place, add version info -->
    6176     <xsl:if test="contains('$Revision: 1.547 $',':')">
    6177       <xsl:value-of select="concat('Revision ',normalize-space(translate(substring-after('$Revision: 1.547 $', 'Revision: '),'$','')),', ')"/>
     6172    <xsl:if test="contains('$Revision: 1.550 $',':')">
     6173      <xsl:value-of select="concat('Revision ',normalize-space(translate(substring-after('$Revision: 1.550 $', 'Revision: '),'$','')),', ')"/>
    61786174    </xsl:if>
    6179     <xsl:if test="contains('$Date: 2011-04-17 09:42:41 $',':')">
    6180       <xsl:value-of select="concat(normalize-space(translate(substring-after('$Date: 2011-04-17 09:42:41 $', 'Date: '),'$','')),', ')"/>
     6175    <xsl:if test="contains('$Date: 2011-05-30 14:02:12 $',':')">
     6176      <xsl:value-of select="concat(normalize-space(translate(substring-after('$Date: 2011-05-30 14:02:12 $', 'Date: '),'$','')),', ')"/>
    61816177    </xsl:if>
    61826178    <xsl:value-of select="concat('XSLT vendor: ',system-property('xsl:vendor'),' ',system-property('xsl:vendor-url'))"/>
     
    61936189    <xsl:if test="contains(.,',')">
    61946190      <xsl:call-template name="warning">
    6195         <xsl:with-param name="inline" select="'no'"/>
    61966191        <xsl:with-param name="msg">keyword element appears to contain a comma-separated list, split into multiple elements instead.</xsl:with-param>
    61976192      </xsl:call-template>
     
    63166311  <xsl:if test="$r!=@initials">
    63176312    <xsl:call-template name="warning">
    6318       <xsl:with-param name="inline" select="'no'"/>
    63196313      <xsl:with-param name="msg">@initials '<xsl:value-of select="@initials"/>': did you mean '<xsl:value-of select="$r"/>'?</xsl:with-param>
    63206314    </xsl:call-template>
     
    63826376  <xsl:if test="string-length($node) != string-length($text)">
    63836377    <xsl:call-template name="warning">
    6384       <xsl:with-param name="inline" select="'no'"/>
    63856378      <xsl:with-param name="msg">excessive whitespace in <xsl:value-of select="$name"/>: '<xsl:value-of select="$node"/>'</xsl:with-param>
    63866379    </xsl:call-template>
     
    63946387  <xsl:if test="string-length(.) != string-length($email) or contains($email,' ')">
    63956388    <xsl:call-template name="warning">
    6396       <xsl:with-param name="inline" select="'no'"/>
    63976389      <xsl:with-param name="msg">excessive whitespace in email address: '<xsl:value-of select="."/>'</xsl:with-param>
    63986390    </xsl:call-template>
     
    64036395      <xsl:when test="starts-with($email,'mailto:')">
    64046396        <xsl:call-template name="warning">
    6405           <xsl:with-param name="inline" select="'no'"/>
    64066397          <xsl:with-param name="msg">email should not include URI scheme: '<xsl:value-of select="."/>'</xsl:with-param>
    64076398        </xsl:call-template>
     
    64226413  <xsl:if test="string-length(.) != string-length($uri) or contains($uri,' ')">
    64236414    <xsl:call-template name="warning">
    6424       <xsl:with-param name="inline" select="'no'"/>
    64256415      <xsl:with-param name="msg">excessive whitespace in URI: '<xsl:value-of select="."/>'</xsl:with-param>
    64266416    </xsl:call-template>
     
    65236513          <xsl:call-template name="warning">
    65246514            <xsl:with-param name="msg">bad PI syntax: <xsl:value-of select="$str2"/></xsl:with-param>
    6525             <xsl:with-param name="inline" select="'no'"/>
    65266515          </xsl:call-template>
    65276516          <xsl:value-of select="$ret"/>
     
    65336522              <xsl:call-template name="warning">
    65346523                <xsl:with-param name="msg">bad PI value syntax: <xsl:value-of select="$remainder"/></xsl:with-param>
    6535                 <xsl:with-param name="inline" select="'no'"/>
    65366524              </xsl:call-template>
    65376525              <xsl:value-of select="$ret"/>
     
    65506538                  <xsl:call-template name="warning">
    65516539                    <xsl:with-param name="msg">pseudo-attribute value needs to be quoted: <xsl:value-of select="$rem"/></xsl:with-param>
    6552                     <xsl:with-param name="inline" select="'no'"/>
    65536540                  </xsl:call-template>
    65546541                  <xsl:value-of select="$ret"/>
     
    65576544                  <xsl:call-template name="warning">
    65586545                    <xsl:with-param name="msg">unmatched quote in: <xsl:value-of select="$rem2"/></xsl:with-param>
    6559                     <xsl:with-param name="inline" select="'no'"/>
    65606546                  </xsl:call-template>
    65616547                  <xsl:value-of select="$ret"/>
     
    65706556                      <xsl:when test="$attrname='authors-section'"/>
    65716557                      <xsl:when test="$attrname='duplex'"/>
     6558                      <xsl:when test="$attrname='include-index'"/>
    65726559                      <xsl:when test="$attrname='include-references-in-index'"/>
    65736560                      <xsl:when test="$attrname='justification'"/>
     
    65796566                        <xsl:call-template name="warning">
    65806567                          <xsl:with-param name="msg">unsupported rfc-ext pseudo-attribute '<xsl:value-of select="$attrname"/>'</xsl:with-param>
    6581                           <xsl:with-param name="inline" select="'no'"/>
    65826568                        </xsl:call-template>
    65836569                      </xsl:otherwise>
     
    65906576                        <xsl:call-template name="warning">
    65916577                          <xsl:with-param name="msg">the rfc include pseudo-attribute is not supported by this processor, see http://greenbytes.de/tech/webdav/rfc2629xslt/rfc2629xslt.html#examples.internalsubset for help.</xsl:with-param>
    6592                           <xsl:with-param name="inline" select="'no'"/>
    65936578                        </xsl:call-template>
    65946579                      </xsl:when>
     
    66126597                        <xsl:call-template name="warning">
    66136598                          <xsl:with-param name="msg">duplicate pseudo-attribute <xsl:value-of select="$attr"/>, overwriting value <xsl:value-of select="$ret"/></xsl:with-param>
    6614                           <xsl:with-param name="inline" select="'no'"/>
    66156599                        </xsl:call-template>
    66166600                      </xsl:if>
     
    68036787    <xsl:when test="$current-year!='' and $may-default-dates!='yes'">
    68046788      <xsl:call-template name="warning">
    6805         <xsl:with-param name="inline" select="'no'"/>
    68066789        <xsl:with-param name="msg" select="$may-default-dates"/>
    68076790      </xsl:call-template>
     
    68276810    <xsl:when test="$current-month!='' and $may-default-dates!='yes'">
    68286811      <xsl:call-template name="warning">
    6829         <xsl:with-param name="inline" select="'no'"/>
    68306812        <xsl:with-param name="msg" select="$may-default-dates"/>
    68316813      </xsl:call-template>
     
    68726854    <xsl:otherwise>00</xsl:otherwise>
    68736855  </xsl:choose>
    6874 
    68756856</xsl:param>
    68766857
     6858<!-- simple validation support -->
     6859
     6860<xsl:template match="*" mode="validate">
     6861  <xsl:apply-templates select="@*|*" mode="validate"/>
     6862</xsl:template>
     6863<xsl:template match="@*" mode="validate"/>
     6864
     6865<xsl:template name="warninvalid">
     6866  <xsl:variable name="pname">
     6867    <xsl:if test="namespace-uri(..)!=''">
     6868      <xsl:value-of select="concat('{',namespace-uri(..),'}')"/>
     6869    </xsl:if>
     6870    <xsl:value-of select="local-name(..)"/>
     6871  </xsl:variable>
     6872  <xsl:variable name="cname">
     6873    <xsl:if test="namespace-uri(.)!=''">
     6874      <xsl:value-of select="concat('{',namespace-uri(.),'}')"/>
     6875    </xsl:if>
     6876    <xsl:value-of select="local-name(.)"/>
     6877  </xsl:variable>
     6878  <xsl:call-template name="warning">
     6879    <xsl:with-param name="msg" select="concat($cname,' not allowed inside ',$pname)"/>
     6880  </xsl:call-template>
     6881</xsl:template>
     6882
     6883<!-- figure element -->
     6884<xsl:template match="figure/artwork | figure/ed:replace/ed:*/artwork" mode="validate" priority="9">
     6885  <xsl:apply-templates select="@*|*" mode="validate"/>
     6886</xsl:template>
     6887<xsl:template match="artwork" mode="validate">
     6888  <xsl:call-template name="warninvalid"/>
     6889  <xsl:apply-templates select="@*|*" mode="validate"/>
     6890</xsl:template>
     6891
     6892<!-- list element -->
     6893<xsl:template match="t/list | t/ed:replace/ed:*/list" mode="validate" priority="9">
     6894  <xsl:apply-templates select="@*|*" mode="validate"/>
     6895</xsl:template>
     6896<xsl:template match="list" mode="validate">
     6897  <xsl:call-template name="warninvalid"/>
     6898  <xsl:apply-templates select="@*|*" mode="validate"/>
     6899</xsl:template>
     6900
     6901<!-- t element -->
     6902<xsl:template match="abstract/t | abstract/ed:replace/ed:*/t |                      list/t | list/ed:replace/ed:*/t |                      note/t | note/ed:replace/ed:*/t |                      section/t | section/ed:replace/ed:*/t |                      x:blockquote/t | x:blockquote/ed:replace/ed:*/t |                      x:note/t | x:note/ed:replace/ed:*/t |                      x:lt/t | x:lt/ed:replace/ed:*/t" mode="validate" priority="9">
     6903  <xsl:apply-templates select="@*|*" mode="validate"/>
     6904</xsl:template>
     6905<xsl:template match="t" mode="validate">
     6906  <xsl:call-template name="warninvalid"/>
     6907  <xsl:apply-templates select="@*|*" mode="validate"/>
     6908</xsl:template>
     6909
    68776910</xsl:transform>
Note: See TracChangeset for help on using the changeset viewer.