XPath seems like a useful implementation for the patterns that the rules match. It's rather general and powerful, and I might eventually use it, but it has two problems, that cocnern me where I am now, and provides, as I see it, no solution for either:
- XPath is not a grammer, it's a way to write patterns, so it will need to be part of a larger scheme
- XPath will be very hard to performance-tune later. I will probably need to prune the very wide match tree to find the results I'm most happy with in a timely manner. I doubt XPath will let me do it since it's possibly a bit too powerful.
The second problem is solvable provided I can ask per node whether rule $some_xpath_based_rule applies to it, and then memoize the results, but trying to find a good match by pruning, like game-playing searches do is not very trivial since it is rather closed.
I think I may eventually use a subset of XPath, where some of it's aspects/features are actually pushed up to the grammer engine level, and at that point I might have something useful.
Anyway, my answer is "yes, i've thought of that, but I'm not really sure what I'm going to do about those thoughts yet" ;-).
Thanks for your time!