>I started wondering this morning whether
>that might be scope for a "friend" class that
>could extract this kind of stuff from nodes.
I've got such a thing under development, in the Java side of Xalan: the
XDM interface. It's still very much in flux, but some basic info and a
"pre-alpha" code sketch has been checked in. Basic concept is to build
"cursors" which walk along an XPath axis and display the content of each
node along that axis... essentially, moving current-node-property
accessors onto an iterator object. There's some overlap between this and
the "XML pull parser" efforts, though our requirements are somewhat
different from theirs and I expect our solution will likewise be somewhat
different.
See the directory .../java/src/org/apache/xml/xdm in the xslt20 branch for
both basic documentation and code fragments. Early feedback is welcome,
but please don't assume yet that what's written there is cast in concrete,
or even cast in Jello.
I expect it will be at least a month, probably more, before I have even a
prototype of Xalan running against the XDM model, and longer before we
know whether this investment will actually pay off. (I don't expect to
check in much code for a while, since MASSIVE alterations are required to
cut over to XDM; merging those with other changes made in the meantime is
going to be unavoidably painful.)
More news when this experiment either succeeds or fails...
______________________________________
Joe Kesselman, IBM Next-Generation Web Technologies:
XML, XSL and more. "may'ron DaroQbe'chugh vaj bIrIQbej"
("Put down the squeezebox and nobody gets hurt.")