Hi all
Can anybody let me know how to extract "footnote" from paragraph and write
it to end of the section. Below is what I am trying to do
Input
<section>
<para>111...<footnote label="1" id="f1"><para>First fnt</para></footnote>
222... <footnote label="2" id="f2"><para>second fnt</para></footnote> </para>
<para>333...<footnote label="3" id="f3"><para>Third fnt</para></footnote>
...</para>
</section>
Required Output
<level>
<para>111....222 .... </para>
<para>333... ...</para>
<footnote label="1" id="f1"><para>First fnt</para></footnote>
<footnote label="2" id="f2"><para>second fnt</para></footnote>
<footnote label="3" id="f3"><para>Third fnt</para></footnote>
</level>
<xsl:template match="section">
<level>
<xsl:apply-templates/>
<xsl:if test="descendant::*[self::footnote]">
<xsl:apply-templates select="descendant::*[self::section//footnote]"/>
</xsl:if>
</level>
</xsl:template>
<xsl:template match="para">
<xsl:copy>
<xsl:apply-templates select="descendant::*[not(self::footnote)]"/>
</xsl:copy>
</xsl:template>
thanks
...JSR
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--