Examples of formatNumber()


Examples of com.jclark.xsl.conv.NumberListFormat.formatNumber()

                            ++n;
                            if (tem.equals(node))
                                break;
                        }
                    }
                    result.characters(format.formatNumber(0, n));
                    break;
                }
                if (from != null && from.matches(node, context))
                    break;
                node = parent;
View Full Code Here

Examples of com.jclark.xsl.conv.NumberListFormat.formatNumber()

            }
        }
        else
            return;
        result.characters(format.getPrefix(0));
        result.characters(format.formatNumber(0, cache.getNumber(node)));
        result.characters(format.getSuffix());
    }
}
View Full Code Here

Examples of org.exist.xquery.util.NumberFormatter.formatNumber()

                final Sequence tz = dt.getTimezone();
                if(tz != Sequence.EMPTY_SEQUENCE) {
                    final DayTimeDurationValue dtv = ((DayTimeDurationValue)tz);
                    final NumberFormatter formatter = NumberFormatter.getInstance(language);
                    sb.append(dtv.getPart(DurationValue.SIGN) >= 0 ? '+' : '-');
                    sb.append(formatter.formatNumber(dtv.getPart(DurationValue.HOUR), "01", 2, 2));
                    sb.append(':');
                    sb.append(formatter.formatNumber(dtv.getPart(DurationValue.MINUTE), "01", 2, 2));
                }
                break;
View Full Code Here

Examples of org.exist.xquery.util.NumberFormatter.formatNumber()

                    final DayTimeDurationValue dtv = ((DayTimeDurationValue)tz);
                    final NumberFormatter formatter = NumberFormatter.getInstance(language);
                    sb.append(dtv.getPart(DurationValue.SIGN) >= 0 ? '+' : '-');
                    sb.append(formatter.formatNumber(dtv.getPart(DurationValue.HOUR), "01", 2, 2));
                    sb.append(':');
                    sb.append(formatter.formatNumber(dtv.getPart(DurationValue.MINUTE), "01", 2, 2));
                }
                break;

            default:
                throw new XPathException(this, ErrorCodes.FOFD1340, "Unrecognized date/time component: " + component);
View Full Code Here

Examples of org.exist.xquery.util.NumberFormatter.formatNumber()

        if (widths != null) {
            if (widths[0] > 0) {min = widths[0];}
            if (widths[1] > 0) {max = widths[1];}
        }
        try {
            sb.append(formatter.formatNumber(num, picture, min, max));
        } catch (final XPathException e) {
            throw new XPathException(this, ErrorCodes.FOFD1350, e.getMessage());
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.