1 15 package org.apache.tapestry.script; 16 17 import org.apache.tapestry.util.xml.RuleDirectedParser; 18 import org.xml.sax.Attributes ; 19 20 28 class InsertRule extends AbstractTokenRule 29 { 30 31 public void endElement(RuleDirectedParser parser) 32 { 33 parser.pop(); 34 } 35 36 public void startElement(RuleDirectedParser parser, Attributes attributes) 37 { 38 String expression = getAttribute(attributes, "property-path"); 40 41 if (expression == null) 43 expression = getAttribute(attributes, "key"); 44 45 IScriptToken token = new InsertToken(expression, parser.getLocation()); 46 47 addToParent(parser, token); 48 49 parser.push(token); 50 } 51 52 } 53 | Popular Tags |