I do this, or rather I have the footnote callout link to the footnote in question although I don't link back to the footnote callout from the marker.
I do by using
Textile to generate my HTML. Textile has it's own footnotes feature which allows you to place the footnote itself wherever you want. Textile generates a unique ID for the footnote callout and links to the footnote marker. It's then trivial to use float: footnote to have the footnote displayed in the footnotes area.
You do have to remove the duplicate footnote call out generated by Prince but that's easy enough to do:
.footnote::footnote-call {
content: none;
}
You could hack on the Textile library to provide the link back to the callout from the marker.
You'd add a variant of the same ID to the callout:
function footnoteID($id, $t)
{
if (empty($this->fn[$id]))
$this->fn[$id] = uniqid(rand());
$fnid = $this->fn[$id];
return '<sup class="footnote"><a href="#fn'.$fnid.'" id="callout'.$fnid.'">'.$id.'</a></sup>'.$t;
}
Then modify the code that generates the marker to include a link back to the callout:
if (preg_match("/fn(\d+)/", $tag, $fns)) {
$tag = 'p';
$fnid = empty($this->fn[$fns[1]]) ? $fns[1] : $this->fn[$fns[1]];
$atts .= ' id="fn' . $fnid . '"';
if (strpos($atts, 'class=') === false)
$atts .= ' class="footnote"';
$content = '<a href="#callout' . $fnid . '">^</a>' . $content;
}
If you're not using PHP Textile is also available in other languages - perl, ruby etc.
Hope this helps.