Hello,
I have several books written up in TEI with long footnotes/endnotes.
The notes often contain multiple paragraphs or lines of poems etc. It
seems perfectly legal in TEI to do the following:
<p>Some paragraph text.
<note place="foot">
<p>This note is long.</p>
<p>see, I told you it was long</p>
</note></p>
The question is then how do I process this efficiently in XSL(T)? The
documents typically have multiple div levels etc.
Typically I've set up templates in my XSL (to convert to wordml) like:
<xsl:template match="p">
<w:p>
<w:r>
<w:t>
<xsl:value-of select="."/>
</w:t>
</w:r>
<xsl:apply-templates select="note"/>
</w:p>
</xsl:template>
<xsl:template match="note">
<w:r>
<w:rPr>
<w:rStyle w:val="FootnoteReference"/>
</w:rPr>
<w:footnote>
<w:p>
<w:pPr>
<w:pStyle w:val="FootnoteText"/>
</w:pPr>
<w:r>
<w:rPr>
<w:rStyle w:val="FootnoteReference"/>
</w:rPr>
<w:footnoteRef/>
</w:r>
<w:r>
<w:t>
<xsl:value-of select="."/>
</w:t>
</w:r>
</w:p>
</w:footnote>
</w:r>
</xsl:template>
This works ok, but it produces duplicate text for footnotes: like
<w:r>
<w:t>Some paragraph text.This note is long.
see, I told you it was long</w:t>
</w:r>
<w:r>
<w:rPr>
<w:rStyle w:val="FootnoteReference"/>
</w:rPr>
<w:footnote>
<w:p>
<w:pPr>
<w:pStyle w:val="FootnoteText"/>
</w:pPr>
<w:r>
<w:rPr>
<w:rStyle w:val="FootnoteReference"/>
</w:rPr>
<w:footnoteRef/>
</w:r>
<w:r>
<w:t>This note is long.see, I told you it was long</w:t>
</w:r>
</w:p>
</w:footnote>
</w:r>
So they are not quite formatted the way I'd like!
Any suggestions would be helpful.
Thank you,
Jeremy