ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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 98 of file class.ilXML2FO.php.

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

Referenced by transform().

99  {
100 
101  #domxml_open_mem($this->getXMLString(), DOMXML_LOAD_VALIDATING, $error);
102  #if($error)
103  #{
104  # var_dump("<pre>","XML ERROR: ".$error,htmlentities($this->getXMLString()),"<pre>");
105  #}
106 
107  $this->xslt_handler = xslt_create();
108  $this->xslt_args = array('/_xml' => $this->getXMLString(),
109  '/_xsl' => file_get_contents($this->getXSLTLocation()));
110 
111  return true;
112  }
xslt_create()
Create styles array
The data for the language used.
+ 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.

References $fo_string.

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

◆ getXMLString()

ilXML2FO::getXMLString ( )

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

References $xml.

Referenced by __init().

49  {
50  return $this->xml;
51  }
+ Here is the caller graph for this function:

◆ getXSLTLocation()

ilXML2FO::getXSLTLocation ( )

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

References $xslt.

Referenced by __init().

57  {
58  return $this->xslt;
59  }
+ Here is the caller graph for this function:

◆ getXSLTParams()

ilXML2FO::getXSLTParams ( )

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

References $xslt_params.

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

◆ 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.

Referenced by ilContentObject2FO\__construct().

53  {
54  $this->xslt = $xslt_location;
55  }
+ Here is the caller graph for this function:

◆ setXSLTParams()

ilXML2FO::setXSLTParams (   $params)

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

References $params.

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

◆ transform()

ilXML2FO::transform ( )

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

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

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