$this->content_ns_decls = array
();
if($this->is_html ||
$this->is_text
) trigger_error("Invalid content in element found. Content must not be of type text or html if it contains markup."
);
$attrs_prefix = array
();
// resolve prefixes for attributes
foreach($attrs as $key =>
$value) { $with_prefix =
$this->
ns_to_prefix($key, true
);
$attrs_prefix[$with_prefix[1
]] =
$this->
xml_escape($value);
} $attrs_str =
join(' ',
array_map($this->map_attrs_func,
array_keys($attrs_prefix),
array_values($attrs_prefix)));
if(strlen($attrs_str) > 0
) { $attrs_str = " " .
$attrs_str;
} $with_prefix =
$this->
ns_to_prefix($name);
if(!
$this->
is_declared_content_ns($with_prefix[0
])) { array_push($this->content_ns_decls,
$with_prefix[0
]);
}