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!
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.