You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by mo...@apache.org on 2001/11/22 14:49:07 UTC
cvs commit: xml-xalan/java/src/org/apache/xalan/xsltc/compiler XslElement.java
morten 01/11/22 05:49:07
Modified: java/src/org/apache/xalan/xsltc/compiler XslElement.java
Log:
Added test in <xsl:element> to verify that the local name of the created
element is legal (must have contents, but no whitespaces or colon).
PR: bugzilla 4894
Obtained from: n/a
Submitted by: morten@xml.apache.org
Reviewed by: morten@xml.apache.org
Revision Changes Path
1.13 +10 -9 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.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- XslElement.java 2001/10/30 08:42:55 1.12
+++ XslElement.java 2001/11/22 13:49:07 1.13
@@ -1,5 +1,5 @@
/*
- * @(#)$Id: XslElement.java,v 1.12 2001/10/30 08:42:55 morten Exp $
+ * @(#)$Id: XslElement.java,v 1.13 2001/11/22 13:49:07 morten Exp $
*
* The Apache Software License, Version 1.1
*
@@ -160,14 +160,15 @@
_name = AttributeValue.create(this, name, parser);
// Next check that the local part of the QName is legal (no whitespace)
- if ((_name instanceof SimpleAttributeValue) &&
- (local.indexOf(' ') > -1)) {
- ErrorMsg err = new ErrorMsg(ErrorMsg.ILLEGAL_ELEM_NAME_ERR,
- local, this);
- parser.reportError(WARNING, err);
- parseChildren(parser);
- _ignore = true; // Ignore the element if the local part is invalid
- return;
+ if (_name instanceof SimpleAttributeValue) {
+ if (local.equals(EMPTYSTRING) || (local.indexOf(' ') > -1)) {
+ ErrorMsg err = new ErrorMsg(ErrorMsg.ILLEGAL_ELEM_NAME_ERR,
+ local, this);
+ parser.reportError(WARNING, err);
+ parseChildren(parser);
+ _ignore = true; // Ignore the element if local part is invalid
+ return;
+ }
}
// Handle the 'use-attribute-sets' attribute
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org