3 Comments

  • How about predicates?

    What if I want some XPath-like predicates in selectors,something like:

    ns1:*[@test]



    Thanks,wonderful tool!

  • OK,how I can understand I must use registered handler to investigate further and act accordingly,some kind of manual precise event detection mechanism(if I have node I can test it myself),right?

  • I'm working on predicates. The big issue here is that for attribute tests this is easy, as you can get attributes on an element without actually moving the reader position. The situation is different for element children, for example:



    ns1:*[orderedYear > '2004']



    Such an expression requires:



    - Reading next node

    - Determining if it's a child of the previous one

    - Read again to get its contents



    Either this, or I have to keep a stack of "pending child element checks" and test for this when the actual read happens, outside of the matching strategy itself. At this point, if a pending match does match, the callback invocation is performed. This is what I think is best, although it requires a bit more work.



    But definitely it's something I'd like/need to have!

Comments have been disabled for this content.