ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilXML2FO Class Reference
+ Inheritance diagram for ilXML2FO:
+ Collaboration diagram for ilXML2FO:

Public Member Functions

 setXMLString ($a_xml)
 
 getXMLString ()
 
 setXSLTLocation ($xslt_location)
 
 getXSLTLocation ()
 
 getFOString ()
 
 setXSLTParams ($params)
 
 getXSLTParams ()
 
 transform ()
 
 __init ()
 

Data Fields

 $xslt = null
 
 $xml = null
 
 $fo_string = null
 
 $xslt_handler = null
 
 $xslt_args = null
 
 $xslt_params = null
 

Detailed Description

Definition at line 34 of file class.ilXML2FO.php.

Member Function Documentation

◆ __init()

ilXML2FO::__init ( )

Definition at line 99 of file class.ilXML2FO.php.

100 {
101
102 #domxml_open_mem($this->getXMLString(), DOMXML_LOAD_VALIDATING, $error);
103 #if($error)
104 #{
105 # var_dump("<pre>","XML ERROR: ".$error,htmlentities($this->getXMLString()),"<pre>");
106 #}
107
108 $this->xslt_handler = xslt_create();
109 $this->xslt_args = array('/_xml' => $this->getXMLString(),
110 '/_xsl' => file_get_contents($this->getXSLTLocation()));
111
112 return true;
113 }
xslt_create()

References getXMLString(), getXSLTLocation(), and xslt_create().

Referenced by transform().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getFOString()

ilXML2FO::getFOString ( )

Definition at line 60 of file class.ilXML2FO.php.

61 {
62 return $this->fo_string;
63 }

References $fo_string.

◆ getXMLString()

ilXML2FO::getXMLString ( )

Definition at line 48 of file class.ilXML2FO.php.

49 {
50 return $this->xml;
51 }

References $xml.

Referenced by __init().

+ Here is the caller graph for this function:

◆ getXSLTLocation()

ilXML2FO::getXSLTLocation ( )

Definition at line 56 of file class.ilXML2FO.php.

57 {
58 return $this->xslt;
59 }

References $xslt.

Referenced by __init().

+ Here is the caller graph for this function:

◆ getXSLTParams()

ilXML2FO::getXSLTParams ( )

Definition at line 68 of file class.ilXML2FO.php.

69 {
70 return $this->xslt_params;
71 }

References $xslt_params.

◆ setXMLString()

ilXML2FO::setXMLString (   $a_xml)

Definition at line 44 of file class.ilXML2FO.php.

45 {
46 $this->xml = $a_xml;
47 }

◆ setXSLTLocation()

ilXML2FO::setXSLTLocation (   $xslt_location)

Definition at line 52 of file class.ilXML2FO.php.

53 {
54 $this->xslt = $xslt_location;
55 }

Referenced by ilContentObject2FO\__construct().

+ Here is the caller graph for this function:

◆ setXSLTParams()

ilXML2FO::setXSLTParams (   $params)

Definition at line 64 of file class.ilXML2FO.php.

65 {
66 $this->xslt_params = $params;
67 }
$params
Definition: disable.php:11

References $params.

◆ transform()

ilXML2FO::transform ( )

Definition at line 72 of file class.ilXML2FO.php.

73 {
74 global $ilLog;
75
76 $this->__init();
77
78 $this->fo_string = @xslt_process(
79 $this->xslt_handler,
80 "arg:/_xml",
81 "arg:/_xsl",
82 null,
83 $this->xslt_args,
84 $this->xslt_params
85 );
86
87
88 if (strlen($error_msg = xslt_error($this->xslt_handler))) {
89 $ilLog->write("Error generating pdf: " . $error_msg);
90 return false;
91 }
92
93 xslt_free($this->xslt_handler);
94
95 return true;
96 }
xslt_error(&$proc)
xslt_free(&$proc)

References $ilLog, __init(), xslt_error(), and xslt_free().

+ Here is the call graph for this function:

Field Documentation

◆ $fo_string

ilXML2FO::$fo_string = null

Definition at line 38 of file class.ilXML2FO.php.

Referenced by getFOString().

◆ $xml

ilXML2FO::$xml = null

Definition at line 37 of file class.ilXML2FO.php.

Referenced by getXMLString().

◆ $xslt

ilXML2FO::$xslt = null

Definition at line 36 of file class.ilXML2FO.php.

Referenced by getXSLTLocation().

◆ $xslt_args

ilXML2FO::$xslt_args = null

Definition at line 41 of file class.ilXML2FO.php.

◆ $xslt_handler

ilXML2FO::$xslt_handler = null

Definition at line 40 of file class.ilXML2FO.php.

◆ $xslt_params

ilXML2FO::$xslt_params = null

Definition at line 42 of file class.ilXML2FO.php.

Referenced by getXSLTParams().


The documentation for this class was generated from the following file: