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/rfc2629.xslt

    r662 r689  
    589589  <p>
    590590    <xsl:choose>
     591      <xsl:when test="@align='center'">
     592        <xsl:attribute name="style">text-align: center</xsl:attribute>
     593      </xsl:when>
     594      <xsl:when test="@align='right'">
     595        <xsl:attribute name="style">text-align: right</xsl:attribute>
     596      </xsl:when>
     597      <xsl:otherwise/>
     598    </xsl:choose>
     599    <xsl:choose>
    591600      <xsl:when test="@type='image/svg+xml'">
    592601        <object data="{@src}" type="image/svg+xml">
     
    611620      <xsl:otherwise>
    612621        <img src="{@src}" alt="{.}">
    613           <xsl:copy-of select="@width|@height"/>
     622          <xsl:if test="@width and @width!=''">
     623            <xsl:copy-of select="@width"/>
     624          </xsl:if>
     625          <xsl:if test="@height and @height!=''">
     626            <xsl:copy-of select="@height"/>
     627          </xsl:if>
    614628        </img>
    615629      </xsl:otherwise>
     
    15261540      </xsl:if>
    15271541      <xsl:apply-templates select="/" mode="links" />
    1528       <xsl:for-each select="/rfc/x:link">
     1542      <xsl:for-each select="x:link">
    15291543        <link><xsl:copy-of select="@*" /></link>
    15301544      </xsl:for-each>
    1531       <xsl:if test="/rfc/@number">
     1545      <xsl:if test="@number">
    15321546        <xsl:variable name="number">
    15331547          <xsl:choose>
    1534             <xsl:when test="string-length(/rfc/@number) &lt; 2">000<xsl:value-of select="/rfc/@number"/></xsl:when>
    1535             <xsl:when test="string-length(/rfc/@number) &lt; 3">00<xsl:value-of select="/rfc/@number"/></xsl:when>
    1536             <xsl:when test="string-length(/rfc/@number) &lt; 4">0<xsl:value-of select="/rfc/@number"/></xsl:when>
    1537             <xsl:otherwise><xsl:value-of select="/rfc/@number"/></xsl:otherwise>
     1548            <xsl:when test="string-length(@number) &lt; 2">000<xsl:value-of select="@number"/></xsl:when>
     1549            <xsl:when test="string-length(@number) &lt; 3">00<xsl:value-of select="@number"/></xsl:when>
     1550            <xsl:when test="string-length(@number) &lt; 4">0<xsl:value-of select="@number"/></xsl:when>
     1551            <xsl:otherwise><xsl:value-of select="@number"/></xsl:otherwise>
    15381552          </xsl:choose>
    15391553        </xsl:variable>
    1540         <link rel="Alternate" title="Authorative ASCII Version" href="http://www.ietf.org/rfc/rfc{/rfc/@number}.txt" />
     1554        <link rel="Alternate" title="Authorative ASCII Version" href="http://www.ietf.org/rfc/rfc{@number}.txt" />
    15411555        <link rel="Help" title="Additional Information on tools.ietf.org" href="http://tools.ietf.org/html/rfc{$number}" />
    15421556      </xsl:if>
     
    15611575             
    15621576        <!-- DC creator, see RFC2731 -->
    1563         <xsl:for-each select="/rfc/front/author">
     1577        <xsl:for-each select="front/author">
    15641578          <xsl:variable name="initials">
    15651579            <xsl:call-template name="format-initials"/>
     
    15701584        <xsl:if test="not($xml2rfc-private)">
    15711585          <xsl:choose>
    1572             <xsl:when test="/rfc/@number">
    1573               <meta name="DC.Identifier" content="urn:ietf:rfc:{/rfc/@number}" />
     1586            <xsl:when test="@number">
     1587              <meta name="DC.Identifier" content="urn:ietf:rfc:{@number}" />
    15741588            </xsl:when>
    1575             <xsl:when test="/rfc/@docName">
    1576               <meta name="DC.Identifier" content="urn:ietf:id:{/rfc/@docName}" />
     1589            <xsl:when test="@docName">
     1590              <meta name="DC.Identifier" content="urn:ietf:id:{@docName}" />
    15771591            </xsl:when>
    15781592            <xsl:otherwise/>
     
    15811595            <xsl:attribute name="content">
    15821596              <xsl:value-of select="concat($xml2rfc-ext-pub-year,'-',$xml2rfc-ext-pub-month-numeric)"/>
    1583               <xsl:if test="$xml2rfc-ext-pub-day != '' and not(/rfc/@number)">
     1597              <xsl:if test="$xml2rfc-ext-pub-day != '' and not(@number)">
    15841598                <xsl:value-of select="concat('-',format-number($xml2rfc-ext-pub-day,'00'))"/>
    15851599              </xsl:if>
     
    15871601          </meta>
    15881602 
    1589           <xsl:if test="/rfc/@obsoletes!=''">
     1603          <xsl:if test="@obsoletes!=''">
    15901604            <xsl:call-template name="rfclist-for-dcmeta">
    1591               <xsl:with-param name="list" select="/rfc/@obsoletes"/>
     1605              <xsl:with-param name="list" select="@obsoletes"/>
    15921606            </xsl:call-template>
    15931607          </xsl:if>
    15941608        </xsl:if>
    15951609 
    1596         <xsl:if test="/rfc/front/abstract">
    1597           <meta name="DC.Description.Abstract" content="{normalize-space(/rfc/front/abstract)}" />
     1610        <xsl:if test="front/abstract">
     1611          <meta name="DC.Description.Abstract" content="{normalize-space(front/abstract)}" />
    15981612        </xsl:if>     
    15991613
    1600         <xsl:if test="/rfc/@number">
    1601           <meta name="DC.isPartOf" content="urn:ISSN:2070-1721" />
     1614        <xsl:if test="@number">
     1615          <meta name="DC.isPartOf" content="urn:issn:2070-1721" />
    16021616        </xsl:if>     
    16031617
    1604       </xsl:if>     
     1618      </xsl:if>
     1619     
     1620      <!-- this replicates dc.description.abstract, but is used by Google & friends -->
     1621      <xsl:if test="front/abstract">
     1622        <meta name="description" content="{normalize-space(front/abstract)}" />
     1623      </xsl:if>
     1624     
    16051625    </head>
    16061626    <body>
     
    42744294</xsl:template>
    42754295
     4296<xsl:template name="rfc-or-id-link">
     4297  <xsl:param name="name" />
     4298  <xsl:call-template name="check-front-matter-ref">
     4299    <xsl:with-param name="name" select="$name"/>
     4300  </xsl:call-template>
     4301  <a>
     4302    <xsl:attribute name="href">
     4303      <xsl:choose>
     4304        <xsl:when test="starts-with($name,'draft-')">
     4305          <xsl:value-of select="concat($internetDraftUrlPrefix,$name,$internetDraftUrlPostfix)"/>
     4306        </xsl:when>
     4307        <xsl:otherwise>
     4308          <xsl:value-of select="concat($rfcUrlPrefix,$name,$rfcUrlPostfix)"/>
     4309        </xsl:otherwise>
     4310      </xsl:choose>
     4311    </xsl:attribute>
     4312    <xsl:value-of select="$name" />
     4313  </a>
     4314</xsl:template>
    42764315
    42774316<xsl:template name="rfclist">
     
    42804319    <xsl:when test="contains($list,',')">
    42814320      <xsl:variable name="rfcNo" select="substring-before($list,',')" />
    4282       <xsl:call-template name="check-front-matter-ref">
     4321      <xsl:call-template name="rfc-or-id-link">
    42834322        <xsl:with-param name="name" select="$rfcNo"/>
    42844323      </xsl:call-template>
    4285       <a href="{concat($rfcUrlPrefix,$rfcNo,$rfcUrlPostfix)}"><xsl:value-of select="$rfcNo" /></a>,
     4324      <xsl:text>, </xsl:text>
    42864325      <xsl:call-template name="rfclist">
    42874326        <xsl:with-param name="list" select="normalize-space(substring-after($list,','))" />
     
    42904329    <xsl:otherwise>
    42914330      <xsl:variable name="rfcNo" select="$list" />
    4292       <xsl:call-template name="check-front-matter-ref">
     4331      <xsl:call-template name="rfc-or-id-link">
    42934332        <xsl:with-param name="name" select="$rfcNo"/>
    42944333      </xsl:call-template>
    4295       <a href="{concat($rfcUrlPrefix,$rfcNo,$rfcUrlPostfix)}"><xsl:value-of select="$rfcNo" /></a>
    42964334    </xsl:otherwise>
    42974335  </xsl:choose>
     
    55415579    <xsl:text>http://greenbytes.de/tech/webdav/rfc2629.xslt, </xsl:text>
    55425580    <!-- when RCS keyword substitution in place, add version info -->
    5543     <xsl:if test="contains('$Revision: 1.447 $',':')">
    5544       <xsl:value-of select="concat('Revision ',normalize-space(translate(substring-after('$Revision: 1.447 $', 'Revision: '),'$','')),', ')" />
     5581    <xsl:if test="contains('$Revision: 1.451 $',':')">
     5582      <xsl:value-of select="concat('Revision ',normalize-space(translate(substring-after('$Revision: 1.451 $', 'Revision: '),'$','')),', ')" />
    55455583    </xsl:if>
    5546     <xsl:if test="contains('$Date: 2009-08-04 19:54:03 $',':')">
    5547       <xsl:value-of select="concat(normalize-space(translate(substring-after('$Date: 2009-08-04 19:54:03 $', 'Date: '),'$','')),', ')" />
     5584    <xsl:if test="contains('$Date: 2009-08-28 12:08:05 $',':')">
     5585      <xsl:value-of select="concat(normalize-space(translate(substring-after('$Date: 2009-08-28 12:08:05 $', 'Date: '),'$','')),', ')" />
    55485586    </xsl:if>
    55495587    <xsl:value-of select="concat('XSLT vendor: ',system-property('xsl:vendor'),' ',system-property('xsl:vendor-url'))" />
     
    55575595
    55585596<xsl:template name="get-keywords">
    5559   <xsl:variable name="keyw">
    5560     <xsl:for-each select="/rfc/front/keyword">
    5561       <xsl:value-of select="translate(.,',',' ')" />
    5562       <xsl:if test="position()!=last()">, </xsl:if>
    5563     </xsl:for-each>
    5564   </xsl:variable>
    5565   <xsl:value-of select="normalize-space($keyw)" />
     5597  <xsl:for-each select="/rfc/front/keyword">
     5598    <xsl:if test="contains(.,',')">
     5599      <xsl:call-template name="warning">
     5600        <xsl:with-param name="inline" select="'no'"/>
     5601        <xsl:with-param name="msg">keyword element appears to contain a comma-separated list, split into multiple elements instead.</xsl:with-param>
     5602      </xsl:call-template>
     5603    </xsl:if>
     5604    <xsl:value-of select="normalize-space(.)" />
     5605    <xsl:if test="position()!=last()">, </xsl:if>
     5606  </xsl:for-each>
    55665607</xsl:template>
    55675608
Note: See TracChangeset for help on using the changeset viewer.