xml-xalan-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mikko Honkala <honk...@tml.hut.fi>
Subject Xalan-J question: using XPathVisitor to get the list of nodes that LocPaths reference
Date Mon, 28 Jul 2003 12:46:02 GMT

for many applications, it is necessary to execute an arbitrary XPath 
expression and return the list of all nodes that the expression 
references in location paths.

For instance, the following expression :
"sum(/doc/item[@level='3']/@value) * /doc/tax/@tax" references value, 
level and tax attributes.

In my application I did this using Xalan-J by extending Compiler and 
WalkerFactory to create my own WalkingIterators in order to get the 
nodes while executing the XPath. This is not very nice, since it depends 
heavily on the version of Xalan.

Would it be possible to implement this using the XPathVisitor class? Is 
it possible to somehow call the visitors while executing the expression 
in order to know correct context for all LocPaths? Or is there another 
way to accomplish this?


View raw message