Browse Source

* 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 -
sergei 13 years ago
parent
commit
bab72f0025
1 changed files with 2 additions and 3 deletions
  1. 2 3
      packages/fcl-xml/src/xmlread.pp

+ 2 - 3
packages/fcl-xml/src/xmlread.pp

@@ -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;