ILIAS
release_5-0 Revision 5.0.0-1144-gc4397b1f870
◀ ilDoc Overview
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
+
Data Fields
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Variables
$
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
+
Files
File List
+
Globals
+
All
$
(
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
+
Functions
_
a
b
c
d
e
f
g
h
i
k
l
m
o
p
r
s
t
u
v
w
x
+
Variables
$
(
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Modules
Pages
class.ilXML2FO.php
Go to the documentation of this file.
1
<?php
2
/*
3
+-----------------------------------------------------------------------------+
4
| ILIAS open source |
5
+-----------------------------------------------------------------------------+
6
| Copyright (c) 1998-2001 ILIAS open source, University of Cologne |
7
| |
8
| This program is free software; you can redistribute it and/or |
9
| modify it under the terms of the GNU General Public License |
10
| as published by the Free Software Foundation; either version 2 |
11
| of the License, or (at your option) any later version. |
12
| |
13
| This program is distributed in the hope that it will be useful, |
14
| but WITHOUT ANY WARRANTY; without even the implied warranty of |
15
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16
| GNU General Public License for more details. |
17
| |
18
| You should have received a copy of the GNU General Public License |
19
| along with this program; if not, write to the Free Software |
20
| Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
21
+-----------------------------------------------------------------------------+
22
*/
23
24
34
class
ilXML2FO
35
{
36
var
$xslt
= null;
37
var
$xml
= null;
38
var
$fo_string
= null;
39
40
var
$xslt_handler
= null;
41
var
$xslt_args
= null;
42
var
$xslt_params
= null;
43
function
ilXML2FO
()
44
{
45
46
}
47
48
function
setXMLString
($a_xml)
49
{
50
$this->xml = $a_xml;
51
}
52
function
getXMLString
()
53
{
54
return
$this->xml
;
55
}
56
function
setXSLTLocation
($xslt_location)
57
{
58
$this->xslt = $xslt_location;
59
}
60
function
getXSLTLocation
()
61
{
62
return
$this->xslt
;
63
}
64
function
getFOString
()
65
{
66
return
$this->fo_string
;
67
}
68
function
setXSLTParams
($params)
69
{
70
$this->xslt_params = $params;
71
}
72
function
getXSLTParams
()
73
{
74
return
$this->xslt_params
;
75
}
76
function
transform
()
77
{
78
global
$ilLog
;
79
80
$this->
__init
();
81
82
$this->fo_string = @xslt_process($this->xslt_handler,
83
"arg:/_xml"
,
84
"arg:/_xsl"
,
85
null,
86
$this->xslt_args,
87
$this->xslt_params);
88
89
90
if
(strlen($error_msg =
xslt_error
($this->xslt_handler)))
91
{
92
$ilLog->write(
"Error generating pdf: "
.$error_msg);
93
return
false
;
94
}
95
96
xslt_free
($this->xslt_handler);
97
98
return
true
;
99
}
100
101
// Private
102
function
__init
()
103
{
104
105
#domxml_open_mem($this->getXMLString(), DOMXML_LOAD_VALIDATING, $error);
106
#if($error)
107
#{
108
# var_dump("<pre>","XML ERROR: ".$error,htmlentities($this->getXMLString()),"<pre>");
109
#}
110
111
$this->xslt_handler =
xslt_create
();
112
$this->xslt_args = array(
'/_xml'
=> $this->
getXMLString
(),
113
'/_xsl'
=> file_get_contents($this->
getXSLTLocation
()));
114
115
return
true
;
116
}
117
118
119
120
121
}
122
?>
xslt_create
xslt_create()
Definition:
inc.xsl5compliance.php:24
ilXML2FO\$xslt_params
$xslt_params
Definition:
class.ilXML2FO.php:42
ilXML2FO\setXMLString
setXMLString($a_xml)
Definition:
class.ilXML2FO.php:48
xslt_free
xslt_free(&$proc)
Definition:
inc.xsl5compliance.php:76
ilXML2FO\$xml
$xml
Definition:
class.ilXML2FO.php:37
ilXML2FO\ilXML2FO
ilXML2FO()
Definition:
class.ilXML2FO.php:43
ilXML2FO\setXSLTLocation
setXSLTLocation($xslt_location)
Definition:
class.ilXML2FO.php:56
xslt_error
xslt_error(&$proc)
Definition:
inc.xsl5compliance.php:82
ilXML2FO
Definition:
class.ilXML2FO.php:34
ilXML2FO\getFOString
getFOString()
Definition:
class.ilXML2FO.php:64
ilXML2FO\$fo_string
$fo_string
Definition:
class.ilXML2FO.php:38
ilXML2FO\$xslt_handler
$xslt_handler
Definition:
class.ilXML2FO.php:40
$ilLog
$ilLog
Definition:
inc.setup_header.php:132
ilXML2FO\getXSLTLocation
getXSLTLocation()
Definition:
class.ilXML2FO.php:60
ilXML2FO\setXSLTParams
setXSLTParams($params)
Definition:
class.ilXML2FO.php:68
ilXML2FO\__init
__init()
Definition:
class.ilXML2FO.php:102
ilXML2FO\transform
transform()
Definition:
class.ilXML2FO.php:76
ilXML2FO\$xslt
$xslt
Definition:
class.ilXML2FO.php:36
ilXML2FO\getXSLTParams
getXSLTParams()
Definition:
class.ilXML2FO.php:72
ilXML2FO\getXMLString
getXMLString()
Definition:
class.ilXML2FO.php:52
ilXML2FO\$xslt_args
$xslt_args
Definition:
class.ilXML2FO.php:41
Services
Transformation
classes
class.ilXML2FO.php
Generated on Mon Apr 7 2025 19:00:58 for ILIAS by
1.8.13 (using
Doxyfile
)