Skip to content
Snippets Groups Projects
Commit ad89e24a authored by Khaled Noaman's avatar Khaled Noaman
Browse files

DOM L2 does not support editing DocumentType nodes.

git-svn-id: https://svn.apache.org/repos/asf/xerces/c/trunk@174090 13f79535-47bb-0310-9956-ffa450edef68
parent efde4318
No related branches found
No related tags found
No related merge requests found
......@@ -1138,10 +1138,17 @@ void AbstractDOMParser::endIntSubset()
fDocumentType->setInternalSubset(fInternalSubset.getRawBuffer());
fBufMgr.releaseBuffer(fInternalSubset);
fDocumentType->intSubsetReading = false;
// DOM L2 does not support editing DocumentType nodes
if (fScanner -> getDoNamespaces())
fDocumentType->setReadOnly(true, true);
}
void AbstractDOMParser::endExtSubset()
{
// DOM L2 does not support editing DocumentType nodes
if (fScanner -> getDoNamespaces())
fDocumentType->setReadOnly(true, true);
}
void AbstractDOMParser::entityDecl
......@@ -1256,6 +1263,10 @@ void AbstractDOMParser::startIntSubset()
void AbstractDOMParser::startExtSubset()
{
// Disable read only to be able to add entities and notations
// declarations. In endExtSubset, we will enable it again.
if (fScanner -> getDoNamespaces())
fDocumentType->setReadOnly(false, true);
}
void AbstractDOMParser::TextDecl
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment