dbertoni    2004/10/12 11:43:54

  Modified:    c/src/xalanc/XSLT ElemTemplateElement.cpp
  Log:
  Cleaned up code and modified the logic of beginExecuteChildren() and 
endExecuteChildren() slightly.
  
  Revision  Changes    Path
  1.23      +24 -14    xml-xalan/c/src/xalanc/XSLT/ElemTemplateElement.cpp
  
  Index: ElemTemplateElement.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/xalanc/XSLT/ElemTemplateElement.cpp,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- ElemTemplateElement.cpp   5 Aug 2004 23:27:41 -0000       1.22
  +++ ElemTemplateElement.cpp   12 Oct 2004 18:43:54 -0000      1.23
  @@ -232,11 +232,14 @@
   
   
   void
  -ElemTemplateElement::execute(StylesheetExecutionContext&                     
executionContext) const
  +ElemTemplateElement::execute(StylesheetExecutionContext&    
executionContext) const
   {
  -     const ElemTemplateElement * invoker = getParentNodeElem();
  -     const ElemTemplateElement * currentElement = this;
  -     const ElemTemplateElement * nextElement = 0;
  +     const ElemTemplateElement* const    invoker =
  +            getParentNodeElem();
  +
  +    const ElemTemplateElement*  currentElement = this;
  +
  +    const ElemTemplateElement*  nextElement = 0;
   
        executionContext.pushInvoker(invoker);
   
  @@ -251,10 +254,18 @@
                        if (currentElement->getInvoker(executionContext) == 
invoker)
                        {
                                nextElement = 0;
  -                             break;
  +
  +                break;
                        }
  -             
  -                     nextElement = 
currentElement->getInvoker(executionContext)->getNextChildElemToExecute(executionContext,currentElement);
  +
  +            const ElemTemplateElement* const    localInvoker =
  +                currentElement->getInvoker(executionContext);
  +            assert(localInvoker != 0);
  +
  +            nextElement =
  +                localInvoker->getNextChildElemToExecute(
  +                        executionContext,
  +                        currentElement);
   
                        if (0 == nextElement)
                        {
  @@ -263,7 +274,6 @@
                }
   
                currentElement = nextElement;
  -
        }
   
        executionContext.popInvoker();
  @@ -293,10 +303,11 @@
   {
        if (hasParams() == true || hasVariables() == true)
        {
  +        assert(hasDirectTemplate() == false);
  +
                executionContext.pushElementFrame(this);
        }
  -
  -     if (hasDirectTemplate() == true)
  +    else if (hasDirectTemplate() == true)
        {
           executionContext.pushContextMarker();
                executionContext.pushInvoker(this);
  @@ -308,14 +319,13 @@
   
   
   void 
  -ElemTemplateElement::endExecuteChildren(StylesheetExecutionContext&  
executionContext) const
  +ElemTemplateElement::endExecuteChildren(StylesheetExecutionContext&      
executionContext) const
   {
  -     if (hasParams() == true || hasVariables() == true)
  +    if (hasParams() == true || hasVariables() == true)
        {
                executionContext.popElementFrame();
        }
  -
  -     if (hasDirectTemplate() == true)
  +     else if (hasDirectTemplate() == true)
        {
                executionContext.popInvoker();
           executionContext.popContextMarker();
  
  
  

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

Reply via email to