|
From: Mark S. <ma...@Sc...> - 2007-03-01 02:57:17
|
Rodrigo Cunha wrote:
> For a SimpleContext, or something similar:
>
> The comparison operator could just compare the arrays containing the
> internal state of Navigator.
>
> The hashcode would be the XOR of all elements in the array, that
> implements java hashcode and equals in a compatible way with the assumed
> rules in java libraries.
>
> Jimmy, I think my "SimpleContext" or whatever you want to call it, if
> properly implemented and perhaps with a few extra functions could solve
> all the problems of random access.
>
> I think we just want something with the functionality of push() and
> pop() but that can be extracted and kept outside, memorizing the
> equivalent of a single stack position, and perhaps with a bit more
> functionality.
It will be interesting to see how much / little info we can get away
with saving and still be able to start an XPath expression from an
arbitrary point.
Important: it may make the implementation easier if we make the
arbitrary starting point the new document root - just for xpath
evaluation purposes. I think this is perfect, actually. I don't want
anything except for the node and its children - that's why I'm
explicitly pointing there in the first place.
F.E.
(forgive the illegal simplified syntax..)
aaa
bbb
ccc <- Index saved, new root for xpath eval.
eee
fff
/ccc
dd
...
I'd want to say something like this:
vtdNav.toElement(cccIndex); // reset cursor to ccc
ap.selectXPath("/ccc/*")
Cheers.
--
http://www.ScheduleWorld.com/
Free Google Calendar synchronization with Outlook, Evolution,
cell phones, BlackBerry, PalmOS, Exchange, Mozilla, Thunderbird,
Pocket PC/Windows Mobile. Also sync tasks, notes and contacts!
WebDAV, vfreebusy, RSS, LDAP, iCalendar, iTIP, iMIP support.
|