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...@locus.apache.org on 2000/01/06 18:10:30 UTC
cvs commit: xml-xalan/src/org/apache/xalan/xslt/res XSLTErrorResources.java
mmidy 00/01/06 09:10:29
Modified: src/org/apache/xalan/xslt ElemLiteralResult.java
src/org/apache/xalan/xslt/res XSLTErrorResources.java
Log:
Catch invalid attributes in LiteralResultElement
Revision Changes Path
1.10 +9 -2 xml-xalan/src/org/apache/xalan/xslt/ElemLiteralResult.java
Index: ElemLiteralResult.java
===================================================================
RCS file: /home/cvs/xml-xalan/src/org/apache/xalan/xslt/ElemLiteralResult.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- ElemLiteralResult.java 2000/01/05 23:05:30 1.9
+++ ElemLiteralResult.java 2000/01/06 17:10:28 1.10
@@ -65,6 +65,7 @@
import org.apache.xalan.xpath.XPathSupport;
import org.apache.xalan.xpath.xml.StringToStringTable;
import org.apache.xalan.xpath.xml.NameSpace;
+import org.apache.xalan.xslt.res.XSLTErrorResources;
import java.io.*;
import java.util.*;
@@ -130,8 +131,14 @@
{
String versionStr = atts.getValue(i);
m_stylesheet.m_XSLTVerDeclared = Double.valueOf(versionStr).doubleValue();
- }
- }
+ }
+ // invalid attribute
+ else
+ {
+ processor.warn(XSLTErrorResources.WG_ILLEGAL_ATTRIBUTE, new Object[] {name, aname});
+ needToProcess = false;
+ }
+ }
}
}
if(needToProcess)
1.10 +6 -1 xml-xalan/src/org/apache/xalan/xslt/res/XSLTErrorResources.java
Index: XSLTErrorResources.java
===================================================================
RCS file: /home/cvs/xml-xalan/src/org/apache/xalan/xslt/res/XSLTErrorResources.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- XSLTErrorResources.java 2000/01/05 23:05:38 1.9
+++ XSLTErrorResources.java 2000/01/06 17:10:29 1.10
@@ -21,7 +21,7 @@
public static final String WARNING_SUFFIX = "WR";
public static final int MAX_CODE = 91; // this is needed to keep track of the number of messages
-public static final int MAX_WARNING = 20; // this is needed to keep track of the number of warnings
+public static final int MAX_WARNING = 21; // this is needed to keep track of the number of warnings
public static final int MAX_OTHERS = 41;
public static final int MAX_MESSAGES = MAX_CODE + MAX_WARNING +1;
@@ -616,6 +616,11 @@
public static final int WG_XSLDECIMALFORMAT_NAMES_MUST_BE_UNIQUE = 20;
static {contents[WG_XSLDECIMALFORMAT_NAMES_MUST_BE_UNIQUE + MAX_CODE][1]
= "xsl:decimal-format names must be unique. The last one will be used.";
+}
+
+public static final int WG_ILLEGAL_ATTRIBUTE = 21;
+static {contents[WG_ILLEGAL_ATTRIBUTE + MAX_CODE][1]
+ = "{0} has an illegal attribute: {1}";
}
// Other miscellaneous text used inside the code...