Ignore:
Timestamp:
May 19, 2008, 6:58:01 AM (12 years ago)
Author:
julian.reschke@…
Message:

Update to latest version of rfc2629xslt.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • rfc2629xslt/rfc2629toFO.xslt

    r213 r246  
    4646<xsl:import href="rfc2629.xslt" />
    4747
    48 <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
    49 
    50 <xsl:attribute-set name="h1-inline">
     48<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
     49
     50<xsl:attribute-set name="base">
     51        <xsl:attribute name="font-family">serif</xsl:attribute>
     52        <xsl:attribute name="font-size">10pt</xsl:attribute>
     53</xsl:attribute-set>
     54
     55<xsl:attribute-set name="h1">
    5156        <xsl:attribute name="font-weight">bold</xsl:attribute>
    5257        <xsl:attribute name="font-size">14pt</xsl:attribute>
     
    5459        <xsl:attribute name="space-before">14pt</xsl:attribute>
    5560        <xsl:attribute name="space-after">7pt</xsl:attribute>
    56 </xsl:attribute-set>
    57 
    58 <xsl:attribute-set name="h1-new-page">
    59         <xsl:attribute name="font-weight">bold</xsl:attribute>
    60         <xsl:attribute name="font-size">14pt</xsl:attribute>
    61         <xsl:attribute name="keep-with-next">always</xsl:attribute>
    62         <xsl:attribute name="space-after">7pt</xsl:attribute>
    63   <xsl:attribute name="page-break-before">always</xsl:attribute>
    6461</xsl:attribute-set>
    6562
     
    8582</xsl:attribute-set>
    8683
    87 <!--<xsl:attribute-set name="p">
    88         <xsl:attribute name="margin-left">2em</xsl:attribute>
    89 </xsl:attribute-set>  -->
    90 
    91 <xsl:attribute-set name="internal-link">
    92   <xsl:attribute name="color">#000080</xsl:attribute>
    93 </xsl:attribute-set>
    94 
    9584<xsl:attribute-set name="external-link">
    9685  <xsl:attribute name="color">blue</xsl:attribute>
     
    9887</xsl:attribute-set>
    9988
     89<xsl:attribute-set name="index">
     90        <xsl:attribute name="font-size">9pt</xsl:attribute>
     91</xsl:attribute-set>
     92
     93<xsl:attribute-set name="internal-link">
     94  <xsl:attribute name="color">#000080</xsl:attribute>
     95</xsl:attribute-set>
     96
     97<xsl:attribute-set name="newpage">
     98  <xsl:attribute name="page-break-before">always</xsl:attribute>
     99</xsl:attribute-set>
     100
     101<xsl:attribute-set name="title">
     102  <xsl:attribute name="text-align">center</xsl:attribute>
     103  <xsl:attribute name="font-weight">bold</xsl:attribute>
     104  <xsl:attribute name="font-size">18pt</xsl:attribute>
     105  <xsl:attribute name="space-before">3em</xsl:attribute>
     106  <xsl:attribute name="space-after">3em</xsl:attribute>
     107</xsl:attribute-set>
     108
    100109<xsl:template match="abstract">
    101   <fo:block xsl:use-attribute-sets="h1-inline" id="{concat($anchor-prefix,'.abstract')}">Abstract</fo:block>
     110  <fo:block xsl:use-attribute-sets="h1" id="{concat($anchor-prefix,'.abstract')}">Abstract</fo:block>
    102111        <xsl:apply-templates />
    103112</xsl:template>
     
    302311  </xsl:if>
    303312     
    304   <fo:block text-align="center" font-weight="bold" font-size="18pt" space-before="3em" space-after="3em">
     313  <fo:block xsl:use-attribute-sets="title">
    305314    <xsl:apply-templates select="/rfc/front/title" mode="get-text-content" />
    306315    <xsl:if test="/rfc/@docName">
    307       <fo:block font-size="15pt"><xsl:value-of select="/rfc/@docName" /></fo:block>
     316      <fo:block font-size="80%"><xsl:value-of select="/rfc/@docName" /></fo:block>
    308317    </xsl:if>
    309318 </fo:block>
     
    633642<xsl:template match="note">
    634643  <xsl:variable name="num"><xsl:number count="note"/></xsl:variable>
    635   <fo:block xsl:use-attribute-sets="h1-inline" id="{concat($anchor-prefix,'.note.',$num)}"><xsl:value-of select="@title" /></fo:block>
     644  <fo:block xsl:use-attribute-sets="h1" id="{concat($anchor-prefix,'.note.',$num)}"><xsl:value-of select="@title" /></fo:block>
    636645        <xsl:apply-templates />
    637646</xsl:template>
     
    781790  <!-- insert pseudo section when needed -->
    782791  <xsl:if test="$name='1' and count(/*/back/references)!=1">
    783     <fo:block id="{$anchor-prefix}.references" xsl:use-attribute-sets="h1-inline">
     792    <fo:block id="{$anchor-prefix}.references" xsl:use-attribute-sets="h1">
    784793      <xsl:if test="$name='1'">
    785794        <xsl:attribute name="page-break-before">always</xsl:attribute>
    786         <xsl:attribute name="space-before">0pt</xsl:attribute>
    787795      </xsl:if>
    788796      <xsl:variable name="sectionNumber">
     
    798806  <xsl:choose>
    799807    <xsl:when test="count(/*/back/references)=1">
    800       <fo:block id="{$anchor-prefix}.references" xsl:use-attribute-sets="h1-inline">
    801         <xsl:attribute name="page-break-before">always</xsl:attribute>
    802         <xsl:attribute name="space-before">0pt</xsl:attribute>
     808      <fo:block id="{$anchor-prefix}.references" xsl:use-attribute-sets="h1 newpage">
    803809        <xsl:call-template name="get-section-number"/>&#160;&#160;
    804810        <xsl:choose>
     
    849855
    850856<xsl:template match="rfc">
    851         <fo:root font-family="serif" font-size="10pt">
     857        <fo:root xsl:use-attribute-sets="base">
    852858   
    853859    <!-- insert PDF information (XEP extension) -->
     
    910916        <xsl:call-template name="insertHeader" />
    911917        <xsl:call-template name="insertFooter" />
    912                         <fo:flow flow-name="xsl-region-body" font-size="9pt">
     918                        <fo:flow flow-name="xsl-region-body" xsl:use-attribute-sets="index">
    913919                                <xsl:call-template name="insertIndex" />   
    914920                          </fo:flow>
     
    943949<xsl:template match="section[count(ancestor::section) = 0 and @myns:notoclink]">
    944950
    945   <fo:block xsl:use-attribute-sets="h1-inline">
     951  <fo:block xsl:use-attribute-sets="h1">
    946952    <xsl:call-template name="section-maker" />
    947953  </fo:block>
     
    954960<xsl:template match="section[count(ancestor::section) = 0 and not(@myns:notoclink)]">
    955961
    956   <fo:block xsl:use-attribute-sets="h1-new-page">
     962  <fo:block xsl:use-attribute-sets="h1 newpage">
    957963    <xsl:call-template name="section-maker" />
    958964  </fo:block>
     
    13771383  </xsl:variable>
    13781384
    1379         <fo:block id="{$anchor-prefix}.authors" xsl:use-attribute-sets="h1-new-page">
     1385        <fo:block id="{$anchor-prefix}.authors" xsl:use-attribute-sets="h1 newpage">
    13801386    <xsl:if test="$sectionNumber != ''">
    13811387      <xsl:call-template name="emit-section-number">
     
    13951401<xsl:template name="insertIndex">
    13961402
    1397         <fo:block xsl:use-attribute-sets="h1-new-page" id="{$anchor-prefix}.index">
    1398     Index
     1403        <fo:block xsl:use-attribute-sets="h1 newpage" id="{$anchor-prefix}.index">
     1404    <xsl:text>Index</xsl:text>
    13991405  </fo:block>
    14001406
     
    15601566
    15611567<xsl:template match="/" mode="toc">
    1562         <fo:block xsl:use-attribute-sets="h1-new-page" id="{concat($anchor-prefix,'.toc')}">
    1563     <xsl:attribute name="page-break-before">always</xsl:attribute>
    1564     Table of Contents
     1568        <fo:block xsl:use-attribute-sets="h1 newpage" id="{concat($anchor-prefix,'.toc')}">
     1569    <xsl:text>Table of Contents</xsl:text>
    15651570  </fo:block>
    15661571
     
    23522357</xsl:template>
    23532358
     2359<!-- Superscripts -->
     2360<xsl:template match="x:sup">
     2361  <xsl:text>^</xsl:text> <!-- make this prettier -->
     2362  <xsl:apply-templates/>
     2363</xsl:template>
     2364
    23542365<!-- measuring lengths -->
    23552366<xsl:template match="x:length-of">
Note: See TracChangeset for help on using the changeset viewer.