3 /* the actual text container..
5 does a quick bit of parsing to see if it a {template}var ..
8 class XML_SvgToPDFAlt_Tspan extends XML_SvgToPDFAlt_Base {
10 function fromNode($node) {
11 parent::fromNode($node);
12 if (isset($this->x)) {
15 if (isset($this->y)) {
18 static $trans = false;
20 $trans = array_flip(get_html_translation_table(HTML_ENTITIES));
22 if (@$this->content) {
23 if (strpos($this->content,'&') !== false) {
24 $this->content = strtr($this->content, $trans);
25 $this->content = str_replace(''',"'",$this->content);
27 $this->content = preg_replace_callback(
34 if (@$node->language) {
35 // todo - other conversions....
37 //$this->content = mb_convert_encoding($this->content,'BIG-5','UTF-8');
42 if (false === strpos($this->content,'{')) {
45 preg_match_all('/\{([a-z0-9_.]+(\(\))?)\}/i',$this->content,$matches);
46 //echo "<PRE>"; print_r($matches);
47 //if (false !== strpos($this->content,'(')) {
49 // echo "<PRE>";print_R($matches);
53 $this->args = $matches[1];
54 foreach($this->args as $v) {
55 $this->content = str_replace('{'.$v.'}', '%s',$this->content);
57 //$this->content = preg_replace('/\{('.implode('|',$matches[1]).')\}/','%s',$this->content);