Hi again!
Matt: thank you for your patience ;-)
>>
>> 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.


Aaaarrrggh. User to stupid error!

Done that, got more sensible output, but still not correct.

whether I do a top/testcode setting prechild or sub/testcode setting pre,
I still get no numbers, just blanks. Which seem clear to me in case of the 
top/testcode variant because the findvalue is executed in the context 
of the top element. But doing sub/testcode setting pre sould evaluate the
findvalue in the context of each sub, so I should get the rigth thing!?

My code in question look this:

<%
$t->{'top'}{pre} = "A List\n\n";
$t->{'sub'}{testcode} = sub {
   my ($node, $t) = @_;
   my $pos = $node->findvalue('position()');
   $t->{pre} = $pos . ") ";
   return 1;
};

print apply_templates();
%>

Best regards
Olaf
>-- 
><!-- Matt -->
><:->Get a smart net</:->


>---------------------------------------------------------------------
>
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]


-- 
Olaf P�schel, Softwaretechnik, OLMOS Workstations GmbH, Germany
Wolfenb�tteler Str. 31A, 38102 Braunschweig, Fon.: +49-531-22020-0 Fax: -99
OLMOS supports signed and/or encrypted mail. Grab my key at www.keyserver.net
"Unix *is* user friendly. It's just a bit picky about its friends"

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to