Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > XML > XSLT
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old April 15th, 2013, 08:02 AM
Authorized User
Points: 151, Level: 3
Points: 151, Level: 3 Points: 151, Level: 3 Points: 151, Level: 3
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2013
Posts: 31
Thanks: 3
Thanked 0 Times in 0 Posts
Default counter reset problem

Hi,
i've the below xml document.


HTML Code:
<?xml version="1.0" encoding="UTF-8"?>
<chapter num="A">
	<title>
		<content-style font-style="bold">PART 1 GENERAL PRINCIPLES</content-style>
	</title>
	<section level="sect1">
		<title>
			<content-style font-style="bold">Chapter 3: WAYS TO RESOLVE A DISPUTE</content-style>
		</title>
		<section level="sect2">
			<title>Flowchart&#x2014;HKIAC Mediation</title>
			<para>
				<phrase>3.001</phrase>
			</para>
			<figure>
				<title>Flowchart&#x2014;HKIAC Mediation</title>
				<graphic href="ARBHK_121.jpg"/>
			</figure>
		</section>
		<section level="sect2">
			<title>Flowchart&#x2014;Adjudication</title>
			<para>
				<phrase>3.002</phrase>
			</para>
			<figure>
				<title>Flowchart&#x2014;Adjudication</title>
				<graphic href="ARBHK_122.jpg"/>
			</figure>
		</section>
		<section level="sect2" number-type="manual" num="1.">
			<title>INTRODUCTION</title>
			<para>
				<phrase>3.003</phrase> Parties to contracts have traditionally utilised courts to resolve disputes. Alternative Dispute Resolution (ADR) procedures were born out of dissatisfaction with the time and cost of traditional litigation, which often ruined commercial relationships. </para>
			<para>
				<phrase>3.004</phrase> Arbitration was originally considered to be the first form of ADR. However, it has become as lengthy and costly as litigation. Consequently, arbitration is no longer viewed as a true ADR technique. </para>
			<para>
				<phrase>3.005</phrase> ADR is traditionally regarded as any consensual system of dispute resolution which is non-binding. That is, there is no imposed decision in respect of the dispute. However, with the rapidly developing alternatives to arbitration and litigation today, a wider view should be taken. Brown and Marriott define ADR as &#x201C;a range of procedures that serve as alternatives to litigation through the courts for the resolution of disputes, generally involving the intercession and assistance of a neutral and impartial third party&#x201D;.<footnote num="1">
					<para>Brown, H. and Marriott, A., <content-style font-style="italic">ADR Principles and Practice</content-style>, 2nd edn (Sweet &#x0026; Maxwell, 1999), 12. </para>
				</footnote> This includes dispute resolution techniques which involve the imposition of a binding decision on a party as well as techniques which involve non-binding decisions. Certain countries, such as the United States, Canada, Australia and New Zealand have court-annexed ADR. </para>
			<para>
				<phrase>3.006</phrase> Parties may agree to undergo a particular ADR technique in the event of a dispute between them by entering into an ADR agreement. There are a number of ADR procedures to choose from. The procedure may involve only the parties to the dispute (such as negotiation), or may involve an independent third party. The third party may facilitate the parties&#x2019; own consensual resolution of the dispute (as in mediation/conciliation), or the third party may give an opinion on the issues in dispute (as is usually the case with a Dispute Review Board). The third party may produce a binding decision (such as adjudication) or a non-binding decision (such as expert determination). These various ADR techniques will be discussed (in paras.3.007-3.111) below. They can be compared with partnering which involves dispute avoidance (see paras.3.112 to 3.127), and the more traditional arbitration and litigation (see paras.3.128 to 3.172). </para>
		</section>
		<section level="sect2" number-type="manual" num="2.">
			<title>NEGOTIATION?</title>
			<section level="sect3" number-type="manual" num="(a)">
				<title>What is Negotiation?</title>
				<para>
					<phrase>3.007</phrase> Negotiation can be defined as a process through which parties move from their initially divergent positions to a point where agreement can be reached. It is a consensual bargaining process in which parties attempt to reach agreement on a disputed, or potentially disputed, matter. Negotiation allows parties to get something they would not get by acting unilaterally. What sets negotiation apart from the other dispute resolution techniques described below is that it allows, but does not compel, autonomy without third party intervention,<footnote num="2">
						<para>Nolan-Haley, J., <content-style font-style="italic">Alternative Dispute Resolution in a Nutshell</content-style>, 2nd edn (West Group, 2001), 15. </para>
					</footnote> although it can form an important part of certain ADR procedures, e.g. mediation or conciliation. </para>
				<para>
					<phrase>3.008</phrase> It may be stating the obvious, but negotiation can (and should) be used on its own to resolve a dispute. In fact, many dispute resolution clauses in commercial contracts require the parties to try to resolve disputes between them by negotiation prior to the initiation of any arbitration or legal proceedings. A common dispute resolution clause will use words to the effect of &#x201C;the parties shall use their best efforts in good faith to reach a reasonable and equitable resolution&#x201D; (the concept of good faith negotiation will be discussed further in para.3.020 below). Alternatively, negotiation can be used as a facilitating technique in one of the many other methods of dispute resolution. It is of particular importance in mediation or conciliation (which is discussed in para.3.027 below). </para>
			</section>
			<section level="sect3" number-type="manual" num="(b)">
				<title>Objective Theories of Negotiation</title>
				<para>
					<phrase>3.009</phrase> Negotiation is a learned skill. Although usually learned by experience, it is important to be aware of the different objective theories of negotiation in order to optimise the chances of engaging in a successful negotiation, both as a party to the negotiation, and as a facilitator. </para>
				<para>
					<phrase>3.010</phrase> There are two main theories of negotiation:</para>
				<orderedlist type="manual">
					<item num="(1)">
						<para>problem-solving negotiation; and </para>
					</item>
					<item num="(2)">
						<para>competitive negotiation. </para>
					</item>
				</orderedlist>
				<section level="sect3" number-type="manual" num="(i)">
					<title>Problem-Solving Negotiation</title>
					<para>
						<phrase>3.011</phrase> Problem-solving negotiation focuses on the opportunities for joint, rather than individual gain. The negotiators view the dispute as a mutual problem that has the potential for being resolved to the parties&#x2019; mutual satisfaction and they then search for ways to create value so that both sides may benefit.<footnote num="3">
							<para>
								<content-style font-style="italic">Ibid.</content-style>, 24. </para>
						</footnote> Different authors suggest different ways of approaching problem-solving negotiation. Naturally, it is not an exact science, and inevitably the different techniques will overlap. One technique propounded by well-known authors Roger Fisher and William Ury<footnote num="4">
							<para>Fisher, R. and Ury, W., <content-style font-style="italic">Getting to Yes: Negotiating Agreement Without Giving In</content-style> (Houghton Mifflin, 1981). </para>
						</footnote> requires the parties to: </para>
					<orderedlist type="manual">
						<item num="(1)">
							<para>concentrate on their respective interests as opposed to the defence of their positions; </para>
						</item>
						<item num="(2)">
							<para>adopt a problem-solving approach, separating any personality differences from the problem; </para>
						</item>
						<item num="(3)">
							<para>generate as many options as possible, particularly those creating mutual benefit, before making a decision; </para>
						</item>
						<item num="(4)">
							<para>establish objective and fair criteria for a principled negotiation and a resolution independent of will. </para>
						</item>
					</orderedlist>
					<para>
						<phrase>3.012</phrase> Fisher and Ury&#x2019;s technique is to ensure the parties bear in mind their Best Alternative to a Negotiated Agreement (referred to as the BATNA). Where the alternative is costly and time-consuming litigation, this should encourage them to make genuine efforts to negotiate and to continue to explore satisfactory settlement options achievable by negotiation. </para>
					<para>
						<phrase>3.013</phrase> Another technique propounded by the author Howard Raiffa<footnote num="5">
							<para>Raiffa, H., <content-style font-style="italic">The Art and Science of Negotiation</content-style> (Belknap Press of Harvard University Press, 1982). </para>
						</footnote> distinguishes between distributive and integrative bargaining. Distributive bargaining is where the parties believe there are limited resources to divide. This is particularly relevant in single issue disputes where it is perceived that the more one party gets, the less another party gets. On the other hand, integrative bargaining is where there is more than one issue between the parties, such that several alternative and mutually beneficial solutions may arise. </para>
					<para>
						<phrase>3.014</phrase> Raiffa advocates the detailed assessment of: </para>
					<orderedlist type="manual">
						<item num="(1)">
							<para>litigation risks; </para>
						</item>
						<item num="(2)">
							<para>parties&#x2019; positions and prospects of success; and </para>
						</item>
						<item num="(3)">
							<para>the criteria for settlement for each side. </para>
						</item>
					</orderedlist>
					<para>
						<phrase>3.015</phrase> He sets out &#x201C;zones of agreement&#x201D; which include the range of possible terms of settlement in the context of the particular case and outlines other negotiation tools. For the application of problem-solving negotiation in a separate technique of dispute resolution, (see partnering at para.3.112). </para>
				</section>
				<section level="sect3" number-type="manual" num="(ii)">
					<title>Competitive Negotiation</title>
					<para>
						<phrase>3.016</phrase> Competitive (or adversarial) negotiation involves positional bargaining with a winner and a loser. The successful negotiator does not move far from their adopted position. It is distributive, thereby achieving the best outcome for the successful negotiator, irrespective of the outcome for the other party. It is characterised by hard bargaining with few concessions, the use of threats, stretching the truth and withholding information. The aim is to destroy the confidence of the other side, driving them to make concessions leading to a less satisfactory outcome. </para>
					<para>
						<phrase>3.017</phrase> The problems with this approach include: </para>
					<orderedlist type="manual">
						<item num="(1)">
							<para>joint gains cannot be identified; </para>
						</item>
						<item num="(2)">
							<para>communication and information flow is hindered; </para>
						</item>
						<item num="(3)">
							<para>tension, mistrust and anger results, affecting relationships (not favourable where there is the need for an ongoing commercial relationship); </para>
						</item>
						<item num="(4)">
							<para>negotiations are more likely to break down which leads to deadlock being reached. </para>
						</item>
					</orderedlist>
					<para>
						<phrase>3.018</phrase> Clearly this competitive approach to dispute resolution is less satisfactory than the problem-solving approach. If parties to a dispute employ this approach they are more likely to attract the litigation process than to avoid it, rendering the negotiation process a waste of time. </para>
				</section>
			</section>
			<section level="sect3" number-type="manual" num="(c)">
				<title>Subjective Factors in Negotiation</title>
				<para>
					<phrase>3.019</phrase> Negotiation success is not just dependent on the above objective theories. It is also affected by subjective factors such as:<footnote num="6">
						<para>Brown, H. and Marriott, A., <content-style font-style="italic">ADR Principles and Practice</content-style>, 2nd edn (Sweet &#x0026; Maxwell, 1999), 111&#x2013;117. </para>
					</footnote>
				</para>
				<orderedlist type="manual">
					<item num="(1)">
						<para>the skills of the negotiator (which involves their natural ability to negotiate, together with their learned techniques of negotiation); </para>
					</item>
					<item num="(2)">
						<para>the strategies employed by the negotiator (which depends on the combination of techniques they use, together with their actual tactics); </para>
					</item>
					<item num="(3)">
						<para>negotiation style (which depends on the negotiator&#x2019;s personality); </para>
					</item>
					<item num="(4)">
						<para>the relative power base of the parties; and </para>
					</item>
					<item num="(5)">
						<para>culture and gender. </para>
					</item>
				</orderedlist>
			</section>
			<section level="sect3" number-type="manual" num="(d)">
				<title>Good Faith in Negotiation</title>
				<para>
					<phrase>3.020</phrase> In some civil law jurisdictions, there is an overriding principle of good faith in the formation and performance of contracts. Pre-contractual liability can attach to parties where there is found to be a failure to negotiate in good faith. In Hong Kong (and other common law jurisdictions), parties are able to negotiate without risk of pre-contractual liability. This is due to the court&#x2019;s traditional reluctance to impose a duty of good faith on negotiating parties unless a specific fiduciary relationship exists. To this end, in <case>
						<content-style font-style="italic">Walford v Miles</content-style>
					</case>
					<footnote num="7">
						<para>
							<case>[1992] 2 AC 128</case>, 138, (Lord Ackner).</para>
					</footnote> the House of Lords said:</para>
				<extract>
					<para>&#x201C;the concept of a duty to carry on negotiations in good faith is inherently repugnant to the adversarial position of the parties when involved in negotiations. Each party to negotiations is entitled to pursue his (or her) own interests, so long as he avoids making misrepresentations. To advance that interest he must be entitled, if he thinks it appropriate, to threaten to withdraw from further negotiations or to withdraw in fact, in the hope that the opposite party may seek to reopen the negotiations by offering him improved terms.&#x201D;</para>
				</extract>
				<para>
					<phrase>3.021</phrase> In <case>
						<content-style font-style="italic">Halifax Financial Services Ltd v Intuitive Systems Ltd</content-style>
					</case>,<footnote num="8">
						<para>
							<case>(2000) 2 TCLR 35</case>, QBD.</para>
					</footnote> McKinnon J. followed <content-style font-style="italic">Walford v Miles</content-style> and accepted that the courts had consistently declined to compel parties to engage in co-operative processes, particularly &#x201C;good faith&#x201D; negotiations, because of the practical and legal impossibility of monitoring and enforcing the process.</para>
				<para>
					<phrase>3.022</phrase> There are, however, dissenting views from judges that an agreement to negotiate in good faith was not enforceable. In <case>
						<content-style font-style="italic">Hyundai Engineering and Construction Co Ltd v Vigour Ltd</content-style>
					</case>
					<footnote num="9">
						<para>
							<case>[1996] 2 HKC 395</case>.</para>
					</footnote> Reyes J. expressed that:</para>
				<extract>
					<para>&#x201C;I have some difficulty with Lord Ackner&#x2019;s reasoning [above]. For example, continental European legal systems have long applied the concept of &#x201D;good faith&#x201D; in the adjudication of commercial disputes without apparent problem. Similarly, the English Court in its equitable jurisdiction is constantly concerned to ensure that fiduciaries have not acted in bad faith towards beneficiaries. In light of such legal experience, it is difficult to see why an English or Hong Kong Court should have any real difficulty in assessing whether parties have objectively acted in a spirit of cooperation and good faith.&#x201D;</para>
				</extract>
				<para>
					<phrase>3.023</phrase> Similarly, Allsop P. in <content-style font-style="italic">United Group Rail Services Ltd v Rail Corporation New South Wales</content-style>
					<footnote num="10">
						<para>
							<case>
								<content-style font-style="italic">United Group Rail Services Ltd v Rail Corporation New South Wales</content-style> [2009] NSWCA 177</case>.</para>
					</footnote> said that:</para>
				<extract>
					<para>&#x201C;An obligation to undertake discussions about a subject in an honest and genuine attempt to reach an identified result is not incomplete. It may be referable to a standard concerned with conduct assessed by subjective standards, but does not make the standard or compliance with the standard impossible of assessment.&#x201D;</para>
				</extract>
				<para>
					<phrase>3.024</phrase> In the English case <case>
						<content-style font-style="italic">Petromec Inc v Petroleo Brasileiro SA Petrobras</content-style>
					</case>,<footnote num="11">
						<para>
							<case>[2006] 1 Lloyd's Rep 121</case>.</para>
					</footnote> the Court of Appeal considered that where the parties had entered into a written contract including provisions for good faith negotiation, and in particular where legal advisers had been consulted in the drafting of those terms, the court may conclude that such provisions were enforceable.</para>
				<para>
					<phrase>3.025</phrase> It seems that the courts are more prepared to assess whether a negotiation was conducted in good faith; or at the least, there can be no blanket rule which automatically deems all agreements to negotiate in good faith as unenforceable. Of course, where lawyers or other professionals bound by ethical rules of conduct are involved in negotiations, a duty to negotiate in good faith is imposed, such that they must not lie or mislead the other party during negotiations. The general law of misrepresentation, deceit and duress applies to the conduct of negotiations. To avoid any confusion, parties who enter into contracts with obligations to negotiate with or without the assistance of a neutral third party, should expressly specify the requirement that parties negotiate in good faith using their best endeavours.</para>
			</section>
			<section level="sect3" number-type="manual" num="(e)">
				<title>Summary</title>
				<para>
					<phrase>3.026</phrase> The above discussion of negotiation is very general. It does not attempt to arm the reader with formidable negotiation skills, which are moulded by personality and experience, but aims to draw attention to the different techniques and how their effective use can in fact help parties to resolve disputes.</para>
			</section>
		</section>
		<section level="sect2" number-type="manual" num="3.">
			<title>MEDIATION/CONCILIATION</title>
			<section level="sect3" number-type="manual" num="(a)">
				<title>What is Mediation?</title>
				<para>
					<phrase>3.027</phrase> Mediation and conciliation involves a neutral intermediary, the mediator, who encourages disputing parties to arrive at an agreed resolution of their dispute. It is an informal, consensual and facilitative process. The mediator has no authority to make decisions that are binding on the parties, and does not adjudicate on the dispute. Conciliation and mediation have long been preferred mechanisms in Asia for resolving disputes by non-confrontational means, to preserve relationships and &#x201C;face&#x201D;. Traditionally, Asian cultures seek a harmonious solution and not an imposed one.</para>
			</section>
			<section level="sect3" number-type="manual" num="(b)">
				<title>What is Conciliation?</title>
				<para>
					<phrase>3.028</phrase> The term &#x201C;conciliation&#x201D; is used interchangeably with &#x201D;mediation&#x201D;. The new Arbitration Ordinance (Cap.609) defines mediation as including conciliation. Where the mediator takes a more pro-active role, the term &#x201C;evaluative mediation&#x201D; is used.</para>
			</section>
			<section level="sect3" number-type="manual" num="(c)">
				<title>The Development of Mediation in Hong Kong</title>
				<para>
					<phrase>3.029</phrase> Mediation began to emerge in the Hong Kong commercial scene in the early 1980s. At this time, arbitration was the most common form of dispute resolution of commercial contracts. However, a pattern of massive cost and timetable blowouts began to occur, particularly in several high-profile construction cases, leading parties to question the point of arbitration. In 1984, partially at the urging of the Hong Kong Construction Association, the Government introduced mediation in a selection of public works contracts on a trial basis. The scheme was administered by the Hong Kong Institute of Engineers (HKIE), adopting the HKIE Mediation Service Rules. A revised set of rules was issued in 1989. The 1990 Government Conditions of Contract included a provision for mediation to take place before arbitration (although not mandatory). New Government Mediation Rules were issued in 1991, and Hong Kong International Arbitration Centre (HKIAC) shortly followed with its own rules. At this time, the HKIAC took over the administration of mediations from the HKIE. The Airport Core Programme (ACP) Contract included mandatory mediation in its innovative four-tiered dispute resolution system. The KCRC West Rail General Conditions of Contract and MTR General Conditions of Contract also provide for compulsory mediation (although, unlike the ACP Contract, they do not provide for adjudication). A new set of Government Construction Mediation Rules (amended in October 2003) and a new set of HKIAC Mediation Rules were published in 1999. In line with the underlying objectives of the Civil Justice Reform implemented on 2 April 2009 (CJR), the new Practice Direction 31 on mediation came into effect in 1 January 2010 which encourages litigants to mediate before or during court proceedings.</para>
			</section>
			<section level="sect3" number-type="manual" num="(d)">
				<title>Fundamentals of Mediation</title>
				<para>
					<phrase>3.030</phrase> The fundamentals of mediation include:</para>
				<orderedlist type="manual">
					<item num="(1)">
						<para>unlike negotiation, there must be a mediator. The parties cannot conduct a mediation without the dynamic of the third person;</para>
					</item>
					<item num="(2)">
						<para>the mediator must be impartial;</para>
					</item>
					<item num="(3)">
						<para>the mediator does not have the authority to make a determination or finding;</para>
					</item>
					<item num="(4)">
						<para>the mediator&#x2019;s authority is derived from the parties;</para>
					</item>
					<item num="(5)">
						<para>the resolution of the dispute must be consensual, such that the only binding outcome of the mediation is one on which all parties agree;</para>
					</item>
					<item num="(6)">
						<para>the process involves negotiation by the parties facilitated by the mediator&#x2019;s unique communication, negotiation and other skills;</para>
					</item>
					<item num="(7)">
						<para>the mediator can see the parties on their own and such discussions are confidential;</para>
					</item>
					<item num="(8)">
						<para>the parties must be provided with a secure negotiating environment. They must feel able to negotiate freely without fear, threat or harassment. Confidentiality and evidential privilege must be provided, and indeed most mediation rules ensure nothing that transpires in the mediation can be used in a subsequent dispute resolution procedure;</para>
					</item>
					<item num="(9)">
						<para>the parties have the ability to make decisions on their own;</para>
					</item>
					<item num="(10)">
						<para>the process is confidential, if this is desired and agreed by the parties;</para>
					</item>
					<item num="(11)">
						<para>the mediator may obtain independent advice from lawyers or experts at any time;</para>
					</item>
					<item num="(12)">
						<para>mediation preserves relationships.</para>
					</item>
				</orderedlist>
			</section>
			<section level="sect3" number-type="manual" num="(e)">
				<title>Mediation Models</title>
				<para>
					<phrase>3.031</phrase> There are different models for the conduct of a mediation depending on the nature of the dispute. Key features which distinguish different techniques of mediation are described below.<footnote num="12">
						<para>Brown, H. and Marriott, A., <content-style font-style="italic">ADR Principles and Practice</content-style>, 2nd edn (Sweet &amp; Maxwell, 1999), 135&#x2013;145.</para>
					</footnote>
				</para>
				<section level="sect4" number-type="manual" num="(i)">
					<title>Is it voluntary or mandatory?</title>
					<para>
						<phrase>3.032</phrase> Although mediation is generally considered to be consensual, disputants are often required to participate. For example, court rules may require it (although this is not a requirement in the Hong Kong court rules but is a requirement in some other jurisdictions such as Australia). Alternatively, commercial contracts may require it (especially in construction contracts).</para>
					<para>
						<phrase>3.033</phrase> What may seem like a contradiction is that a party cannot be compelled to negotiate. They can only be compelled to be brought together to participate in the mediation process. The goal of mandatory mediation is to bring initially reluctant, uncommunicative parties together and, with the help of a skilled mediator, to convert them into willing negotiators. This was explained persuasively in <case>
							<content-style font-style="italic">Hooper Bailie Associated Ltd v Natcon Group Pty Ltd</content-style>
						</case>
						<footnote num="13">
							<para>
								<case>(1992) 28 NSWLR 194, 206</case>.</para>
						</footnote> by Giles J:</para>
					<extract>
						<para>&#x201C;the most fundamental resistance to compromise can wane and turn to co-operation and consent if the dispute is removed from the adversarial procedures of the court and exposed to procedures designed to promote compromise, in particular where a skilled conciliator or mediator is interposed between the parties. What is enforced is not co-operation and consent, but participation in a process from which co-operation and consent might come.&#x201D;</para>
					</extract>
					<para>
						<phrase>3.034</phrase> While it is not mandatory to mediate in Hong Kong, the newly issued Practice Direction 31 requires parties to legal proceedings to consider using mediation to resolve their dispute. Most importantly, the court could issue adverse costs order if a party &#x201C;unreasonably fails&#x201D; to mediate, unless the party has a reasonable explanation for not engaging in mediation; or if the party has engaged in mediation to the minimum level of participation as agreed between the parties.<footnote num="14">
							<para>Practice Direction 31 (Mediation)&#x2014;<uri href="http://legalref.judiciary.gov.hk/lrs/common/pd/pdcontent.jsp?pdn=PD31.htm&#x0026;lang=EN">http://legalref.judiciary.gov.hk/lrs/common/pd/pdcontent.jsp?pdn=PD31.htm&#x0026;lang=EN</uri> visited on 14 Jan 2011.</para>
						</footnote>
					</para>
				</section>
				<section level="sect4" number-type="manual" num="(ii)">
					<title>Which field of practice?</title>
					<para>
						<phrase>3.035</phrase> Mediation technique is influenced by what is suitable for the particular dispute. For example, a mediator of a commercial dispute may focus the negotiations on the preservation of the relationship of the parties since there will be a continuing relationship. This may not be such a focus if the parties&#x2019; dealings are one-off or short-term only.</para>
				</section>
				<section level="sect4" number-type="manual" num="(iii)">
					<title>Facilitation or evaluation?</title>
					<para>
						<phrase>3.036</phrase> All mediation is facilitative in that the parties are helped to communicate and negotiate, explore options and increase common ground. However, a distinction is made between purely facilitative mediation (interest-based) and evaluative mediation (rights-based). Evaluative mediation is where the mediator expresses a view on the respective merits of the issues between the parties. The evaluation is not binding but may influence the parties&#x2019; assessment of the strengths and weaknesses of their case. This may be pivotal in bringing the parties to an amicable settlement.</para>
				</section>
				<section level="sect4" number-type="manual" num="(iv)">
					<title>Settlement-oriented or therapeutic?</title>
					<para>
						<phrase>3.037</phrase> Mediation is generally seen as a way of reaching settlement via a competitive bargaining process with trade-offs and compromise. However, some mediation is seen as a way of helping the parties to communicate and understand their differences. This &#x201C;therapeutic&#x201D; approach which does not result in settlement may lead to a future settlement by negotiation</para>
				</section>
				<section level="sect4" number-type="manual" num="(v)">
					<title>Degree of intervention?</title>
					<para>
						<phrase>3.038</phrase> There are different views as to the degree of intervention that should take place in mediation. One school of thought is that the mediator has a limited role of facilitating discussions between the parties thereby empowering them to take control of the resolution of the dispute. Another school of thought is that the mediator should adopt a pro-active role with aggressive intervention, putting pressure on the parties to reach settlement.</para>
					<para>
						<phrase>3.039</phrase> The interventionist approach is beneficial where the parties cannot resolve a dispute themselves, and where they involve a competent, suitably skilled third party in their discussions with a view to that person contributing in a way that helps them to resolve the dispute. Necessarily, this involves pointing out the respective strengths and weaknesses of the parties&#x2019; cases. The problems perceived with the interventionist approach are that it introduces a new personality dynamic into an already fragile relationship, and imposes the mediator&#x2019;s views on the parties.</para>
				</section>
				<section level="sect4" number-type="manual" num="(vi)">
					<title>Professionalisation</title>
					<para>
						<phrase>3.040</phrase> One benefit of mediation is that it avoids the formalities of other forms of dispute resolution, litigation in particular. However, in order to give mediation legitimacy and credibility it is important that a certain level of formality is imported into the process and that mediators are trained and viewed as professionals in their own right, irrespective of their professional background. There are a number of highly respected and experienced mediators based in Hong Kong. The HKIAC Mediation Council (HKMC) has a list of mediators and also runs training courses and generally encourages the use of mediation.</para>
				</section>
				<section level="sect4" number-type="manual" num="(vii)">
					<title>Sole mediation or co-mediation?</title>
					<para>
						<phrase>3.041</phrase> Co-mediation is useful in a demanding mediation so the mediators can &#x201C;share the load.&#x201D; While one mediator listens and reflects the other can interact with the parties. It is also useful where multidisciplinary skills would be beneficial. Sole mediation is better from a cost savings point of view and minimises the chances of mediator conflict.</para>
				</section>
				<section level="sect4" number-type="manual" num="(viii)">
					<title>Joint or separate meetings?</title>
					<para>
						<phrase>3.042</phrase> Joint meetings decrease suspicion and enhance openness and communication. Separate meetings on the other hand allow the parties to express their feelings, and allows the mediator to point out weaknesses in that party&#x2019;s case.</para>
				</section>
				<section level="sect4" number-type="manual" num="(ix)">
					<title>Codes of practice</title>
					<para>
						<phrase>3.043</phrase> Mediations will vary depending on the applicable codes and rules of practice (see para.3.048).</para>
				</section>
			</section>
			<section level="sect3" number-type="manual" num="(f)">
				<title>When Should Parties Mediate?</title>
				<para>
					<phrase>3.044</phrase> Examples of when mediation can arise include:</para>
				<orderedlist type="manual">
					<item num="(1)">
						<para>where a contract clause stipulates that the parties to the contract must attempt to mediate a dispute under the contract before entering into arbitration or litigation;</para>
					</item>
					<item num="(2)">
						<para>in the absence of a contractual requirement, the parties agree to mediate on the occurrence of a dispute, or where litigation or arbitration is underway and the parties agree to take time out to attempt to mediate a resolution. A useful time to consider mediation is after the exchange of pleadings and discovery.</para>
					</item>
				</orderedlist>
			</section>
			<section level="sect3" number-type="manual" num="(g)">
				<title>Which Institutions Facilitate Mediation in Hong Kong?</title>
				<para>
					<phrase>3.045</phrase> Four institutions linked to mediation in Hong Kong are:</para>
				<orderedlist type="manual">
					<item num="(1)">
						<para>the Hong Kong International Arbitration Centre (HKIAC) and the HKMC;</para>
					</item>
					<item num="(2)">
						<para>the Hong Kong Institute of Arbitrators (HKIArb);</para>
					</item>
					<item num="(3)">
						<para>the International Chamber of Commerce (ICC); and</para>
					</item>
					<item num="(4)">
						<para>the East-Asia Branch of the Chartered Institute of Arbitrators.</para>
					</item>
				</orderedlist>
				<para>
					<phrase>3.046</phrase> The HKIAC was established in 1985 to assist disputing parties in solving their disputes by arbitration, by ADR and by mediation. The HKIAC is a non-profit making company limited by guarantee. It was established by a group of leading business and professional people in Hong Kong to be the focus in Asia for dispute resolution. It is funded by the business community and the Government of Hong Kong but is independent of both. The HKIAC accredits suitably qualified persons as mediators. The HKMC was set up within the structure of the HKIAC in January 1994 as a division of the HKIAC to promote the development and use of mediation as a method of resolving disputes. It aims to promote the development and use of mediation and other forms of ADR.<footnote num="15">
						<para>
							<uri href="http://www.hkiac.org/show_content.php?article_id=35">http://www.hkiac.org/show_content.php?article_id=35</uri> (visited on 21/01/11) and the Hong Kong International Arbitration Centre Mediation Rules. </para>
					</footnote> The HKMC has actively promoted the use of mediation in such fields as construction, community, commercial and family. See also para.5.078.</para>
				<para>
					<phrase>3.047</phrase> The ICC is another widely respected body based in Paris which aims to facilitate the resolution of disputes inevitably arising in trade relations.</para>
			</section>
			<section level="sect3" number-type="manual" num="(h)">
				<title>Are There any Rules which Apply to Mediations?</title>
				<para>
					<phrase>3.048</phrase> The parties to a mediation agreement may agree which rules will apply to mediation in the event that the parties end up in dispute. Although they may agree to their own rules, it is better to apply rules which are commonly used, have been tried and tested and which have been prepared by a body with experience in the mediation process. Some examples of mediation rules include the HKIAC Mediation Rules (effective from 1 August 1999), the Government of Hong Kong SAR Construction Mediation Rules (1999 Edition, revised in 2003) (Government Mediation Rules) and the ICC ADR Rules (in force as from 1 January 2008) (ICC ADR Rules). A flow chart of a typical HKIAC mediation procedure is appended (see para.3.001). It is of note that both the HKIAC Mediation Rules and the Government Mediation Rules have been revised to remove the requirement for a mediator to provide an opinion in a report upon request by one of the parties. Many mediators were of the view that providing an opinion and report writing were inconsistent with the fundamentals of mediation. Mediators are usually barred from subsequently acting in any capacity in the future conduct of the dispute, e.g. HKIAC Mediation Rule cl.14. However, a mediator can act as an arbitrator and vice versa pursuant to s.32 of the new Arbitration Ordinance (Cap.609).</para>
				<para>
					<phrase>3.049</phrase> Practice Direction 31 laid down procedures for encouraging parties to resolve their disputes by ADR in civil proceedings begun by writ in the Court of First Instance and the District Court, with the exception of proceedings in specialist lists. Solicitors for the parties are required to file in Court a mediation certificate and a time tabling questionnaire so that the Court can decide on appropriate directions for the conduct of a case. If a party wishes to attempt mediation, he will serve a mediation notice on the other party as soon as the mediation certificate has been filed. The applicant will state in the mediation notice that he wishes to attempt mediation, and will propose details of mediation such as the appointment of mediator, the venue for mediation, rules to be applied, fees and costs of mediation, etc. The respondent, upon receiving a mediation notice, must serve a mediation response within 14 days and to state whether he agrees to engage in mediation. If the parties agree to mediate, they may apply to court for an interim stay of proceedings and proceed in accordance with the stipulated rules and timetable.<footnote num="16">
						<para>Practice Direction 31 (Mediation).</para>
					</footnote> Otherwise, the Court may make an adverse costs order if it considers a party unreasonably fails to engage in mediation.<footnote num="17">
						<para>
							<case>
								<content-style font-style="italic">Golden Eagle International (Group) Ltd v GR Investment Holdings Ltd</content-style> [HCA 2032/2007]</case>.</para>
					</footnote>
				</para>
			</section>
			<section level="sect3" number-type="manual" num="(i)">
				<title>Strengths of Mediation</title>
				<para>
					<phrase>3.050</phrase> Mediation is becoming more and more popular and is a common feature of dispute resolution in Hong Kong, particularly in the construction industry. The strengths of the mediation process include the following:</para>
				<orderedlist type="manual">
					<item num="(1)">
						<para>mediation fosters the expeditious and relatively inexpensive resolution of disputes;</para>
					</item>
					<item num="(2)">
						<para>mediation fosters communication between parties and is a private forum between parties;</para>
					</item>
					<item num="(3)">
						<para>mediation avoids bad publicity;</para>
					</item>
					<item num="(4)">
						<para>mediation promotes good, workable relationships where cooperation, creative solutions and mutual gain are the focus;</para>
					</item>
					<item num="(5)">
						<para>the parties can explore the merits and weaknesses of their position in an open environment, knowing that anything they say is restricted for use in that environment only and cannot be used in future arbitrations or court hearings; and</para>
					</item>
					<item num="(6)">
						<para>the parties have control of the outcome, unlike some other forms of dispute resolution such as arbitration or litigation.</para>
					</item>
				</orderedlist>
				<para>
					<phrase>3.051</phrase> Where mediation has been used in Hong Kong, it has resulted in a high percentage of settlements.</para>
			</section>
			<section level="sect3" number-type="manual" num="(j)">
				<title>Weaknesses of Mediation</title>
				<para>
					<phrase>3.052</phrase> On the other hand, there are some drawbacks to mediation which include:</para>
				<orderedlist type="manual">
					<item num="(1)">
						<para>mediation&#x2019;s success depends on the willingness of the parties to participate in and commit to the process;</para>
					</item>
					<item num="(2)">
						<para>not all disputes are suited to mediation, for example where the focus is on the law rather than the facts;</para>
					</item>
					<item num="(3)">
						<para>mediation does not require a formal &#x201C;discovery&#x201D; of documents as in arbitration and litigation. Therefore the parties need to rely on the other party&#x2019;s openness and honesty about the strengths and weaknesses of their case. This is open to abuse, for example where one party fully intends to go to arbitration and uses the mediation process to find weaknesses in the other party&#x2019;s case;</para>
					</item>
					<item num="(4)">
						<para>complex disputes cannot always be resolved within the short time frame available in mediations and without heavy reliance on documents.</para>
					</item>
				</orderedlist>
				<para>
					<phrase>3.053</phrase> Consequently, many mediations fail to arrive at a binding settlement agreement.</para>
			</section>
			<section level="sect3" number-type="manual" num="(k)">
				<title>Summary</title>
				<para>
					<phrase>3.054</phrase> Mediation is a quick and inexpensive procedure which facilitates a consensual solution, and has been highly successful in Hong Kong.</para>
			</section>
		</section>
		</section>
		</chapter>

and the below xslt

HTML Code:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ntw="Number2Word.uri" exclude-result-prefixes="ntw">

	<xsl:variable name="ThisDocument" select="document('')"/>
	<xsl:output method="html"/>
	<xsl:template match="/">

		<xsl:text disable-output-escaping="yes">&lt;!DOCTYPE&gt;</xsl:text>
		<html>
			<head>
				<xsl:text disable-output-escaping="yes"><![CDATA[</meta>]]></xsl:text>
				<title>
					<xsl:value-of select="substring-after(chapter/section/title,':')"/>
				</title>
				<link rel="stylesheet" href="er:#css" type="text/css"/><xsl:text disable-output-escaping="yes"><![CDATA[</link>]]></xsl:text>
			</head>
			<body>
				<xsl:apply-templates/>
				
				<section class="tr_footnotes">
				<hr/>
					<xsl:apply-templates select="//footnote" mode="footnote"/>
				</section>
			</body>
		</html>
	</xsl:template>
	<xsl:template match="chapter">
		<section class="tr_chapter">
			<div class="chapter">
			<xsl:variable name="l">
			<xsl:value-of select="substring(substring-after(section/title,' '),1,1)"/>
			</xsl:variable>
				<a name="AHK_CH_0{$l}"/>
				
				<div class="chapter-title">
				<xsl:variable name="titl">
				<xsl:value-of select="substring-after(section/title,':')"/>
				</xsl:variable>
					<span class="chapter-num">
						<xsl:value-of select="concat('Chapter ',$l,' ')"/>
					</span>
					<xsl:value-of select="$titl"/>
					<!--xsl:apply-templates select="section/title"/-->
				</div>
	
	<div class="para align-right"><span class="format-smallcaps">Para</span>.</div>
				<div class="toc">
					<div class="toc-part">
						<table class="toc-div">
							<tbody>
								<tr>
									<td>
										<xsl:for-each select="current()/section/section|current()/section/section/section[contains(@num, '(')]|current()/section/section/section/section[contains(@num, '(')]">
											<xsl:call-template name="IndexItem">
                                            </xsl:call-template>
										</xsl:for-each>
									</td>
								</tr>
							</tbody>
						</table>
					</div>
				</div>
				<xsl:apply-templates select="section/section"/>
			</div>
		</section>
	</xsl:template>
		
	<xsl:template match="chapter/para">
		<div class="para align-right">
			<span class="format-smallcaps">Para</span>.
        </div>
		<xsl:apply-templates select="section"/>
	</xsl:template>
	<!-- Index templates -->
	<!--<xsl:template name="toc" match="chapter/toc">
		<div class="toc">
			<xsl:call-template name="toc-part"/>
		</div>
	</xsl:template>-->
	<!--<xsl:template name="toc-part" match="chapter/toc/toc-part">
		<div class="toc-part">
			<xsl:call-template name="toc-div"/>
		</div>
	</xsl:template>
	<xsl:template name="toc-div" match="chapter/toc/toc-part/toc-div">
		<table class="toc-div">
			<tbody>
				<xsl:for-each select="current()/toc-part/toc-div/*">
					<xsl:call-template name="toc-item"/>
				</xsl:for-each>
			</tbody>
		</table>
	</xsl:template>-->
	<!--<xsl:template name="toc-item" match="chapter/toc/toc-part/toc-div/toc-item">
		<xsl:variable name="tocpg">
			<xsl:value-of select="concat('#P',current()/toc-pg/text())"/>
		</xsl:variable>
		<xsl:variable name="tocpgtag" select="translate($tocpg,'.', '-')"/>
		<xsl:variable name="chapternumber">
			--><!-- Get num attribute of parent node --><!--
			<xsl:value-of select="ancestor::chapter[1]/@num"/>
		</xsl:variable>
		<xsl:variable name="itemlevel">
			<xsl:value-of select="$ThisDocument//ntw:nums[@num=$chapternumber]/@word"/>
		</xsl:variable>
		<xsl:variable name="tocitemlevel">
			<xsl:value-of select="concat('toc-item-', $itemlevel,'-level')"/>
		</xsl:variable>
		<table class="{$tocitemlevel}">
			<tbody>
				<tr>
					<td class="toc-item-num">
						<xsl:value-of select="current()/@num"/>
					</td>
					<td class="toc-title">
						<xsl:value-of select="current()/toc-title"/>
					</td>
					<td class="toc-pg">
						<a href="{$tocpgtag}">
							<xsl:value-of select="current()/toc-pg"/>
						</a>
					</td>
				</tr>
			</tbody>
		</table>
	</xsl:template>-->
	<xsl:template name="fig" match="figure">
		<div class="figure">
		<div class="figure-title">
		<xsl:value-of select="current()/title"/>
		</div>
			<xsl:variable name="numb">
			<xsl:value-of select="substring-after(graphic/@href,'_')"/>
			</xsl:variable>
		<xsl:variable name="figCon">
			<xsl:value-of select="concat('er:#page-',$numb)"/>
		</xsl:variable>
		
		<img class="graphic" src="{$figCon}" alt=""/>
		</div>
		
	</xsl:template>
	
	
	<xsl:template name="IndexItem">
	<xsl:if test="not(contains(@level,'sect1'))"><!--changed fron @num to sect2-->
		<xsl:variable name="tocpg">
			<xsl:value-of select="concat('#P',descendant::para/phrase[1]/text())"/>
		</xsl:variable>
		<xsl:variable name="tocpgtag" select="translate($tocpg,'.', '-')"/>
		<xsl:variable name="smallcase" select="'abcdefghijklmnopqrstuvwxyz'"/>
		<xsl:variable name="uppercase" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'"/>
		<xsl:variable name="text" select="current()/title/text()"/>
		<xsl:variable name="Brac">
			<xsl:choose>
				<xsl:when test="contains(current()/@num,'(')">
					<xsl:value-of select="2"/>
				</xsl:when>
				<xsl:otherwise>
									<xsl:value-of select="1"/>
				</xsl:otherwise>
			</xsl:choose>
		</xsl:variable>
		<xsl:variable name="d">
		<xsl:value-of select="concat('toc-item-',$ThisDocument//ntw:nums[@num=$Brac]/@word,'-level')"/>

<!--xsl:value-of select="$ThisDocument//ntw:nums[@num=$Brac]/@word"-->

		
		
		</xsl:variable>
		<table class="{$d}">
			<tbody>
				<tr>
					<td class="toc-item-num">
						<xsl:value-of select="@num"/>
					</td>
					<td class="toc-title">
						<xsl:value-of select="concat(substring($text,1,1), translate(substring($text,2), $uppercase, $smallcase))"/>
					</td>
					<td class="toc-pg">
						<a href="{$tocpgtag}">
							<xsl:value-of select="descendant::para/phrase[1]/text()"/>
						</a>
					</td>
				</tr>
			</tbody>
		</table>
		</xsl:if>
	</xsl:template>
	<!-- Index Templates Complete -->
	<!-- Paragraph templates -->
	<xsl:template name="section" match="section">
		<!-- Variables-->
		<xsl:variable name="classname">
			<!--Get name attribute of current node -->
			<xsl:value-of select="concat('section-',parent::section/@level)"/>
		</xsl:variable>
		<xsl:variable name="chapternumber">
			<!-- Get num attribute of parent node -->
			<xsl:variable name="StrL">
			<xsl:value-of select="string-length(substring(substring-after(ancestor::chapter/section/title,'Chapter '),1,1))"/>
			</xsl:variable>
			<xsl:choose>
				<xsl:when test="$StrL>1">
				<xsl:value-of select="substring(substring-after(ancestor::chapter/section/title,'Chapter '),1,1)"/>
</xsl:when>
			<xsl:otherwise>	
<xsl:value-of select="concat('0',substring(substring-after(ancestor::chapter/section/title,'Chapter '),1,1))"/>
		
		</xsl:otherwise>	
			</xsl:choose>
		</xsl:variable>
		<xsl:variable name="sectnum">
		<xsl:choose>
			<xsl:when test="contains(current,section)">
			<xsl:number format="1"></xsl:number>
			</xsl:when>
			<xsl:when test="contains(current,section/section)">
			<xsl:number format="1"/>
			</xsl:when>
			<xsl:otherwise>
			<xsl:number format="1"/>
			</xsl:otherwise>
			
		</xsl:choose>
		</xsl:variable>
		<!--Create a string variable by concat string method  -->
		<xsl:variable name="sectionname">
			<xsl:value-of select="concat('CH_',$chapternumber,'-SEC-', $sectnum)"/>
		</xsl:variable>
		<!-- Template Content  --><!--<xsl:choose>
			<xsl:when test="contains(current()/@num,'.')">-->
			<div class="{$classname}">
			<a name="{$sectionname}"> </a>
			<div class="section-title">
				<span class="section-num">
					<xsl:value-of select="@num"/>
					<xsl:text> </xsl:text>
				</span>
				<xsl:apply-templates select="title"/>
			</div>
			<xsl:apply-templates select="child::node()[not(self::title)]"/>
		</div><!--</xsl:when>
		<xsl:otherwise>
		<xsl:apply-templates select="child::node()[not(self::title)]"/>
		</xsl:otherwise>
		</xsl:choose>
		-->
	</xsl:template>
	
	<xsl:template name="para" match="section/para">
<!--		<xsl:choose>
			<xsl:when test="contains()">-->
			
				<div class="para">
				<xsl:apply-templates select="phrase"/>
					<span class="phrase">
						<xsl:value-of select="current()/phrase"/>
					</span>
					
					<xsl:apply-templates select="child::node()[not(self::phrase)]"/>
					
				</div>
				
<!--			</xsl:when>
		</xsl:choose>-->
	</xsl:template>
	
	<xsl:template name="phrase" match="phrase">
		<xsl:variable name="phrase">
			<xsl:value-of select="concat('P',text())"/>
		</xsl:variable>
		<xsl:variable name="newphrase" select="translate($phrase,'.','-')"/>
		<a>
			<xsl:attribute name="name"><xsl:value-of select="$newphrase"></xsl:value-of></xsl:attribute>
		</a>
	</xsl:template>
	
	
	
	
	<!-- Table Templates  -->
	<xsl:template name="table" match="table">
			<table style="frame-{current()/@frame} width-{translate(current()/@width,'%','')}">
	<xsl:apply-templates/>
	</table>
	</xsl:template>
	
	
<xsl:template match="tgroup">
		<colgroup>
			<xsl:apply-templates select=".//colspec"/>
</colgroup>
<xsl:apply-templates select="child::node()[not(self::colspec)]"/>
		

</xsl:template>	
	
	<xsl:template name="tbody" match="tgroup/tbody">
		<tbody>
			<xsl:for-each select="current()/row">
				<xsl:call-template name="row"/>
			</xsl:for-each>
		</tbody>
	</xsl:template>
	<xsl:template name="thead" match="tgroup/thead">
		<!--<xsl:value-of select="name()"/>-->
		<xsl:for-each select="current()/row"><thead>
		
			<!--<xsl:value-of select="name()"/>-->
			<tr>
				<xsl:for-each select="current()/entry">
					<xsl:call-template name="headentry"/>
				</xsl:for-each>
</tr>
			</thead>
		</xsl:for-each>
	</xsl:template>
	<xsl:template name="colspec" match="colspec">

		<col class="colnum-{current()/@colnum} colname-{current()/@colname} colwidth-{translate(current()/@colwidth,'%','')}"/><!--<xsl:text disable-output-escaping="yes"><![CDATA[</col>]]></xsl:text>-->
	</xsl:template>
	<xsl:template name="row" match="tbody/row">
		<tr>
			<xsl:for-each select="current()/entry">
				<xsl:call-template name="entry"/>
			</xsl:for-each>
		</tr>
	</xsl:template>
	<xsl:template name="entry" match="entry">
		<xsl:variable name="count">
			<xsl:value-of select="count(preceding-sibling::* | following-sibling::*)"/>
		</xsl:variable>
		<xsl:choose>
			<xsl:when test="$count &lt; 2">
				<xsl:if test="position()=1">
					<td>
						<div class="para align-center">
							<xsl:value-of select="para[position()=1]"/>
						</div>
					</td>
					<td>
						<div class="para">
							<xsl:value-of select="following-sibling::node()"/>
						</div>
					</td>
				</xsl:if>
			</xsl:when>
			<xsl:when test="$count &gt; 1">
				<td>
					<div class="para">
						
						<xsl:apply-templates/>
					</div>
				</td>
			</xsl:when>
		</xsl:choose>
	</xsl:template>
	<xsl:template name="headentry">
		<th>
			<xsl:if test="translate(current()/@namest,'col','') != translate(current()/@nameend,'col','')">
				<xsl:variable name="colspan">
					<xsl:value-of select="translate(current()/@nameend,'col','') - translate(current()/@namest,'col','') + 1"/>
				</xsl:variable>
				<xsl:attribute name="colspan"><xsl:value-of select="$colspan"></xsl:value-of></xsl:attribute>
			</xsl:if>
			<div class="para">
				<xsl:value-of select="current()/para/text()"/>
				<xsl:apply-templates/>
			</div>
		</th>
	</xsl:template>
	<!-- Table Templates complete  -->
	
	
	<!--List templates -->
	
	<xsl:template name="orderedlist" match="orderedlist">
		<ol class="eng-orderedlist orderedlist">
			<xsl:apply-templates/>
		</ol>
	</xsl:template>



	<xsl:template name="orderitem" match="item">
		<li class="item">
			<xsl:apply-templates/>
		</li>
	</xsl:template>
	
	
	<xsl:template name="orderitempara" match="item/para">
		
		
		
		<div class="para">
		
			
				<span class="item-num">
				<xsl:if test="position()=1">
					<xsl:value-of select="parent::item[1]/@num"/>
					<xsl:text> </xsl:text>
					</xsl:if>
					</span>
					<xsl:apply-templates/>
				
				
		
			</div>
		
	</xsl:template>
	<!--List templates Complete -->
	<!-- Paragraph templates Complete -->
	<!-- Footnote Templates-->
	<xsl:template match="footnote">
		<sup>
			<a>
				<xsl:attribute name="name"><xsl:text>f</xsl:text><xsl:number level="any" count="footnote" format="1"/></xsl:attribute>
				<xsl:attribute name="href"><xsl:text>#ftn.</xsl:text><xsl:number level="any" count="footnote" format="1"/></xsl:attribute>
				<xsl:attribute name="class"><xsl:text>tr_ftn</xsl:text></xsl:attribute>
				<xsl:number level="any" count="footnote" format="1"/>
			</a>
		</sup>
	</xsl:template>
	<xsl:template match="footnote" mode="footnote">
	<div class="tr_footnote">
		<div class="footnote">
		<sup>
			
				<a>
					<xsl:attribute name="name"><xsl:text>ftn.</xsl:text><xsl:number level="any" count="footnote" format="1"/></xsl:attribute>
					<xsl:attribute name="href"><xsl:text>#f</xsl:text><xsl:number level="any" count="footnote" format="1"/></xsl:attribute>
					<xsl:attribute name="class"><xsl:text>tr_ftn</xsl:text></xsl:attribute>
					<xsl:number level="any" count="footnote" format="1"/>
				</a>
			</sup>
			<div class="a">
				 <xsl:variable name="new">
        			<xsl:value-of select="current()"/>
				 </xsl:variable>
				 <xsl:variable name="new1">
					<xsl:value-of select="substring(substring-after(current(),'paragraph'),2,5)"/>
				 </xsl:variable>
				 <xsl:variable name="roo">
				<xsl:value-of select="substring(//@num,2)"/>
				</xsl:variable>
				 <xsl:variable name="befTex">
				 <xsl:value-of select="substring-before(current(),'paragraph')"/>
				 </xsl:variable>
				 <xsl:variable name="before">
				 <xsl:value-of select="substring-before($new1,'.')"/>
				 </xsl:variable>
				 <xsl:variable name="after">
				 <xsl:value-of select="substring(substring-after($new1,'.'),1,3)"/>
				 </xsl:variable>
				 <xsl:variable name="centTex">
				<xsl:value-of select="substring(substring-after(current(),$after),1)"/>
				</xsl:variable>
				
				
				<xsl:variable name="pCon">
				<xsl:value-of select="concat('paragraph',' ',$before,'.',$after)"/>
				</xsl:variable>
				
					<xsl:variable name="tes">
				<xsl:if test="contains($centTex,'chapter')">
				<xsl:value-of select="concat(' ',substring(substring-before($centTex,'chapter'),2))"/> 
				</xsl:if>
				</xsl:variable>
				<xsl:variable name="ChapNu">
				<xsl:value-of select="normalize-space(substring(substring-after(current(),'chapter'),1,2))"/>
				</xsl:variable>
				
				<xsl:variable name="ChapNuC">
				<xsl:value-of select="concat('er:#BVI_CH_0',$ChapNu,'/BVI_CH_0',$ChapNu)"/>
				</xsl:variable>
				<xsl:variable name="curSel">
				<xsl:value-of select="concat('#P',$before,'-',$after)"/>
				</xsl:variable>
				<xsl:variable name="ChapCon">
				<xsl:value-of select="concat('chapter',' ',substring(substring-after(current(),'chapter'),2,1))"/>
				</xsl:variable>
				
				<xsl:variable name="conc1">
				<xsl:value-of select="concat('er:#BVI_CH_0',$before,'/P',$before,'-',$after)"/>
				</xsl:variable>
				<xsl:value-of select="$befTex"/>
				<xsl:choose>
				<xsl:when test="contains(substring(substring-after($new,'paragraph'),1,3),'.')">
				<xsl:choose>
				
				<xsl:when test="$before = $roo">
				<a href="{$curSel}">
				<xsl:value-of select="$pCon"/>
				</a>
				</xsl:when>
				<xsl:otherwise>
				<a href="{$conc1}">
					<xsl:value-of select="$pCon"/>
				</a>
                 </xsl:otherwise>
				</xsl:choose>
				<xsl:value-of select="$tes"/>
				<xsl:if test="contains($centTex,'chapter')">
				<a href="{$ChapNuC}">
				<xsl:value-of select="$ChapCon"/>
				</a>
				</xsl:if>
				<xsl:text>.</xsl:text>
				</xsl:when>
				
				<xsl:otherwise>
				<xsl:apply-templates/>
				</xsl:otherwise>
				</xsl:choose>
		</div>
		
		</div>
		</div>
	</xsl:template>
	<xsl:template match="footnote/para/uri">
		
            <xsl:variable name="url1">
                        <xsl:value-of select="translate(@href, '&#x003C;','')" />
            </xsl:variable>
            <xsl:variable name="url2">
                        <xsl:value-of select="translate($url1, '&#x003E;','')" />
            </xsl:variable>
            <a href="{$url2}">
                        <xsl:value-of select="." />
            </a>


	</xsl:template>
	<!-- Footnote Templates Complete -->
	<xsl:template match="content-style">
		<xsl:choose>
			<xsl:when test="@format='smallcaps'">
				<xsl:value-of select="translate(normalize-space(.),'ABCDEFGHIJKLMNOPQRSTUVWXZ','abcdefghijklmnopqrstuvwxyz')"/>
			</xsl:when>
			<xsl:when test="@format='superscript'">
            </xsl:when>

			<xsl:otherwise>
				<xsl:variable name="fontStyle">
            <xsl:value-of select="concat('font-style-',@font-style)"/>
        </xsl:variable>
		<span class="{$fontStyle}">
             <xsl:apply-templates/>
        </span>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<!-- Namespace ntw-->
	<ntw:nums num="1" word="first"/>
	<ntw:nums num="2" word="second"/>
	<ntw:nums num="3" word="third"/>
	<ntw:nums num="4" word="forth"/>
	<ntw:nums num="5" word="fifth"/>
	<ntw:nums num="6" word="sixth"/>
	<ntw:nums num="7" word="seventh"/>
	<ntw:nums num="8" word="eighth"/>
	<ntw:nums num="9" word="nighth"/>
	<ntw:nums num="10" word="tenth"/>
	<!-- Namespace ntw ends -->
</xsl:stylesheet>
here the [roblem is in the below block of my xslt.

HTML Code:
<xsl:variable name="sectnum">
		<xsl:choose>
			<xsl:when test="contains(current,section)">
			<xsl:number format="1"></xsl:number>
			</xsl:when>
			<xsl:when test="contains(current,section/section)">
			<xsl:number format="1"/>
			</xsl:when>
			<xsl:otherwise>
			<xsl:number format="1"/>
			</xsl:otherwise>
			
		</xsl:choose>
		</xsl:variable>

actually here, when ever section with attribute num is found i want sectnum to be incremented by 1, but here in my case each time it finds a new section, the value is getting reset to 1. and then it is again continuing. please let me know how do i solve this.
Reply With Quote
  #2 (permalink)  
Old April 15th, 2013, 09:27 AM
samjudson's Avatar
Friend of Wrox
Points: 8,687, Level: 40
Points: 8,687, Level: 40 Points: 8,687, Level: 40 Points: 8,687, Level: 40
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2007
Location: Newcastle, , United Kingdom.
Posts: 2,128
Thanks: 1
Thanked 189 Times in 188 Posts
Default

Try producing a small example that illustrates your problem, hopefully fitting on one page completely.
__________________
/- Sam Judson : Wrox Technical Editor -/

Think before you post: What have you tried?
Reply With Quote
  #3 (permalink)  
Old April 15th, 2013, 10:23 AM
Authorized User
Points: 151, Level: 3
Points: 151, Level: 3 Points: 151, Level: 3 Points: 151, Level: 3
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2013
Posts: 31
Thanks: 3
Thanked 0 Times in 0 Posts
Default

Hey,

thanks for looking into this issue, here actually i used <xsl:number count='section'/> in <sectnum> class, this is working fine, but can you please let me know how do i count the section level containing num attribute, else it should be ignored.

Thanks
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to reset the SessionID? akkad C# 2 October 24th, 2007 06:49 AM
Counter PHP problem its_jon Beginning PHP 5 June 23rd, 2006 07:08 AM
Problem with CGI Counter arunmohanmp Perl 0 April 9th, 2006 12:40 AM
echoing textfields and reset problem Stevie Javascript How-To 0 May 8th, 2005 09:28 PM
reset password help nazra Classic ASP Databases 3 July 25th, 2003 09:24 PM



All times are GMT -4. The time now is 06:48 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.