XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Posttop
Rakesh KeerthiSubject: getting different instances of footnotes
Author: Rakesh Keerthi
Date: 07 May 2014 10:33 AM
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

 
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.