// This is necessary on a non-DTD schema, like HTML5.
if ('id' ===
$aName) { $ele->
setIdAttribute('id', true
);
} } if ($this->frag !==
$this->current &&
$this->rules->
hasRules($name)) { // Some elements have special processing rules. Handle those separately.
$this->current =
$this->rules->
evaluate($ele,
$this->current
);
} else { // Otherwise, it's a standard element.
$this->current->
appendChild($ele);
if (!Elements::
isA($name, Elements::VOID_TAG
)) { $this->current =
$ele;
} // Self-closing tags should only be respected on foreign elements
// (and are implied on void elements)
// See: https://www.w3.org/TR/html5/syntax.html#start-tags
if (Elements::
isHtml5Element($name)) { $selfClosing = false;
} }