On Sat, 19 Jan 2002, Olaf P�schel wrote:
> Hi!
>
> Thank you for you advice Matt,
>
> > > Now I habe an XPathScript Stylesheet which I would presume to give the same
> > > outtput:
> > >
> > > <%
> > > $t->{'top'}{pre} = "A List\n\n";
> > > $t->{'sub'}{pre} = findvalue('position()') . ") ";
> >
> > This is not executed per element. If you want that behaviour, you need to
> > use testcode.
>
> but I still seem to dumb. I tried this:
>
> <%
> $t->{'top'}{pre} = "A List\n\n";
> $t->{'sub'}{testcode} = sub {
> my ($node, $t) = @_;
> my $pos = $node->findvalue('position()');
> $t->{pre} = $pos . ") ";
> };
You're forgetting the biggie - from testcode you MUST return the right
return code or it doesn't do anything. Add:
return DO_SELF_AND_KIDS;
to the end of your testcode sub.
--
<!-- Matt -->
<:->Get a smart net</:->
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]