* xmlread.pp, fixed skipping DTD in canonical mode: ReadTopLevel was not recurring, but exiting with undefined result (happened to be 'true' most of the time). This went unnoticed due to redundant check in TLoader.ParseContent.

git-svn-id: trunk@20645 -
This commit is contained in:
sergei 2012-03-28 10:42:45 +00:00
parent 0658a6ee88
commit bab72f0025

View File

@ -1527,8 +1527,7 @@ begin
cursor := TDOMNode_WithChildren(cursor.ParentNode);
ntDocumentType:
if not FCanonical then
cursor.InternalAppend(TDOMDocumentType.Create(doc, FDocType));
cursor.InternalAppend(TDOMDocumentType.Create(doc, FDocType));
ntEntityReference:
cursor.InternalAppend(doc.CreateEntityReference(FCurrNode^.FQName^.Key));
@ -3464,7 +3463,7 @@ begin
if FCanonical then
begin
// recurse, effectively ignoring the DTD
result := ReadTopLevel;
result := ReadTopLevel();
Exit;
end;
end;