I have a custom element <rfc> to put references to RFC. I want to add
a small blurb explaining how to get a RFC but, since there are many
references to RFC in a given text, I want it to appear only the first
time.
I have no idea on how to do that. Both XSL and DSSSL are stateless so
I cannot keep a "already_seen" variable.
To make things more concrete, here is the way I do it in LaTeX:
% The first time we mention a RFC, add a reference
\newcounter{rfcfirst}
\newcommand{\rfc}[1]{RFC #1\ifthenelse{\boolean{rfcfootnote}}%
{\ifthenelse{\value{rfcfirst} = 0}%
{\footnote{Pour voir le RFC de num�ro NNN,
\url{http://www.ietf.org/rfc/rfcNNN.txt}, par exemple
\url{http://www.ietf.org/rfc/rfc#1.txt}}\stepcounter{rfcfirst}}%
{}%
}%
{}%
}