2000-06-23 15:16:43 +02:00
|
|
|
<?xml version="1.0"?>
|
2000-08-11 19:48:21 +02:00
|
|
|
|
2000-06-23 15:16:43 +02:00
|
|
|
<!-- XSLT stylesheet to convert the Fop documentation collected in one xml file into a fo file
|
|
|
|
for use in FOP
|
|
|
|
|
|
|
|
TBD: - The faq doesn't show in the content
|
|
|
|
- check why margin-bottom on the page with properties is too large
|
|
|
|
- check why keep-next not only doesn't work, but leads to repeating already printed lines
|
|
|
|
- make lines containing only code look nicer (smaller line height)
|
2000-07-21 00:18:08 +02:00
|
|
|
- replace bullets in ordered lists with numbers
|
2000-06-23 15:16:43 +02:00
|
|
|
- correct the hack replacing nbsp with '-'
|
|
|
|
- handle the links correctly which have been external in the html doc and are now internal
|
|
|
|
|
|
|
|
-->
|
|
|
|
|
|
|
|
<xsl:stylesheet
|
|
|
|
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
|
|
|
|
xmlns:fo="http://www.w3.org/1999/XSL/Format"
|
|
|
|
>
|
|
|
|
|
|
|
|
<xsl:template match ="/">
|
|
|
|
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
|
|
|
|
|
|
|
|
<!-- defines page layout -->
|
|
|
|
<fo:layout-master-set>
|
|
|
|
|
2000-11-12 00:27:14 +01:00
|
|
|
<fo:simple-page-master master-name="simple"
|
2000-08-11 19:48:21 +02:00
|
|
|
page-height="29.7cm"
|
|
|
|
page-width="21cm"
|
2000-06-23 15:16:43 +02:00
|
|
|
margin-top="1.5cm"
|
|
|
|
margin-bottom="2cm"
|
|
|
|
margin-left="2.5cm"
|
|
|
|
margin-right="2.5cm">
|
|
|
|
<fo:region-body margin-top="3cm"/>
|
2000-08-11 19:48:21 +02:00
|
|
|
<fo:region-before extent="1.5cm"/>
|
2000-06-23 15:16:43 +02:00
|
|
|
<fo:region-after extent="1.5cm"/>
|
|
|
|
</fo:simple-page-master>
|
2000-07-19 07:20:50 +02:00
|
|
|
</fo:layout-master-set>
|
2000-06-23 15:16:43 +02:00
|
|
|
|
2000-11-12 00:27:14 +01:00
|
|
|
<fo:page-sequence master-name="simple">
|
2000-08-03 00:48:07 +02:00
|
|
|
<fo:static-content flow-name="xsl-region-before">
|
2000-06-23 15:16:43 +02:00
|
|
|
<fo:block text-align="end"
|
|
|
|
font-size="10pt"
|
|
|
|
font-family="serif"
|
|
|
|
line-height="14pt" >
|
|
|
|
FOP documentation - p. <fo:page-number/>
|
|
|
|
</fo:block>
|
|
|
|
</fo:static-content>
|
|
|
|
|
2000-08-03 00:48:07 +02:00
|
|
|
<fo:flow flow-name="xsl-region-body">
|
2000-06-23 15:16:43 +02:00
|
|
|
|
|
|
|
|
|
|
|
<fo:block font-size="18pt"
|
|
|
|
font-family="sans-serif"
|
|
|
|
line-height="24pt"
|
|
|
|
space-after.optimum="15pt"
|
|
|
|
background-color="blue"
|
|
|
|
color="white"
|
2000-08-02 00:30:35 +02:00
|
|
|
text-align="center">
|
2000-06-23 15:16:43 +02:00
|
|
|
FOP - an xsl:fo renderer
|
|
|
|
</fo:block>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- generates table of contents and puts it into a table -->
|
|
|
|
|
|
|
|
<fo:block font-size="14pt"
|
|
|
|
font-family="sans-serif"
|
|
|
|
line-height="18pt"
|
|
|
|
space-after.optimum="10pt"
|
|
|
|
font-weight="bold"
|
|
|
|
start-indent="15pt">
|
|
|
|
Content
|
|
|
|
</fo:block>
|
|
|
|
|
|
|
|
<fo:table>
|
|
|
|
<fo:table-column column-width="1cm"/>
|
|
|
|
<fo:table-column column-width="15cm"/>
|
|
|
|
<fo:table-body font-size="12pt"
|
|
|
|
line-height="16pt"
|
|
|
|
font-family="sans-serif">
|
2000-11-12 00:27:14 +01:00
|
|
|
<xsl:for-each select="//s1">
|
2000-06-23 15:16:43 +02:00
|
|
|
<fo:table-row>
|
|
|
|
<fo:table-cell>
|
|
|
|
<fo:block text-align="end" >
|
|
|
|
<xsl:number value="position()" format="1"/>)
|
|
|
|
</fo:block>
|
|
|
|
</fo:table-cell>
|
|
|
|
<fo:table-cell>
|
|
|
|
<fo:block text-align="start" >
|
2000-11-12 00:27:14 +01:00
|
|
|
<fo:basic-link color="blue">
|
2000-06-23 15:16:43 +02:00
|
|
|
<xsl:attribute name="internal-destination">
|
|
|
|
<xsl:value-of select="translate(.,' ),-.(','____')"/>
|
|
|
|
</xsl:attribute>
|
|
|
|
<xsl:value-of select="@title"/>
|
2000-11-12 00:27:14 +01:00
|
|
|
</fo:basic-link>
|
2000-06-23 15:16:43 +02:00
|
|
|
</fo:block>
|
|
|
|
</fo:table-cell>
|
|
|
|
</fo:table-row>
|
|
|
|
</xsl:for-each>
|
|
|
|
</fo:table-body>
|
|
|
|
</fo:table>
|
|
|
|
|
|
|
|
|
|
|
|
<xsl:apply-templates select="documentation"/>
|
|
|
|
</fo:flow>
|
|
|
|
</fo:page-sequence>
|
|
|
|
</fo:root>
|
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
<!-- s1 -->
|
|
|
|
<xsl:template match ="s1">
|
|
|
|
<fo:block font-size="18pt"
|
|
|
|
font-family="sans-serif"
|
|
|
|
line-height="24pt"
|
|
|
|
space-before.optimum="15pt"
|
|
|
|
space-after.optimum="15pt"
|
|
|
|
background-color="blue"
|
|
|
|
color="white"
|
2000-08-02 00:30:35 +02:00
|
|
|
text-align="center"
|
2000-06-23 15:16:43 +02:00
|
|
|
>
|
|
|
|
<xsl:attribute name="id">
|
|
|
|
<xsl:value-of select="translate(.,' ),-.(','____')"/>
|
|
|
|
</xsl:attribute>
|
|
|
|
<xsl:value-of select="@title"/>
|
|
|
|
</fo:block>
|
|
|
|
<xsl:apply-templates/>
|
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
<!-- s2 -->
|
|
|
|
<xsl:template match ="s2">
|
|
|
|
<fo:block font-size="16pt"
|
|
|
|
font-family="sans-serif"
|
|
|
|
line-height="20pt"
|
|
|
|
space-before.optimum="15pt"
|
|
|
|
space-after.optimum="12pt"
|
2000-08-02 00:30:35 +02:00
|
|
|
text-align="center"
|
2000-06-23 15:16:43 +02:00
|
|
|
padding-top="3pt"
|
|
|
|
>
|
|
|
|
<xsl:value-of select="@title"/>
|
|
|
|
</fo:block>
|
|
|
|
<xsl:apply-templates/>
|
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
<!-- s3 -->
|
|
|
|
<xsl:template match ="s3">
|
|
|
|
<fo:block font-size="14pt"
|
|
|
|
font-family="sans-serif"
|
|
|
|
line-height="18pt"
|
|
|
|
space-before.optimum="10pt"
|
|
|
|
space-after.optimum="9pt"
|
2000-11-12 00:27:14 +01:00
|
|
|
text-align="start"
|
2000-06-23 15:16:43 +02:00
|
|
|
padding-top="3pt">
|
|
|
|
<xsl:value-of select="@title"/>
|
|
|
|
</fo:block>
|
|
|
|
<xsl:apply-templates/>
|
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
<!-- p [not(code)] -->
|
|
|
|
<xsl:template match ="p">
|
|
|
|
<fo:block font-size="11pt"
|
|
|
|
font-family="sans-serif"
|
|
|
|
line-height="13pt"
|
|
|
|
space-after.optimum="3pt"
|
|
|
|
space-before.optimum="3pt"
|
2000-08-02 00:30:35 +02:00
|
|
|
text-align="justify">
|
2000-06-23 15:16:43 +02:00
|
|
|
<xsl:apply-templates/>
|
|
|
|
</fo:block>
|
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
<!-- p + code
|
|
|
|
<xsl:template match ="p[code]">
|
|
|
|
<fo:block font-size="11pt"
|
|
|
|
font-family="sans-serif"
|
|
|
|
line-height="11pt"
|
|
|
|
space-after.optimum="0pt"
|
|
|
|
space-before.optimum="0pt"
|
|
|
|
text-align="start">
|
|
|
|
<xsl:apply-templates/>
|
|
|
|
</fo:block>
|
|
|
|
</xsl:template>
|
|
|
|
-->
|
|
|
|
|
|
|
|
<!-- faqs -->
|
|
|
|
<xsl:template match ="faqs">
|
|
|
|
<fo:block font-size="18pt"
|
|
|
|
font-family="sans-serif"
|
|
|
|
line-height="24pt"
|
|
|
|
space-before.optimum="15pt"
|
|
|
|
space-after.optimum="15pt"
|
|
|
|
background-color="blue"
|
|
|
|
color="white"
|
2000-08-02 00:30:35 +02:00
|
|
|
text-align="center"
|
2000-06-23 15:16:43 +02:00
|
|
|
>
|
|
|
|
<xsl:attribute name="id">
|
|
|
|
<xsl:value-of select="translate(.,' ),-.(','____')"/>
|
|
|
|
</xsl:attribute>
|
|
|
|
<xsl:value-of select="@title"/>
|
|
|
|
</fo:block>
|
|
|
|
<xsl:apply-templates/>
|
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- faq -->
|
|
|
|
<xsl:template match ="faq">
|
|
|
|
<xsl:apply-templates/>
|
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
<!-- q in faq -->
|
|
|
|
<xsl:template match ="q">
|
|
|
|
<fo:block font-size="11pt"
|
|
|
|
font-family="sans-serif"
|
|
|
|
line-height="13pt"
|
|
|
|
space-after.optimum="3pt"
|
|
|
|
space-before.optimum="3pt"
|
2000-08-02 00:30:35 +02:00
|
|
|
text-align="justify">
|
2000-06-23 15:16:43 +02:00
|
|
|
<xsl:apply-templates/>
|
|
|
|
</fo:block>
|
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
<!-- a in faq -->
|
|
|
|
<xsl:template match ="a">
|
|
|
|
<xsl:apply-templates/>
|
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- jump (links) -->
|
|
|
|
<xsl:template match ="*/jump">
|
2000-11-12 00:27:14 +01:00
|
|
|
<fo:basic-link color="blue" external-destination="{@href}">
|
2000-06-23 15:16:43 +02:00
|
|
|
<xsl:apply-templates/>
|
2000-11-12 00:27:14 +01:00
|
|
|
</fo:basic-link>
|
2000-06-23 15:16:43 +02:00
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- code -->
|
|
|
|
<xsl:template match ="*/code">
|
2000-08-11 19:48:21 +02:00
|
|
|
<fo:inline font-size="10pt"
|
2000-06-23 15:16:43 +02:00
|
|
|
font-family="Courier">
|
|
|
|
<xsl:apply-templates/>
|
2000-08-11 19:48:21 +02:00
|
|
|
</fo:inline>
|
2000-06-23 15:16:43 +02:00
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ul (unordered list) -->
|
|
|
|
<xsl:template match ="ul">
|
|
|
|
<fo:list-block start-indent="1cm"
|
|
|
|
provisional-distance-between-starts="12pt"
|
|
|
|
font-family="sans-serif"
|
|
|
|
font-size="11pt"
|
|
|
|
line-height="11pt">
|
|
|
|
<xsl:apply-templates/>
|
|
|
|
</fo:list-block>
|
|
|
|
</xsl:template>
|
|
|
|
|
2000-07-21 00:18:08 +02:00
|
|
|
|
|
|
|
<!-- ol (ordered list) -->
|
|
|
|
<xsl:template match ="ol">
|
|
|
|
<fo:list-block start-indent="1cm"
|
|
|
|
provisional-distance-between-starts="12pt"
|
|
|
|
font-family="sans-serif"
|
|
|
|
font-size="11pt"
|
|
|
|
line-height="11pt">
|
|
|
|
<xsl:apply-templates/>
|
|
|
|
</fo:list-block>
|
2000-06-23 15:16:43 +02:00
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
|
2000-07-21 00:18:08 +02:00
|
|
|
<!-- li (list item) in unordered list -->
|
|
|
|
<xsl:template match ="ul/li">
|
|
|
|
<fo:list-item>
|
2001-02-23 07:00:29 +01:00
|
|
|
<fo:list-item-label end-indent="label-end()">
|
2000-08-11 19:48:21 +02:00
|
|
|
<fo:block><fo:inline font-family="Symbol">·</fo:inline></fo:block>
|
2000-07-21 00:18:08 +02:00
|
|
|
</fo:list-item-label>
|
2001-02-23 07:00:29 +01:00
|
|
|
<fo:list-item-body start-indent="body-start()">
|
2000-07-21 00:18:08 +02:00
|
|
|
<fo:block space-after.optimum="4pt"
|
2000-08-02 00:30:35 +02:00
|
|
|
text-align="justify"
|
2000-07-21 00:18:08 +02:00
|
|
|
padding-top="3pt">
|
|
|
|
<xsl:apply-templates/>
|
|
|
|
</fo:block>
|
|
|
|
</fo:list-item-body>
|
|
|
|
</fo:list-item>
|
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- li (list item) in ordered list -->
|
|
|
|
<xsl:template match ="ol/li">
|
|
|
|
<fo:list-item>
|
2001-02-23 07:00:29 +01:00
|
|
|
<fo:list-item-label end-indent="label-end()">
|
2000-07-21 00:18:08 +02:00
|
|
|
<fo:block>
|
|
|
|
<xsl:number level="multiple" count="li" format="1"/>)
|
|
|
|
</fo:block>
|
|
|
|
</fo:list-item-label>
|
2001-02-23 07:00:29 +01:00
|
|
|
<fo:list-item-body start-indent="body-start()">
|
2000-07-21 00:18:08 +02:00
|
|
|
<fo:block space-after.optimum="4pt"
|
2000-08-02 00:30:35 +02:00
|
|
|
text-align="justify"
|
2000-07-21 00:18:08 +02:00
|
|
|
padding-top="3pt">
|
|
|
|
<xsl:apply-templates/>
|
|
|
|
</fo:block>
|
|
|
|
</fo:list-item-body>
|
|
|
|
</fo:list-item>
|
|
|
|
</xsl:template>
|
|
|
|
|
2000-06-23 15:16:43 +02:00
|
|
|
<!-- end body -->
|
|
|
|
|
|
|
|
</xsl:stylesheet>
|