[fpc-devel] TDOMDocument.GetTextContent implementation seems wrong

Sergei Gorelkin sergei_gorelkin at mail.ru
Thu Oct 7 13:35:49 CEST 2010


Graeme Geldenhuys wrote:
> Hi,
> 
> The current hierarchy in the dom unit is as follows
> 
>      TDomNode
>         |
>  TDOMNode_WithChildren
>         |
>    TDOMDocument
> 
> 
> Now the GetTextContent() implementation for TDOMNode_WithChildren runs
> recursively through all child nodes collecting data.
> 
> ...but the GetTextContent() implementation of TDomDocument simply
> returns '', without calling inherited GetTextContent;
> so we loose all the functionality implemented in
> TDOMNode_WithChildren!  Why is that?
> 
Compliance, see
http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#Node3-textContent

specifies that textContent property should be null for Document, Notation and DocumentType nodes.

Regards,
Sergei




More information about the fpc-devel mailing list