_mode = parser.getQName(mode);
_mode = parser.getQNameIgnoreDefaultNs(mode);
    public void parseContents(Parser parser) {	final String name     = getAttribute("name");	final String mode     = getAttribute("mode");	final String match    = getAttribute("match");	final String priority = getAttribute("priority");	_stylesheet = super.getStylesheet();	if (name.length() > 0) {	    _name = parser.getQName(name);	}		if (mode.length() > 0) {	    _mode = parser.getQName(mode);	}		if (match.length() > 0) {	    _pattern = parser.parsePattern(this, "match", null);	}	if (priority.length() > 0) {	    _priority = Double.parseDouble(priority);	}	else {	    if (_pattern != null)		_priority = _pattern.getPriority();	    else		_priority = Double.NaN;	}	_position = parser.getTemplateIndex();	// Add the (named) template to the symbol table	if (_name != null) {	    Template other = parser.getSymbolTable().addTemplate(this);	    if (!resolveNamedTemplates(other, parser)) {		ErrorMsg err =		    new ErrorMsg(ErrorMsg.TEMPLATE_REDEF_ERR, _name, this);		parser.reportError(Constants.ERROR, err);	    }	}	parser.setTemplate(this);	// set current template	parseChildren(parser);	parser.setTemplate(null);	// clear template    }