1 package net.sf.saxon.instruct; 2 3 import net.sf.saxon.expr.*; 4 import net.sf.saxon.om.NamePool; 5 import net.sf.saxon.pattern.NodeKindTest; 6 import net.sf.saxon.trans.XPathException; 7 import net.sf.saxon.type.ItemType; 8 9 import java.io.PrintStream ; 10 11 15 public class UseAttributeSets extends Instruction { 16 17 private AttributeSet[] attributeSets; 18 19 public UseAttributeSets(AttributeSet[] sets) { 20 attributeSets = sets; 21 } 22 23 32 33 public Expression simplify(StaticContext env) throws XPathException { 34 return this; 35 } 36 37 54 55 public Expression optimize(Optimizer opt, StaticContext env, ItemType contextItemType) throws XPathException { 56 return this; 57 } 58 59 82 83 public Expression typeCheck(StaticContext env, ItemType contextItemType) throws XPathException { 84 return this; 85 } 86 87 92 93 public ItemType getItemType() { 94 return NodeKindTest.ATTRIBUTE; 95 } 96 97 108 109 public TailCall processLeavingTail(XPathContext context) throws XPathException { 110 AttributeSet.expand(attributeSets, context); 111 return null; 112 } 113 114 122 123 public void display(int level, NamePool pool, PrintStream out) { 124 out.println(ExpressionTool.indent(level) + "use attribute sets"); 125 } 126 } 127 128 146 | Popular Tags |