Changeset 246 for rfc2629xslt/rfc2629toFO.xslt
- Timestamp:
- 19/05/08 13:58:01 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
rfc2629xslt/rfc2629toFO.xslt
r213 r246 46 46 <xsl:import href="rfc2629.xslt" /> 47 47 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"> 51 56 <xsl:attribute name="font-weight">bold</xsl:attribute> 52 57 <xsl:attribute name="font-size">14pt</xsl:attribute> … … 54 59 <xsl:attribute name="space-before">14pt</xsl:attribute> 55 60 <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>64 61 </xsl:attribute-set> 65 62 … … 85 82 </xsl:attribute-set> 86 83 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 95 84 <xsl:attribute-set name="external-link"> 96 85 <xsl:attribute name="color">blue</xsl:attribute> … … 98 87 </xsl:attribute-set> 99 88 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 100 109 <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> 102 111 <xsl:apply-templates /> 103 112 </xsl:template> … … 302 311 </xsl:if> 303 312 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"> 305 314 <xsl:apply-templates select="/rfc/front/title" mode="get-text-content" /> 306 315 <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> 308 317 </xsl:if> 309 318 </fo:block> … … 633 642 <xsl:template match="note"> 634 643 <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> 636 645 <xsl:apply-templates /> 637 646 </xsl:template> … … 781 790 <!-- insert pseudo section when needed --> 782 791 <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"> 784 793 <xsl:if test="$name='1'"> 785 794 <xsl:attribute name="page-break-before">always</xsl:attribute> 786 <xsl:attribute name="space-before">0pt</xsl:attribute>787 795 </xsl:if> 788 796 <xsl:variable name="sectionNumber"> … … 798 806 <xsl:choose> 799 807 <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"> 803 809 <xsl:call-template name="get-section-number"/>   804 810 <xsl:choose> … … 849 855 850 856 <xsl:template match="rfc"> 851 <fo:root font-family="serif" font-size="10pt">857 <fo:root xsl:use-attribute-sets="base"> 852 858 853 859 <!-- insert PDF information (XEP extension) --> … … 910 916 <xsl:call-template name="insertHeader" /> 911 917 <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"> 913 919 <xsl:call-template name="insertIndex" /> 914 920 </fo:flow> … … 943 949 <xsl:template match="section[count(ancestor::section) = 0 and @myns:notoclink]"> 944 950 945 <fo:block xsl:use-attribute-sets="h1 -inline">951 <fo:block xsl:use-attribute-sets="h1"> 946 952 <xsl:call-template name="section-maker" /> 947 953 </fo:block> … … 954 960 <xsl:template match="section[count(ancestor::section) = 0 and not(@myns:notoclink)]"> 955 961 956 <fo:block xsl:use-attribute-sets="h1 -new-page">962 <fo:block xsl:use-attribute-sets="h1 newpage"> 957 963 <xsl:call-template name="section-maker" /> 958 964 </fo:block> … … 1377 1383 </xsl:variable> 1378 1384 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"> 1380 1386 <xsl:if test="$sectionNumber != ''"> 1381 1387 <xsl:call-template name="emit-section-number"> … … 1395 1401 <xsl:template name="insertIndex"> 1396 1402 1397 <fo:block xsl:use-attribute-sets="h1 -new-page" id="{$anchor-prefix}.index">1398 Index1403 <fo:block xsl:use-attribute-sets="h1 newpage" id="{$anchor-prefix}.index"> 1404 <xsl:text>Index</xsl:text> 1399 1405 </fo:block> 1400 1406 … … 1560 1566 1561 1567 <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> 1565 1570 </fo:block> 1566 1571 … … 2352 2357 </xsl:template> 2353 2358 2359 <!-- Superscripts --> 2360 <xsl:template match="x:sup"> 2361 <xsl:text>^</xsl:text> <!-- make this prettier --> 2362 <xsl:apply-templates/> 2363 </xsl:template> 2364 2354 2365 <!-- measuring lengths --> 2355 2366 <xsl:template match="x:length-of">
Note: See TracChangeset
for help on using the changeset viewer.