org.apache.xalan.xsltc.runtime
Class BasisLibrary

java.lang.Object
  |
  +--org.apache.xalan.xsltc.runtime.BasisLibrary

public final class BasisLibrary
extends java.lang.Object
implements Operators

Standard XSLT functions. All standard functions expect the current node and the DOM as their last two arguments.


Constructor Summary
BasisLibrary()
           
 
Method Summary
static boolean booleanF(java.lang.Object obj)
          XSLT Standard function boolean()
static boolean compare(int node, NodeIterator nodeSet, int op, DOM dom)
          Utility function: node/node-set compare.
static boolean compare(int node, NodeIterator iterator, int op, int dummy, DOM dom)
           
static boolean compare(NodeIterator left, double rnumber, int op, DOM dom)
          Utility function: node-set/number compare.
static boolean compare(NodeIterator left, double rnumber, int op, int node, DOM dom)
           
static boolean compare(NodeIterator left, NodeIterator right, int op, int node, DOM dom)
          Utility function: node-set/node-set compare.
static boolean compare(NodeIterator left, java.lang.String rstring, int op, DOM dom)
          Utility function: node-set/string comparison.
static boolean compare(NodeIterator left, java.lang.String rstring, int op, int node, DOM dom)
           
static boolean compare(java.lang.Object left, java.lang.Object right, int op, int node, DOM dom)
           
static void consoleOutput(java.lang.String msg)
           
static void copy(java.lang.Object obj, TransletOutputHandler handler, int node, DOM dom)
           
static int countF(NodeIterator iterator)
          XSLT Standard function count(node-set)
static java.lang.String formatNumber(double number, java.lang.String pattern, java.text.DecimalFormat formatter)
           
static java.lang.String generate_idF(int node)
          XSLT Standard function generate-id().
static java.lang.String getLocalName(java.lang.String value)
          utility function for calls to local-name().
static NodeIterator getSingleNode(NodeIterator iterator)
          Utility function: used with nth position filters to convert a sequence of nodes to just one single node (the one at position n).
static java.lang.String namespace_uriF(int node, DOM dom)
          XSLT Standard function namespace-uri().
static java.lang.String namespace_uriF(NodeIterator iter, DOM dom)
          XSLT Standard function namespace-uri(node-set).
static java.lang.String normalize_spaceF(int node, DOM dom)
          XSLT Standard function normalize-space().
static java.lang.String normalize_spaceF(java.lang.String value)
          XSLT Standard function normalize-space(string).
static double numberF(int node, DOM dom)
          XSLT Standard function number()
static double numberF(java.lang.Object obj, DOM dom)
          XSLT Standard function number(value)
static int realToInt(double d)
          Utility function: used in RealType to convert a real to an integer
static java.lang.String realToString(double d)
          Utility function: used in RealType to convert a real to a string.
static NodeIterator referenceToNodeSet(java.lang.Object obj)
          Utility function: used to convert references to node-sets.
static void runTimeError(java.lang.String message)
          Print a run-time error message.
static void runTimeInternalError()
          Print a run-time internal error message.
static void runTimeTypeError(java.lang.String from, java.lang.String to)
          Print a run-time type error message.
static java.lang.String stringF(int node, DOM dom)
          XSLT Standard function string()
static java.lang.String stringF(java.lang.Object obj, DOM dom)
          XSLT Standard function string(value)
static java.lang.String stringF(java.lang.Object obj, int node, DOM dom)
          XSLT Standard function string(value)
static int stringToInt(java.lang.String s)
          Utility function: used in StringType to convert a string to an int.
static double stringToReal(java.lang.String s)
          Utility function: used in StringType to convert a string to a real.
static java.lang.String substring_afterF(java.lang.String value, java.lang.String substring)
          XSLT Standard function substring-after().
static java.lang.String substring_beforeF(java.lang.String value, java.lang.String substring)
          XSLT Standard function substring-before().
static java.lang.String substringF(java.lang.String value, double start)
          XSLT Standard function substring().
static java.lang.String substringF(java.lang.String value, double start, double length)
          XSLT Standard function substring().
static double sumF(NodeIterator iterator, DOM dom)
          XSLT Standard function sum(node-set).
static java.lang.String system_propertyF(java.lang.String name)
          XSLT Standard function system-property(name)
static boolean testLanguage(java.lang.String testLang, DOM dom, int node)
          Utility function: used to test context node's language
static java.lang.String translateF(java.lang.String value, java.lang.String from, java.lang.String to)
          XSLT Standard function translate().
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasisLibrary

public BasisLibrary()
Method Detail

countF

public static int countF(NodeIterator iterator)
XSLT Standard function count(node-set)

sumF

public static double sumF(NodeIterator iterator,
                          DOM dom)
XSLT Standard function sum(node-set). stringToDouble is inlined

stringF

public static java.lang.String stringF(int node,
                                       DOM dom)
XSLT Standard function string()

stringF

public static java.lang.String stringF(java.lang.Object obj,
                                       DOM dom)
