I agree with you on both counts. The second check for node type seem
superfluous, and hasNSDecls is never reset, so we'll always skip the
addNSDeclsToAttrs call. Do you think that may be the cause of John's
problems?

Myriam


                                                                                       
                    Gary L Peskin                                                      
                    <garyp@firstec       To:     Xalan Development                     
                    h.com>                <[EMAIL PROTECTED]>                   
                                         cc:     (bcc: Myriam Midy/CAM/Lotus)          
                    07/19/01 04:28       Subject:     TreeWalker2Result.startNode()    
                    PM                    questions                                    
                    Please respond                                                     
                    to xalan-dev                                                       
                                                                                       
                                                                                       




Joe or Myriam or Scott upon return --

Could you please look at
org.apache.xalan.transformer.TreeWalker2Result.startNode()? I am either
going sane (an unlikely possibility) or there are some serious problems
in startNode().

At line 150, we have

  if (DTM.ELEMENT_NODE == m_dtm.getNodeType(node))

this begins an if block.  Inside there at line 167, we have

  if (DTM.ELEMENT_NODE == m_dtm.getNodeType(node))

I don't see how the type of node could have changed and node itself
didn't change so shouldn't this inner if test just be eliminated and the
code moved to the block beginning at line 150 (actually the "else"
clause of that).

Second, on line 169 we declare

  boolean hasNSDecls = false;

This is later tested but never changed.  Shouldn't the body of the loop
at line 174 maybe set this to true?

Please advise.

Gary




Reply via email to