blautenb    2004/02/29 02:17:04

  Modified:    c/src/transformers TXFMXPath.cpp
  Log:
  Fix for XPath processing when input is a nodeset - fix provided by John Moore 
([EMAIL PROTECTED]) via e-mail to security-dev on 12 Feb 2004
  
  Revision  Changes    Path
  1.12      +9 -4      xml-security/c/src/transformers/TXFMXPath.cpp
  
  Index: TXFMXPath.cpp
  ===================================================================
  RCS file: /home/cvs/xml-security/c/src/transformers/TXFMXPath.cpp,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- TXFMXPath.cpp     8 Feb 2004 10:25:16 -0000       1.11
  +++ TXFMXPath.cpp     29 Feb 2004 10:17:04 -0000      1.12
  @@ -329,7 +329,9 @@
                switch (inputType) {
   
                case DOM_NODE_DOCUMENT :
  -
  +             case DOM_NODE_XPATH_NODESET :
  +                     // do XPath over the whole document and, if the input 
was an 
  +                     // XPath Nodeset, then later intersect the result with 
the input nodelist                       
                        cd = XalanDOMString("/");               // Root node
                        cexpr = cd.c_str();
   
  @@ -462,8 +464,11 @@
                        }
                }
   
  -             
xpesd.uninstallExternalFunctionGlobal(XalanDOMString(URI_ID_DSIG), 
XalanDOMString("here"));
  -
  +             if (inputType == DOM_NODE_XPATH_NODESET) {
  +                     //the input list was a XPATH nodeset, so we must 
intersect the 
  +                     // results of the XPath processing done above with the 
input nodeset
  +                     m_XPathMap.intersect(input->getXPathNodeList());
  +             }
        }
   
        catch (XSLException &e) {
  
  
  

Reply via email to