Incorrect parser failure
Brought to you by:
tpsfadmin
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 <> '');