Hi Erik and Gareth,

FWIW, I'm fairly strongly of the view that we need to preserve consistency
here so that the parser owns this memory.  It's always bad to be
inconsistent but isn't it especially bad with things as subtle as memory
management?

Besides, the memory here is no larger than the sum of all the textual
children of the node; when you think about how heavy the DOM tends to be,
so long as this is documented in a FAQ somewhere I think this should be
acceptable.  After all, if a user just wants text then surely she should be
using SAX; otherwise there's generally likely lots of other operations
being performed (i.e., getTextContent shouldn't be used that often).

Cheers,
Neil
Neil Graham
XML Parser Development
IBM Toronto Lab
Phone:  905-413-3519, T/L 969-3519
E-mail:  [EMAIL PROTECTED]




|---------+---------------------------->
|         |           "Erik Rydgren"   |
|         |           <[EMAIL PROTECTED]|
|         |           darinen.se>      |
|         |                            |
|         |           04/01/2003 05:01 |
|         |           AM               |
|         |           Please respond to|
|         |           xerces-c-dev     |
|         |                            |
|---------+---------------------------->
  
>---------------------------------------------------------------------------------------------------------------------------------------------|
  |                                                                                    
                                                         |
  |       To:       <[EMAIL PROTECTED]>                                                
                                               |
  |       cc:                                                                          
                                                         |
  |       Subject:  RE: Implementing getTextContent                                    
                                                         |
  |                                                                                    
                                                         |
  |                                                                                    
                                                         |
  
>---------------------------------------------------------------------------------------------------------------------------------------------|



I agree, I like consistency.
Let's register the string into the document by allocating the memory on the
documents heap.
Although, the result can be very large. Should we allow the user to release
the memory when not used anymore? How?

/ Erik

-----Original Message-----
From: Gareth Reakes [mailto:[EMAIL PROTECTED]
Sent: den 1 april 2003 11:55
To: [EMAIL PROTECTED]
Subject: RE: Implementing getTextContent


Hi,
             there are no other methods in the DOM interface that you have
to
do that with. My opinion is that we allow the document to manage this as
well for consistency. Anyone else got an opinion?

Gareth


--
Gareth Reakes, Head of Product Development  +44-1865-203192
DecisionSoft Limited                        http://www.decisionsoft.com
XML Development and Services




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to