Hi All
I'm just getting started with XPathScript, and have been trying all afternoon to
guess the proper syntax for accessing an attribute in the following testcode:
$t->{'field'}{testcode} = sub {
my $node = shift;
my $t = shift;
if (findvalue( '@species', $node ) eq 'BF_COUNT') {
$t->{pre} = "<td align='right'>";
$t->{post} = "</td>";
} else {
$t->{pre} = "<td align='left'>";
$t->{post} = "</td>";
}
}
Given this XML
<field species="BF_COUNT">1234</field>
I'm trying to test on the species attribute in order to know whether to right
align it. I get a server error with the error_log message "..."Not a PrimaryExpr
at <" which doesn't help. If I skip the testcode and simply specify:
$t->{'field'}{pre} = "<td align='left'>";
$t->{'field'}{post} = "</td>";
everything works fine, so the xml file and the xps file are otherwise ok. I've
looked at all the sample xps files I could find at the axkit site and through a
google search, but no luck. Sorry to post such a really basic question, but I'm
about to go hang myself. Can anyone help me out?
Thanks
Bill
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]