org.apache.xalan.xslt.extensions
Class Tokenizer

java.lang.Object
  |
  +--org.apache.xalan.xslt.extensions.Tokenizer

public class Tokenizer
extends java.lang.Object

Tokenizer class. This class is an extension implementing a set of tokenizing function. I've found this functions especially usefull when used with attribute nodes.


Constructor Summary
Tokenizer()
           
 
Method Summary
static org.w3c.dom.NodeList tokenize(org.w3c.dom.NodeList iNodes)
          Tokenize a Nodelist into a NodeList of text nodes.
static org.w3c.dom.NodeList tokenize(org.w3c.dom.NodeList iNodes, java.lang.String iTokenSeparators)
          Tokenize a Nodelist into a NodeList of text nodes.
static org.w3c.dom.NodeList tokenize(java.lang.String iToTokenize)
          Tokenize a Nodelist into a NodeList of text nodes.
static org.w3c.dom.NodeList tokenize(java.lang.String iToTokenize, java.lang.String iTokenSeparators)
          Tokenize a string into a NodeList of text nodes.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Tokenizer

public Tokenizer()
Method Detail

tokenize

public static org.w3c.dom.NodeList tokenize(java.lang.String iToTokenize,
                                            java.lang.String iTokenSeparators)
Tokenize a string into a NodeList of text nodes. The main method for this class, it is used to turn a String and a token separator list into a Node-Set of Text nodes.
Parameters:
iToTokenize - The string which needs to be tokenized.
iTokenSeparators - The string which contains all the separators used during the tokenization process.
Returns:
A NodeList containing a text node with the appropriate value for each token in the string.

tokenize

public static org.w3c.dom.NodeList tokenize(org.w3c.dom.NodeList iNodes,
                                            java.lang.String iTokenSeparators)
Tokenize a Nodelist into a NodeList of text nodes. Converts the NodeList into a string then calls the first method.
Parameters:
iNodes - The Node-Set which needs to be tokenized.
iTokenSeparators - The string which contains all the separators used during the tokenization process.
Returns:
A NodeList containing a text node with the appropriate value for each token in the string.

tokenize

public static org.w3c.dom.NodeList tokenize(org.w3c.dom.NodeList iNodes)
Tokenize a Nodelist into a NodeList of text nodes. Converts the NodeList into a string then calls the first method with space and commas as separators.
Parameters:
iNodes - The Node-Set which needs to be tokenized.
Returns:
A NodeList containing a text node with the appropriate value for each token in the string.

tokenize

public static org.w3c.dom.NodeList tokenize(java.lang.String iToTokenize)
Tokenize a Nodelist into a NodeList of text nodes. Calls the first method with space and commas as separators.
Parameters:
iNodes - The Node-Set which needs to be tokenized.
Returns:
A NodeList containing a text node with the appropriate value for each token in the string.


Copyright © 2000 Apache XML Project. All Rights Reserved.