com.caucho.xsl.fun
Class KeyFun

java.lang.Object
  extended by com.caucho.xpath.XPathFun
      extended by com.caucho.xsl.fun.KeyFun

public class KeyFun
extends XPathFun

The key(...) function.


Nested Class Summary
static class KeyFun.Key
           
 
Constructor Summary
KeyFun()
           
 
Method Summary
 void add(java.lang.String name, AbstractPattern match, Expr use)
          Add a new key.
 java.lang.Object eval(org.w3c.dom.Node node, ExprEnvironment env, AbstractPattern pattern, java.util.ArrayList args)
          Evaluate the function.
 java.util.HashMap<java.lang.String,KeyFun.Key> getKeys()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KeyFun

public KeyFun()
Method Detail

add

public void add(java.lang.String name,
                AbstractPattern match,
                Expr use)
Add a new key.

Parameters:
name - name of the key
match - the key's match pattern
use - the key's use expression

getKeys

public java.util.HashMap<java.lang.String,KeyFun.Key> getKeys()

eval

public java.lang.Object eval(org.w3c.dom.Node node,
                             ExprEnvironment env,
                             AbstractPattern pattern,
                             java.util.ArrayList args)
                      throws XPathException
Evaluate the function.

Specified by:
eval in class XPathFun
Parameters:
pattern - The context pattern.
args - The evaluated arguments
Throws:
XPathException