I am transforming HTML into TEI and ran into the problem of handling footnotes.
The input HTML looks like:
<content>
<div>
<p>p1</p>
<p>p2</p>
<p>p3<a href="#_ftn1" name="_ftnref1" title="">[1]</a> p3</p>
<p>p4</p>
<p>p5<a href="#_ftn2" name="_ftnref2" title="">[2]</a> p5</p>
<p>p6</p>
<p><a href="#_ftnref1" name="_ftn1" title="">[1]</a> footnote1</p>
<p><a href="#_ftnref2" name="_ftn2" title="">[2]</a> footnote2</p>
</div>
</content>
The desired output is:
<content>
<div>
<p>p1</p>
<p>p2</p>
<p>p3<note>footnote1</note> p3</p>
<p>p4</p>
<p>p5<note>footnote2</note> p5</p>
<p>p6</p>
</div>
</content>
Unfortunately I have no idea how to handle this. All the other elements are simpley exchanged e.g. by doing this:
<xsl:template match="xhtml:br">
<lb/>
</xsl:template>
Thanks a lot for your help!