dbertoni    2002/07/09 23:49:07

  Modified:    c/src/XSLT ElemCopyOf.cpp ElemCopyOf.hpp
  Log:
  Removed code that was commented out and removed unused functions.
  
  Revision  Changes    Path
  1.27      +12 -91    xml-xalan/c/src/XSLT/ElemCopyOf.cpp
  
  Index: ElemCopyOf.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XSLT/ElemCopyOf.cpp,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- ElemCopyOf.cpp    9 Jul 2002 06:19:40 -0000       1.26
  +++ ElemCopyOf.cpp    10 Jul 2002 06:49:07 -0000      1.27
  @@ -138,95 +138,6 @@
   
   
   
  -inline void
  -ElemCopyOf::doCloneNode(
  -                     StylesheetExecutionContext&             
executionContext,
  -                     XalanNode&                                              
theNode) const
  -{
  -#if 1
  -     executionContext.cloneToResultTree(theNode, this);
  -#else
  -     XalanNode*                              pos = &theNode;
  -     XalanNode::NodeType             posNodeType = pos->getNodeType();
  -
  -     while(pos != 0)
  -     {
  -             if(posNodeType != XalanNode::ATTRIBUTE_NODE)
  -             {
  -                     executionContext.flushPending();
  -             }
  -
  -             executionContext.cloneToResultTree(
  -                                             *pos,
  -                                             posNodeType,
  -                                             false,
  -                                             false,
  -                                             true,
  -                                             this);
  -
  -             XalanNode*      nextNode = pos->getFirstChild();
  -
  -             while(nextNode == 0)
  -             {
  -                     if(XalanNode::ELEMENT_NODE == posNodeType)
  -                     {
  -                             
executionContext.endElement(c_wstr(pos->getNodeName()));
  -                     }
  -
  -                     if(&theNode == pos)
  -                             break;
  -
  -                     nextNode = pos->getNextSibling();
  -
  -                     if(nextNode == 0)
  -                     {
  -                             pos = pos->getParentNode();
  -                             assert(pos != 0);
  -
  -                             posNodeType = pos->getNodeType();
  -
  -                             if(&theNode == pos)
  -                             {
  -                                     if(XalanNode::ELEMENT_NODE == 
posNodeType)
  -                                     {
  -                                             
executionContext.endElement(c_wstr(pos->getNodeName()));
  -                                     }
  -
  -                                     nextNode = 0;
  -                                     break;
  -                             }
  -                     }
  -             }
  -
  -             pos = nextNode;
  -
  -             if (pos != 0)
  -             {
  -                     posNodeType = pos->getNodeType();
  -             }
  -     }
  -#endif
  -}
  -
  -
  -
  -inline void
  -ElemCopyOf::doCloneNodeSet(
  -                     StylesheetExecutionContext&             
executionContext,
  -                     const NodeRefListBase&                  theNodeList) 
const
  -{
  -     const NodeRefListBase::size_type        nChildren = 
theNodeList.getLength();
  -
  -     for(NodeRefListBase::size_type i = 0; i < nChildren; i++)
  -     {
  -             assert(theNodeList.item(i) != 0);
  -
  -             doCloneNode(executionContext, *theNodeList.item(i));
  -     }
  -}
  -
  -
  -
   void
   ElemCopyOf::execute(StylesheetExecutionContext&              
executionContext) const
   {
  @@ -251,7 +162,7 @@
                                        XObjectPtr()));
                }
   
  -             doCloneNode(executionContext, *sourceNode);
  +             executionContext.cloneToResultTree(*sourceNode, this);
        }
        else
        {
  @@ -281,7 +192,17 @@
                        break;
   
                case XObject::eTypeNodeSet:
  -                     doCloneNodeSet(executionContext, value->nodeset());
  +                     {
  +                             const NodeRefListBase&                          
theNodeList = value->nodeset();
  +                             const NodeRefListBase::size_type        
nChildren = theNodeList.getLength();
  +
  +                             for(NodeRefListBase::size_type i = 0; i < 
nChildren; i++)
  +                             {
  +                                     assert(theNodeList.item(i) != 0);
  +
  +                                     
executionContext.cloneToResultTree(*theNodeList.item(i), this);
  +                             }
  +                     }
                        break;
   
                case XObject::eTypeResultTreeFrag:
  
  
  
  1.12      +1 -11     xml-xalan/c/src/XSLT/ElemCopyOf.hpp
  
  Index: ElemCopyOf.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XSLT/ElemCopyOf.hpp,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- ElemCopyOf.hpp    22 Jul 2001 04:31:54 -0000      1.11
  +++ ElemCopyOf.hpp    10 Jul 2002 06:49:07 -0000      1.12
  @@ -111,16 +111,6 @@
   
   private:
   
  -     void
  -     doCloneNode(
  -                     StylesheetExecutionContext&             
executionContext,
  -                     XalanNode&                                              
theNode) const;
  -
  -     void
  -     doCloneNodeSet(
  -                     StylesheetExecutionContext&             
executionContext,
  -                     const NodeRefListBase&                  theNodeList) 
const;
  -
        const XPath*    m_selectPattern;
   
        bool                    m_isDot;
  
  
  

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

Reply via email to