One idea is to have two processing stages, i.e. two stylesheets: one of which builds the basic output document with elements marking where you want the custom-found HREFs to go; the second stage then replaces these with the HREFs you've actually found.
How would this work? Could this be done purely in XSLT? It seems to me that additional code would still be needed, but perhaps I'm overlooking something.
This is just idle curiosity on my part, as I have a working solution, but if you (or someone else) had a moment to give me a hint or two, well, I'd be interested to know.
Another idea would be to write an extension for xalan that would simply output the correctly-found HREF on the spot at a certain part of your stylesheet. The stylesheet would determine where the HREF should go and all other formatting; the extension could then be any arbitrary Java (or other language) code that you write that does the searching you want and then returns the correctly-found HREF on the spot.
This is the approach I've taken, and it works fine.
Thanks for your help,
Angus -- [EMAIL PROTECTED] http://pobox.com/~angus
