|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.novell.xsl.process.NumberTemplate
An abstract class for templates that add a formatted number to the result
tree. Such templates correspond to the xsl:number
element.
Nested Class Summary | |
protected static class |
NumberTemplate.ParsedFormat
A class representing a parsed number format string. |
Field Summary | |
protected Pattern |
countPattern
A match pattern specifying what nodes this number template counts; null means count elements having the same type name as the
current node. |
protected Expression |
digitGroupSepExpr
A string expression specifying the separator this number template uses between groups of digits; null means there are no digit
group separators. |
protected Expression |
digitsPerGroupExpr
A string expression specifying the number of digits per group; null means there are no digit group separators. |
protected Expression |
formatExpr
A string expression specifying how this number template formats numbers. |
protected Pattern |
fromPattern
A match pattern specifying where this number template starts counting from; null means counting starts from the beginning of the
document. |
protected Expression |
langExpr
A string expression specifying the language this number template uses for alphabetic sequences; null means determine the language
from the system environment. |
protected Expression |
letterValueExpr
A string expression that disambiguates between numbering schemes that use letters. |
protected NumberTemplate.ParsedFormat |
preparsedFormat
This number template's parsed number format if the format, lang, and letter value expressions can be evaluated at compile time; null means at least one of those three expressions needs to
be evaluated at runtime. |
protected Expression |
valueExpr
A number expression used to determine the number to format. |
Constructor Summary | |
NumberTemplate(Pattern countPattern,
Pattern fromPattern,
Expression formatExpr,
Expression langExpr,
Expression letterValueExpr,
Expression digitGroupSepExpr,
Expression digitsPerGroupExpr,
Expression valueExpr,
Node nsContext)
Constructs a number template. |
Method Summary | |
void |
dump(PrintWriter out,
int indent)
Dumps this object to the specified output stream. |
Node |
getNamespaceContext()
Return the node that is the namespace context for this template |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.novell.xsl.process.Template |
instantiate |
Field Detail |
protected Pattern countPattern
null
means count elements having the same type name as the
current node.
protected Pattern fromPattern
null
means counting starts from the beginning of the
document.
protected Expression formatExpr
protected Expression langExpr
null
means determine the language
from the system environment.
protected Expression letterValueExpr
null
mean?
protected Expression digitGroupSepExpr
null
means there are no digit
group separators.
protected Expression digitsPerGroupExpr
null
means there are no digit group separators.
protected Expression valueExpr
null
means no expression specified, so use the position of the current node in the
source tree
protected NumberTemplate.ParsedFormat preparsedFormat
null
means at least one of those three expressions needs to
be evaluated at runtime. This is an optimization that avoids unnecessary
parsing of the number format at runtime.
Constructor Detail |
public NumberTemplate(Pattern countPattern, Pattern fromPattern, Expression formatExpr, Expression langExpr, Expression letterValueExpr, Expression digitGroupSepExpr, Expression digitsPerGroupExpr, Expression valueExpr, Node nsContext) throws XSLException
countPattern
- a match pattern specifying the nodes to be
counted; null
means count
elements having the same type name as the
current nodefromPattern
- a match pattern specifying where counting
starts from; null
means
counting starts from the beginning of the
documentformatExpr
- a string expression specifying how to format
the numberslangExpr
- a string expression specifying the language
to use for alphabetic sequences;
null
means determine the
language from the system environmentletterValueExpr
- a string expression that disambiguates
between numbering schemes that use letters;
must evaluate to alphabetic
or
traditional
; what does
null
mean?digitGroupSepExpr
- a string expression specifying the separator
between groups of digits; null
means there are no digit group separatorsdigitsPerGroupExpr
- a string expression specifying the number of
digits per group; null
means
there are no digit group separatorsvalueExpr
- a number expression which is evaluated to get the number
that is to be formated. If null
then the position
of the current node in the source document is used.nsContext
- The node in the style sheet from which this template comes
XSLException
- if a fatal error occurs during constructionMethod Detail |
public Node getNamespaceContext()
getNamespaceContext
in interface Template
public void dump(PrintWriter out, int indent)
dump
in interface Template
out
- the output stream to write toindent
- number of tabs to indent
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |