net.sf.saxon.option.local
Class Numberer_he

java.lang.Object
  extended by net.sf.saxon.number.AbstractNumberer
      extended by net.sf.saxon.number.Numberer_en
          extended by net.sf.saxon.option.local.Numberer_he
All Implemented Interfaces:
Serializable, Numberer

public class Numberer_he
extends Numberer_en

Class Numberer_en does number formatting for language="en". This supports the xsl:number element. Methods and data are declared as protected, and static is avoided, to allow easy subclassing.

Author:
Michael H. Kay
See Also:
Serialized Form

Field Summary
 
Fields inherited from class net.sf.saxon.number.AbstractNumberer
cyrillicLower, cyrillicUpper, greekLower, greekUpper, hebrew, hiraganaA, hiraganaI, kanjiDigits, katakanaA, katakanaI, latinLower, latinUpper, LOWER_CASE, TITLE_CASE, UPPER_CASE, westernDigits
 
Constructor Summary
Numberer_he()
           
 
Method Summary
 String format(long number, String picture, int groupSize, String groupSeparator, String letterValue, String ordinal)
          Format a number into a string
protected  String toTraditionalSequence(long number, String groupSeparator)
          Convert a number to traditional Hebrew representation.
 
Methods inherited from class net.sf.saxon.number.Numberer_en
dayName, monthName, ordinalSuffix, toOrdinalWords, toWords
 
Methods inherited from class net.sf.saxon.number.AbstractNumberer
alphaDefault, getCalendarName, getCountry, getEraName, getOrdinalSuffixForDateTime, halfDayName, setCountry, toAlpha, toAlphaSequence, toRoman, toWords
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Numberer_he

public Numberer_he()
Method Detail

format

public String format(long number,
                     String picture,
                     int groupSize,
                     String groupSeparator,
                     String letterValue,
                     String ordinal)
Format a number into a string

Specified by:
format in interface Numberer
Overrides:
format in class AbstractNumberer
Parameters:
number - The number to be formatted
picture - The format token. This is a single component of the format attribute of xsl:number, e.g. "1", "01", "i", or "a"
groupSize - number of digits per group (0 implies no grouping)
groupSeparator - string to appear between groups of digits
letterValue - The letter-value specified to xsl:number: "alphabetic" or "traditional". Can also be an empty string or null.
ordinal - The value of the ordinal attribute specified to xsl:number The value "yes" indicates that ordinal numbers should be used; "" or null indicates that cardinal numbers
Returns:
the formatted number. Note that no errors are reported; if the request is invalid, the number is formatted as if the string() function were used.

toTraditionalSequence

protected String toTraditionalSequence(long number,
                                       String groupSeparator)
Convert a number to traditional Hebrew representation. All parameters are the same as for format()

Parameters:
number -
groupSeparator -
Returns:
The number in traditional Hebrew. The result for numbers above 9999 is not really well-defined. Neither is 0.


Copyright (c) Saxonica Limited. All rights reserved.