ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
ilXML2FO Class Reference
+ Inheritance diagram for ilXML2FO:
+ Collaboration diagram for ilXML2FO:

Public Member Functions

 ilXML2FO ()
 
 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 102 of file class.ilXML2FO.php.

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 }
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 64 of file class.ilXML2FO.php.

65 {
66 return $this->fo_string;
67 }

References $fo_string.

◆ getXMLString()

ilXML2FO::getXMLString ( )

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

53 {
54 return $this->xml;
55 }

References $xml.

Referenced by __init().

+ Here is the caller graph for this function:

◆ getXSLTLocation()

ilXML2FO::getXSLTLocation ( )

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

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

References $xslt.

Referenced by __init().

+ Here is the caller graph for this function:

◆ getXSLTParams()

ilXML2FO::getXSLTParams ( )

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

73 {
74 return $this->xslt_params;
75 }

References $xslt_params.

◆ ilXML2FO()

ilXML2FO::ilXML2FO ( )

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

44 {
45
46 }

◆ setXMLString()

ilXML2FO::setXMLString (   $a_xml)

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

49 {
50 $this->xml = $a_xml;
51 }

◆ setXSLTLocation()

ilXML2FO::setXSLTLocation (   $xslt_location)

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

57 {
58 $this->xslt = $xslt_location;
59 }

Referenced by ilContentObject2FO\ilContentObject2FO().

+ Here is the caller graph for this function:

◆ setXSLTParams()

ilXML2FO::setXSLTParams (   $params)

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

69 {
70 $this->xslt_params = $params;
71 }
$params
Definition: example_049.php:96

References $params.

◆ transform()

ilXML2FO::transform ( )

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

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 }
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: