You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by mm...@apache.org on 2001/09/12 22:07:36 UTC
cvs commit: xml-xalan/java/src/org/apache/xalan/templates ElemElement.java
mmidy 01/09/12 13:07:36
Modified: java/src/org/apache/xalan/res XSLTErrorResources.java
java/src/org/apache/xalan/templates ElemElement.java
Log:
Bug 3421: Issue an error if namespace attribute is used with an empty string in xsl:element
Revision Changes Path
1.22 +10 -1 xml-xalan/java/src/org/apache/xalan/res/XSLTErrorResources.java
Index: XSLTErrorResources.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/res/XSLTErrorResources.java,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- XSLTErrorResources.java 2001/07/31 21:33:17 1.21
+++ XSLTErrorResources.java 2001/09/12 20:07:36 1.22
@@ -86,7 +86,7 @@
public static final String WARNING_SUFFIX = "WR";
/** Maximum error messages, this is needed to keep track of the number of messages. */
- public static final int MAX_CODE = 215;
+ public static final int MAX_CODE = 216;
/** Maximum warnings, this is needed to keep track of the number of warnings. */
public static final int MAX_WARNING = 26;
@@ -2050,6 +2050,15 @@
contents[ER_XMLRDR_NOT_BEFORE_STARTPARSE][1] =
"XMLReader not before startParse request";
}
+
+ /** Attempting to generate a namespace prefix with a null URI */
+ public static final int ER_NULL_URI_NAMESPACE = 216;
+
+ static
+ {
+ contents[ER_NULL_URI_NAMESPACE][1] =
+ "Attempting to generate a namespace prefix with a null URI";
+ }
/*
1.21 +6 -3 xml-xalan/java/src/org/apache/xalan/templates/ElemElement.java
Index: ElemElement.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/templates/ElemElement.java,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- ElemElement.java 2001/08/10 16:21:09 1.20
+++ ElemElement.java 2001/09/12 20:07:36 1.21
@@ -305,9 +305,11 @@
if (null != m_namespace_avt)
{
nodeNamespace = m_namespace_avt.evaluate(xctxt, sourceNode, this);
- if (null == nodeNamespace)
- nodeNamespace = "";
-
+ if (null == nodeNamespace || nodeNamespace.length()== 0 )
+ transformer.getMsgMgr().error(
+ this, XSLTErrorResources.ER_NULL_URI_NAMESPACE);
+ else
+ {
// Determine the actual prefix that we will use for this nodeNamespace
prefix = resolvePrefix(rhandler, prefix, nodeNamespace);
@@ -318,6 +320,7 @@
nodeName = (prefix + ":" + QName.getLocalPart(nodeName));
else
nodeName = QName.getLocalPart(nodeName);
+ }
}
// No namespace attribute was supplied. Use the namespace declarations
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org