dbertoni    01/07/20 22:35:40

  Modified:    c/src/XSLT ElemForEach.cpp
  Log:
  Optimize when there are no children.
  
  Revision  Changes    Path
  1.17      +18 -15    xml-xalan/c/src/XSLT/ElemForEach.cpp
  
  Index: ElemForEach.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XSLT/ElemForEach.cpp,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- ElemForEach.cpp   2001/07/18 04:33:15     1.16
  +++ ElemForEach.cpp   2001/07/21 05:35:40     1.17
  @@ -169,23 +169,26 @@
   {
        assert(m_selectPattern != 0);
   
  -     XalanNode* const        sourceNode = executionContext.getCurrentNode();
  -
  -     if (sourceNode != 0)
  +     if (hasChildren() == true)
        {
  -             transformSelectedChildren(
  -                     executionContext,
  -                     this,
  -                     sourceNode,
  -                     executionContext.getCurrentStackFrameIndex());
  +             XalanNode* const        sourceNode = executionContext.getCurrentNode();
  +
  +             if (sourceNode != 0)
  +             {
  +                     transformSelectedChildren(
  +                             executionContext,
  +                             this,
  +                             sourceNode,
  +                             executionContext.getCurrentStackFrameIndex());
  +             }
  +             else
  +             {
  +                     executionContext.error(
  +                             "There is no current node in ElemForEach::execute()!",
  +                             sourceNode, 
  +                             this);
  +             }
        }
  -    else
  -    {
  -             executionContext.error(
  -                     "There is no current node in ElemForEach::execute()!",
  -                     sourceNode, 
  -                     this);
  -    }
   }
   
   
  
  
  

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

Reply via email to