~ubuntu-branches/ubuntu/breezy/koffice/breezy

« back to all changes in this revision

Viewing changes to filters/xsltfilter/export/xsl/kword/xslfo/kword2xslfo-table.xsl

  • Committer: Bazaar Package Importer
  • Author(s): Ben Burton
  • Date: 2004-05-09 11:33:00 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20040509113300-vfrdadqsvjfuhn3b
Tags: 1:1.3.1-1
* New upstream bugfix release.
* Built against newer imagemagick (closes: #246623).
* Made koffice-libs/kformula recommend/depend on latex-xft-fonts, which
  provides mathematical fonts that the formula editor can use.  Also
  patched the kformula part to make these fonts the default.
* Changed kword menu hint from "WordProcessors" to "Word processors"
  (closes: #246209).
* Spellchecker configuration is now fixed (closes: #221256, #227568).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0"  encoding="UTF-8"?>
 
2
 
 
3
<!--    
 
4
   This file is part of the KDE project
 
5
   Copyright (C) 2002 Robert JACOLIN <rjacolin@ifrance.com>
 
6
 
 
7
   This library is free software; you can redistribute it and/or
 
8
   modify it under the terms of the GNU Library General Public
 
9
   License as published by the Free Software Foundation; either
 
10
   version 2 of the License, or (at your option) any later version.
 
11
 
 
12
   This library is distributed in the hope that it will be useful,
 
13
   but WITHOUT ANY WARRANTY; without even the implied warranty of
 
14
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
15
   Library General Public License for more details.
 
16
 
 
17
   You should have received a copy of the GNU Library General Public License
 
18
   along with this library; see the file COPYING.LIB.  If not, write to
 
19
   the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 
20
   Boston, MA 02111-1307, USA.
 
21
 
 
22
   This stylesheet convert kword document in xsl:fo.
 
23
 
 
24
   -->
 
25
   
 
26
<xsl:stylesheet version = '1.0' 
 
27
     xmlns:xsl='http://www.w3.org/1999/XSL/Transform'
 
28
     xmlns:fo='http://www.w3.org/1999/XSL/Format'>
 
29
         
 
30
<!-- DOC. (DEFINITIONS, ...) -->
 
31
<xsl:template match="ANCHOR">
 
32
        <xsl:param name="rows">
 
33
                <xsl:value-of select="/DOC/FRAMESETS/FRAMESET[@grpMgr=$table]/@rows"/>
 
34
        </xsl:param>
 
35
        <xsl:param name="cols">
 
36
                <xsl:value-of select="/DOC/FRAMESETS/FRAMESET[@grpMgr=$table]/@cols"/>
 
37
        </xsl:param>
 
38
        <xsl:param name="table">param_table</xsl:param>
 
39
        <xsl:message>Construction de la table</xsl:message>
 
40
        
 
41
        <xsl:message><xsl:value-of select="$table"/>, Col <xsl:value-of select="$cols"/>, ligne <xsl:value-of select="$rows"/></xsl:message>
 
42
        <fo:table>
 
43
                <xsl:call-template name="ligne">
 
44
                        <xsl:with-param name="row">0</xsl:with-param>
 
45
                        <xsl:with-param name="rows">
 
46
                                <xsl:copy-of select="$rows"/>
 
47
                        </xsl:with-param>
 
48
                        <xsl:with-param name="cols">
 
49
                                <xsl:copy-of select="$cols"/>
 
50
                        </xsl:with-param>
 
51
                        <xsl:with-param name="table">
 
52
                                <xsl:copy-of select="$table"/>
 
53
                        </xsl:with-param>
 
54
                </xsl:call-template>
 
55
        </fo:table>
 
56
</xsl:template>
 
57
 
 
58
<xsl:template name="ligne">
 
59
        <xsl:param name="row">param_row</xsl:param>
 
60
        <xsl:param name="rows">param_rows</xsl:param>
 
61
        <xsl:param name="cols">param_cols</xsl:param>
 
62
        <xsl:param name="table">param_table</xsl:param>
 
63
 
 
64
        <xsl:message>Ligne : <xsl:value-of select="$row"/> / <xsl:value-of select="$rows"/></xsl:message>
 
65
        <fo:table-row>
 
66
                <xsl:call-template name="cellule">
 
67
                        <xsl:with-param  name="col">0</xsl:with-param>
 
68
                        <xsl:with-param name="cols">
 
69
                                <xsl:copy-of select="$cols"/>
 
70
                        </xsl:with-param>
 
71
                        <xsl:with-param name="row">
 
72
                                <xsl:copy-of select="$row"/>
 
73
                        </xsl:with-param>
 
74
                        <xsl:with-param name="rows">
 
75
                                <xsl:copy-of select="$rows"/>
 
76
                        </xsl:with-param>
 
77
                        <xsl:with-param name="table">
 
78
                                <xsl:copy-of select="$table"/>
 
79
                        </xsl:with-param>
 
80
                </xsl:call-template>
 
81
        </fo:table-row>
 
82
 
 
83
        <xsl:if test="$row &lt; $rows">
 
84
                <xsl:call-template name="ligne">
 
85
                        <xsl:with-param name="cols">
 
86
                                <xsl:copy-of select="$cols"/>
 
87
                        </xsl:with-param>
 
88
                        <xsl:with-param name="row">
 
89
                                <xsl:copy-of select="$row + 1"/>
 
90
                        </xsl:with-param>
 
91
                        <xsl:with-param name="rows">
 
92
                                <xsl:copy-of select="$rows"/>
 
93
                        </xsl:with-param>
 
94
                        <xsl:with-param name="table">
 
95
                                <xsl:copy-of select="$table"/>
 
96
                        </xsl:with-param>
 
97
                </xsl:call-template>
 
98
        </xsl:if>
 
99
        
 
100
</xsl:template>
 
101
 
 
102
<xsl:template name="cellule">
 
103
        <xsl:param name="row">param_row</xsl:param>
 
104
        <xsl:param name="rows">param_rows</xsl:param>
 
105
        <xsl:param name="col">param_col</xsl:param>
 
106
        <xsl:param name="cols">param_cols</xsl:param>
 
107
        <xsl:param name="table">param_table</xsl:param>
 
108
 
 
109
        <xsl:message>Col : <xsl:value-of select="$col"/> / <xsl:value-of select="$cols"/></xsl:message>
 
110
        <xsl:message>Para : <xsl:value-of select="/DOC/FRAMESETS/FRAMESET[@grpMgr=$table and @row=$row and @col=$col]"/></xsl:message>
 
111
        <fo:table-cell>
 
112
                        <xsl:call-template name="PARAS" select="/DOC/FRAMESETS/FRAMESET[@grpMgr=$table and @row=$row and @col=$col]/PARAGRAPH">
 
113
                        <xsl:with-param name="i">1</xsl:with-param>
 
114
                        <xsl:with-param name="debutListInitial">0</xsl:with-param>
 
115
                    <xsl:with-param name="nbItemInitial">0</xsl:with-param>
 
116
                </xsl:call-template>
 
117
        </fo:table-cell>
 
118
 
 
119
        <xsl:if test="$col &lt; $cols">
 
120
                <xsl:call-template name="cellule">
 
121
                        <xsl:with-param name="col">
 
122
                                <xsl:copy-of select="$col + 1"/>
 
123
                        </xsl:with-param>
 
124
                        <xsl:with-param name="cols">
 
125
                                <xsl:copy-of select="$cols"/>
 
126
                        </xsl:with-param>
 
127
                        <xsl:with-param name="row">
 
128
                                <xsl:copy-of select="$row"/>
 
129
                        </xsl:with-param>
 
130
                        <xsl:with-param name="rows">
 
131
                                <xsl:copy-of select="$rows"/>
 
132
                        </xsl:with-param>
 
133
                        <xsl:with-param name="table">
 
134
                                <xsl:copy-of select="$table"/>
 
135
                        </xsl:with-param>
 
136
                </xsl:call-template>
 
137
        </xsl:if>
 
138
</xsl:template>
 
139
        
 
140
</xsl:stylesheet>