final String select = getAttribute("select"); if (select.length() > 0) { _select = parser.parseExpression(this, "select", null); }
select = getAttribute("select");
    public void parseContents(Parser parser) {	// Parse attributes name and select (if present)	final String name = getAttribute("name");	if (name.length() > 0) {	    setName(parser.getQName(name));	}        else {	    reportError(this, parser, ErrorMsg.NREQATTR_ERR, "name");        }	// Check whether variable/param of the same name is already in scope	if (parser.lookupVariable(_name) != null) {	    ErrorMsg msg = new ErrorMsg(ErrorMsg.VARREDEF_ERR, _name, this);	    parser.reportError(Constants.ERROR, msg);	}		final String select = getAttribute("select");	if (select.length() > 0) {	    _select = parser.parseExpression(this, "select", null);	}	// Children must be parsed first -> static scoping	parseChildren(parser);	// Add a ref to this param to its enclosing construct	final SyntaxTreeNode parent = getParent();	if (parent instanceof Stylesheet) {	    // Mark this as a global parameter	    _isLocal = false;	    // Check if a global variable with this name already exists...	    Param param = parser.getSymbolTable().lookupParam(_name);	    // ...and if it does we need to check import precedence	    if (param != null) {		final int us = this.getImportPrecedence();		final int them = param.getImportPrecedence();		// It is an error if the two have the same import precedence		if (us == them) {		    reportError(this, parser, ErrorMsg.VARREDEF_ERR,				_name.toString());		}		// Ignore this if previous definition has higher precedence		else if (them > us) {		    _ignore = true;		    return;		}		else {		    param.disable();		}	    }	    // Add this variable if we have higher precedence	    ((Stylesheet)parent).addParam(this);	    parser.getSymbolTable().addParam(this);	}	else if (parent instanceof Template) {	    _isLocal = true;	    ((Template)parent).hasParams(true);	}    }