XSLT Standard function string(value)

stringF

public static java.lang.String stringF(java.lang.Object obj,
                                       int node,
                                       DOM dom)
XSLT Standard function string(value)

numberF

public static double numberF(int node,
                             DOM dom)
XSLT Standard function number()

numberF

public static double numberF(java.lang.Object obj,
                             DOM dom)
XSLT Standard function number(value)

booleanF

public static boolean booleanF(java.lang.Object obj)
XSLT Standard function boolean()

substringF

public static java.lang.String substringF(java.lang.String value,
                                          double start)
XSLT Standard function substring(). Must take a double because of conversions resulting into NaNs and rounding.

substringF

public static java.lang.String substringF(java.lang.String value,
                                          double start,
                                          double length)
XSLT Standard function substring(). Must take a double because of conversions resulting into NaNs and rounding.

substring_afterF

public static java.lang.String substring_afterF(java.lang.String value,
                                                java.lang.String substring)
XSLT Standard function substring-after().

substring_beforeF

public static java.lang.String substring_beforeF(java.lang.String value,
                                                 java.lang.String substring)
XSLT Standard function substring-before().

translateF

public static java.lang.String translateF(java.lang.String value,
                                          java.lang.String from,
                                          java.lang.String to)
XSLT Standard function translate().

normalize_spaceF

public static java.lang.String normalize_spaceF(int node,
                                                DOM dom)
XSLT Standard function normalize-space().

normalize_spaceF

public static java.lang.String normalize_spaceF(java.lang.String value)
XSLT Standard function normalize-space(string).

generate_idF

public static java.lang.String generate_idF(int node)
XSLT Standard function generate-id().

getLocalName

public static java.lang.String getLocalName(java.lang.String value)
utility function for calls to local-name().

namespace_uriF

public static java.lang.String namespace_uriF(NodeIterator iter,
                                              DOM dom)
XSLT Standard function namespace-uri(node-set).

system_propertyF

public static java.lang.String system_propertyF(java.lang.String name)
XSLT Standard function system-property(name)

namespace_uriF

public static java.lang.String namespace_uriF(int node,
                                              DOM dom)
XSLT Standard function namespace-uri().

compare

public static boolean compare(NodeIterator left,
                              NodeIterator right,
                              int op,
                              int node,
                              DOM dom)
Utility function: node-set/node-set compare.

compare

public static boolean compare(int node,
                              NodeIterator nodeSet,
                              int op,
                              DOM dom)
Utility function: node/node-set compare.

compare

public static boolean compare(int node,
                              NodeIterator iterator,
                              int op,
                              int dummy,
                              DOM dom)

compare

public static boolean compare(NodeIterator left,
                              double rnumber,
                              int op,
                              int node,
                              DOM dom)

compare

public static boolean compare(NodeIterator left,
                              double rnumber,
                              int op,
                              DOM dom)
Utility function: node-set/number compare.

compare

public static boolean compare(NodeIterator left,
                              java.lang.String rstring,
                              int op,
                              DOM dom)
Utility function: node-set/string comparison.

compare

public static boolean compare(NodeIterator left,
                              java.lang.String rstring,
                              int op,
                              int node,
                              DOM dom)

compare

public static boolean compare(java.lang.Object left,
                              java.lang.Object right,
                              int op,
                              int node,
                              DOM dom)

testLanguage

public static boolean testLanguage(java.lang.String testLang,
                                   DOM dom,
                                   int node)
Utility function: used to test context node's language

stringToReal

public static double stringToReal(java.lang.String s)
Utility function: used in StringType to convert a string to a real.

stringToInt

public static int stringToInt(java.lang.String s)
Utility function: used in StringType to convert a string to an int.

realToString

public static java.lang.String realToString(double d)
Utility function: used in RealType to convert a real to a string. Removes the decimal if null.

realToInt

public static int realToInt(double d)
Utility function: used in RealType to convert a real to an integer

formatNumber

public static java.lang.String formatNumber(double number,
                                            java.lang.String pattern,
                                            java.text.DecimalFormat formatter)

referenceToNodeSet

public static NodeIterator referenceToNodeSet(java.lang.Object obj)
Utility function: used to convert references to node-sets. If the obj is an instanceof Node then create a singleton iterator.

getSingleNode

public static NodeIterator getSingleNode(NodeIterator iterator)
Utility function: used with nth position filters to convert a sequence of nodes to just one single node (the one at position n).

copy

public static void copy(java.lang.Object obj,
                        TransletOutputHandler handler,
                        int node,
                        DOM dom)

runTimeTypeError

public static void runTimeTypeError(java.lang.String from,
                                    java.lang.String to)
Print a run-time type error message.

runTimeInternalError

public static void runTimeInternalError()
Print a run-time internal error message.

runTimeError

public static void runTimeError(java.lang.String message)
Print a run-time error message.

consoleOutput

public static void consoleOutput(java.lang.String msg)


Copyright © 2000 Apache XML Project. All Rights Reserved.