1 package com.icl.saxon.expr; 2 import com.icl.saxon.Context; 3 import com.icl.saxon.om.*; 4 5 6 9 10 public final class ContextNodeExpression extends SingletonExpression { 11 12 18 19 public NodeInfo getNode(Context context) throws XPathException { 20 return context.getContextNodeInfo(); 21 } 22 23 28 29 public int getDependencies() { 30 return Context.CONTEXT_NODE; 31 } 32 33 41 42 public Expression reduce(int dependencies, Context context) throws XPathException { 43 if ((dependencies & Context.CONTEXT_NODE) != 0 ) { 44 return new SingletonNodeSet(context.getContextNodeInfo()); 45 } else { 46 return this; 47 } 48 } 49 50 53 54 public void display(int level) { 55 System.err.println(indent(level) + "."); 56 } 57 58 } 59 60 | Popular Tags |