Debian Codegraph @

Templates/fastqc2fo.xsl

raw symbols SCIP
1 <?xml version="1.0"?>
2 <xsl:stylesheet
3 version="1.0"
4 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
5 xmlns:fo="http://www.w3.org/1999/XSL/Format"
6 xmlns:fox="http://xml.apache.org/fop/extensions">
7
8 <xsl:template match="html">
9 <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"
10 xmlns:fox="http://xml.apache.org/fop/extensions">
11
12 <fo:layout-master-set>
13 <fo:simple-page-master master-name="page-layout">
14 <fo:region-body margin="2.5cm" region-name="body"/>
15 </fo:simple-page-master>
16 </fo:layout-master-set>
17
18 <fo:page-sequence master-reference="page-layout">
19
20
21
22 <xsl:apply-templates select="body"/>
23 </fo:page-sequence>
24 </fo:root>
25 </xsl:template>
26
27
28 <xsl:template match="b">
29 <fo:inline font-weight="bold">
30 <xsl:apply-templates select="*|text()"/>
31 </fo:inline>
32 </xsl:template>
33
34
35
36
37 <xsl:template match="body">
38
39 <fo:flow flow-name="body">
40 <fo:block font-size="48pt" text-align="center">
41 FASTQC-Report
42 <fo:inline wrap-option="no-wrap"/>
43 </fo:block>
44
45 <xsl:apply-templates select="//div[@class='module']"/>
46
47 </fo:flow>
48 </xsl:template>
49
50 <xsl:template match="div[@class='module']">
51 <fo:block text-align="center" page-break-before="always" font-size="48pt">
52 <xsl:value-of select="h2"/>
53 </fo:block>
54 <xsl:apply-templates select="p/img|table"/>
55
56 </xsl:template>
57
58 <xsl:template match="img">
59
60 <xsl:if test="starts-with(@src,'Images/')">
61 <fo:block space-after="12pt" width="18cm" >
62 <fo:external-graphic src="{@src}" content-width="19cm" content-height="12.4cm" scaling="uniform" >
63 </fo:external-graphic>
64 </fo:block>
65 </xsl:if>
66 </xsl:template>
67
68
69
70 <xsl:template match="table">
71 <fo:table >
72 <xsl:for-each select="thead/tr/th">
73 <fo:table-column column-width="200pt"/>
74 </xsl:for-each>
75 <fo:table-body>
76 <xsl:apply-templates select="tbody/tr"/>
77 </fo:table-body>
78 </fo:table>
79 </xsl:template>
80
81 <xsl:template match="tr">
82 <fo:table-row>
83 <xsl:apply-templates select="td"/>
84 </fo:table-row>
85 </xsl:template>
86
87 <xsl:template match="td">
88 <fo:table-cell>
89 <fo:block>
90 <xsl:apply-templates select="*|text()"/>
91 </fo:block>
92 </fo:table-cell>
93 </xsl:template>
94
95
96 </xsl:stylesheet>