mirror of
https://github.com/jezhiggins/arabica
synced 2024-11-15 19:48:00 +01:00
Expand entity references in the DOM
This commit is contained in:
parent
6d07f4a42d
commit
2f88819306
1 changed files with 11 additions and 2 deletions
|
@ -325,8 +325,17 @@ class Parser : protected Arabica::SAX::DefaultHandler<stringT, typename ParserTy
|
|||
|
||||
if(this->dtd_pseudo_entity == name)
|
||||
return;
|
||||
|
||||
currentNode_.appendChild(document_.createEntityReference(name));
|
||||
|
||||
const EntityT* declared = declaredEntities_[name];
|
||||
if(declared != 0 && declared->getLength() != 0)
|
||||
{
|
||||
for(DOM::Node<stringT, string_adaptorT> child = declared->getFirstChild();
|
||||
child != 0;
|
||||
child = child.getNextSibling())
|
||||
currentNode_.appendChild(child.cloneNode(true));
|
||||
}
|
||||
else
|
||||
currentNode_.appendChild(document_.createEntityReference(name));
|
||||
} // endEntity
|
||||
|
||||
virtual void startCDATA()
|
||||
|
|
Loading…
Reference in a new issue