[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xalan-c-users
Subject:    RE: Using XPathExpression
From:       "Bagepalli, Kiran" <kbagepalli () informatica ! com>
Date:       2004-07-26 22:54:28
Message-ID: 27D936D54B6740439A140C5CA02DFE525977B5 () ps2kex03 ! informatica ! com
[Download RAW message or body]

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: david_n_bertoni@us.ibm.com [mailto:david_n_bertoni@us.ibm.com] 
	Sent: Fri 7/23/2004 8:23 PM 
	To: xalan-c-users@xml.apache.org 
	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
	
	


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic