1 package net.sf.saxon.functions; 2 import net.sf.saxon.expr.Expression; 3 import net.sf.saxon.expr.StaticContext; 4 import net.sf.saxon.expr.StaticProperty; 5 import net.sf.saxon.expr.XPathContext; 6 import net.sf.saxon.om.Item; 7 import net.sf.saxon.trans.XPathException; 8 9 12 13 public class Current extends SystemFunction implements XSLTFunction { 14 15 20 21 public int computeSpecialProperties() { 22 return StaticProperty.CONTEXT_DOCUMENT_NODESET | 23 StaticProperty.SINGLE_DOCUMENT_NODESET | 24 StaticProperty.ORDERED_NODESET | 25 StaticProperty.NON_CREATIVE; 26 } 27 28 32 33 public Expression preEvaluate(StaticContext env) { 34 return this; 35 } 36 37 40 41 public Item evaluateItem(XPathContext c) throws XPathException { 42 throw new AssertionError ("current() function should have been rewritten at compile time"); 43 } 47 48 51 52 public int getIntrinsicDependencies() { 53 return StaticProperty.DEPENDS_ON_CURRENT_ITEM; 54 } 55 56 } 57 58 59 60 61 | Popular Tags |