Menu

#13 Incorrect parser failure

open
nobody
None
5
2013-01-15
2005-07-11
No

XpParser fails if it finds an element which contains
#PCDATA but whose content model mandates element
content. However, this is a validity error, not a
well-formedness one, and in my view the parser should
recover from this condition by parsing the #PCDATA and
carrying on.

The error (introduced in release .52) appears in
ParseContent. A work-round is to replace:

else begin
raise ExpParserError.CreateError(FFilter.Line,

FFilter.LinePos,

FFilter.URL,

sExpectedElement);
end;

by:

else ParsePCData(TempChar <> '');

Discussion


Log in to post a comment.

MongoDB Logo MongoDB