Template template = new Template(); template.parseSimplified(this, parser);
Template template = (Template) parent; _isLocal = true; template.addParameter(this); if (template.isSimpleNamedTemplate()) { _isInSimpleNamedTemplate = true;
private int partition(Vector templates, int p, int r) { final Template x = (Template)templates.elementAt(p); int i = p - 1; int j = r + 1; while (true) { while (x.compareTo((Template)templates.elementAt(--j)) > 0); while (x.compareTo((Template)templates.elementAt(++i)) < 0); if (i < j) { templates.set(j, templates.set(i, templates.elementAt(j))); } else { return j; } } }
public void setTemplate(final Template template) { _template = template; _priority = template.getPriority(); _importPrecedence = template.getImportPrecedence(); _position = template.getPosition(); }
private boolean resolveNamedTemplates(Template other, Parser parser) { if (other == null) return true; SymbolTable stable = parser.getSymbolTable(); final int us = this.getImportPrecedence(); final int them = other.getImportPrecedence(); if (us > them) { other.disable(); return true; } else if (us < them) { stable.addTemplate(other); this.disable(); return true; } else { return false; } }
/** * Parse the attributes and contents of an <xsl:apply-imports/> element. */ public void parseContents(Parser parser) { // Indicate to the top-level stylesheet that all templates must be // compiled into separate methods. Stylesheet stylesheet = getStylesheet(); stylesheet.setTemplateInlining(false); // Get the mode we are currently in (might not be any) Template template = getTemplate(); _modeName = template.getModeName(); _precedence = template.getImportPrecedence(); parseChildren(parser); // with-params }
if (template.isNamed() && !template.disabled()) { _namedTemplates.put(template, this); final Pattern pattern = template.getPattern(); if (pattern != null) { flattenAlternative(pattern, template, keys);
final ConstantPoolGen cpg = classGen.getConstantPool(); final InstructionList il = new InstructionList(); String methodName = Util.escape(template.getName().toString()); if (template.isSimpleNamedTemplate()) { Vector parameters = template.getParameters(); numParams = parameters.size(); getClassName(), il, cpg); il.append(template.compile(classGen, methodGen)); il.append(RETURN);
final ConstantPoolGen cpg = classGen.getConstantPool(); final InstructionList il = new InstructionList(); String methodName = Util.escape(template.getName().toString()); if (template.isSimpleNamedTemplate()) { Vector parameters = template.getParameters(); numParams = parameters.size();
String name = "template$dot$" + template.getPosition(); template.setName(parser.getQName(name));
Vector defaultParams = _calleeTemplate.getParameters(); int numParams = defaultParams.size(); _parameters = new Object[numParams];
public void setTemplate(final Template template) { _template = template; _priority = template.getPriority(); _importPrecedence = template.getImportPrecedence(); _position = template.getPosition(); }
getMode(template.getModeName()).addTemplate(template);
public Template addTemplate(Template template) { final QName name = template.getName(); if (_templates == null) _templates = new Hashtable(); return (Template)_templates.put(name, template); }
/** * Returns the position of the highest priority pattern in * this test sequence. */ public int getPosition() { final Template template = (_patterns.size() == 0) ? _default : ((Pattern) _patterns.elementAt(0)).getTemplate(); return template.getPosition(); }
private boolean resolveNamedTemplates(Template other, Parser parser) { if (other == null) return true; SymbolTable stable = parser.getSymbolTable(); final int us = this.getImportPrecedence(); final int them = other.getImportPrecedence(); if (us > them) { other.disable(); return true; } else if (us < them) { stable.addTemplate(other); this.disable(); return true; } else { return false; } }
if (template.isNamed() && !template.disabled()) { _namedTemplates.put(template, this); final Pattern pattern = template.getPattern(); if (pattern != null) { flattenAlternative(pattern, template, keys);
final ConstantPoolGen cpg = classGen.getConstantPool(); final InstructionList il = new InstructionList(); String methodName = Util.escape(template.getName().toString()); if (template.isSimpleNamedTemplate()) { Vector parameters = template.getParameters(); numParams = parameters.size(); getClassName(), il, cpg); il.append(template.compile(classGen, methodGen)); il.append(RETURN);
final ConstantPoolGen cpg = classGen.getConstantPool(); final InstructionList il = new InstructionList(); String methodName = Util.escape(template.getName().toString()); if (template.isSimpleNamedTemplate()) { Vector parameters = template.getParameters(); numParams = parameters.size();
String name = "template$dot$" + template.getPosition(); template.setName(parser.getQName(name));