from docbook_print.xps in the axkit.org/stylesheets directory of
hte Axkit-1.5 distribution:
<%
my %links;
my $linkid = 0;
$t->{'ulink'}{testcode} = sub {
my $node = shift;
my $t = shift;
my $url = findvalue('@url', $node);
if (!exists $links{$url}) {
$linkid++;
$links{$url} = $linkid;
}
my $link_number = $links{$url};
$t->{pre} = "<i><a href=\"$url\">";
$t->{post} = " [$link_number]</a></i>";
return 1;
};
%>
.. is similar to what you want to do
On Tuesday, February 5, 2002, at 08:25 AM, jc153 wrote:
> I'm trying to implement an XPathScript stylesheet using the following:
>
> <%
> for my $deposits (findnodes("/accounts/deposit")) {
> print "<p>", $deposits->findvalue("position()"), ......etc
>
> The aim is to print the deposit number at the start of each paragraph,
> but with the code above no number gets returned. What is the best
> way to
> do this sort of thing?
>
> Thanks,
> Jonathan
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]