morten 01/06/12 03:35:22 Modified: java/src/org/apache/xalan/xsltc/compiler XslElement.java Log: Modified test for legal element names in <xsl:element>. The element name is treated as an attribute value. Whitespaces are not allowed in plain text element names, but should be allowed inside "{...}" attribute values. PR: Bugzilla 1489 Obtained from: n/a Submitted by: [EMAIL PROTECTED] Reviewed by: [EMAIL PROTECTED] Revision Changes Path 1.8 +13 -12 xml-xalan/java/src/org/apache/xalan/xsltc/compiler/XslElement.java Index: XslElement.java =================================================================== RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/XslElement.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- XslElement.java 2001/06/08 15:28:14 1.7 +++ XslElement.java 2001/06/12 10:35:19 1.8 @@ -1,5 +1,5 @@ /* - * @(#)$Id: XslElement.java,v 1.7 2001/06/08 15:28:14 morten Exp $ + * @(#)$Id: XslElement.java,v 1.8 2001/06/12 10:35:19 morten Exp $ * * The Apache Software License, Version 1.1 * @@ -122,17 +122,6 @@ } } - // Next check that the local part of the QName is legal (no whitespace) - if (qname.getLocalPart().indexOf(' ') > -1) { - final ErrorMsg msg = - new ErrorMsg("You can't call an element \""+ - qname.getLocalPart()+"\""); - parser.reportError(Constants.WARNING, msg); - parseChildren(parser); - _ignore = true; // Ignore the element if the local part is invalid - return; - } - // Check if this element belongs in a specific namespace if (namespace != Constants.EMPTYSTRING) { // Get the namespace requested by the xsl:element @@ -151,6 +140,18 @@ } _name = AttributeValue.create(this, name, parser); + + // Next check that the local part of the QName is legal (no whitespace) + if ((_name instanceof SimpleAttributeValue) && + (qname.getLocalPart().indexOf(' ') > -1)) { + final ErrorMsg msg = + new ErrorMsg("You can't call an element \""+ + qname.getLocalPart()+"\""); + parser.reportError(Constants.WARNING, msg); + parseChildren(parser); + _ignore = true; // Ignore the element if the local part is invalid + return; + } // Handle the 'use-attribute-sets' attribute final String useSets = getAttribute("use-attribute-sets"); --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]