title: Converting a number and linking it
body: <p>i have the below xml document.</p>
  
  <pre><code>&lt;chapter&gt;
      &lt;para&gt;
          &lt;phrase&gt;3.006&lt;/phrase&gt; 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&amp;#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).
      &lt;/para&gt;
      &lt;para&gt;
          &lt;phrase&gt;3.008&lt;/phrase&gt; 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 &amp;#x201C;the parties shall use their best efforts in good faith to reach a reasonable and equitable resolution&amp;#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).
      &lt;/para&gt;
      &lt;para&gt;Arbitration agreements are discussed in more detail in Chapter 9.&lt;/para&gt;
  &lt;/chapter&gt;
  </code></pre>
  
  <p>here actually i want an xslt that converts a number into hyperlink as below.</p>
  
  <p>Case1:<br>
  if something like <code>3.128</code> is found, it should be converted to   </p>
  
  <pre><code>&lt;a href="er:#AHK_CH_03/P03-128"&gt;3.128&lt;/a&gt; 
  </code></pre>
  
  <p>Case 2:<br>
      if some thing like <code>Chapter 9</code> is found, it should be converted to</p>
  
  <pre><code>&lt;a href="er:#AHK_CH_18&gt;Chapter 9&lt;/a&gt;.
  </code></pre>
  
  <p>please let me know how do i do it.</p>
  
  <p>Thanks.</p>