Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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.

Field Summary
`static int` | `AXIS_SUPPORT_ERR`
`static int` | `DATA_CONVERSION_ERR`
`static int` | `DOM_ADAPTER_INIT_ERR`
`static int` | `EQUALITY_EXPR_ERR`
`static java.lang.String` | `ERROR_MESSAGES_KEY`
`static int` | `EXTERNAL_FUNC_ERR`
`static int` | `FORMAT_NUMBER_ERR`
`static int` | `INVALID_ARGUMENT_ERR`
`static int` | `ITERATOR_CLONE_ERR`
`static int` | `NAMESPACE_PREFIX_ERR`
`static int` | `NAMESPACES_SUPPORT_ERR`
`static int` | `PARSER_DTD_SUPPORT_ERR`
`static int` | `RUN_TIME_COPY_ERR`
`static int` | `RUN_TIME_INTERNAL_ERR`
`static int` | `STRAY_ATTRIBUTE_ERR`
`static int` | `STRAY_NAMESPACE_ERR`
`static int` | `TYPED_AXIS_SUPPORT_ERR`

Constructor Summary
`BasisLibrary()`

Method Summary
`static boolean` | `booleanF(java.lang.Object obj)` XSLT Standard function boolean()
`static boolean` | `compare(int node, NodeIterator iterator, int op, DOM dom)`
`static boolean` | `compare(NodeIterator left, double rnumber, int op, DOM dom)` Utility function: node-set/number compare.
`static boolean` | `compare(NodeIterator left, NodeIterator right, int op, 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(java.lang.Object left, java.lang.Object right, int op, 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)` 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` | `generatePrefix()`
`static java.lang.String` | `getLocalName(java.lang.String value)` utility function for calls to local-name().
`static java.lang.String` | `getPrefix(java.lang.String qname)` This function is used in the execution of xsl:element
`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 NodeIterator` | `node2Iterator(Node node, Translet translet, DOM dom)` Utility function used to convert a w3c Node into an internal DOM iterator.
`static NodeIterator` | `nodeList2Iterator(NodeList nodeList, Translet translet, DOM dom)` Utility function used to convert a w3c NodeList into a internal DOM iterator.
`static NodeIterator` | `nodesetF(java.lang.Object obj)` Implements the nodeset() extension function.
`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 java.lang.String` | `objectTypeF(java.lang.Object obj)` Implements the object-type() extension function.
`static int` | `positionF(NodeIterator iterator)` Standard function position()
`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 Node` | `referenceToNode(java.lang.Object obj, DOM dom)` Utility function: used to convert reference to org.w3c.dom.Node.
`static NodeList` | `referenceToNodeList(java.lang.Object obj, DOM dom)` Utility function: used to convert reference to org.w3c.dom.NodeList.
`static NodeIterator` | `referenceToNodeSet(java.lang.Object obj)` Utility function: used to convert references to node-sets.
`static DOM` | `referenceToResultTree(java.lang.Object obj)` Utility function used to convert references to DOMs.
`static java.lang.String` | `replace(java.lang.String base, char ch, java.lang.String str)` Replace a certain character in a string with a new substring.
`static java.lang.String` | `replace(java.lang.String base, java.lang.String delim, java.lang.String[] str)`
`static void` | `runTimeError(int code)` Print a run-time error message.
`static void` | `runTimeError(int code, java.lang.Object arg0)`
`static void` | `runTimeError(int code, java.lang.Object[] args)`
`static void` | `runTimeError(int code, java.lang.Object arg0, java.lang.Object arg1)`
`static java.lang.String` | `startXslElement(java.lang.String qname, java.lang.String namespace, TransletOutputHandler handler, DOM dom, int node)` Utility function for the implementation of xsl:element.
`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().
`static void` | `unresolved_externalF(java.lang.String name)` External functions that cannot be resolved are replaced with a call to this method.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### RUN_TIME_INTERNAL_ERR

    public static final int RUN_TIME_INTERNAL_ERR

### RUN_TIME_COPY_ERR

    public static final int RUN_TIME_COPY_ERR

### DATA_CONVERSION_ERR

    public static final int DATA_CONVERSION_ERR

### EXTERNAL_FUNC_ERR

    public static final int EXTERNAL_FUNC_ERR

### EQUALITY_EXPR_ERR

    public static final int EQUALITY_EXPR_ERR

### INVALID_ARGUMENT_ERR

    public static final int INVALID_ARGUMENT_ERR

### FORMAT_NUMBER_ERR

    public static final int FORMAT_NUMBER_ERR

