<html>
<head>
<title>&lt;xsl:decimal-format&gt;</title>
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div id="">
<table cellpadding="0" cellspacing="0" border="0" width="100%" class="main">
<tr>
<td valign="top" class="NAME">&lt;xsl:decimal-format&gt;</td>
<td valign="top" class="COMPATIBILITY">&nbsp;</td>
</tr>
<tr>
<td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
</tr>
<tr>
<td valign="top" colspan="2" class="description">
o̓hLgɐlނƂɎgp鐔l``܂B<span class="LITERAL">&lt;decimal-format&gt;</span>  <span class="LITERAL">name</span> w肳ĂȂꍇ́AׂĂ̏o͂ŃftHg̐l`gp܂Bl`w肳Ăꍇ́A<span class="LITERAL">format-number()</span> ֐ɂĎQƂ܂B</td></tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr>
<td colspan="2" class="TITLE">JeS</td>
</tr>
<tr>
<td colspan="2" class="description">
<p>gbvxvf</p>
</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr>
<td colspan="2" class="TITLE">K{̑</td>
</tr>
<tr>
<td colspan="2" class="description">
<p>ȂB</p>
</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr>
<td colspan="2" class="TITLE">ȗ\ȑ</td>
</tr>
<tr>
<td colspan="2" class="description">
<dl>
<dt>
name
</dt>
<dd>
̌`ɖO蓖Ă܂B
<P></p>
<dt>
decimal-separator
</dt>
<dd>
_ƂĎgp镶 (ʏAsIh܂̓R}) `܂B́̕AtH[}bgƏo̗͂Ŏgp܂BݒĺAsIh (<span class="LITERAL"> . </span>) łB
<P></p>
<dt>
grouping-separator
</dt>
<dd>
Pʋ؂蕶ƂĎgp镶 (ʏAsIh܂̓R}) `܂B́̕AtH[}bgƏo̗͂Ŏgp܂Bݒl̓R} (<span class="LITERAL"> , </span>) łB
<P></p>
<dt>
infinity
</dt>
<dd>
\`܂BXSLT ł́A̖ƕ̖̗T|[gĂ܂B̕͏o͂ł̂ݎgp܂Bݒl͕ "Infinity" łB
<P></p>
<dt>
minus-sign
</dt>
<dd>
}CiXLƂĎgp镶`܂B̕͏o͂ł̂ݎgp܂BݒĺAnCt (<span class="LITERAL"> - </span>A#x2D) łB
<P></p>
<dt>
NaN
</dt>
<dd>
tH[}bgllł͂Ȃꍇɕ\镶`܂B̕͏o͂ł̂ݎgp܂Bݒl͕ "NaN" łB
<P></p>
<dt>
percent
</dt>
<dd>
p[ZgLƂĎgp镶`܂B́̕AtH[}bgƏo̗͂Ŏgp܂BݒĺAp[ZgL (<span class="LITERAL"> % </span>) łB
<P></p>
<dt>
per-mille
</dt>
<dd>
PʋLƂĎgp镶`܂B́̕AtH[}bgƏo̗͂Ŏgp܂BݒĺAUnicode ̐Pʕ (#x2030) łB
<P></p>
<dt>
zero-digit
</dt>
<dd>
[ƂĎgp镶`܂B́̕AtH[}bgƏo̗͂Ŏgp܂Bݒl̓[ (<span class="LITERAL"> 0 </span>) łB
<P></p>
<dt>
digit
</dt>
<dd>
l\tH[}bgŎgp镶`܂BݒĺAԍL (<span class="LITERAL"> # </span>) łB
<P></p>
<dt>
pattern-separator
</dt>
<dd>
p^[Őƕ̃Tup^[؂邽߂Ɏgp镶`܂BݒĺAZ~R (<span class="LITERAL"> ; </span>) łB̓̕tH[}bgł̂ݎgp܂B
<P></p>
</dl>
</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr>
<td colspan="2" class="TITLE">Rec</td>
</tr>
<tr>
<td colspan="2" class="description">
<p>ȂB<span class="LITERAL">&lt;xsl:decimal-format&gt;</span> ̗͋vfłB</p>
</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr>
<td colspan="2" class="TITLE">w</td>
</tr>
<tr>
<td colspan="2" class="description">
<p>
<span class="LITERAL">&lt;xsl:decimal-format&gt;</span> ́AgbvxvfłA<span class="LITERAL">&lt;xsl:stylesheet&gt;</span> ̎qƂĂ̂ݎgpł܂B</p>
</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr>
<td colspan="2" class="TITLE">`</td>
</tr>
<tr>
<td colspan="2" class="description">
<p>XSLT 12.3 ߁uNumber Formattingv</p>
</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr>
<td colspan="2" class="TITLE"></td>
</tr>
<tr>
<td colspan="2" class="description">
<p>2  <span class="LITERAL">&lt;decimal-format&gt;</span> `X^CV[gɎ܂B</p>
<span class="PROGRAMLISTING"><pre>
&lt;?xml version="1.0" encoding="ISO-8859-1" ?&gt;
&lt;xsl:stylesheet version="1.0" 
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:months="Lookup table for month names"&gt;

  &lt;xsl:output method="text"/&gt;

  &lt;months:name sequence="01"&gt;January&lt;/months:name&gt;
  &lt;months:name sequence="02"&gt;February&lt;/months:name&gt;
  &lt;months:name sequence="03"&gt;March&lt;/months:name&gt;
  &lt;months:name sequence="04"&gt;April&lt;/months:name&gt;

  &lt;xsl:variable name="newline"&gt;
&lt;xsl:text&gt;
&lt;/xsl:text&gt;
  &lt;/xsl:variable&gt;

  &lt;xsl:decimal-format name="f1"
    decimal-separator=":"
    grouping-separator="/"/&gt;

  &lt;xsl:decimal-format name="f2"
    infinity="Really, really big"
    NaN="[not a number]"/&gt;

  &lt;xsl:template match="/"&gt;
    &lt;xsl:value-of select="$newline"/&gt;
    &lt;xsl:text&gt;Tests of the &lt;decimal-format&gt; element:&lt;/xsl:text&gt;

    &lt;xsl:value-of select="$newline"/&gt;
    &lt;xsl:value-of select="$newline"/&gt;
    &lt;xsl:text&gt;   format-number(1528.3, '#/###:00', 'f1')=&lt;/xsl:text&gt;
    &lt;xsl:value-of select="format-number(1528.3, '#/###:00;-#/###:00', 'f1')"/&gt;
    &lt;xsl:value-of select="$newline"/&gt;
    &lt;xsl:text&gt;   format-number(1 div 0, '###,###.00', 'f2')=&lt;/xsl:text&gt;
    &lt;xsl:value-of select="format-number(1 div 0, '###,###.00', 'f2')"/&gt;
    &lt;xsl:value-of select="$newline"/&gt;
    &lt;xsl:text&gt;   format-number(blue div orange, '#.##', 'f2')=&lt;/xsl:text&gt;
    &lt;xsl:value-of select="format-number(blue div orange, '#.##', 'f2')"/&gt;
    &lt;xsl:value-of select="$newline"/&gt;
    &lt;xsl:value-of select="$newline"/&gt;
    &lt;xsl:for-each select="report/month"&gt;
      &lt;xsl:text&gt;   &lt;/xsl:text&gt;
      &lt;xsl:value-of 
        select="document('')/*/months:name[@sequence=current()/@sequence]"/&gt;
      &lt;xsl:text&gt; - &lt;/xsl:text&gt;
      &lt;xsl:value-of select="format-number(miles-flown, '##,###')"/&gt;
      &lt;xsl:text&gt; miles flown, &lt;/xsl:text&gt;
      &lt;xsl:value-of select="format-number(miles-earned, '##,###')"/&gt;
      &lt;xsl:text&gt; miles earned.&lt;/xsl:text&gt;
      &lt;xsl:value-of select="$newline"/&gt;
      &lt;xsl:text&gt;     (&lt;/xsl:text&gt;
      &lt;xsl:value-of 
        select="format-number(miles-flown div sum(//miles-flown), '##%')"/&gt;
      &lt;xsl:text&gt; of all miles flown, &lt;/xsl:text&gt;
      &lt;xsl:value-of 
        select="format-number(miles-earned div sum(//miles-earned), '##%')"/&gt;
      &lt;xsl:text&gt; of all miles earned.)&lt;/xsl:text&gt;
      &lt;xsl:value-of select="$newline"/&gt;
      &lt;xsl:value-of select="$newline"/&gt;
    &lt;/xsl:for-each&gt; 
    &lt;xsl:text&gt;   Total miles flown: &lt;/xsl:text&gt;
    &lt;xsl:value-of select="format-number(sum(//miles-flown), '##,###')"/&gt;
    &lt;xsl:text&gt;, total miles earned: &lt;/xsl:text&gt;
    &lt;xsl:value-of select="format-number(sum(//miles-earned), '##,###')"/&gt;
  &lt;/xsl:template&gt;

&lt;/xsl:stylesheet&gt;</pre></span>
<p>̃X^CV[g̃hLgɑ΂Ďgp܂B</p>
<span class="PROGRAMLISTING"><pre>
&lt;?xml version="1.0"?&gt;
&lt;report&gt;
  &lt;title&gt;Miles Flown in 2001&lt;/title&gt;
  &lt;month sequence="01"&gt;
    &lt;miles-flown&gt;12379&lt;/miles-flown&gt;
    &lt;miles-earned&gt;35215&lt;/miles-earned&gt;
  &lt;/month&gt;
  &lt;month sequence="02"&gt;
    &lt;miles-flown&gt;32857&lt;/miles-flown&gt;
    &lt;miles-earned&gt;92731&lt;/miles-earned&gt;
  &lt;/month&gt;
  &lt;month sequence="03"&gt;
    &lt;miles-flown&gt;19920&lt;/miles-flown&gt;
    &lt;miles-earned&gt;76725&lt;/miles-earned&gt;
  &lt;/month&gt;
  &lt;month sequence="04"&gt;
    &lt;miles-flown&gt;18903&lt;/miles-flown&gt;
    &lt;miles-earned&gt;31781&lt;/miles-earned&gt;
  &lt;/month&gt;
&lt;/report&gt;</pre></span>
<p>X^CV[ggpẴhLgʂ͎̂ƂłB</p>
<span class="PROGRAMLISTING"><pre>

Tests of the &lt;decimal-format&gt; element:

   format-number(1528.3, '#/###:00', 'f1')=1/528:30
   format-number(1 div 0, '###,###.00', 'f2')=Really, really big
   format-number(blue div orange, '#.##', 'f2')=[not a number]

   January - 12,379 miles flown, 35,215 miles earned.
     (15% of all miles flown, 15% of all miles earned.)

   February - 32,857 miles flown, 92,731 miles earned.
     (39% of all miles flown, 39% of all miles earned.)

   March - 19,920 miles flown, 76,725 miles earned.
     (24% of all miles flown, 32% of all miles earned.)

   April - 18,903 miles flown, 31,781 miles earned.
     (22% of all miles flown, 13% of all miles earned.)

   Total miles flown: 84,059, total miles earned: 236,452</pre></span>
</td>
</tr>
</table>
</div>
</body>
</html>
