On Fri, Feb 01, 2002 at 04:11:59PM -0500, Terrence Brannon wrote:
> I'm not sure if I stated my question clearly. I am trying to do a 
> node transformation where the content of the node is now 
> different.
> 
> Let's say I wanted the entire content (content being "Sebastian 
> Rahtz      OUCS Information Manager") in all caps.
> 
> And let's say I am making this a table data cell. So
> 
> $t->{pre} = '<TD>'; $t->{post}='</TD>];
> 
> but what do I do to mutate the contents?

I think this would work for you:

# untested;
$t->{stuff}{testcode} = sub
{
        my( $n, $t ) = @_;
        my $text = uc $n->findvalue( '/text()' ); # or whatever transformation
        $t->{pre} = "<td>$t</td>";
        return -1;
}

of course, I suppose here you don't have any
other children within <stuff>...

Joy,
`/anick

-- 
"One must still have chaos in oneself to be able to give birth to a
dancing star."      - Friedrich Nietzsche

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

Reply via email to