i want a small change in my xslt which is as below.
<xsl:variable name="sectnum">
<xsl:number level="any" count="section[(@num and @level ='sect2') or (@level !='sect2' and @level !='sect1') or @level='sect2' or contains(//content-style,'Part')]"/>
</xsl:variable>
here actually i have path for para as section/para and in para i have para/content-style. i want to count the para with string containing 'Part' in it. please let me know how do i do it. the above variable is giving count only for the @level attributes but not for the para part.
a part of my xml is as below.
<?xml version="1.0" encoding="UTF-8"?>
<chapter>
<section level="sect2" number-type="manual" num="1.">
<title>INTRODUCTION</title>
<para>
<phrase>1.001</phrase> This part will consider matters relevant to the administration of a deceased's estate from the death to the application for the grant. Chapter 1 will outline some preliminary steps to be taken immediately on obtaining instructions to act. The distinction between testate and intestate succession, and the practical implications of each, will be considered in Chapter 2. Foreign elements, particularly the relevant questions of domicile, the involvement of PRC law, and overseas property, will be noted in Chapter 3. The steps necessary to obtain estate duty clearance (where now necessary) will be briefly considered in Chapter 4. </para>
</section>
<section level="sect2">
<para>
<content-style font-style="bold">Part 1 The deceased person</content-style>
</para>
</section>
</chapter>
second Scenario
<chapter><section level="sect2">
<para>
<content-style font-style="bold">Part 5 The dependants</content-style>
</para></section>
<section level="sect2">
<para>Complete the table at Appendix B. </para>
<para>
<content-style font-style="bold">Part 6 The estate</content-style>
</para></section>
</chapter>
Thanks