dbertoni    2003/01/13 17:17:15

  Modified:    c/src/XPath XPath.cpp
  Log:
  Fix for bug 15983.  Make sure findNamespace() returns nodes in the proper 
order.
  
  Revision  Changes    Path
  1.88      +7 -3      xml-xalan/c/src/XPath/XPath.cpp
  
  Index: XPath.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XPath/XPath.cpp,v
  retrieving revision 1.87
  retrieving revision 1.88
  diff -u -r1.87 -r1.88
  --- XPath.cpp 7 Jan 2003 00:40:29 -0000       1.87
  +++ XPath.cpp 14 Jan 2003 01:17:14 -0000      1.88
  @@ -4313,11 +4313,13 @@
   
                        if(attributeList != 0) 
                        {
  -                             const unsigned int      nAttrs = 
attributeList->getLength();
  +                             unsigned int    nAttrs = 
attributeList->getLength();
   
  -                             for(unsigned int i = 0; i < nAttrs; ++i)
  +                             while(nAttrs > 0)
                                {
  -                                     XalanNode* const        attr = 
attributeList->item(i);
  +                                     --nAttrs;
  +
  +                                     XalanNode* const        attr = 
attributeList->item(nAttrs);
                                        assert(attr != 0 && attr->getNodeType() 
== XalanNode::ATTRIBUTE_NODE);
   
                                        const XalanDOMString&   theNodeName = 
attr->getNodeName();
  @@ -4342,6 +4344,8 @@
                        theCurrentNode = theCurrentNode->getParentNode();
                } while (theCurrentNode != theOwnerDocument && theCurrentNode 
!= 0);
        }
  +
  +     subQueryResults.reverse();
   
        subQueryResults.setDocumentOrder();
   
  
  
  

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

Reply via email to