Ignore:
Timestamp:
Aug 31, 2009, 11:50:20 PM (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/rfc2629toXHTML.xslt

    r662 r689  
    379379  <p xmlns="http://www.w3.org/1999/xhtml">
    380380    <xsl:choose>
     381      <xsl:when test="@align='center'">
     382        <xsl:attribute name="style">text-align: center</xsl:attribute>
     383      </xsl:when>
     384      <xsl:when test="@align='right'">
     385        <xsl:attribute name="style">text-align: right</xsl:attribute>
     386      </xsl:when>
     387      <xsl:otherwise/>
     388    </xsl:choose>
     389    <xsl:choose>
    381390      <xsl:when test="@type='image/svg+xml'">
    382391        <object data="{@src}" type="image/svg+xml">
     
    401410      <xsl:otherwise>
    402411        <img src="{@src}" alt="{.}">
    403           <xsl:copy-of select="@width|@height"/>
     412          <xsl:if test="@width and @width!=''">
     413            <xsl:copy-of select="@width"/>
     414          </xsl:if>
     415          <xsl:if test="@height and @height!=''">
     416            <xsl:copy-of select="@height"/>
     417          </xsl:if>
    404418        </img>
    405419      </xsl:otherwise>
     
    13161330      </xsl:if>
    13171331      <xsl:apply-templates select="/" mode="links"/>
    1318       <xsl:for-each select="/rfc/x:link">
     1332      <xsl:for-each select="x:link">
    13191333        <link><xsl:copy-of select="@*"/></link>
    13201334      </xsl:for-each>
    1321       <xsl:if test="/rfc/@number">
     1335      <xsl:if test="@number">
    13221336        <xsl:variable name="number">
    13231337          <xsl:choose>
    1324             <xsl:when test="string-length(/rfc/@number) &lt; 2">000<xsl:value-of select="/rfc/@number"/></xsl:when>
    1325             <xsl:when test="string-length(/rfc/@number) &lt; 3">00<xsl:value-of select="/rfc/@number"/></xsl:when>
    1326             <xsl:when test="string-length(/rfc/@number) &lt; 4">0<xsl:value-of select="/rfc/@number"/></xsl:when>
    1327             <xsl:otherwise><xsl:value-of select="/rfc/@number"/></xsl:otherwise>
     1338            <xsl:when test="string-length(@number) &lt; 2">000<xsl:value-of select="@number"/></xsl:when>
     1339            <xsl:when test="string-length(@number) &lt; 3">00<xsl:value-of select="@number"/></xsl:when>
     1340            <xsl:when test="string-length(@number) &lt; 4">0<xsl:value-of select="@number"/></xsl:when>
     1341            <xsl:otherwise><xsl:value-of select="@number"/></xsl:otherwise>
    13281342          </xsl:choose>
    13291343        </xsl:variable>
    1330         <link rel="Alternate" title="Authorative ASCII Version" href="http://www.ietf.org/rfc/rfc{/rfc/@number}.txt"/>
     1344        <link rel="Alternate" title="Authorative ASCII Version" href="http://www.ietf.org/rfc/rfc{@number}.txt"/>
    13311345        <link rel="Help" title="Additional Information on tools.ietf.org" href="http://tools.ietf.org/html/rfc{$number}"/>
    13321346      </xsl:if>
     
    13511365             
    13521366        <!-- DC creator, see RFC2731 -->
    1353         <xsl:for-each select="/rfc/front/author">
     1367        <xsl:for-each select="front/author">
    13541368          <xsl:variable name="initials">
    13551369            <xsl:call-template name="format-initials"/>
     
    13601374        <xsl:if test="not($xml2rfc-private)">
    13611375          <xsl:choose>
    1362             <xsl:when test="/rfc/@number">
    1363               <meta name="DC.Identifier" content="urn:ietf:rfc:{/rfc/@number}"/>
     1376            <xsl:when test="@number">
     1377              <meta name="DC.Identifier" content="urn:ietf:rfc:{@number}"/>
    13641378            </xsl:when>
    1365             <xsl:when test="/rfc/@docName">
    1366               <meta name="DC.Identifier" content="urn:ietf:id:{/rfc/@docName}"/>
     1379            <xsl:when test="@docName">
     1380              <meta name="DC.Identifier" content="urn:ietf:id:{@docName}"/>
    13671381            </xsl:when>
    13681382            <xsl:otherwise/>
     
    13711385            <xsl:attribute name="content">
    13721386              <xsl:value-of select="concat($xml2rfc-ext-pub-year,'-',$xml2rfc-ext-pub-month-numeric)"/>
    1373               <xsl:if test="$xml2rfc-ext-pub-day != '' and not(/rfc/@number)">
     1387              <xsl:if test="$xml2rfc-ext-pub-day != '' and not(@number)">
    13741388                <xsl:value-of select="concat('-',format-number($xml2rfc-ext-pub-day,'00'))"/>
    13751389              </xsl:if>
     
    13771391          </meta>
    13781392 
    1379           <xsl:if test="/rfc/@obsoletes!=''">
     1393          <xsl:if test="@obsoletes!=''">
    13801394            <xsl:call-template name="rfclist-for-dcmeta">
    1381               <xsl:with-param name="list" select="/rfc/@obsoletes"/>
     1395              <xsl:with-param name="list" select="@obsoletes"/>
    13821396            </xsl:call-template>
    13831397          </xsl:if>
    13841398        </xsl:if>
    13851399 
    1386         <xsl:if test="/rfc/front/abstract">
    1387           <meta name="DC.Description.Abstract" content="{normalize-space(/rfc/front/abstract)}"/>
     1400        <xsl:if test="front/abstract">
     1401          <meta name="DC.Description.Abstract" content="{normalize-space(front/abstract)}"/>
    13881402        </xsl:if>     
    13891403
    1390         <xsl:if test="/rfc/@number">
    1391           <meta name="DC.isPartOf" content="urn:ISSN:2070-1721"/>
     1404        <xsl:if test="@number">
     1405          <meta name="DC.isPartOf" content="urn:issn:2070-1721"/>
    13921406        </xsl:if>     
    13931407
    1394       </xsl:if>     
     1408      </xsl:if>
     1409     
     1410      <!-- this replicates dc.description.abstract, but is used by Google & friends -->
     1411      <xsl:if test="front/abstract">
     1412        <meta name="description" content="{normalize-space(front/abstract)}"/>
     1413      </xsl:if>
     1414     
    13951415    </head>
    13961416    <body>
     
    40594079</xsl:template>
    40604080
     4081<xsl:template name="rfc-or-id-link">
     4082  <xsl:param name="name"/>
     4083  <xsl:call-template name="check-front-matter-ref">
     4084    <xsl:with-param name="name" select="$name"/>
     4085  </xsl:call-template>
     4086  <a xmlns="http://www.w3.org/1999/xhtml">
     4087    <xsl:attribute name="href">
     4088      <xsl:choose>
     4089        <xsl:when test="starts-with($name,'draft-')">
     4090          <xsl:value-of select="concat($internetDraftUrlPrefix,$name,$internetDraftUrlPostfix)"/>
     4091        </xsl:when>
     4092        <xsl:otherwise>
     4093          <xsl:value-of select="concat($rfcUrlPrefix,$name,$rfcUrlPostfix)"/>
     4094        </xsl:otherwise>
     4095      </xsl:choose>
     4096    </xsl:attribute>
     4097    <xsl:value-of select="$name"/>
     4098  </a>
     4099</xsl:template>
    40614100
    40624101<xsl:template name="rfclist">
     
    40654104    <xsl:when test="contains($list,',')">
    40664105      <xsl:variable name="rfcNo" select="substring-before($list,',')"/>
    4067       <xsl:call-template name="check-front-matter-ref">
     4106      <xsl:call-template name="rfc-or-id-link">
    40684107        <xsl:with-param name="name" select="$rfcNo"/>
    40694108      </xsl:call-template>
    4070       <a xmlns="http://www.w3.org/1999/xhtml" href="{concat($rfcUrlPrefix,$rfcNo,$rfcUrlPostfix)}"><xsl:value-of select="$rfcNo"/></a>,
     4109      <xsl:text>, </xsl:text>
    40714110      <xsl:call-template name="rfclist">
    40724111        <xsl:with-param name="list" select="normalize-space(substring-after($list,','))"/>
     
    40754114    <xsl:otherwise>
    40764115      <xsl:variable name="rfcNo" select="$list"/>
    4077       <xsl:call-template name="check-front-matter-ref">
     4116      <xsl:call-template name="rfc-or-id-link">
    40784117        <xsl:with-param name="name" select="$rfcNo"/>
    40794118      </xsl:call-template>
    4080       <a xmlns="http://www.w3.org/1999/xhtml" href="{concat($rfcUrlPrefix,$rfcNo,$rfcUrlPostfix)}"><xsl:value-of select="$rfcNo"/></a>
    40814119    </xsl:otherwise>
    40824120  </xsl:choose>
     
    53255363    <xsl:text>http://greenbytes.de/tech/webdav/rfc2629.xslt, </xsl:text>
    53265364    <!-- when RCS keyword substitution in place, add version info -->
    5327     <xsl:if test="contains('$Revision: 1.447 $',':')">
    5328       <xsl:value-of select="concat('Revision ',normalize-space(translate(substring-after('$Revision: 1.447 $', 'Revision: '),'$','')),', ')"/>
     5365    <xsl:if test="contains('$Revision: 1.451 $',':')">
     5366      <xsl:value-of select="concat('Revision ',normalize-space(translate(substring-after('$Revision: 1.451 $', 'Revision: '),'$','')),', ')"/>
    53295367    </xsl:if>
    5330     <xsl:if test="contains('$Date: 2009-08-04 19:54:03 $',':')">
    5331       <xsl:value-of select="concat(normalize-space(translate(substring-after('$Date: 2009-08-04 19:54:03 $', 'Date: '),'$','')),', ')"/>
     5368    <xsl:if test="contains('$Date: 2009-08-28 12:08:05 $',':')">
     5369      <xsl:value-of select="concat(normalize-space(translate(substring-after('$Date: 2009-08-28 12:08:05 $', 'Date: '),'$','')),', ')"/>
    53325370    </xsl:if>
    53335371    <xsl:value-of select="concat('XSLT vendor: ',system-property('xsl:vendor'),' ',system-property('xsl:vendor-url'))"/>
     
    53415379
    53425380<xsl:template name="get-keywords">
    5343   <xsl:variable name="keyw">
    5344     <xsl:for-each select="/rfc/front/keyword">
    5345       <xsl:value-of select="translate(.,',',' ')"/>
    5346       <xsl:if test="position()!=last()">, </xsl:if>
    5347     </xsl:for-each>
    5348   </xsl:variable>
    5349   <xsl:value-of select="normalize-space($keyw)"/>
     5381  <xsl:for-each select="/rfc/front/keyword">
     5382    <xsl:if test="contains(.,',')">
     5383      <xsl:call-template name="warning">
     5384        <xsl:with-param name="inline" select="'no'"/>
     5385        <xsl:with-param name="msg">keyword element appears to contain a comma-separated list, split into multiple elements instead.</xsl:with-param>
     5386      </xsl:call-template>
     5387    </xsl:if>
     5388    <xsl:value-of select="normalize-space(.)"/>
     5389    <xsl:if test="position()!=last()">, </xsl:if>
     5390  </xsl:for-each>
    53505391</xsl:template>
    53515392
Note: See TracChangeset for help on using the changeset viewer.