Thanks for the reply. Yes I did get to understand so much before sending the 
mail. Beyond that it got a little fuzzy.
Apart from the mapcode/length what else does it store. Is it different for 
different mapcodes. Does it maintain offsets into the physical expression 
string.
Any insight would go greats lengths to get me started.
Thanks
Kiran

        -----Original Message----- 
        From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
        Sent: Fri 7/23/2004 8:23 PM 
        To: [email protected] 
        Cc: 
        Subject: Re: Using XPathExpression
        
        

        > I wanted to find if the XPathExpression component can be used in
        > isolation. I want to pass a Xpath string and analyze tokens in the
        > string.
        
        It's possible, but it's not a trivial thing to understand.
        
        > ./A/B/C=10, analyzed as ./A/B/C(location path), = (operator),
        > 10(literal). Is there a way to use this class to parse this 
information.
        > I looked at m_op member of XPathExpression but no real documentation 
is
        > available on what this stores and how to get this token information.
        
        It's a very tricky part of the system, that's for sure.  My suggestion 
is
        you start debugging through the compilation of some simple expressions, 
to
        get an idea of what's going on.  The operations map is an array of ints,
        starting with an opcode encoded as the first int, followed by its 
length,
        encoded as the second int, followed by any terms for the opcode, etc..  
You
        can also dump the op map and look at that while you debug the 
evaulation of
        the expressions.  You can use the XPathEvaluator class to do that, if 
you
        don't want to deal with writing stylesheets.
        
        It would be nice to have some code that could print out an op map, but 
the
        need doesn't often come up.
        
        Dave
        
        

Reply via email to