Quantcast
Channel: XML, System.Xml, MSXML and XmlLite forum
Viewing all articles
Browse latest Browse all 935

getting different instances of footnotes

$
0
0

Hi,

  I've the below cases in my XML.

<main><para num="1.12.10">
        since no <page num="138"/>principal.<footnoteref linkend="fn855" num="855"/><footnote num="855" id="fn855" number-type="arabic"></footnote></para><para num="1.12.11">
        In other pl<footnoteref linkend="fn857" num="857"/><footnote num="857" id="fn857" number-type="arabic"></footnote>short of the fraud of the agent.<footnoteref linkend="fn860" num="860"/><footnote num="860" id="fn860" number-type="arabic"></footnote><footnoteref linkend="fn861" num="861"/><footnote num="861" id="fn861" number-type="arabic"><para>At [8-209].</para></footnote></para><para num="1.12.12">
        Indeed, in some non-property cases such as<footnoteref linkend="fn862" num="862"/><footnote num="862" id="fn862" number-type="arabic"><para><case>[1896] 2 Ch 743</case>.</para></footnote></para></main>

and from footnotes template I use the below.

<xsl:if test="preceding::page[1]"><xsl:variable name="op">&#60;</xsl:variable><xsl:variable name="apos">'</xsl:variable><xsl:variable name="cl">&#62;</xsl:variable><xsl:value-of select="concat($op,'?pb label=',$apos,preceding::page[1]/@num,$apos,'?',$cl)"/></xsl:if>

and i get the below output

&lt;?pb label='138'?&gt;<div class="tr_footnote"><div class="footnote"><sup><a name="ftn.855" href="#f855" class="tr_ftn">855</a></sup>a</div></div>&lt;?pb label='138'?&gt;<div class="tr_footnote"><div class="footnote"><sup><a name="ftn.857" href="#f857" class="tr_ftn">857</a></sup>b</div></div>&lt;?pb label='138'?&gt;<div class="tr_footnote"><div class="footnote"><sup><a name="ftn.860" href="#f860" class="tr_ftn">860</a></sup>c</div></div>&lt;?pb label='138'?&gt;<div class="tr_footnote"><div class="footnote"><sup><a name="ftn.861" href="#f861" class="tr_ftn">861</a></sup>At [8-209].</div></div>&lt;?pb label='138'?&gt;<div class="tr_footnote"><div class="footnote"><sup><a name="ftn.862" href="#f862" class="tr_ftn">862</a></sup>[1896] 2 Ch 743.</div></div>

but i want the output as below.

&lt;?pb label='138'?&gt;<div class="tr_footnote"><div class="footnote"><sup><a name="ftn.855" href="#f855" class="tr_ftn">855</a></sup>a</div></div><div class="tr_footnote"><div class="footnote"><sup><a name="ftn.857" href="#f857" class="tr_ftn">857</a></sup>b</div></div><div class="tr_footnote"><div class="footnote"><sup><a name="ftn.860" href="#f860" class="tr_ftn">860</a></sup>c</div></div><div class="tr_footnote"><div class="footnote"><sup><a name="ftn.861" href="#f861" class="tr_ftn">861</a></sup>At [8-209].</div></div><div class="tr_footnote"><div class="footnote"><sup><a name="ftn.862" href="#f862" class="tr_ftn">862</a></sup>[1896] 2 Ch 743.</div></div>

i.e. the first footnote following the page number should have pb label tag, the footnote location can be ignored. i.e. the footnote can be anywhere in the XML but the first footnote following para should get pb label tag and rest should be ignored.

please let me know how can i do it.

Thanks


Viewing all articles
Browse latest Browse all 935

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>