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?
<submission date="Fri Feb 1 11:24:27 EST 2002">
Sebastian Rahtz OUCS Information Manager
</submission>
On Friday, February 1, 2002, at 03:30 PM, Matt Sergeant wrote:
> On Fri, 1 Feb 2002, Terrence Brannon wrote:
>
>> Given this XML,
>>
>> <submission date="Fri Feb 1 11:24:27 EST 2002">
>> Sebastian Rahtz OUCS Information Manager
>> </submission>
>>
>> I wanted to use setNodeText() to reformat the text in the node
>>
>> $t->{submission}{testcode} = sub {
>> my ($node, $t) = @_;
>> my $date = findvalue('@date', $node);
>> my $submitter = findvalue('./text()', $node);
>> my $text = "<td align=center>[ Posted $date by $submitter
>> ]</td>";
>> $node->setNodeText($node, $text);
>> return 1;
>> }
>>
>> but I dont see any examples of setNodeText anywhere. Please show
>> me how to do this.
>
> setNodeText will have no effect on the output, so the above will
> probably
> not do what you want it to do. And will be formatted as <td...
>
> Try $t->{pre} = "<td align=center..."
>
> --
> <!-- Matt -->
> <:->Get a smart net</:->
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]