25 require_once(
"./classes/class.ilSaxParser.php");
50 $this->style_obj =& $a_style_obj;
63 xml_set_object($a_xml_parser,$this);
64 xml_set_element_handler($a_xml_parser,
'handlerBeginTag',
'handlerEndTag');
65 xml_set_character_data_handler($a_xml_parser,
'handlerCharacterData');
73 $this->styles = array();
75 $this->style_obj->setStyle($this->styles);
76 $this->style_obj->setCharacteristics($this->chars);
89 $this->current_tag = $a_attribs[
"Tag"];
90 $this->current_class = $a_attribs[
"Class"];
91 $this->current_type = $a_attribs[
"Type"];
92 if ($this->current_class ==
"PageTitle" && $this->current_type ==
"page_title" && $this->current_tag ==
"div")
94 $this->current_tag =
"h1";
96 if ($this->current_class ==
"Headline1" && $this->current_tag ==
"div")
98 $this->current_tag =
"h1";
99 $this->current_type =
"heading1";
101 if ($this->current_class ==
"Headline2" && $this->current_tag ==
"div")
103 $this->current_tag =
"h2";
104 $this->current_type =
"heading2";
106 if ($this->current_class ==
"Headline3" && $this->current_tag ==
"div")
108 $this->current_tag =
"h3";
109 $this->current_type =
"heading3";
111 $this->current_tags = array();
112 $this->chars[] = array(
"type" => $this->current_type,
113 "class" => $this->current_class);
116 case "StyleParameter":
117 $this->current_tags[] = array(
118 "tag" => $this->current_tag,
119 "class" => $this->current_class,
120 "parameter" => $a_attribs[
"Name"],
121 "type" => $this->current_type,
122 "value" => $a_attribs[
"Value"]);
126 $this->style_obj->addColor($a_attribs[
"Name"], $a_attribs[
"Code"]);
129 case "StyleTemplate":
130 $this->cur_template = array(
"type" => $a_attribs[
"Type"],
131 "name" => $a_attribs[
"Name"]);
132 $this->cur_template_classes = array();
135 case "StyleTemplateClass":
136 $this->cur_template_classes[$a_attribs[
"ClassType"]] =
153 $this->style_obj->setTitle($this->cdata);
157 $this->style_obj->setDescription($this->cdata);
161 $this->styles[] = $this->current_tags;
164 case "StyleTemplate":
165 $this->style_obj->addTemplate($this->cur_template[
"type"],
166 $this->cur_template[
"name"], $this->cur_template_classes);
181 $a_data = str_replace(
"<",
"<",$a_data);
182 $a_data = str_replace(
">",
">",$a_data);
185 $a_data = preg_replace(
"/\n/",
"",$a_data);
186 $a_data = preg_replace(
"/\t+/",
"",$a_data);
189 $this->cdata .= $a_data;