1
<?xml version="1.0" encoding="UTF-8"?>
4
This file is part of the KDE project
5
Copyright (C) 2002 Robert JACOLIN <rjacolin@ifrance.com>
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.
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.
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.
22
This stylesheet convert kword document in xsl:fo.
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'>
30
<!-- DOC. (DEFINITIONS, ...) -->
31
<xsl:template match="ANCHOR">
32
<xsl:param name="rows">
33
<xsl:value-of select="/DOC/FRAMESETS/FRAMESET[@grpMgr=$table]/@rows"/>
35
<xsl:param name="cols">
36
<xsl:value-of select="/DOC/FRAMESETS/FRAMESET[@grpMgr=$table]/@cols"/>
38
<xsl:param name="table">param_table</xsl:param>
39
<xsl:message>Construction de la table</xsl:message>
41
<xsl:message><xsl:value-of select="$table"/>, Col <xsl:value-of select="$cols"/>, ligne <xsl:value-of select="$rows"/></xsl:message>
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"/>
48
<xsl:with-param name="cols">
49
<xsl:copy-of select="$cols"/>
51
<xsl:with-param name="table">
52
<xsl:copy-of select="$table"/>
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>
64
<xsl:message>Ligne : <xsl:value-of select="$row"/> / <xsl:value-of select="$rows"/></xsl:message>
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"/>
71
<xsl:with-param name="row">
72
<xsl:copy-of select="$row"/>
74
<xsl:with-param name="rows">
75
<xsl:copy-of select="$rows"/>
77
<xsl:with-param name="table">
78
<xsl:copy-of select="$table"/>
83
<xsl:if test="$row < $rows">
84
<xsl:call-template name="ligne">
85
<xsl:with-param name="cols">
86
<xsl:copy-of select="$cols"/>
88
<xsl:with-param name="row">
89
<xsl:copy-of select="$row + 1"/>
91
<xsl:with-param name="rows">
92
<xsl:copy-of select="$rows"/>
94
<xsl:with-param name="table">
95
<xsl:copy-of select="$table"/>
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>
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>
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>
119
<xsl:if test="$col < $cols">
120
<xsl:call-template name="cellule">
121
<xsl:with-param name="col">
122
<xsl:copy-of select="$col + 1"/>
124
<xsl:with-param name="cols">
125
<xsl:copy-of select="$cols"/>
127
<xsl:with-param name="row">
128
<xsl:copy-of select="$row"/>
130
<xsl:with-param name="rows">
131
<xsl:copy-of select="$rows"/>
133
<xsl:with-param name="table">
134
<xsl:copy-of select="$table"/>