if (!Util.isValidQNames(val)) { ErrorMsg err = new ErrorMsg(ErrorMsg.INVALID_QNAME_ERR, val, this); parser.reportError(Constants.ERROR, err); }
    public void parseContents(Parser parser) {	final SymbolTable stable = parser.getSymbolTable();	stable.setCurrentNode(this);	// Find the closest literal element ancestor (if there is one)	SyntaxTreeNode _literalElemParent = getParent();	while (_literalElemParent != null && !(_literalElemParent instanceof LiteralElement)) {	    _literalElemParent = _literalElemParent.getParent();	}	if (!(_literalElemParent instanceof LiteralElement)) {	    _literalElemParent = null;	}	_name = translateQName(_qname, stable);	// Process all attributes and register all namespaces they use	final int count = _attributes.getLength();	for (int i = 0; i < count; i++) {	    final QName qname = parser.getQName(_attributes.getQName(i));	    final String uri = qname.getNamespace();	    final String val = _attributes.getValue(i);	    // Handle xsl:use-attribute-sets. Attribute sets are placed first	    // in the vector or attributes to make sure that later local	    // attributes can override an attributes in the set.	    if (qname == parser.getUseAttributeSets()) {		setFirstAttribute(new UseAttributeSets(val, parser));	    }	    // Handle xsl:extension-element-prefixes	    else if (qname == parser.getExtensionElementPrefixes()) {		stable.excludeNamespaces(val);	    }	    // Handle xsl:exclude-result-prefixes	    else if (qname == parser.getExcludeResultPrefixes()) {		stable.excludeNamespaces(val);	    }	    else {		// Ignore special attributes (e.g. xmlns:prefix and xmlns)		final String prefix = qname.getPrefix();		if (prefix != null && prefix.equals(XMLNS_PREFIX) ||		    prefix == null && qname.getLocalPart().equals("xmlns") ||		    uri != null && uri.equals(XSLT_URI))		{		    continue;			}		// Handle all other literal attributes		final String name = translateQName(qname, stable);		LiteralAttribute attr = new LiteralAttribute(name, val, parser);		addAttribute(attr);		attr.setParent(this);		attr.parseContents(parser);	    }	}	// Register all namespaces that are in scope, except for those that	// are listed in the xsl:stylesheet element's *-prefixes attributes	final Enumeration include = getNamespaceScope(this);	while (include.hasMoreElements()) {	    final String prefix = (String)include.nextElement();	    if (!prefix.equals("xml")) {		final String uri = lookupNamespace(prefix);		if (uri != null && !stable.isExcludedNamespace(uri)) {		    registerNamespace(prefix, uri, stable, true);		}	    }	}	parseChildren(parser);	// Process all attributes and register all namespaces they use	for (int i = 0; i < count; i++) {	    final QName qname = parser.getQName(_attributes.getQName(i));	    final String val = _attributes.getValue(i);	    // Handle xsl:extension-element-prefixes	    if (qname == parser.getExtensionElementPrefixes()) {		stable.unExcludeNamespaces(val);	    }	    // Handle xsl:exclude-result-prefixes	    else if (qname == parser.getExcludeResultPrefixes()) {		stable.unExcludeNamespaces(val);	    }	}    }