title: Formatting an amount field into 9(09)V9(06) format via XSLT
body: <p>I am working on a requirement where I need to format my input amount field into 9(09)V9(06) format. Our Vendor gave an example like below</p>
  <p><em>format is 9(09)V9(06) which means <strong>nine digits implied decimal six digits</strong>. If you want to send 124.46 you would send 000000124460000 (Total 15 characters)</em></p>
  <p>Below is my XML and XSLT I have tried... and it's working right now.
  but I just want to check out, is this the right approach for formating amount field into 9(09)V9(06)..? Is there a different way to do it?</p>
  <h2>XML</h2>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
  &lt;report_entry&gt;
      &lt;amount&gt;124.99&lt;/amount&gt;
  &lt;/report_entry&gt;
  </code></pre>
  <h2>XSLT</h2>
  <pre><code> &lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
  &lt;xsl:stylesheet xmlns:xsl=&quot;http://www.w3.org/1999/XSL/Transform&quot;
      xmlns:xs=&quot;http://www.w3.org/2001/XMLSchema&quot; exclude-result-prefixes=&quot;xs&quot; version=&quot;2.0&quot;&gt;
      &lt;xsl:template match=&quot;report_entry&quot;&gt;
  
          &lt;xsl:variable name=&quot;amount_total&quot; select=&quot;amount&quot;/&gt;
          &lt;xsl:variable name=&quot;amount_total_1&quot;
              select=&quot;translate(format-number($amount_total, '#########.000000'), '.', '')&quot;/&gt;
          &lt;xsl:value-of select=&quot;format-number(number($amount_total_1), '000000000000000')&quot;/&gt;
  
      &lt;/xsl:template&gt;
  &lt;/xsl:stylesheet&gt;
  </code></pre>