Foot notes to end notes
I want to write out foot notes in the input document as end notes in a separate list at the bottom of the output document. The notes are marked up with asterixes (*, **, *** etc.) which I have replaced with sequential numbers allocated by <xsl:number>. This works fine, but I don't know how to lift out the notes of their original context and place them in a list.
Input is somewhat like this:
<page_content id="001">
<p>Text, text, <foot_note target="001">text</foot_note>, text.</p>
<p>Text, text, text, text.</p>
<foot_note id="001">Text, text, text, text.</foot_note>
</page_content>
<page_content id="002">
<p>Text, text, <foot_note target="002">text</foot_note>, text.</p>
<p>Text, text, <foot_note target="003">text</foot_note>, text.</p>
<foot_note id="002">Text, text, text, text.</foot_note>
<foot_note id="003">Text, text, text, text.</foot_note>
</page_content>
... etc...
Output is supposed to look like this:
<page_content id="001">
<p>Text, text, <end_note target="001">text</end_note>, text.</p>
<p>Text, text, text, text.</p>
</page_content>
<page_content id="002">
<p>Text, text, <end_note target="002">text</end_note>, text.</p>
<p>Text, text, <end_note target="003">text</end_note>, text.</p>
</page_content>
...etc ...
<end_note_list>
<end_note id="001">Text, text, text, text.</end_note>
<end_note id="002">Text, text, text, text.</end_note>
<end_note id="003">Text, text, text, text.</end_note>
... etc ...
</end_note_list>
|