_name = parser.getQName(name); _name.clearDefaultNamespace();
setName(parser.getQName(name));
    public void parseContents(Parser parser) {	// parse attributes name and select (if present)	final String name = getAttribute("name");	if (name.length() > 0) {	    _name = parser.getQName(name);	    _name.clearDefaultNamespace();	}        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) {	    reportError(this, parser, ErrorMsg.VARREDEF_ERR, _name.toString());	}	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 var to its enclosing construct	SyntaxTreeNode parent = getParent();	if (parent instanceof Stylesheet) {	    // Mark this as a global variable	    _isLocal = false;	    // Check if a global variable with this name already exists...	    Variable var = parser.getSymbolTable().lookupVariable(_name);	    // ...and if it does we need to check import precedence	    if (var != null) {		final int us = this.getImportPrecedence();		final int them = var.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) {		    return;		}		// Add this variable if we have higher precedence	    }	    ((Stylesheet)parent).addVariable(this);	    parser.getSymbolTable().addVariable(this);	}	else {	    _isLocal = true;	}    }