Ignore:
Timestamp:
Jun 1, 2009, 6:21:15 AM (11 years ago)
Author:
julian.reschke@…
Message:

Update to latest version of rfc2629.xslt and bump up document dates.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • rfc2629xslt/rfc2629toFO.xslt

    r571 r588  
    11<!--
    2         XSLT transformation from RFC2629 XML format to XSL-FO
     2    XSLT transformation from RFC2629 XML format to XSL-FO
    33     
    44    Copyright (c) 2006-2009, Julian Reschke (julian.reschke@greenbytes.de)
     
    489489<xsl:template match="list[@style='hanging']/x:lt" priority="1">
    490490  <fo:list-item space-before=".25em" space-after=".25em">
    491     <xsl:if test="@anchor"><xsl:attribute name="id"><xsl:value-of select="@anchor"/></xsl:attribute></xsl:if>
     491    <xsl:call-template name="copy-anchor"/>
    492492    <fo:list-item-label end-indent="label-end()"><fo:block><xsl:value-of select="@hangText" /></fo:block></fo:list-item-label>
    493493    <fo:list-item-body start-indent="body-start()">
     
    506506<xsl:template match="list[@style='hanging']/t | list[@style='hanging']/ed:replace/ed:ins/t" priority="1">
    507507  <fo:list-item space-before=".25em" space-after=".25em">
    508     <xsl:if test="@anchor"><xsl:attribute name="id"><xsl:value-of select="@anchor"/></xsl:attribute></xsl:if>
     508    <xsl:call-template name="copy-anchor"/>
    509509    <fo:list-item-label end-indent="label-end()"><fo:block><xsl:value-of select="@hangText" /></fo:block></fo:list-item-label>
    510510    <fo:list-item-body start-indent="body-start()"><fo:block><xsl:apply-templates /></fo:block></fo:list-item-body>
     
    520520<xsl:template match="list[@style='symbols']/t" priority="1">
    521521  <fo:list-item space-before=".25em" space-after=".25em">
    522     <xsl:if test="@anchor"><xsl:attribute name="id"><xsl:value-of select="@anchor"/></xsl:attribute></xsl:if>
     522    <xsl:call-template name="copy-anchor"/>
    523523    <fo:list-item-label end-indent="label-end()"><fo:block>&#x2022;</fo:block></fo:list-item-label>
    524524    <fo:list-item-body start-indent="body-start()"><fo:block><xsl:apply-templates /></fo:block></fo:list-item-body>
     
    528528<xsl:template match="list[@style='symbols']/x:lt" priority="1">
    529529  <fo:list-item space-before=".25em" space-after=".25em">
    530     <xsl:if test="@anchor"><xsl:attribute name="id"><xsl:value-of select="@anchor"/></xsl:attribute></xsl:if>
     530    <xsl:call-template name="copy-anchor"/>
    531531    <fo:list-item-label end-indent="label-end()"><fo:block>&#x2022;</fo:block></fo:list-item-label>
    532532    <fo:list-item-body start-indent="body-start()">
     
    557557<xsl:template match="list/t">
    558558  <fo:list-item space-before=".25em" space-after=".25em">
    559     <xsl:if test="@anchor"><xsl:attribute name="id"><xsl:value-of select="@anchor"/></xsl:attribute></xsl:if>
     559    <xsl:call-template name="copy-anchor"/>
    560560    <fo:list-item-label end-indent="label-end()"><fo:block></fo:block></fo:list-item-label>
    561561    <fo:list-item-body start-indent="body-start()"><fo:block><xsl:apply-templates /></fo:block></fo:list-item-body>
     
    571571<xsl:template match="list[@style='numbers' or @style='letters']/t" priority="1">
    572572  <fo:list-item space-before=".25em" space-after=".25em">
    573     <xsl:if test="@anchor"><xsl:attribute name="id"><xsl:value-of select="@anchor"/></xsl:attribute></xsl:if>
     573    <xsl:call-template name="copy-anchor"/>
    574574    <fo:list-item-label end-indent="label-end()">
    575575      <fo:block>
     
    587587<xsl:template match="list[@style='numbers' or @style='letters']/x:lt" priority="1">
    588588  <fo:list-item space-before=".25em" space-after=".25em">
    589     <xsl:if test="@anchor"><xsl:attribute name="id"><xsl:value-of select="@anchor"/></xsl:attribute></xsl:if>
     589    <xsl:call-template name="copy-anchor"/>
    590590    <fo:list-item-label end-indent="label-end()">
    591591      <fo:block>
     
    613613<xsl:template match="list//t//list[@style='letters']/t" priority="9">
    614614  <fo:list-item space-before=".25em" space-after=".25em">
    615     <xsl:if test="@anchor"><xsl:attribute name="id"><xsl:value-of select="@anchor"/></xsl:attribute></xsl:if>
     615    <xsl:call-template name="copy-anchor"/>
    616616    <fo:list-item-label end-indent="label-end()"><fo:block><xsl:number format="A"/>.</fo:block></fo:list-item-label>
    617617    <fo:list-item-body start-indent="body-start()"><fo:block><xsl:apply-templates /></fo:block></fo:list-item-body>
     
    639639  </xsl:variable>
    640640  <fo:list-item space-before=".25em" space-after=".25em">
    641     <xsl:if test="@anchor"><xsl:attribute name="id"><xsl:value-of select="@anchor"/></xsl:attribute></xsl:if>
     641    <xsl:call-template name="copy-anchor"/>
    642642    <fo:list-item-label end-indent="label-end()">
    643643      <fo:block>
     
    673673<xsl:template match="preamble">
    674674        <fo:block space-after=".5em">
    675     <xsl:if test="@anchor">
    676       <xsl:attribute name="id"><xsl:value-of select="@anchor"/></xsl:attribute>
    677     </xsl:if>
     675    <xsl:call-template name="copy-anchor"/>
    678676    <xsl:apply-templates />
    679677  </fo:block>
     
    942940          <dc:creator><xsl:call-template name="get-author-summary" /></dc:creator>
    943941          <dc:description><xsl:value-of select="normalize-space(/rfc/front/abstract)"/></dc:description>
     942          <xsl:if test="/rfc/@number">
     943            <dc:isPartOf>urn:ISSN:2070-1721</dc:isPartOf>
     944          </xsl:if>     
    944945          <xsl:if test="/rfc/front/keyword" xmlns:pdf="http://ns.adobe.com/pdf/1.3/">
    945946            <pdf:Keywords>
     
    10591060<xsl:template match="spanx[@style='emph' or not(@style)]">
    10601061  <fo:wrapper font-style="italic">
    1061     <xsl:if test="@anchor">
    1062       <xsl:attribute name="id"><xsl:value-of select="@anchor"/></xsl:attribute>
    1063     </xsl:if>
     1062    <xsl:call-template name="copy-anchor"/>
    10641063    <xsl:apply-templates />
    10651064  </fo:wrapper>
     
    10681067<xsl:template match="spanx[@style='strong']">
    10691068  <fo:wrapper font-weight="bold">
    1070     <xsl:if test="@anchor">
    1071       <xsl:attribute name="id"><xsl:value-of select="@anchor"/></xsl:attribute>
    1072     </xsl:if>
     1069    <xsl:call-template name="copy-anchor"/>
    10731070    <xsl:apply-templates />
    10741071  </fo:wrapper>
     
    10771074<xsl:template match="spanx[@style='verb']">
    10781075  <fo:wrapper font-family="monospace">
    1079     <xsl:if test="@anchor">
    1080       <xsl:attribute name="id"><xsl:value-of select="@anchor"/></xsl:attribute>
    1081     </xsl:if>
     1076    <xsl:call-template name="copy-anchor"/>
    10821077    <xsl:apply-templates/>
    10831078  </fo:wrapper>
     
    10981093      </xsl:otherwise>
    10991094    </xsl:choose>
    1100     <xsl:if test="@anchor"><xsl:attribute name="id"><xsl:value-of select="@anchor"/></xsl:attribute></xsl:if>
     1095    <xsl:call-template name="copy-anchor"/>
    11011096    <xsl:apply-templates />
    11021097  </fo:block>
     
    12651260          <xsl:otherwise>
    12661261            <xsl:value-of select="normalize-space(concat('Table&#160;',$tabcnt))"/>
     1262          </xsl:otherwise>
     1263        </xsl:choose>
     1264      </fo:basic-link>
     1265    </xsl:when>
     1266
     1267    <!-- Paragraph links -->
     1268    <xsl:when test="$node/self::t">
     1269      <fo:basic-link internal-destination="{$target}" xsl:use-attribute-sets="internal-link">
     1270        <xsl:variable name="tcnt">
     1271          <xsl:for-each select="$node">
     1272            <xsl:call-template name="get-paragraph-number" />
     1273          </xsl:for-each>
     1274        </xsl:variable>
     1275        <xsl:choose>
     1276          <xsl:when test="@format='counter'">
     1277            <xsl:value-of select="$tcnt" />
     1278          </xsl:when>
     1279          <xsl:when test="@format='title'">
     1280            <xsl:value-of select="$node/@title" />
     1281          </xsl:when>
     1282          <xsl:otherwise>
     1283            <xsl:value-of select="normalize-space(concat('Paragraph&#160;',substring-after($tcnt,'p.')))"/>
     1284          </xsl:otherwise>
     1285        </xsl:choose>
     1286      </fo:basic-link>
     1287    </xsl:when>
     1288
     1289    <!-- Comment links -->
     1290    <xsl:when test="$node/self::cref">
     1291      <fo:basic-link internal-destination="{$target}" xsl:use-attribute-sets="internal-link">
     1292        <xsl:variable name="name">
     1293          <xsl:for-each select="$node">
     1294            <xsl:call-template name="get-comment-name" />
     1295          </xsl:for-each>
     1296        </xsl:variable>
     1297        <xsl:choose>
     1298          <xsl:when test="@format='counter'">
     1299            <xsl:value-of select="$name" />
     1300          </xsl:when>
     1301          <xsl:when test="@format='title'">
     1302            <xsl:value-of select="$node/@title" />
     1303          </xsl:when>
     1304          <xsl:otherwise>
     1305            <xsl:value-of select="normalize-space(concat('Comment&#160;',$name))"/>
    12671306          </xsl:otherwise>
    12681307        </xsl:choose>
     
    13951434   
    13961435    <xsl:otherwise>
    1397       <xsl:message>xref to unknown element: <xsl:value-of select="name($node)"/></xsl:message>
     1436      <xsl:call-template name="error">
     1437        <xsl:with-param name="msg" select="concat('xref to unknown element: ',name($node))"/>
     1438      </xsl:call-template>
    13981439    </xsl:otherwise>
    13991440  </xsl:choose>
     
    15271568                    <xsl:for-each select="$rs2">
    15281569                      <xsl:sort select="substring-before(concat(@x:sec,'.'),'.')" data-type="number"/>
    1529                       <xsl:sort select="substring(@x:sec,1+string-length(substring-before(@x:sec,'.')))" data-type="number"/>
     1570                      <xsl:sort select="substring(@x:sec,2+string-length(substring-before(@x:sec,'.')))" data-type="number"/>
    15301571                      <xsl:if test="generate-id(.) = generate-id(key('index-xref-by-sec',concat(@target,'..',@x:sec)))">
    15311572                        <fo:block start-indent="2em" hyphenate="true">
     
    24072448  <xsl:if test="$xml2rfc-comments!='no'">
    24082449    <xsl:variable name="cid">
    2409       <xsl:choose>
    2410         <xsl:when test="@anchor">
    2411           <xsl:value-of select="@anchor"/>
    2412         </xsl:when>
    2413         <xsl:otherwise>
    2414           <xsl:value-of select="$anchor-prefix"/>
    2415           <xsl:text>.comment.</xsl:text>
    2416           <xsl:number count="cref[not(@anchor)]" level="any"/>
    2417         </xsl:otherwise>
    2418       </xsl:choose>
     2450      <xsl:call-template name="get-comment-name"/>
    24192451    </xsl:variable>
    24202452   
     
    24732505    <xsl:when test="$target">
    24742506      <fo:basic-link internal-destination="{$target/@anchor}" xsl:use-attribute-sets="internal-link">
     2507        <xsl:call-template name="copy-anchor"/>
    24752508        <xsl:apply-templates/>
    24762509      </fo:basic-link>
Note: See TracChangeset for help on using the changeset viewer.