dbertoni    01/01/26 08:23:15

  Modified:    c/src/XPath SimpleNodeLocator.cpp
  Log:
  Fixed bug with getting namespace URIs.
  
  Revision  Changes    Path
  1.32      +7 -3      xml-xalan/c/src/XPath/SimpleNodeLocator.cpp
  
  Index: SimpleNodeLocator.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XPath/SimpleNodeLocator.cpp,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- SimpleNodeLocator.cpp     2001/01/25 16:57:22     1.31
  +++ SimpleNodeLocator.cpp     2001/01/26 16:23:14     1.32
  @@ -1331,6 +1331,8 @@
   
                                        const XalanDOMString&   theNodeName = 
attr->getNodeName();
   
  +                                     // This is an optimization to keep 
non-namespace attributes out of
  +                                     // the call to nodeTest().
                                        if (startsWith(theNodeName, 
DOMServices::s_XMLNamespaceWithSeparator) == true ||
                                                equals(theNodeName, 
DOMServices::s_XMLNamespace) == true)
                                        {
  @@ -1398,8 +1400,6 @@
   
        const XalanNode::NodeType       nodeType = context->getNodeType();
   
  -     opPos++;
  -
        switch(testType)
        {
        case XPathExpression::eNODETYPE_COMMENT:
  @@ -1421,6 +1421,8 @@
        case XPathExpression::eNODETYPE_PI:
                if(XalanNode::PROCESSING_INSTRUCTION_NODE == nodeType)
                {
  +                     opPos++;
  +
                        if(argLen == 1)
                        {
                                score = xpath.s_MatchScoreNodeTest;
  @@ -1472,6 +1474,8 @@
   
        case XPathExpression::eNODENAME:
                {
  +                     opPos++;
  +
                        if (nodeType == XalanNode::ATTRIBUTE_NODE || nodeType 
== XalanNode::ELEMENT_NODE)
                        {
                                bool                                    test = 
false;
  @@ -1504,7 +1508,7 @@
   
                                if(isTotallyWild == false)
                                {
  -                                     const XalanDOMString&   contextNS = 
context->getNamespaceURI();
  +                                     const XalanDOMString&   contextNS = 
DOMServices::getNamespaceOfNode(*context);
   
                                        if(0 != length(targetNS) && 0 != 
length(contextNS))
                                        {
  
  
  

Reply via email to