In my text-based XML corpus I have a lot of markup of different data (using TEI schema). As part of the process of transforming these documents into a PDF, I am preprocessing it into a simplified file for xsl:fo to transform. In that preprocessing I am assigning footnote numbers by finding the markup and adding <sup>incremented integer</sup>
.
A line like this:
<p>
<seg>
<date type="deposition_date">Item anno et die quo supra</date>. <persName>P Lapassa Senior</persName> testis iuratus idem per omnia quod predictus <persName>Hugo de Mamiros</persName>.
</seg>
</p>
Processed with this:
<xsl:template match="tei:date">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy><sup><xsl:number count="date[@type='deposition_date'" from="tei:p" format="1" level="any"/></sup>
</xsl:template>
Outputs this (note the new line for <sup>
):
<p>
<seg>
<date type="deposition_date">Item anno et die quo supra</date>
<sup>1</sup>. <persName>P Lapassa Senior</persName> testis iuratus idem per omnia quod predictus <persName>Hugo de Mamiros</persName>.
</seg>
</p>
The result is that when xsl:fo processes the <sup>
into superscript, there is a space between the target and the superscript, like so:
Item anno et die quo supra 1. P Lapassa Senior testis iuratus idem per omnia quod predictus Hugo de Mamiros.
Is there a manner to stop new lines/carriage returns from being introduced in the copy process?
Additional info: I've got <xsl:strip-space elements="*"/>
in the xsl document. Tested against Saxon PE 9.6 and HE 9.8.
Thanks in advance.