### ITERATOR_CLONE_ERR

    public static final int ITERATOR_CLONE_ERR

### AXIS_SUPPORT_ERR

    public static final int AXIS_SUPPORT_ERR

### TYPED_AXIS_SUPPORT_ERR

    public static final int TYPED_AXIS_SUPPORT_ERR

### STRAY_ATTRIBUTE_ERR

    public static final int STRAY_ATTRIBUTE_ERR

### STRAY_NAMESPACE_ERR

    public static final int STRAY_NAMESPACE_ERR

### NAMESPACE_PREFIX_ERR

    public static final int NAMESPACE_PREFIX_ERR

### DOM_ADAPTER_INIT_ERR

    public static final int DOM_ADAPTER_INIT_ERR

### PARSER_DTD_SUPPORT_ERR

    public static final int PARSER_DTD_SUPPORT_ERR

### NAMESPACES_SUPPORT_ERR

    public static final int NAMESPACES_SUPPORT_ERR

### ERROR_MESSAGES_KEY

    public static final java.lang.String ERROR_MESSAGES_KEY

Constructor Detail

### BasisLibrary

    public BasisLibrary()

Method Detail

### countF

    public static int countF(NodeIterator iterator)

  Standard function count(node-set)

### positionF

    public static int positionF(NodeIterator iterator)

  Standard function position()

### 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().

### unresolved_externalF

    public static void unresolved_externalF(java.lang.String name)

  External functions that cannot be resolved are replaced with a call to this method. This method will generate a runtime errors. A good stylesheet checks whether the function exists using conditional constructs, and never really tries to call it if it doesn't exist. But simple stylesheets may result in a call to this method. The compiler should generate a warning if it encounters a call to an unresolved external function.

### 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().

### objectTypeF

    public static java.lang.String objectTypeF(java.lang.Object obj)

  Implements the object-type() extension function.
  See Also:
    EXSLT

### nodesetF

    public static NodeIterator nodesetF(java.lang.Object obj)

  Implements the nodeset() extension function.

### compare

    public static boolean compare(NodeIterator left,
                                  NodeIterator right,
                                  int op,
                                  DOM dom)

  Utility function: node-set/node-set compare.

### compare

    public static boolean compare(int node,
                                  NodeIterator iterator,
                                  int op,
                                  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(java.lang.Object left,
                                  java.lang.Object right,
                                  int op,
                                  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.

### referenceToNodeList

    public static NodeList referenceToNodeList(java.lang.Object obj,
                                               DOM dom)

  Utility function: used to convert reference to org.w3c.dom.NodeList.

### referenceToNode

    public static Node referenceToNode(java.lang.Object obj,
                                       DOM dom)

  Utility function: used to convert reference to org.w3c.dom.Node.

### node2Iterator

    public static NodeIterator node2Iterator(Node node,
                                             Translet translet,
                                             DOM dom)

  Utility function used to convert a w3c Node into an internal DOM iterator.

### nodeList2Iterator

    public static NodeIterator nodeList2Iterator(NodeList nodeList,
                                                 Translet translet,
                                                 DOM dom)

  Utility function used to convert a w3c NodeList into a internal DOM iterator.

### referenceToResultTree

    public static DOM referenceToResultTree(java.lang.Object obj)

  Utility function used to convert references to DOMs.

### 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)

### startXslElement

    public static java.lang.String startXslElement(java.lang.String qname,
                                                   java.lang.String namespace,
                                                   TransletOutputHandler handler,
                                                   DOM dom,
                                                   int node)

  Utility function for the implementation of xsl:element.

### getPrefix

    public static java.lang.String getPrefix(java.lang.String qname)

  This function is used in the execution of xsl:element

### generatePrefix

    public static java.lang.String generatePrefix()

### runTimeError

    public static void runTimeError(int code)

  Print a run-time error message.

### runTimeError

    public static void runTimeError(int code,
                                    java.lang.Object[] args)

### runTimeError

    public static void runTimeError(int code,
                                    java.lang.Object arg0)

### runTimeError

    public static void runTimeError(int code,
                                    java.lang.Object arg0,
                                    java.lang.Object arg1)

### consoleOutput

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

### replace

    public static java.lang.String replace(java.lang.String base,
                                           char ch,
                                           java.lang.String str)

  Replace a certain character in a string with a new substring.

### replace

    public static java.lang.String replace(java.lang.String base,
                                           java.lang.String delim,
                                           java.lang.String[] str)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2002 Apache XML Project. All Rights Reserved.