/** * Return the simple named template which this CallTemplate calls. * Return false if there is no matched template or the matched * template is not a simple named template. */ public Template getCalleeTemplate() { Template foundTemplate = getXSLTC().getParser().getSymbolTable().lookupTemplate(_name); return foundTemplate.isSimpleNamedTemplate() ? foundTemplate : null; }
public void parseContents(Parser parser) { _select = parser.parseExpression(this, "select", null); parseChildren(parser); // make sure required attribute(s) have been set if (_select.isDummy()) { reportError(this, parser, ErrorMsg.REQUIRED_ATTR_ERR, "select"); } }
public void parseContents(Parser parser) { sPrefix = getAttribute("stylesheet-prefix"); rPrefix = getAttribute("result-prefix"); parser.getSymbolTable().addPrefixAlias(sPrefix,rPrefix); }
/** * Type check the contents of this element */ public Type typeCheck(SymbolTable stable) throws TypeCheckError { if (_ignore) return (Type.Void); // _mergeSet Point to any previous definition of this attribute set _mergeSet = stable.addAttributeSet(this); _method = AttributeSetPrefix + getXSLTC().nextAttributeSetSerial(); if (_useSets != null) _useSets.typeCheck(stable); typeCheckContents(stable); return Type.Void; }
public Type typeCheck(SymbolTable stable) throws TypeCheckError { // Type check match pattern _match.typeCheck(stable); // Cast node values to string values (except for nodesets) _useType = _use.typeCheck(stable); if (_useType instanceof StringType == false && _useType instanceof NodeSetType == false) { _use = new CastExpr(_use, Type.String); } return Type.Void; }
public Type typeCheck(SymbolTable stable) throws TypeCheckError { stype = _step.typeCheck(stable); _path.typeCheck(stable); if (_axisMismatch) enableNodeOrdering(); return _type = Type.NodeSet; }
/** * Type checks the 'file' attribute (must be able to convert it to a str). */ public Type typeCheck(SymbolTable stable) throws TypeCheckError { final Type type = _filename.typeCheck(stable); if (type instanceof StringType == false) { _filename = new CastExpr(_filename, Type.String); } typeCheckContents(stable); return Type.Void; }
public ParentLocationPath(RelativeLocationPath path, Expression step) { _path = path; _step = step; _path.setParent(this); _step.setParent(this); if (_step instanceof Step) { _axisMismatch = checkAxisMismatch(); } }
public void parseContents(Parser parser) { _select = parser.parseExpression(this, "select", null); // make sure required attribute(s) have been set if (_select.isDummy()) { reportError(this, parser, ErrorMsg.REQUIRED_ATTR_ERR, "select"); return; } }
public Type typeCheck(SymbolTable stable) throws TypeCheckError { if (!_ignore) { _name.typeCheck(stable); if (_namespace != null) { _namespace.typeCheck(stable); } typeCheckContents(stable); } return Type.Void; }
public Type typeCheck(SymbolTable stable) throws TypeCheckError { if (argumentCount() > 0) { argument().typeCheck(stable); } return _type = Type.Real; }
/** * Return true if the output method is html. */ private boolean isHTMLOutput() { return getStylesheet().getOutputMethod() == Stylesheet.HTML_OUTPUT; }
public Type typeCheck(SymbolTable stable) throws TypeCheckError { if (_pattern != null) { _pattern.typeCheck(stable); } return typeCheckContents(stable); }
public Type typeCheck(SymbolTable stable) throws TypeCheckError { _name.typeCheck(stable); typeCheckContents(stable); return Type.Void; }