dbertoni    00/04/24 15:04:05

  Modified:    c/src/XPath XPathProcessorImpl.cpp
  Log:
  Added support for attribute and child axes in match patterns.
  
  Revision  Changes    Path
  1.7       +18 -0     xml-xalan/c/src/XPath/XPathProcessorImpl.cpp
  
  Index: XPathProcessorImpl.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XPath/XPathProcessorImpl.cpp,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- XPathProcessorImpl.cpp    2000/04/19 16:33:32     1.6
  +++ XPathProcessorImpl.cpp    2000/04/24 22:04:05     1.7
  @@ -2217,6 +2217,24 @@
   
                nextToken();
        }
  +     else if(lookahead(XALAN_STATIC_UCODE_STRING("::"), 1) == true)
  +     {
  +             if(tokenIs(XALAN_STATIC_UCODE_STRING("attribute")) == true)
  +             {
  +                     
m_expression->appendOpCode(XPathExpression::eMATCH_ATTRIBUTE);
  +             }
  +             else if(tokenIs(XALAN_STATIC_UCODE_STRING("child")) == true)
  +             {
  +                     
m_expression->appendOpCode(XPathExpression::eMATCH_IMMEDIATE_ANCESTOR);
  +             }
  +             else
  +             {
  +                     error("Only child:: and attribute:: axes are allowed in 
match patterns!");
  +             }
  +
  +             nextToken();
  +             nextToken();
  +     }
        else if(tokenIs('/') == true)
        {
                
m_expression->appendOpCode(XPathExpression::eMATCH_ANY_ANCESTOR);
  
  
  

Reply via email to