Hi Mike,
Mike Trotman <[EMAIL PROTECTED]> said:
> Thanks Yanick.
You're very welcome. T'was my pleasure.
> >$t->{a}{testcode} = sub {
> > my ( $n, $t ) = @_;
> > $t->{pre} .= "blah blah";
> > return DO_SELF_AND_KIDS();
> >};
> >
> >
> This is what I was afraid of and would have expected - but was obviously
> misled by the example on page 108 in the AxKit book.
I can't say much for that, as I haven't read the book (*hang head low in
shame*) and Kip's reading on the right-o-meter is usually much, much higher
than mine. But it could have been a typo, or a different behavior from the
covered version of XPS.
> >I'm not overly sure I got all the subtilities of your problem, but -- in the
> >remote possibility I actually did -- I think the following would do what
you want:
> >
> >$t->{a}{testcode} = sub {
> > my( $n, $t ) = @_;
> > my @children = $n->findnodes( './*' );
> >
> > # e.g., add an attribute to all children
> > $_->setAttribute( adhoc => 'hi there!' ) for @children;
> >
> > # process the kiddies
> > $t->{pre} .= apply_templates( $_ ) for @children;
> >
> > # strip the attribute away from the kids
> > # well, kinda, I just don't have the proper function
> > # close by hand right now :-P
> > $_->setAttribute( adhoc => '' ) for @children;
> >
> > # don't do the children; their output already have been
> > # generated above
> > return DO_SELF_ONLY;
> >};
> >
> I think something like that might cover what I need to do.
Woohoo!
> >>Also - I cannot get expression interpolation to work.
[..]
> >
> >I would have to check if AxXPSInterpolate works well with the classic XPS.
> >But
> >you might want to give a try to the replacement module bundled with
> >XML::XPathScript which - AFAIK - works.
> >
> I have downloaded this today.
> I haven't re-tried the interpolation yet - but have used YPathScript
> successfully in place of XPathScript.
Woohoo x 2 ! Although many peoples did the switch already, it's always good
to see another migration go without a hitch.
Joy,
`/anick
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]