33         $raw = str_replace(
' ', 
'', $this->dtd_regex);
 
   37         $el = 
'[#a-zA-Z0-9_.-]+';
 
   44         preg_match_all(
"/$el/", $reg, $matches);
 
   45         foreach ($matches[0] as $match) {
 
   46             $this->elements[$match] = 
true;
 
   50         $reg = preg_replace(
"/$el/", 
'(,\\0)', $reg);
 
   53         $reg = preg_replace(
"/([^,(|]\(+),/", 
'\\1', $reg);
 
   56         $reg = preg_replace(
"/,\(/", 
'(', $reg);
 
   58         $this->_pcre_regex = $reg;
 
   61         $list_of_children = 
'';
 
   63         foreach ($tokens_of_children as $token) {
 
   64             if (!empty($token->is_whitespace)) 
continue;
 
   66             $is_child = ($nesting == 0); 
 
   75                 $list_of_children .= $token->name . 
',';
 
   79         $list_of_children = 
',' . rtrim($list_of_children, 
',');
 
   82                 '/^,?'.$this->_pcre_regex.
'$/',