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 00:05:39 UTC
cvs commit: xml-xalan/src/org/apache/xalan/xslt/res XSLTErrorResources.java XSLTErrorResources_en.java
mmidy 00/01/05 15:05:38
Modified: src/org/apache/xalan/xpath FuncCurrent.java FuncDoc.java
FuncFormatNumber.java FuncId.java FuncKey.java
FuncLoader.java FuncLocalPart.java
FuncNamespace.java FuncNormalize.java
FuncNormalizeSpace.java FuncNumber.java
FuncQname.java FuncString.java
FuncStringLength.java FuncSystemProperty.java
FuncTranslate.java FuncUnparsedEntityURI.java
Process.java SimpleNodeLocator.java XObject.java
XPath.java XPathProcessorImpl.java
src/org/apache/xalan/xpath/dtm DTMNodeLocator.java
src/org/apache/xalan/xpath/res XPATHErrorResources.java
XPATHErrorResources_en.java
src/org/apache/xalan/xpath/xml XMLParserLiaisonDefault.java
XSLMessages.java
src/org/apache/xalan/xslt AVT.java ElemApplyImport.java
ElemApplyTemplates.java ElemAttribute.java
ElemAttributeSet.java ElemCallTemplate.java
ElemChoose.java ElemComment.java ElemCopy.java
ElemCopyOf.java ElemDecimalFormat.java
ElemElement.java ElemFallback.java ElemForEach.java
ElemIf.java ElemLiteralResult.java ElemMessage.java
ElemNumber.java ElemOtherwise.java ElemPI.java
ElemSort.java ElemTemplate.java
ElemTemplateElement.java ElemText.java
ElemValueOf.java ElemVariable.java ElemWhen.java
ElemWithParam.java FuncDocument.java
FuncFormatNumb.java NodeSortKey.java Process.java
Stylesheet.java StylesheetHandler.java
StylesheetRoot.java TemplateList.java
UnImplNode.java XSLProcessorException.java
XSLTEngineImpl.java
src/org/apache/xalan/xslt/client XSLTProcessorApplet.java
src/org/apache/xalan/xslt/extensions Redirect.java
src/org/apache/xalan/xslt/res XSLTErrorResources.java
XSLTErrorResources_en.java
Log:
Improve message processing
Revision Changes Path
1.4 +2 -2 xml-xalan/src/org/apache/xalan/xpath/FuncCurrent.java
Index: FuncCurrent.java
===================================================================
RCS file: /home/cvs/xml-xalan/src/org/apache/xalan/xpath/FuncCurrent.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- FuncCurrent.java 1999/11/28 10:26:14 1.3
+++ FuncCurrent.java 2000/01/05 23:05:24 1.4
@@ -80,11 +80,11 @@
Node currentNode = execContext.getCurrentNode();
if(null == currentNode)
{
- path.error(context, XPATHErrorResources.ERROR0001); //"The current() function is not allowed in a match pattern!");
+ path.error(context, XPATHErrorResources.ER_CURRENT_NOT_ALLOWED_IN_MATCH); //"The current() function is not allowed in a match pattern!");
}
if(args.size() > 0)
{
- path.error(context, XPATHErrorResources.ERROR0002); //"The current() function does not accept arguments!");
+ path.error(context, XPATHErrorResources.ER_CURRENT_TAKES_NO_ARGS); //"The current() function does not accept arguments!");
}
XNodeSet nodes = new XNodeSet(currentNode);
return nodes;
1.3 +1 -1 xml-xalan/src/org/apache/xalan/xpath/FuncDoc.java
Index: FuncDoc.java
===================================================================
RCS file: /home/cvs/xml-xalan/src/org/apache/xalan/xpath/FuncDoc.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- FuncDoc.java 1999/11/28 04:25:06 1.2
+++ FuncDoc.java 2000/01/05 23:05:24 1.3
@@ -77,7 +77,7 @@
public XObject execute(XPath path, XPathSupport execContext, Node context, int opPos, Vector args)
throws org.xml.sax.SAXException
{
- path.error( context, XPATHErrorResources.ERROR0003); //"document() function implementation has been replaced by org.apache.xalan.xslt.FuncDocument!");
+ path.error( context, XPATHErrorResources.ER_DOCUMENT_REPLACED); //"document() function implementation has been replaced by org.apache.xalan.xslt.FuncDocument!");
return null;
}
1.4 +1 -1 xml-xalan/src/org/apache/xalan/xpath/FuncFormatNumber.java
Index: FuncFormatNumber.java
===================================================================
RCS file: /home/cvs/xml-xalan/src/org/apache/xalan/xpath/FuncFormatNumber.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- FuncFormatNumber.java 1999/11/28 10:26:15 1.3
+++ FuncFormatNumber.java 2000/01/05 23:05:24 1.4
@@ -82,7 +82,7 @@
int nArgs = args.size();
if(nArgs == 3)
{
- path.warn(XPATHErrorResources.WARNING0001); //"locale name in the format-number function not yet handled!");
+ path.warn(XPATHErrorResources.WG_LOCALE_NAME_NOT_HANDLED); //"locale name in the format-number function not yet handled!");
}
java.text.DecimalFormat formatter = new java.text.DecimalFormat(formatStr);
1.4 +1 -1 xml-xalan/src/org/apache/xalan/xpath/FuncId.java
Index: FuncId.java
===================================================================
RCS file: /home/cvs/xml-xalan/src/org/apache/xalan/xpath/FuncId.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- FuncId.java 1999/11/28 10:26:15 1.3
+++ FuncId.java 2000/01/05 23:05:25 1.4
@@ -116,7 +116,7 @@
}
if(null == docContext)
{
- path.error(context, XPATHErrorResources.ERROR0004); //"context does not have an owner document!");
+ path.error(context, XPATHErrorResources.ER_CONTEXT_HAS_NO_OWNERDOC); //"context does not have an owner document!");
}
Node node = execContext.getElementByID(ref, docContext);
// nodes.mutableNodeset().addNode(node);
1.4 +1 -1 xml-xalan/src/org/apache/xalan/xpath/FuncKey.java
Index: FuncKey.java
===================================================================
RCS file: /home/cvs/xml-xalan/src/org/apache/xalan/xpath/FuncKey.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- FuncKey.java 1999/11/28 10:26:15 1.3
+++ FuncKey.java 2000/01/05 23:05:25 1.4
@@ -84,7 +84,7 @@
? (Document)context : context.getOwnerDocument();
if(null == docContext)
{
- path.error(context, XPATHErrorResources.ERROR0004); //"context does not have an owner document!");
+ path.error(context, XPATHErrorResources.ER_CONTEXT_HAS_NO_OWNERDOC); //"context does not have an owner document!");
}
String keyname = ((XObject)args.elementAt(0)).str();
XObject arg = (XObject)args.elementAt(1);
1.2 +3 -3 xml-xalan/src/org/apache/xalan/xpath/FuncLoader.java
Index: FuncLoader.java
===================================================================
RCS file: /home/cvs/xml-xalan/src/org/apache/xalan/xpath/FuncLoader.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- FuncLoader.java 1999/12/03 22:30:56 1.1
+++ FuncLoader.java 2000/01/05 23:05:25 1.2
@@ -109,19 +109,19 @@
catch(ClassNotFoundException e)
{
e.printStackTrace();
- path.warn(XPATHErrorResources.WARNING0009, new Object[] {m_funcName});
+ path.warn(XPATHErrorResources.WG_COULDNOT_FIND_FUNCTION, new Object[] {m_funcName});
return null;
}
catch(IllegalAccessException e)
{
e.printStackTrace();
- path.warn(XPATHErrorResources.WARNING0009, new Object[] {m_funcName});
+ path.warn(XPATHErrorResources.WG_COULDNOT_FIND_FUNCTION, new Object[] {m_funcName});
return null;
}
catch(InstantiationException e)
{
e.printStackTrace();
- path.warn(XPATHErrorResources.WARNING0009, new Object[] {m_funcName});
+ path.warn(XPATHErrorResources.WG_COULDNOT_FIND_FUNCTION, new Object[] {m_funcName});
return null;
}
}
1.4 +1 -1 xml-xalan/src/org/apache/xalan/xpath/FuncLocalPart.java
Index: FuncLocalPart.java
===================================================================
RCS file: /home/cvs/xml-xalan/src/org/apache/xalan/xpath/FuncLocalPart.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- FuncLocalPart.java 1999/11/28 10:26:15 1.3
+++ FuncLocalPart.java 2000/01/05 23:05:25 1.4
@@ -81,7 +81,7 @@
if(nArgs > 0)
{
if(nArgs > 1)
- path.error(context, XPATHErrorResources.ERROR0005); //"local-name() has too many arguments.");
+ path.error(context, XPATHErrorResources.ER_LOCALNAME_HAS_TOO_MANY_ARGS); //"local-name() has too many arguments.");
NodeList nl = ((XObject)args.elementAt(0)).nodeset();
context = (nl.getLength() > 0) ? nl.item(0) : null;
}
1.4 +1 -1 xml-xalan/src/org/apache/xalan/xpath/FuncNamespace.java
Index: FuncNamespace.java
===================================================================
RCS file: /home/cvs/xml-xalan/src/org/apache/xalan/xpath/FuncNamespace.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- FuncNamespace.java 1999/11/28 10:26:15 1.3
+++ FuncNamespace.java 2000/01/05 23:05:25 1.4
@@ -81,7 +81,7 @@
if(nArgs > 0)
{
if(nArgs > 1)
- path.error(context, XPATHErrorResources.ERROR0006); //"namespace-uri() has too many arguments.");
+ path.error(context, XPATHErrorResources.ER_NAMESPACEURI_HAS_TOO_MANY_ARGS); //"namespace-uri() has too many arguments.");
NodeList nl = ((XObject)args.elementAt(0)).nodeset();
context = (nl.getLength() > 0) ? nl.item(0) : null;
}
1.4 +1 -1 xml-xalan/src/org/apache/xalan/xpath/FuncNormalize.java
Index: FuncNormalize.java
===================================================================
RCS file: /home/cvs/xml-xalan/src/org/apache/xalan/xpath/FuncNormalize.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- FuncNormalize.java 1999/11/28 10:26:15 1.3
+++ FuncNormalize.java 2000/01/05 23:05:25 1.4
@@ -82,7 +82,7 @@
if(nArgs > 0)
{
if(nArgs > 1)
- path.error(context, XPATHErrorResources.ERROR0007); //"normalize() has too many arguments.");
+ path.error(context, XPATHErrorResources.ER_NORMALIZESPACE_HAS_TOO_MANY_ARGS); //"normalize() has too many arguments.");
obj = ((XObject)args.elementAt(0));
}
else
1.4 +1 -1 xml-xalan/src/org/apache/xalan/xpath/FuncNormalizeSpace.java
Index: FuncNormalizeSpace.java
===================================================================
RCS file: /home/cvs/xml-xalan/src/org/apache/xalan/xpath/FuncNormalizeSpace.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- FuncNormalizeSpace.java 1999/11/28 10:26:15 1.3
+++ FuncNormalizeSpace.java 2000/01/05 23:05:25 1.4
@@ -82,7 +82,7 @@
if(nArgs > 0)
{
if(nArgs > 1)
- path.error(context, XPATHErrorResources.ERROR0007); //"normalize-space() has too many arguments.");
+ path.error(context, XPATHErrorResources.ER_NORMALIZESPACE_HAS_TOO_MANY_ARGS); //"normalize-space() has too many arguments.");
obj = ((XObject)args.elementAt(0));
}
else
1.4 +1 -1 xml-xalan/src/org/apache/xalan/xpath/FuncNumber.java
Index: FuncNumber.java
===================================================================
RCS file: /home/cvs/xml-xalan/src/org/apache/xalan/xpath/FuncNumber.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- FuncNumber.java 1999/11/28 10:26:15 1.3
+++ FuncNumber.java 2000/01/05 23:05:25 1.4
@@ -82,7 +82,7 @@
if(nArgs > 0)
{
if(nArgs > 1)
- path.error(context, XPATHErrorResources.ERROR0008); //"number() has too many arguments.");
+ path.error(context, XPATHErrorResources.ER_NUMBER_HAS_TOO_MANY_ARGS); //"number() has too many arguments.");
obj = ((XObject)args.elementAt(0));
}
else
1.5 +1 -1 xml-xalan/src/org/apache/xalan/xpath/FuncQname.java
Index: FuncQname.java
===================================================================
RCS file: /home/cvs/xml-xalan/src/org/apache/xalan/xpath/FuncQname.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- FuncQname.java 1999/12/13 07:48:50 1.4
+++ FuncQname.java 2000/01/05 23:05:25 1.5
@@ -81,7 +81,7 @@
if(nArgs > 0)
{
if(nArgs > 1)
- path.error(context, XPATHErrorResources.ERROR0009); //"name() has too many arguments.");
+ path.error(context, XPATHErrorResources.ER_NAME_HAS_TOO_MANY_ARGS); //"name() has too many arguments.");
NodeList nl = ((XObject)args.elementAt(0)).nodeset();
context = (nl.getLength() > 0) ? nl.item(0) : null;
}
1.4 +1 -1 xml-xalan/src/org/apache/xalan/xpath/FuncString.java
Index: FuncString.java
===================================================================
RCS file: /home/cvs/xml-xalan/src/org/apache/xalan/xpath/FuncString.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- FuncString.java 1999/11/28 10:26:15 1.3
+++ FuncString.java 2000/01/05 23:05:25 1.4
@@ -82,7 +82,7 @@
if(nArgs > 0)
{
if(nArgs > 1)
- path.error(context, XPATHErrorResources.ERROR0010); //"string() has too many arguments.");
+ path.error(context, XPATHErrorResources.ER_STRING_HAS_TOO_MANY_ARGS); //"string() has too many arguments.");
obj = ((XObject)args.elementAt(0));
}
else
1.4 +1 -1 xml-xalan/src/org/apache/xalan/xpath/FuncStringLength.java
Index: FuncStringLength.java
===================================================================
RCS file: /home/cvs/xml-xalan/src/org/apache/xalan/xpath/FuncStringLength.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- FuncStringLength.java 1999/11/28 10:26:15 1.3
+++ FuncStringLength.java 2000/01/05 23:05:25 1.4
@@ -82,7 +82,7 @@
if(nArgs > 0)
{
if(nArgs > 1)
- path.error(context, XPATHErrorResources.ERROR0011); //"string-length() has too many arguments.");
+ path.error(context, XPATHErrorResources.ER_STRINGLENGTH_HAS_TOO_MANY_ARGS); //"string-length() has too many arguments.");
obj = ((XObject)args.elementAt(0));
}
else
1.6 +4 -4 xml-xalan/src/org/apache/xalan/xpath/FuncSystemProperty.java
Index: FuncSystemProperty.java
===================================================================
RCS file: /home/cvs/xml-xalan/src/org/apache/xalan/xpath/FuncSystemProperty.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- FuncSystemProperty.java 1999/12/15 17:20:18 1.5
+++ FuncSystemProperty.java 2000/01/05 23:05:25 1.6
@@ -103,13 +103,13 @@
result = xsltInfo.getProperty(propName);
if (null == result)
{
- path.warn(XPATHErrorResources.WARNING0002, new Object[] {fullName}); //"XSL Property not supported: "+fullName);
+ path.warn(XPATHErrorResources.WG_PROPERTY_NOT_SUPPORTED, new Object[] {fullName}); //"XSL Property not supported: "+fullName);
result = "";
}
}
else
{
- path.warn(XPATHErrorResources.WARNING0003, new Object[] {namespace, fullName}); //"Don't currently do anything with namespace "+namespace+" in property: "+fullName);
+ path.warn(XPATHErrorResources.WG_DONT_DO_ANYTHING_WITH_NS, new Object[] {namespace, fullName}); //"Don't currently do anything with namespace "+namespace+" in property: "+fullName);
try
{
result = System.getProperty(propName);
@@ -121,7 +121,7 @@
}
catch(SecurityException se)
{
- path.warn(XPATHErrorResources.WARNING0004, new Object[] {fullName}); //"SecurityException when trying to access XSL system property: "+fullName);
+ path.warn(XPATHErrorResources.WG_SECURITY_EXCEPTION, new Object[] {fullName}); //"SecurityException when trying to access XSL system property: "+fullName);
result = "";
}
}
@@ -139,7 +139,7 @@
}
catch(SecurityException se)
{
- path.warn(XPATHErrorResources.WARNING0004, new Object[] {fullName}); //"SecurityException when trying to access XSL system property: "+fullName);
+ path.warn(XPATHErrorResources.WG_SECURITY_EXCEPTION, new Object[] {fullName}); //"SecurityException when trying to access XSL system property: "+fullName);
result = "";
}
}
1.4 +1 -1 xml-xalan/src/org/apache/xalan/xpath/FuncTranslate.java
Index: FuncTranslate.java
===================================================================
RCS file: /home/cvs/xml-xalan/src/org/apache/xalan/xpath/FuncTranslate.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- FuncTranslate.java 1999/11/28 10:26:16 1.3
+++ FuncTranslate.java 2000/01/05 23:05:25 1.4
@@ -79,7 +79,7 @@
{
if(args.size() != 3)
{
- path.error(XPATHErrorResources.ERROR0012); //"The translate() function takes three arguments!");
+ path.error(XPATHErrorResources.ER_TRANSLATE_TAKES_3_ARGS); //"The translate() function takes three arguments!");
}
String theFirstString = ((XObject)args.elementAt(0)).str();
String theSecondString = ((XObject)args.elementAt(1)).str();
1.4 +1 -1 xml-xalan/src/org/apache/xalan/xpath/FuncUnparsedEntityURI.java
Index: FuncUnparsedEntityURI.java
===================================================================
RCS file: /home/cvs/xml-xalan/src/org/apache/xalan/xpath/FuncUnparsedEntityURI.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- FuncUnparsedEntityURI.java 1999/11/28 10:26:16 1.3
+++ FuncUnparsedEntityURI.java 2000/01/05 23:05:25 1.4
@@ -79,7 +79,7 @@
{
if(args.size() != 1)
{
- path.error(XPATHErrorResources.ERROR0013); //"The unparsed-entity-uri function should take one argument!");
+ path.error(XPATHErrorResources.ER_UNPARSEDENTITYURI_TAKES_1_ARG); //"The unparsed-entity-uri function should take one argument!");
}
String name = ((XObject)args.elementAt(0)).str();
Document doc = (Node.DOCUMENT_NODE == context.getNodeType())
1.3 +2 -2 xml-xalan/src/org/apache/xalan/xpath/Process.java
Index: Process.java
===================================================================
RCS file: /home/cvs/xml-xalan/src/org/apache/xalan/xpath/Process.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- Process.java 1999/11/24 02:30:18 1.2
+++ Process.java 2000/01/05 23:05:25 1.3
@@ -102,7 +102,7 @@
}
catch(Exception e)
{
- System.err.println(XSLMessages.createXPATHMessage(XPATHErrorResources.ERROR0039, new Object [] {parserLiaisonClassName})); //"Could not create XML Processor Liaison: "+parserLiaisonClassName);
+ System.err.println(XSLMessages.createXPATHMessage(XPATHErrorResources.ER_COULDNOT_CREATE_XMLPROCESSORLIAISON, new Object [] {parserLiaisonClassName})); //"Could not create XML Processor Liaison: "+parserLiaisonClassName);
return;
}
XPathProcessorImpl processor = new XPathProcessorImpl(callbacks);
@@ -131,7 +131,7 @@
if(null == path)
{
- System.out.println(XSLMessages.createXPATHMessage(XPATHErrorResources.ERROR0040, null)); //"Error! Did not find xpath select expression (-select).");
+ System.out.println(XSLMessages.createXPATHMessage(XPATHErrorResources.ER_DIDNOT_FIND_XPATH_SELECT_EXP, null)); //"Error! Did not find xpath select expression (-select).");
return;
}
1.7 +4 -4 xml-xalan/src/org/apache/xalan/xpath/SimpleNodeLocator.java
Index: SimpleNodeLocator.java
===================================================================
RCS file: /home/cvs/xml-xalan/src/org/apache/xalan/xpath/SimpleNodeLocator.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- SimpleNodeLocator.java 1999/12/16 09:06:04 1.6
+++ SimpleNodeLocator.java 2000/01/05 23:05:25 1.7
@@ -1404,7 +1404,7 @@
{
int argLen = xpath.getArgLengthOfStep(opPos);
opPos = xpath.getFirstChildPosOfStep(opPos);
- xpath.error(context, XPATHErrorResources.ERROR0014); //"namespace axis not implemented yet!");
+ xpath.error(context, XPATHErrorResources.ER_NAMESPACEAXIS_NOT_IMPLEMENTED); //"namespace axis not implemented yet!");
return argLen+3;
}
@@ -1425,7 +1425,7 @@
{
int argLen = xpath.getArgLengthOfStep(opPos);
opPos = xpath.getFirstChildPosOfStep(opPos);
- xpath.error(context, XPATHErrorResources.ERROR0015, new Object[] {Integer.toString(stepType)}); //"unknown axis: "+stepType);
+ xpath.error(context, XPATHErrorResources.ER_UNKNOWN_AXIS, new Object[] {Integer.toString(stepType)}); //"unknown axis: "+stepType);
return argLen+3;
}
@@ -1617,7 +1617,7 @@
argLen = xpath.getArgLengthOfStep(opPos);
opPos = xpath.getFirstChildPosOfStep(opPos);
score = xpath.MATCH_SCORE_NONE;
- xpath.error(context, XPATHErrorResources.ERROR0016); //"unknown match operation!");
+ xpath.error(context, XPATHErrorResources.ER_UNKNOWN_MATCH_OPERATION); //"unknown match operation!");
break;
}
opPos += argLen;
@@ -1731,7 +1731,7 @@
else
{
score = xpath.MATCH_SCORE_NONE;
- xpath.error(XPATHErrorResources.ERROR0017); //"Arg length of processing-instruction() node test is incorrect!");
+ xpath.error(XPATHErrorResources.ER_INCORRECT_ARG_LENGTH); //"Arg length of processing-instruction() node test is incorrect!");
}
}
else
1.8 +5 -5 xml-xalan/src/org/apache/xalan/xpath/XObject.java
Index: XObject.java
===================================================================
RCS file: /home/cvs/xml-xalan/src/org/apache/xalan/xpath/XObject.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- XObject.java 1999/12/16 03:50:33 1.7
+++ XObject.java 2000/01/05 23:05:25 1.8
@@ -117,7 +117,7 @@
public double num()
throws org.xml.sax.SAXException
{
- error(XPATHErrorResources.ERROR0018, new Object[] {getTypeString()}); //"Can not convert "+getTypeString()+" to a number");
+ error(XPATHErrorResources.ER_CANT_CONVERT_TO_NUMBER, new Object[] {getTypeString()}); //"Can not convert "+getTypeString()+" to a number");
return 0.0;
}
@@ -128,7 +128,7 @@
public boolean bool()
throws org.xml.sax.SAXException
{
- error(XPATHErrorResources.ERROR0018, new Object[] {getTypeString()}); //"Can not convert "+getTypeString()+" to a number");
+ error(XPATHErrorResources.ER_CANT_CONVERT_TO_NUMBER, new Object[] {getTypeString()}); //"Can not convert "+getTypeString()+" to a number");
return false;
}
@@ -184,7 +184,7 @@
public NodeList nodeset()
throws org.xml.sax.SAXException
{
- error(XPATHErrorResources.ERROR0019, new Object[] {getTypeString()}); //"Can not convert "+getTypeString()+" to a NodeList!");
+ error(XPATHErrorResources.ER_CANT_CONVERT_TO_NODELIST, new Object[] {getTypeString()}); //"Can not convert "+getTypeString()+" to a NodeList!");
return null;
}
@@ -194,7 +194,7 @@
public MutableNodeList mutableNodeset()
throws org.xml.sax.SAXException
{
- error(XPATHErrorResources.ERROR0020, new Object[] {getTypeString()}); //"Can not convert "+getTypeString()+" to a MutableNodeList!");
+ error(XPATHErrorResources.ER_CANT_CONVERT_TO_MUTABLENODELIST, new Object[] {getTypeString()}); //"Can not convert "+getTypeString()+" to a MutableNodeList!");
return (MutableNodeList)m_obj;
}
@@ -226,7 +226,7 @@
result = rtree(support);
break;
default:
- error(XPATHErrorResources.ERROR0021, new Object[] {getTypeString(), Integer.toString(t)}); //"Can not convert "+getTypeString()+" to a type#"+t);
+ error(XPATHErrorResources.ER_CANT_CONVERT_TO_TYPE, new Object[] {getTypeString(), Integer.toString(t)}); //"Can not convert "+getTypeString()+" to a type#"+t);
result = null;
}
return result;
1.12 +10 -10 xml-xalan/src/org/apache/xalan/xpath/XPath.java
Index: XPath.java
===================================================================
RCS file: /home/cvs/xml-xalan/src/org/apache/xalan/xpath/XPath.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- XPath.java 1999/12/16 06:10:44 1.11
+++ XPath.java 2000/01/05 23:05:25 1.12
@@ -281,7 +281,7 @@
}
else
{
- error(context, XPATHErrorResources.ERROR0022); //"Expected match pattern in getMatchScore!");
+ error(context, XPATHErrorResources.ER_EXPECTED_MATCH_PATTERN); //"Expected match pattern in getMatchScore!");
}
return score;
@@ -325,7 +325,7 @@
}
else
{
- error(dtm.getNode( context ), XPATHErrorResources.ERROR0022); //"Expected match pattern in getMatchScore!");
+ error(dtm.getNode( context ), XPATHErrorResources.ER_EXPECTED_MATCH_PATTERN); //"Expected match pattern in getMatchScore!");
}
return score;
@@ -728,7 +728,7 @@
throws org.xml.sax.SAXException
{
// Actually, this is no longer supported by xpath...
- warn(XPATHErrorResources.WARNING0005); //"Old syntax: quo(...) is no longer defined in XPath.");
+ warn(XPATHErrorResources.WG_QUO_NO_LONGER_DEFINED); //"Old syntax: quo(...) is no longer defined in XPath.");
opPos = getFirstChildPos(opPos);
int expr2Pos = getNextOpPos(opPos);
@@ -849,13 +849,13 @@
}
catch(Exception e)
{
- error(XPATHErrorResources.ERROR0023, new Object[] {varName}); //"Could not get variable named "+varName);
+ error(XPATHErrorResources.ER_COULDNOT_GET_VAR_NAMED, new Object[] {varName}); //"Could not get variable named "+varName);
result = null;
}
if(null == result)
{
- warn(context, XPATHErrorResources.WARNING0006, new Object[] {varName}); //"VariableReference given for variable out "+
+ warn(context, XPATHErrorResources.WG_ILLEGAL_VARIABLE_REFERENCE, new Object[] {varName}); //"VariableReference given for variable out "+
//"of context or without definition! Name = " + varName);
}
@@ -961,7 +961,7 @@
public double nodeTest(XPathSupport execContext, Node context, int opPos, int argLen, int stepType)
throws org.xml.sax.SAXException
{
- warn(context,XPATHErrorResources.WARNING0007); //"XPath needs a derived object to implement nodeTest!");
+ warn(context,XPATHErrorResources.WG_NEED_DERIVED_OBJECT_TO_IMPLEMENT_NODETEST); //"XPath needs a derived object to implement nodeTest!");
return XPath.MATCH_SCORE_NONE;
}
@@ -976,7 +976,7 @@
protected MutableNodeList step(XPathSupport execContext, Node context, int opPos)
throws org.xml.sax.SAXException
{
- warn(context,XPATHErrorResources.WARNING0007); //"XPath needs a derived object to implement step!");
+ warn(context,XPATHErrorResources.WG_NEED_DERIVED_OBJECT_TO_IMPLEMENT_NODETEST); //"XPath needs a derived object to implement step!");
return null;
}
@@ -1337,7 +1337,7 @@
}
else
{
- warn(XPATHErrorResources.WARNING0008); //"function token not found.");
+ warn(XPATHErrorResources.WG_FUNCTION_TOKEN_NOT_FOUND); //"function token not found.");
}
}
break;
@@ -1404,7 +1404,7 @@
break;
*/
default:
- error(context, XPATHErrorResources.ERROR0024, new Object[] {Integer.toString(m_opMap[opPos])}); //"ERROR! Unknown op code: "+m_opMap[opPos]);
+ error(context, XPATHErrorResources.ER_UNKNOWN_OPCODE, new Object[] {Integer.toString(m_opMap[opPos])}); //"ERROR! Unknown op code: "+m_opMap[opPos]);
}
return result;
}
@@ -1525,7 +1525,7 @@
throws org.xml.sax.SAXException
{
if(!b)
- error(null, XPATHErrorResources.ERROR0025, new Object[] {msg}); //"Programmer assertion is incorrect! - "+msg);
+ error(null, XPATHErrorResources.ER_INCORRECT_PROGRAMMER_ASSERTION, new Object[] {msg}); //"Programmer assertion is incorrect! - "+msg);
}
/**
1.12 +24 -24 xml-xalan/src/org/apache/xalan/xpath/XPathProcessorImpl.java
Index: XPathProcessorImpl.java
===================================================================
RCS file: /home/cvs/xml-xalan/src/org/apache/xalan/xpath/XPathProcessorImpl.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- XPathProcessorImpl.java 1999/12/13 07:56:47 1.11
+++ XPathProcessorImpl.java 2000/01/05 23:05:26 1.12
@@ -185,7 +185,7 @@
if(null != m_token)
extraTokens += ", ";
}
- error(XPATHErrorResources.ERROR0025, new Object[] {extraTokens}); //"Extra illegal tokens: "+extraTokens);
+ error(XPATHErrorResources.ER_EXTRA_ILLEGAL_TOKENS, new Object[] {extraTokens}); //"Extra illegal tokens: "+extraTokens);
}
}
@@ -214,7 +214,7 @@
if(null != m_token)
extraTokens += ", ";
}
- error(XPATHErrorResources.ERROR0025, new Object[] {extraTokens}); //"Extra illegal tokens: "+extraTokens);
+ error(XPATHErrorResources.ER_EXTRA_ILLEGAL_TOKENS, new Object[] {extraTokens}); //"Extra illegal tokens: "+extraTokens);
}
// Terminate for safety.
m_xpath.m_opMap[m_xpath.m_opMap[m_xpath.MAPINDEX_LENGTH]] = m_xpath.ENDOP;
@@ -292,7 +292,7 @@
}
else
{
- error(XPATHErrorResources.ERROR0026); //"misquoted literal... expected double quote!");
+ error(XPATHErrorResources.ER_EXPECTED_DOUBLE_QUOTE); //"misquoted literal... expected double quote!");
}
}
break;
@@ -321,7 +321,7 @@
}
else
{
- error(XPATHErrorResources.ERROR0027); //"misquoted literal... expected single quote!");
+ error(XPATHErrorResources.ER_EXPECTED_SINGLE_QUOTE); //"misquoted literal... expected single quote!");
}
break;
@@ -475,7 +475,7 @@
if(0 == m_xpath.m_tokenQueueSize)
{
- error(XPATHErrorResources.ERROR0028); //"Empty expression!");
+ error(XPATHErrorResources.ER_EMPTY_EXPRESSION); //"Empty expression!");
}
else if(null != targetStrings)
{
@@ -944,7 +944,7 @@
}
else
{
- error(XPATHErrorResources.ERROR0029, new Object[] {expected, m_token}); //"Expected "+expected+", but found: "+m_token);
+ error(XPATHErrorResources.ER_EXPECTED_BUT_FOUND, new Object[] {expected, m_token}); //"Expected "+expected+", but found: "+m_token);
}
}
@@ -961,7 +961,7 @@
}
else
{
- error(XPATHErrorResources.ERROR0029, new Object[] {String.valueOf(expected), m_token}); //"Expected "+expected+", but found: "+m_token);
+ error(XPATHErrorResources.ER_EXPECTED_BUT_FOUND, new Object[] {String.valueOf(expected), m_token}); //"Expected "+expected+", but found: "+m_token);
}
}
@@ -1033,7 +1033,7 @@
throws XPathProcessorException
{
if(!b)
- error(null, XPATHErrorResources.ERROR0030, new Object[] {msg}); //"Programmer assertion is incorrect! - "+msg);
+ error(null, XPATHErrorResources.ER_INCORRECT_PROGRAMMER_ASSERTION, new Object[] {msg}); //"Programmer assertion is incorrect! - "+msg);
}
/**
@@ -1687,7 +1687,7 @@
int opLen = m_xpath.m_opMap[m_xpath.MAPINDEX_LENGTH] - opPos;
if(opLen == 2)
{
- error(XPATHErrorResources.ERROR0031); //"boolean(...) argument is no longer optional with 19990709 XPath draft.");
+ error(XPATHErrorResources.ER_BOOLEAN_ARG_NO_LONGER_OPTIONAL); //"boolean(...) argument is no longer optional with 19990709 XPath draft.");
}
m_xpath.m_opMap[opPos + m_xpath.MAPINDEX_LENGTH] = opLen;
}
@@ -1919,7 +1919,7 @@
int funcTok = getFunctionToken(m_token);
if(-1 == funcTok)
{
- warn(XPATHErrorResources.WARNING0009, new Object[] {m_token}); //"Could not find function: "+m_token+"()");
+ warn(XPATHErrorResources.WG_COULDNOT_FIND_FUNCTION, new Object[] {m_token}); //"Could not find function: "+m_token+"()");
}
switch(funcTok)
{
@@ -1940,7 +1940,7 @@
{
if(tokenIs(','))
{
- error(XPATHErrorResources.ERROR0032); //"Found ',' but no preceding argument!");
+ error(XPATHErrorResources.ER_FOUND_COMMA_BUT_NO_PRECEDING_ARG); //"Found ',' but no preceding argument!");
}
Argument();
if(!tokenIs(')'))
@@ -1948,7 +1948,7 @@
consumeExpected(',');
if(tokenIs(')'))
{
- error(XPATHErrorResources.ERROR0033); //"Found ',' but no following argument!");
+ error(XPATHErrorResources.ER_FOUND_COMMA_BUT_NO_FOLLOWING_ARG); //"Found ',' but no following argument!");
}
}
}
@@ -2030,7 +2030,7 @@
nextToken();
if(tokenIs('['))
{
- error(XPATHErrorResources.ERROR0034); //"'..[predicate]' or '.[predicate]' is illegal syntax. Use 'self::node()[predicate]' instead.");
+ error(XPATHErrorResources.ER_PREDICATE_ILLEGAL_SYNTAX); //"'..[predicate]' or '.[predicate]' is illegal syntax. Use 'self::node()[predicate]' instead.");
}
appendOp(4, m_xpath.FROM_SELF);
// Tell how long the step is without the predicate
@@ -2132,7 +2132,7 @@
Object val = m_axisnames.get(m_token);
if(null == val)
{
- error(XPATHErrorResources.ERROR0035, new Object[] {m_token}); //"illegal axis name: "+m_token);
+ error(XPATHErrorResources.ER_ILLEGAL_AXIS_NAME, new Object[] {m_token}); //"illegal axis name: "+m_token);
}
appendOp(2, ((Integer)val).intValue());
}
@@ -2152,7 +2152,7 @@
Object nodeTestOp = m_nodetypes.get(m_token);
if(null == nodeTestOp)
{
- error(XPATHErrorResources.ERROR0036, new Object[] {m_token}); //"Unknown nodetype: "+m_token);
+ error(XPATHErrorResources.ER_UNKNOWN_NODETYPE, new Object[] {m_token}); //"Unknown nodetype: "+m_token);
}
else
{
@@ -2304,7 +2304,7 @@
}
else
{
- error(XPATHErrorResources.ERROR0037, new Object[] {m_token}); //"Pattern literal ("+m_token+") needs to be quoted!");
+ error(XPATHErrorResources.ER_PATTERN_LITERAL_NEEDS_BE_QUOTED, new Object[] {m_token}); //"Pattern literal ("+m_token+") needs to be quoted!");
}
}
@@ -2328,7 +2328,7 @@
catch(NumberFormatException nfe)
{
num = 0.0; // to shut up compiler.
- error(XPATHErrorResources.ERROR0038, new Object[] {m_token}); //m_token+" could not be formatted to a number!");
+ error(XPATHErrorResources.ER_COULDNOT_BE_FORMATTED_TO_NUMBER, new Object[] {m_token}); //m_token+" could not be formatted to a number!");
}
m_xpath.m_tokenQueue[m_queueMark-1]
= new XNumber(num);
@@ -2699,7 +2699,7 @@
System.out.println("}");
if(xpath.m_opMap[opPos] != xpath.ENDOP)
{
- System.out.println(XSLMessages.createXPATHMessage(XPATHErrorResources.ERROR0041, null)); //"ERROR! Could not find ENDOP after OP_LOCATIONPATH");
+ System.out.println(XSLMessages.createXPATHMessage(XPATHErrorResources.ER_COULDNOT_FIND_ENDOP_AFTER_OPLOCATIONPATH, null)); //"ERROR! Could not find ENDOP after OP_LOCATIONPATH");
}
opPos++;
}
@@ -2763,7 +2763,7 @@
System.out.println("}");
if(xpath.m_opMap[opPos] != xpath.ENDOP)
{
- System.out.println(XSLMessages.createXPATHMessage(XPATHErrorResources.ERROR0041, null)); //"ERROR! Could not find ENDOP after OP_LOCATIONPATH");
+ System.out.println(XSLMessages.createXPATHMessage(XPATHErrorResources.ER_COULDNOT_FIND_ENDOP_AFTER_OPLOCATIONPATH, null)); //"ERROR! Could not find ENDOP after OP_LOCATIONPATH");
}
opPos++;
}
@@ -2780,7 +2780,7 @@
System.out.println("}");
if(xpath.m_opMap[opPos] != xpath.ENDOP)
{
- System.out.println(XSLMessages.createXPATHMessage(XPATHErrorResources.ERROR0041, null)); //"ERROR! Could not find ENDOP after OP_LOCATIONPATH");
+ System.out.println(XSLMessages.createXPATHMessage(XPATHErrorResources.ER_COULDNOT_FIND_ENDOP_AFTER_OPLOCATIONPATH, null)); //"ERROR! Could not find ENDOP after OP_LOCATIONPATH");
}
opPos++;
break;
@@ -2894,7 +2894,7 @@
opPos = diagnoseToken(xpath, opPos);
break;
default:
- System.out.println(XSLMessages.createXPATHMessage(XPATHErrorResources.ERROR0042, new Object[] {Integer.toString(xpath.m_opMap[opPos])})); //"ERROR! Unknown op code: "+xpath.m_opMap[opPos]);
+ System.out.println(XSLMessages.createXPATHMessage(XPATHErrorResources.ER_UNKNOWN_OPCODE, new Object[] {Integer.toString(xpath.m_opMap[opPos])})); //"ERROR! Unknown op code: "+xpath.m_opMap[opPos]);
}
return opPos;
}
@@ -3197,7 +3197,7 @@
indent(indent);
if(xpath.m_opMap[opPos] != xpath.ENDOP)
{
- System.out.println(XSLMessages.createXPATHMessage(XPATHErrorResources.ERROR0041, null)); //"ERROR! Could not find ENDOP after OP_LOCATIONPATH");
+ System.out.println(XSLMessages.createXPATHMessage(XPATHErrorResources.ER_COULDNOT_FIND_ENDOP_AFTER_OPLOCATIONPATH, null)); //"ERROR! Could not find ENDOP after OP_LOCATIONPATH");
}
indent(indent+1);
diagnoseOpOnly2(opPos, "ENDOP");
@@ -3214,7 +3214,7 @@
}
if(xpath.m_opMap[opPos] != xpath.ENDOP)
{
- System.out.println(XSLMessages.createXPATHMessage(XPATHErrorResources.ERROR0041, null)); //"ERROR! Could not find ENDOP after OP_LOCATIONPATH");
+ System.out.println(XSLMessages.createXPATHMessage(XPATHErrorResources.ER_COULDNOT_FIND_ENDOP_AFTER_OPLOCATIONPATH, null)); //"ERROR! Could not find ENDOP after OP_LOCATIONPATH");
}
indent(indent+1);
diagnoseOpOnly2(opPos, "ENDOP");
@@ -3338,7 +3338,7 @@
opPos = diagnoseToken2(xpath, opPos);
break;
default:
- System.out.println(XSLMessages.createXPATHMessage(XPATHErrorResources.ERROR0042, new Object[] {Integer.toString(xpath.m_opMap[opPos])})); //"ERROR! Unknown op code: "+xpath.m_opMap[opPos]);
+ System.out.println(XSLMessages.createXPATHMessage(XPATHErrorResources.ER_UNKNOWN_OPCODE, new Object[] {Integer.toString(xpath.m_opMap[opPos])})); //"ERROR! Unknown op code: "+xpath.m_opMap[opPos]);
}
return opPos;
}
1.7 +2 -2 xml-xalan/src/org/apache/xalan/xpath/dtm/DTMNodeLocator.java
Index: DTMNodeLocator.java
===================================================================
RCS file: /home/cvs/xml-xalan/src/org/apache/xalan/xpath/dtm/DTMNodeLocator.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- DTMNodeLocator.java 1999/12/16 03:50:34 1.6
+++ DTMNodeLocator.java 2000/01/05 23:05:28 1.7
@@ -426,7 +426,7 @@
argLen = xpath.m_opMap[opPos+xpath.MAPINDEX_LENGTH+1]-3;
opPos += 3;
score = xpath.MATCH_SCORE_NONE;
- xpath.error(dtm.getNode( context ), XPATHErrorResources.ERROR0016); //"unknown match operation!");
+ xpath.error(dtm.getNode( context ), XPATHErrorResources.ER_UNKNOWN_MATCH_OPERATION); //"unknown match operation!");
break;
}
opPos += argLen;
@@ -543,7 +543,7 @@
else
{
score = xpath.MATCH_SCORE_NONE;
- xpath.error(XPATHErrorResources.ERROR0017); //"Arg length of processing-instruction() node test is incorrect!");
+ xpath.error(XPATHErrorResources.ER_INCORRECT_ARG_LENGTH); //"Arg length of processing-instruction() node test is incorrect!");
}
}
else
1.7 +427 -182 xml-xalan/src/org/apache/xalan/xpath/res/XPATHErrorResources.java
Index: XPATHErrorResources.java
===================================================================
RCS file: /home/cvs/xml-xalan/src/org/apache/xalan/xpath/res/XPATHErrorResources.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- XPATHErrorResources.java 1999/12/10 18:42:29 1.6
+++ XPATHErrorResources.java 2000/01/05 23:05:29 1.7
@@ -3,11 +3,408 @@
import java.util.*;
import java.text.DecimalFormat;
-//
-// LangResources_en.properties
-//
+/**
+ * Set up error messages.
+ * We build a two dimensional array of message keys and
+ * message strings. In order to add a new message here,
+ * you need to first update the count of messages(MAX_CODE)or
+ * the count of warnings(MAX_WARNING). The array will be
+ * automatically filled in with the keys, but you need to
+ * fill in the actual message string. Follow the instructions
+ * below.
+ */
public class XPATHErrorResources extends XSLResourceBundle
{
+
+public static final String ERROR_SUFFIX = "ER";
+public static final String WARNING_SUFFIX = "WR";
+
+public static final int MAX_CODE = 42; // this is needed to keep track of the number of messages
+public static final int MAX_WARNING = 10; // this is needed to keep track of the number of warnings
+public static final int MAX_OTHERS = 20;
+public static final int MAX_MESSAGES = MAX_CODE + MAX_WARNING +1;
+
+static final Object[][] contents = new Object[MAX_MESSAGES + MAX_OTHERS +1][2];
+
+/*
+ * Now fill in the message keys.
+ * This does not need to be updated. If MAX_CODE and MAX_WARNING
+ * are correct, the keys will get filled in automatically with
+ * the value ERxxxx (WRxxxx for warnings) where xxxx is a
+ * formatted number corresponding to the error code (i.e. ER0001).
+ */
+static
+{
+ for(int i = 0; i < MAX_CODE+1; i++)
+ {
+ contents[i][0] = getMKey(i);
+ }
+ for(int i = 1; i < MAX_WARNING+1; i++)
+ {
+ contents[i+ MAX_CODE][0] = getWKey(i);
+ }
+}
+
+/*
+ * Now fill in the message text.
+ * First create an int for the message code. Make sure you
+ * update MAX_CODE for error messages and MAX_WARNING for warnings
+ * Then fill in the message text for that message code in the
+ * array. Use the new error code as the index into the array.
+ */
+
+// Error messages...
+
+public static final int ERROR0000 = 0;
+static {contents[ERROR0000][1]
+ = "{0}";
+}
+
+public static final int ER_CURRENT_NOT_ALLOWED_IN_MATCH = 1;
+static {contents[ER_CURRENT_NOT_ALLOWED_IN_MATCH][1]
+ = "The current() function is not allowed in a match pattern!";
+}
+
+public static final int ER_CURRENT_TAKES_NO_ARGS = 2;
+static {contents[ER_CURRENT_TAKES_NO_ARGS][1]
+ = "The current() function does not accept arguments!";
+}
+
+public static final int ER_DOCUMENT_REPLACED = 3;
+static {contents[ER_DOCUMENT_REPLACED][1]
+ = "document() function implementation has been replaced by org.apache.xalan.xslt.FuncDocument!";
+}
+
+public static final int ER_CONTEXT_HAS_NO_OWNERDOC = 4;
+static {contents[ER_CONTEXT_HAS_NO_OWNERDOC][1]
+ = "context does not have an owner document!";
+}
+
+public static final int ER_LOCALNAME_HAS_TOO_MANY_ARGS = 5;
+static {contents[ER_LOCALNAME_HAS_TOO_MANY_ARGS ][1]
+ = "local-name() has too many arguments.";
+}
+
+public static final int ER_NAMESPACEURI_HAS_TOO_MANY_ARGS = 6;
+static {contents[ER_NAMESPACEURI_HAS_TOO_MANY_ARGS ][1]
+ = "namespace-uri() has too many arguments.";
+}
+
+public static final int ER_NORMALIZESPACE_HAS_TOO_MANY_ARGS = 7;
+static {contents[ER_NORMALIZESPACE_HAS_TOO_MANY_ARGS ][1]
+ = "normalize-space() has too many arguments.";
+}
+
+public static final int ER_NUMBER_HAS_TOO_MANY_ARGS = 8;
+static {contents[ER_NUMBER_HAS_TOO_MANY_ARGS ][1]
+ = "number() has too many arguments.";
+}
+
+public static final int ER_NAME_HAS_TOO_MANY_ARGS = 9;
+static {contents[ER_NAME_HAS_TOO_MANY_ARGS ][1]
+ = "name() has too many arguments.";
+}
+
+public static final int ER_STRING_HAS_TOO_MANY_ARGS = 10;
+static {contents[ER_STRING_HAS_TOO_MANY_ARGS ][1]
+ = "string() has too many arguments.";
+}
+
+public static final int ER_STRINGLENGTH_HAS_TOO_MANY_ARGS = 11;
+static {contents[ER_STRINGLENGTH_HAS_TOO_MANY_ARGS ][1]
+ = "string-length() has too many arguments.";
+}
+
+public static final int ER_TRANSLATE_TAKES_3_ARGS = 12;
+static {contents[ER_TRANSLATE_TAKES_3_ARGS ][1]
+ = "The translate() function takes three arguments!";
+}
+
+public static final int ER_UNPARSEDENTITYURI_TAKES_1_ARG = 13;
+static {contents[ER_UNPARSEDENTITYURI_TAKES_1_ARG ][1]
+ = "The unparsed-entity-uri function should take one argument!";
+}
+
+public static final int ER_NAMESPACEAXIS_NOT_IMPLEMENTED = 14;
+static {contents[ER_NAMESPACEAXIS_NOT_IMPLEMENTED ][1]
+ = "namespace axis not implemented yet!";
+}
+
+public static final int ER_UNKNOWN_AXIS = 15;
+static {contents[ER_UNKNOWN_AXIS ][1]
+ = "unknown axis: {0}";
+}
+
+public static final int ER_UNKNOWN_MATCH_OPERATION = 16;
+static {contents[ER_UNKNOWN_MATCH_OPERATION ][1]
+ = "unknown match operation!";
+}
+
+public static final int ER_INCORRECT_ARG_LENGTH = 17;
+static {contents[ER_INCORRECT_ARG_LENGTH ][1]
+ = "Arg length of processing-instruction() node test is incorrect!";
+}
+
+public static final int ER_CANT_CONVERT_TO_NUMBER = 18;
+static {contents[ER_CANT_CONVERT_TO_NUMBER ][1]
+ = "Can not convert {0} to a number";
+}
+
+public static final int ER_CANT_CONVERT_TO_NODELIST = 19;
+static {contents[ER_CANT_CONVERT_TO_NODELIST ][1]
+ = "Can not convert {0} to a NodeList!";
+}
+
+public static final int ER_CANT_CONVERT_TO_MUTABLENODELIST = 20;
+static {contents[ER_CANT_CONVERT_TO_MUTABLENODELIST ][1]
+ = "Can not convert {0} to a MutableNodeList!";
+}
+
+public static final int ER_CANT_CONVERT_TO_TYPE = 21;
+static {contents[ER_CANT_CONVERT_TO_TYPE ][1]
+ = "Can not convert {0} to a type#{1}";
+}
+
+public static final int ER_EXPECTED_MATCH_PATTERN = 22;
+static {contents[ER_EXPECTED_MATCH_PATTERN ][1]
+ = "Expected match pattern in getMatchScore!";
+}
+
+public static final int ER_COULDNOT_GET_VAR_NAMED = 23;
+static {contents[ER_COULDNOT_GET_VAR_NAMED ][1]
+ = "Could not get variable named {0}";
+}
+
+public static final int ER_UNKNOWN_OPCODE = 24;
+static {contents[ER_UNKNOWN_OPCODE ][1]
+ = "ERROR! Unknown op code: {0}";
+}
+
+public static final int ER_EXTRA_ILLEGAL_TOKENS = 25;
+static {contents[ER_EXTRA_ILLEGAL_TOKENS ][1]
+ = "Extra illegal tokens: {0}";
+}
+
+public static final int ER_EXPECTED_DOUBLE_QUOTE = 26;
+static {contents[ER_EXPECTED_DOUBLE_QUOTE ][1]
+ = "misquoted literal... expected double quote!";
+}
+
+public static final int ER_EXPECTED_SINGLE_QUOTE = 27;
+static {contents[ER_EXPECTED_SINGLE_QUOTE ][1]
+ = "misquoted literal... expected single quote!";
+}
+
+public static final int ER_EMPTY_EXPRESSION = 28;
+static {contents[ER_EMPTY_EXPRESSION ][1]
+ = "Empty expression!";
+}
+
+public static final int ER_EXPECTED_BUT_FOUND = 29;
+static {contents[ER_EXPECTED_BUT_FOUND ][1]
+ = "Expected {0}, but found: {1}";
+}
+
+public static final int ER_INCORRECT_PROGRAMMER_ASSERTION = 30;
+static {contents[ER_INCORRECT_PROGRAMMER_ASSERTION ][1]
+ = "Programmer assertion is incorrect! - {0}";
+}
+
+public static final int ER_BOOLEAN_ARG_NO_LONGER_OPTIONAL = 31;
+static {contents[ER_BOOLEAN_ARG_NO_LONGER_OPTIONAL ][1]
+ = "boolean(...) argument is no longer optional with 19990709 XPath draft.";
+}
+
+public static final int ER_FOUND_COMMA_BUT_NO_PRECEDING_ARG = 32;
+static {contents[ER_FOUND_COMMA_BUT_NO_PRECEDING_ARG ][1]
+ = "Found ',' but no preceding argument!";
+}
+
+public static final int ER_FOUND_COMMA_BUT_NO_FOLLOWING_ARG = 33;
+static {contents[ER_FOUND_COMMA_BUT_NO_FOLLOWING_ARG ][1]
+ = "Found ',' but no following argument!";
+}
+
+public static final int ER_PREDICATE_ILLEGAL_SYNTAX = 34;
+static {contents[ER_PREDICATE_ILLEGAL_SYNTAX ][1]
+ = "'..[predicate]' or '.[predicate]' is illegal syntax. Use 'self::node()[predicate]' instead.";
+}
+
+public static final int ER_ILLEGAL_AXIS_NAME = 35;
+static {contents[ER_ILLEGAL_AXIS_NAME ][1]
+ = "illegal axis name: {0}";
+}
+
+public static final int ER_UNKNOWN_NODETYPE = 36;
+static {contents[ER_UNKNOWN_NODETYPE ][1]
+ = "Unknown nodetype: {0}";
+}
+
+public static final int ER_PATTERN_LITERAL_NEEDS_BE_QUOTED = 37;
+static {contents[ER_PATTERN_LITERAL_NEEDS_BE_QUOTED ][1]
+ = "Pattern literal ({0}) needs to be quoted!";
+}
+
+public static final int ER_COULDNOT_BE_FORMATTED_TO_NUMBER = 38;
+static {contents[ER_COULDNOT_BE_FORMATTED_TO_NUMBER ][1]
+ = "{0} could not be formatted to a number!";
+}
+
+public static final int ER_COULDNOT_CREATE_XMLPROCESSORLIAISON = 39;
+static {contents[ER_COULDNOT_CREATE_XMLPROCESSORLIAISON ][1]
+ = "Could not create XML Processor Liaison: {0}";
+}
+
+public static final int ER_DIDNOT_FIND_XPATH_SELECT_EXP = 40;
+static {contents[ER_DIDNOT_FIND_XPATH_SELECT_EXP ][1]
+ = "Error! Did not find xpath select expression (-select).";
+}
+
+public static final int ER_COULDNOT_FIND_ENDOP_AFTER_OPLOCATIONPATH = 41;
+static {contents[ER_COULDNOT_FIND_ENDOP_AFTER_OPLOCATIONPATH ][1]
+ = "ERROR! Could not find ENDOP after OP_LOCATIONPATH";
+}
+
+public static final int ER_ERROR_OCCURED = 42;
+static {contents[ER_ERROR_OCCURED ][1]
+ = "Error occured!";
+}
+
+// Warnings...
+
+public static final int WG_LOCALE_NAME_NOT_HANDLED = 1;
+static {contents[WG_LOCALE_NAME_NOT_HANDLED + MAX_CODE][1]
+ = "locale name in the format-number function not yet handled!";
+}
+
+public static final int WG_PROPERTY_NOT_SUPPORTED = 2;
+static {contents[WG_PROPERTY_NOT_SUPPORTED + MAX_CODE][1]
+ = "XSL Property not supported: {0}";
+}
+
+public static final int WG_DONT_DO_ANYTHING_WITH_NS = 3;
+static {contents[WG_DONT_DO_ANYTHING_WITH_NS + MAX_CODE][1]
+ = "Do not currently do anything with namespace {0} in property: {1}";
+}
+
+public static final int WG_SECURITY_EXCEPTION = 4;
+static {contents[WG_SECURITY_EXCEPTION + MAX_CODE][1]
+ = "SecurityException when trying to access XSL system property: {0}";
+}
+
+public static final int WG_QUO_NO_LONGER_DEFINED = 5;
+static {contents[WG_QUO_NO_LONGER_DEFINED + MAX_CODE][1]
+ = "Old syntax: quo(...) is no longer defined in XPath.";
+}
+
+public static final int WG_ILLEGAL_VARIABLE_REFERENCE = 6;
+static {contents[WG_ILLEGAL_VARIABLE_REFERENCE + MAX_CODE][1]
+ = "VariableReference given for variable out of context or without definition! Name = {0}";
+}
+
+public static final int WG_NEED_DERIVED_OBJECT_TO_IMPLEMENT_NODETEST = 7;
+static {contents[WG_NEED_DERIVED_OBJECT_TO_IMPLEMENT_NODETEST + MAX_CODE][1]
+ = "XPath needs a derived object to implement nodeTest!";
+}
+
+public static final int WG_FUNCTION_TOKEN_NOT_FOUND = 8;
+static {contents[WG_FUNCTION_TOKEN_NOT_FOUND + MAX_CODE][1]
+ = "function token not found.";
+}
+
+public static final int WG_COULDNOT_FIND_FUNCTION = 9;
+static {contents[WG_COULDNOT_FIND_FUNCTION + MAX_CODE][1]
+ = "Could not find function: {0}";
+}
+
+public static final int WG_CANNOT_MAKE_URL_FROM = 10;
+static {contents[WG_CANNOT_MAKE_URL_FROM + MAX_CODE][1]
+ = "Can not make URL from: {0}";
+}
+
+// Other miscellaneous text used inside the code...
+
+static {
+
+ contents[MAX_MESSAGES][0] = "ui_language";
+ contents[MAX_MESSAGES][1] = "en";
+
+ contents[MAX_MESSAGES + 1][0] = "help_language";
+ contents[MAX_MESSAGES + 1][1] = "en";
+
+ contents[MAX_MESSAGES + 2][0] = "language";
+ contents[MAX_MESSAGES + 2][1] = "en";
+
+ contents[MAX_MESSAGES + 3][0] = "BAD_CODE";
+ contents[MAX_MESSAGES + 3][1] = "Parameter to createMessage was out of bounds";
+
+ contents[MAX_MESSAGES + 4][0] = "FORMAT_FAILED";
+ contents[MAX_MESSAGES + 4][1] = "Exception thrown during messageFormat call";
+
+ contents[MAX_MESSAGES + 5][0] = "version";
+ contents[MAX_MESSAGES + 5][1] = ">>>>>>> XSLT4J Version ";
+
+ contents[MAX_MESSAGES + 6][0] = "version2";
+ contents[MAX_MESSAGES + 6][1] = "<<<<<<<";
+
+ contents[MAX_MESSAGES + 7][0] = "yes";
+ contents[MAX_MESSAGES + 7][1] = "yes";
+
+ contents[MAX_MESSAGES + 8][0] = "line";
+ contents[MAX_MESSAGES + 8][1] = "Line #";
+
+ contents[MAX_MESSAGES + 9][0] = "column";
+ contents[MAX_MESSAGES + 9][1] = "Column #";
+
+ contents[MAX_MESSAGES + 10][0] = "xsldone";
+ contents[MAX_MESSAGES + 10][1] = "XSLProcessor: done";
+
+ contents[MAX_MESSAGES + 11][0] = "xpath_option";
+ contents[MAX_MESSAGES + 11][1] = "xpath options: ";
+
+ contents[MAX_MESSAGES + 12][0] = "optionIN";
+ contents[MAX_MESSAGES + 12][1] = " [-in inputXMLURL]";
+
+ contents[MAX_MESSAGES + 13][0] = "optionSelect";
+ contents[MAX_MESSAGES + 13][1] = " [-select xpath expression]";
+
+ contents[MAX_MESSAGES + 14][0] = "optionMatch";
+ contents[MAX_MESSAGES + 14][1] = " [-match match pattern (for match diagnostics)]";
+
+ contents[MAX_MESSAGES + 15][0] = "optionAnyExpr";
+ contents[MAX_MESSAGES + 15][1] = "Or just an xpath expression will do a diagnostic dump";
+
+
+ contents[MAX_MESSAGES + 16][0] = "noParsermsg1";
+ contents[MAX_MESSAGES + 16][1] = "XSL Process was not successful.";
+
+ contents[MAX_MESSAGES + 17][0] = "noParsermsg2";
+ contents[MAX_MESSAGES + 17][1] = "** Could not find parser **";
+
+ contents[MAX_MESSAGES + 18][0] = "noParsermsg3";
+ contents[MAX_MESSAGES + 18][1] = "Please check your classpath.";
+
+ contents[MAX_MESSAGES + 19][0] = "noParsermsg4";
+ contents[MAX_MESSAGES + 19][1] = "If you don't have IBM's XML Parser for Java, you can download it from";
+
+ contents[MAX_MESSAGES + 20][0] = "noParsermsg5";
+ contents[MAX_MESSAGES + 20][1] = "IBM's AlphaWorks: http://www.alphaworks.ibm.com/formula/xml";
+ }
+
+// ================= INFRASTRUCTURE ======================
+
+public static final String BAD_CODE = "BAD_CODE";
+public static final String FORMAT_FAILED = "FORMAT_FAILED";
+
+public static final String ERROR_RESOURCES = "org.apache.xalan.xpath.res.XPATHErrorResources";
+
+public static final String ERROR_STRING = "#error";
+public static final String ERROR_HEADER = "Error: ";
+public static final String WARNING_HEADER = "Warning: ";
+public static final String XSL_HEADER = "XSL ";
+public static final String XML_HEADER = "XML ";
+public static final String QUERY_HEADER = "PATTERN ";
+
public Object[][] getContents()
{
return contents;
@@ -96,184 +493,32 @@
return WARNING_SUFFIX + df.format(errorCode);
}
}
-
-public static final String ERROR_SUFFIX = "ER";
-public static final String WARNING_SUFFIX = "WR";
-public static final String BAD_CODE = "BAD_CODE";
-public static final String FORMAT_FAILED = "FORMAT_FAILED";
-
-public static final String ERROR_RESOURCES = "org.apache.xalan.xpath.res.XPATHErrorResources";
-
-public static final String ERROR_STRING = "#error";
-public static final String ERROR_HEADER = "Error: ";
-public static final String WARNING_HEADER = "Warning: ";
-public static final String XSL_HEADER = "XSL ";
-public static final String XML_HEADER = "XML ";
-public static final String QUERY_HEADER = "PATTERN ";
-
-
-public static final int
-ERROR0000 = 0,
-ERROR0001 = 1,
-ERROR0002 = 2,
-ERROR0003 = 3,
-ERROR0004 = 4,
-ERROR0005 = 5,
-ERROR0006 = 6,
-ERROR0007 = 7,
-ERROR0008 = 8,
-ERROR0009 = 9,
-ERROR0010 = 10,
-ERROR0011 = 11,
-ERROR0012 = 12,
-ERROR0013 = 13,
-ERROR0014 = 14,
-ERROR0015 = 15,
-ERROR0016 = 16,
-ERROR0017 = 17,
-ERROR0018 = 18,
-ERROR0019 = 19,
-ERROR0020 = 20,
-ERROR0021 = 21,
-ERROR0022 = 22,
-ERROR0023 = 23,
-ERROR0024 = 24,
-ERROR0025 = 25,
-ERROR0026 = 26,
-ERROR0027 = 27,
-ERROR0028 = 28,
-ERROR0029 = 29,
-ERROR0030 = 30,
-ERROR0031 = 31,
-ERROR0032 = 32,
-ERROR0033 = 33,
-ERROR0034 = 34,
-ERROR0035 = 35,
-ERROR0036 = 36,
-ERROR0037 = 37,
-ERROR0038 = 38,
-ERROR0039 = 39,
-ERROR0040 = 40,
-ERROR0041 = 41,
-ERROR0042 = 42,
-ERROR0043 = 43,
-ERROR0044 = 44,
-ERROR0045 = 45,
-MAX_CODE = 45;
-
-public static final int
-WARNING0000 = 0,
-WARNING0001 = 1,
-WARNING0002 = 2,
-WARNING0003 = 3,
-WARNING0004 = 4,
-WARNING0005 = 5,
-WARNING0006 = 6,
-WARNING0007 = 7,
-WARNING0008 = 8,
-WARNING0009 = 9,
-WARNING0010 = 10,
-WARNING0011 = 11,
-WARNING0012 = 12,
-WARNING0013 = 13,
-MAX_WARNING = 13;
-
-
-
-
-static final Object[][] contents = {
-
-{"ui_language","en"},
-{"help_language", "en"},
-{"language", "en"},
-
-{"ER0000","{0}"},
-{"ER0001","The current() function is not allowed in a match pattern!"},
-{"ER0002", "The current() function does not accept arguments!"},
-{"ER0003", "document() function implementation has been replaced by org.apache.xalan.xslt.FuncDocument!"},
-{"ER0004", "context does not have an owner document!"},
-{"ER0005", "local-name() has too many arguments."},
-{"ER0006", "namespace-uri() has too many arguments."},
-{"ER0007", "normalize-space() has too many arguments."},
-{"ER0008", "number() has too many arguments."},
-{"ER0009", "name() has too many arguments."},
-{"ER0010", "string() has too many arguments."},
-{"ER0011", "string-length() has too many arguments."},
-{"ER0012", "The translate() function takes three arguments!"},
-{"ER0013", "The unparsed-entity-uri function should take one argument!"},
-{"ER0014", "namespace axis not implemented yet!"},
-{"ERR0015", "unknown axis: {0}"},
-{"ERR0016", "unknown match operation!"},
-{"ER0017", "Arg length of processing-instruction() node test is incorrect!"},
-{"ER0018", "Can not convert {0} to a number"},
-{"ER0019", "Can not convert {0} to a NodeList!"},
-{"ER0020", "Can not convert {0} to a MutableNodeList!"},
-{"ER0021", "Can not convert {0} to a type#{1}"},
-{"ER0022", "Expected match pattern in getMatchScore!"},
-{"ER0023", "Could not get variable named {0}"},
-{"ER0024", "ERROR! Unknown op code: {0}"},
-{"ER0025", "Extra illegal tokens: {0}"},
-{"ER0026", "misquoted literal... expected double quote!"},
-{"ER0027", "misquoted literal... expected single quote!"},
-{"ER0028", "Empty expression!"},
-{"ER0029", "Expected {0}, but found: {1}"},
-{"ER0030", "Programmer assertion is incorrect! - {0}"},
-{"ER0031", "boolean(...) argument is no longer optional with 19990709 XPath draft."},
-{"ER0032", "Found ',' but no preceding argument!"},
-{"ER0033", "Found ',' but no following argument!"},
-{"ER0034", "'..[predicate]' or '.[predicate]' is illegal syntax. Use 'self::node()[predicate]' instead."},
-{"ER0035", "illegal axis name: {0}"},
-{"ER0036", "Unknown nodetype: {0}"},
-{"ER0037", "Pattern literal ({0}) needs to be quoted!"},
-{"ER0038", "{0} could not be formatted to a number!"},
-{"ER0039", "Could not create XML Processor Liaison: {0}"},
-{"ER0040", "Error! Did not find xpath select expression (-select)."},
-{"ER0041", "ERROR! Could not find ENDOP after OP_LOCATIONPATH"},
-{"ER0042", "ERROR! Unknown op code: {0}"},
-{"ER0043", "context does not have an owner document!"},
-{"ER0044", "currency sign is not allowed in format pattern string"},
-{"ER0045", "Error occured!"},
-
-
-{"WR0001", "locale name in the format-number function not yet handled!"},
-{"WR0002", "XSL Property not supported: {0}"},
-{"WR0003", "Do not currently do anything with namespace {0} in property: {1}"},
-{"WR0004", "SecurityException when trying to access XSL system property: {0}"},
-{"WR0005", "Old syntax: quo(...) is no longer defined in XPath."},
-{"WR0006", "VariableReference given for variable out of context or without definition! Name = {0}"},
-{"WR0007", "XPath needs a derived object to implement nodeTest!"},
-{"WR0008", "function token not found."},
-{"WR0009", "Could not find function: {0}"},
-{"WR0010", "Can not make URL from: {0}"},
-{"WR0011", "Can not load requested doc: {0}"},
-{"WR0012", "No declaration found for decimal format: {0}"},
-{"WR0013", "Illegal use of disable-output-escaping attribute: ignored"},
-
-
-{"BAD_CODE", "Parameter to createMessage was out of bounds"},
-{"FORMAT_FAILED", "Exception thrown during messageFormat call"},
-
-{"version", ">>>>>>> XSLT4J Version "},
-{"version2", "<<<<<<<"},
-
-{"yes", "yes"},
-{"line", "Line #"},
-{"column", "Column #"},
-{"xsldone", "XSLProcessor: done"},
-
-
-
-{"xpath_option", "xpath options: "},
-{"optionIN", " [-in inputXMLURL]"},
-{"optionSelect", " [-select xpath expression]"},
-{"optionMatch", " [-match match pattern (for match diagnostics)]"},
-{"optionAnyExpr", "Or just an xpath expression will do a diagnostic dump"},
-
-{"noParsermsg1", "XSL Process was not successful."},
-{"noParsermsg2", "** Could not find parser **"},
-{"noParsermsg3", "Please check your classpath."},
-{"noParsermsg4", "If you don't have IBM's XML Parser for Java, you can download it from"},
-{"noParsermsg5", "IBM's AlphaWorks: http://www.alphaworks.ibm.com/formula/xml"}
-};
+ /**
+ * Get the error string associated with the error code
+ */
+ public static String getMKey(int errorCode)
+ {
+ if (errorCode > MAX_CODE)
+ return null;
+ else
+ {
+ DecimalFormat df = new DecimalFormat("0000");
+ return ERROR_SUFFIX + df.format(errorCode);
+ }
+ }
+
+ /**
+ * Get the error string associated with the error code
+ */
+ public static String getWKey(int errorCode)
+ {
+ if (errorCode > MAX_WARNING)
+ return null;
+ else
+ {
+ DecimalFormat df = new DecimalFormat("0000");
+ return WARNING_SUFFIX + df.format(errorCode);
+ }
+ }
}
1.7 +1 -100 xml-xalan/src/org/apache/xalan/xpath/res/XPATHErrorResources_en.java
Index: XPATHErrorResources_en.java
===================================================================
RCS file: /home/cvs/xml-xalan/src/org/apache/xalan/xpath/res/XPATHErrorResources_en.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- XPATHErrorResources_en.java 1999/12/10 18:42:29 1.6
+++ XPATHErrorResources_en.java 2000/01/05 23:05:29 1.7
@@ -4,104 +4,5 @@
// LangResources_en.properties
//
public class XPATHErrorResources_en extends XPATHErrorResources
-{
-public Object[][] getContents()
-{
- return contents;
-}
-
-static final Object[][] contents = {
-
-{"ui_language","en"},
-{"help_language", "en"},
-{"language", "en"},
-
-{"ER0000","{0}"},
-{"ER0001","The current() function is not allowed in a match pattern!"},
-{"ER0002", "The current() function does not accept arguments!"},
-{"ER0003", "document() function implementation has been replaced by org.apache.xalan.xslt.FuncDocument!"},
-{"ER0004", "context does not have an owner document!"},
-{"ER0005", "local-name() has too many arguments."},
-{"ER0006", "namespace-uri() has too many arguments."},
-{"ER0007", "normalize-space() has too many arguments."},
-{"ER0008", "number() has too many arguments."},
-{"ER0009", "name() has too many arguments."},
-{"ER0010", "string() has too many arguments."},
-{"ER0011", "string-length() has too many arguments."},
-{"ER0012", "The translate() function takes three arguments!"},
-{"ER0013", "The unparsed-entity-uri function should take one argument!"},
-{"ER0014", "namespace axis not implemented yet!"},
-{"ER0015", "unknown axis: {0}"},
-{"ER0016", "unknown match operation!"},
-{"ER0017", "Arg length of processing-instruction() node test is incorrect!"},
-{"ER0018", "Can not convert {0} to a number"},
-{"ER0019", "Can not convert {0} to a NodeList!"},
-{"ER0020", "Can not convert {0} to a MutableNodeList!"},
-{"ER0021", "Can not convert {0} to a type#{1}"},
-{"ER0022", "Expected match pattern in getMatchScore!"},
-{"ER0023", "Could not get variable named {0}"},
-{"ER0024", "ERROR! Unknown op code: {0}"},
-{"ER0025", "Extra illegal tokens: {0}"},
-{"ER0026", "misquoted literal... expected double quote!"},
-{"ER0027", "misquoted literal... expected single quote!"},
-{"ER0028", "Empty expression!"},
-{"ER0029", "Expected {0}, but found: {1}"},
-{"ER0030", "Programmer assertion is incorrect! - {0}"},
-{"ER0031", "boolean(...) argument is no longer optional with 19990709 XPath draft."},
-{"ER0032", "Found ',' but no preceding argument!"},
-{"ER0033", "Found ',' but no following argument!"},
-{"ER0034", "'..[predicate]' or '.[predicate]' is illegal syntax. Use 'self::node()[predicate]' instead."},
-{"ER0035", "illegal axis name: {0}"},
-{"ER0036", "Unknown nodetype: {0}"},
-{"ER0037", "Pattern literal ({0}) needs to be quoted!"},
-{"ER0038", "{0} could not be formatted to a number!"},
-{"ER0039", "Could not create XML Processor Liaison: {0}"},
-{"ER0040", "Error! Did not find xpath select expression (-select)."},
-{"ER0041", "ERROR! Could not find ENDOP after OP_LOCATIONPATH"},
-{"ER0042", "ERROR! Unknown op code: {0}"},
-{"ER0043", "context does not have an owner document!"},
-{"ER0044", "currency sign is not allowed in format pattern string"},
-{"ER0045", "Error occured!"},
-
-
-{"WR0001", "locale name in the format-number function not yet handled!"},
-{"WR0002", "XSL Property not supported: {0}"},
-{"WR0003", "Do not currently do anything with namespace {0} in property: {1}"},
-{"WR0004", "SecurityException when trying to access XSL system property: {0}"},
-{"WR0005", "Old syntax: quo(...) is no longer defined in XPath."},
-{"WR0006", "VariableReference given for variable out of context or without definition! Name = {0}"},
-{"WR0007", "XPath needs a derived object to implement nodeTest!"},
-{"WR0008", "function token not found."},
-{"WR0009", "Could not find function: {0}"},
-{"WR0010", "Can not make URL from: {0}"},
-{"WR0011", "Can not load requested doc: {0}"},
-{"WR0012", "No declaration found for decimal format: {0}"},
-{"WR0013", "Illegal use of disable-output-escaping attribute : ignored"},
-
-
-{"BAD_CODE", "Parameter to createMessage was out of bounds"},
-{"FORMAT_FAILED", "Exception thrown during messageFormat call"},
-
-{"version", ">>>>>>> XSLT4J Version "},
-{"version2", "<<<<<<<"},
-
-{"yes", "yes"},
-{"line", "Line #"},
-{"column", "Column #"},
-{"xsldone", "XSLProcessor: done"},
-
-
-
-{"xpath_option", "xpath options: "},
-{"optionIN", " [-in inputXMLURL]"},
-{"optionSelect", " [-select xpath expression]"},
-{"optionMatch", " [-match match pattern (for match diagnostics)]"},
-{"optionAnyExpr", "Or just an xpath expression will do a diagnostic dump"},
-
-{"noParsermsg1", "XSL Process was not successful."},
-{"noParsermsg2", "** Could not find parser **"},
-{"noParsermsg3", "Please check your classpath."},
-{"noParsermsg4", "If you don't have IBM's XML Parser for Java, you can download it from"},
-{"noParsermsg5", "IBM's AlphaWorks: http://www.alphaworks.ibm.com/formula/xml"}
-};
+{
}
1.16 +2 -2 xml-xalan/src/org/apache/xalan/xpath/xml/XMLParserLiaisonDefault.java
Index: XMLParserLiaisonDefault.java
===================================================================
RCS file: /home/cvs/xml-xalan/src/org/apache/xalan/xpath/xml/XMLParserLiaisonDefault.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- XMLParserLiaisonDefault.java 1999/12/16 06:10:45 1.15
+++ XMLParserLiaisonDefault.java 2000/01/05 23:05:29 1.16
@@ -1448,7 +1448,7 @@
data = node.getNodeValue();
break;
case Node.PROCESSING_INSTRUCTION_NODE:
- // warning(XPATHErrorResources.WARNING0013);
+ // warning(XPATHErrorResources.WG_PARSING_AND_PREPARING);
break;
default:
// ignore
@@ -1637,7 +1637,7 @@
throws org.xml.sax.SAXException
{
if(!b)
- error(null, XPATHErrorResources.ERROR0030, new Object[] {msg}); //"Programmer assertion is incorrect! - "+msg);
+ error(null, XPATHErrorResources.ER_INCORRECT_PROGRAMMER_ASSERTION, new Object[] {msg}); //"Programmer assertion is incorrect! - "+msg);
}
/**
1.6 +23 -10 xml-xalan/src/org/apache/xalan/xpath/xml/XSLMessages.java
Index: XSLMessages.java
===================================================================
RCS file: /home/cvs/xml-xalan/src/org/apache/xalan/xpath/xml/XSLMessages.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- XSLMessages.java 1999/11/24 16:34:45 1.5
+++ XSLMessages.java 2000/01/05 23:05:29 1.6
@@ -65,13 +65,14 @@
/**
- * Wraps a DOM attribute list in a SAX AttributeList.
+ * Sets things up for issuing error messages.
*/
public class XSLMessages {
private Locale fLocale = Locale.getDefault();
- private ResourceBundle fResourceBundle = null ;
- private static final String XSLT_ERROR_RESOURCES = "org.apache.xalan.xslt.res.XSLTErrorResources";
+ private static XSLResourceBundle XSLTBundle = null ;
+ private static XSLResourceBundle XPATHBundle = null ;
+ private static final String XSLT_ERROR_RESOURCES = "org.apache.xalan.xslt.res.XSLTErrorResources";
private static final String XPATH_ERROR_RESOURCES = "org.apache.xalan.xpath.res.XPATHErrorResources";
private static String BAD_CODE = "BAD_CODE";
private static String FORMAT_FAILED = "FORMAT_FAILED";
@@ -100,7 +101,10 @@
*/
public static final String createXPATHWarning(int errorCode, Object args[]) //throws Exception
{
- XSLResourceBundle fResourceBundle = (XSLResourceBundle)loadResourceBundle(XPATH_ERROR_RESOURCES );
+ if (XPATHBundle == null)
+ XPATHBundle = (XSLResourceBundle)loadResourceBundle(XPATH_ERROR_RESOURCES );
+ XSLResourceBundle fResourceBundle = XPATHBundle;
+
if (fResourceBundle != null)
{
String msgKey = fResourceBundle.getWarningKey(errorCode);
@@ -120,7 +124,10 @@
*/
public static final String createXPATHMessage(int errorCode, Object args[]) //throws Exception
{
- XSLResourceBundle fResourceBundle = (XSLResourceBundle)loadResourceBundle(XPATH_ERROR_RESOURCES );
+ if (XPATHBundle == null)
+ XPATHBundle = (XSLResourceBundle)loadResourceBundle(XPATH_ERROR_RESOURCES );
+ XSLResourceBundle fResourceBundle = XPATHBundle;
+
if (fResourceBundle != null)
{
String msgKey = fResourceBundle.getMessageKey(errorCode);
@@ -140,7 +147,7 @@
*/
public static final String createXPATHMsg(XSLResourceBundle fResourceBundle, String msgKey, Object args[]) //throws Exception
{
- String fmsg= null;
+ String fmsg= null;
boolean throwex = false;
String msg = null;
@@ -187,7 +194,11 @@
*/
public static final String createWarning(int errorCode, Object args[]) //throws Exception
{
- XSLResourceBundle fResourceBundle = (XSLResourceBundle)loadResourceBundle(XSLT_ERROR_RESOURCES );
+ if (XSLTBundle == null)
+ XSLTBundle = (XSLResourceBundle)loadResourceBundle(XSLT_ERROR_RESOURCES );
+
+ XSLResourceBundle fResourceBundle = XSLTBundle;
+
if (fResourceBundle != null)
{
String msgKey = fResourceBundle.getWarningKey(errorCode);
@@ -207,9 +218,10 @@
*/
public static final String createMessage(int errorCode, Object args[]) //throws Exception
{
- XSLResourceBundle fResourceBundle = null;
+ if (XSLTBundle == null)
+ XSLTBundle = (XSLResourceBundle)loadResourceBundle(XSLT_ERROR_RESOURCES );
- fResourceBundle = (XSLResourceBundle)loadResourceBundle(XSLT_ERROR_RESOURCES );
+ XSLResourceBundle fResourceBundle = XSLTBundle;
if (fResourceBundle != null)
{
@@ -230,7 +242,7 @@
*/
public static final String createMsg(XSLResourceBundle fResourceBundle, String msgKey, Object args[]) //throws Exception
{
- String fmsg= null;
+ String fmsg= null;
boolean throwex = false;
String msg = null;
@@ -361,6 +373,7 @@
throw new MissingResourceException ("Could not load any resource bundles."+ className, className,"");
}
}
+
}
1.4 +3 -3 xml-xalan/src/org/apache/xalan/xslt/AVT.java
Index: AVT.java
===================================================================
RCS file: /home/cvs/xml-xalan/src/org/apache/xalan/xslt/AVT.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- AVT.java 1999/11/28 04:25:13 1.3
+++ AVT.java 2000/01/05 23:05:30 1.4
@@ -192,7 +192,7 @@
case '{':
{
// What's another curly doing here?
- error = XSLMessages.createMessage(XSLTErrorResources.ERROR0001, null); //"Error: Can not have \"{\" within expression.";
+ error = XSLMessages.createMessage(XSLTErrorResources.ER_NO_CURLYBRACE, null); //"Error: Can not have \"{\" within expression.";
break;
}
case '}':
@@ -241,7 +241,7 @@
else
{
// Illegal, I think...
- execContext.warn(XSLTErrorResources.WARNING0001); //"Found \"}\" but no attribute template open!");
+ execContext.warn(XSLTErrorResources.WG_FOUND_CURLYBRACE); //"Found \"}\" but no attribute template open!");
buffer.append("}");
// leave the lookahead to be processed by the next round.
}
@@ -261,7 +261,7 @@
}
if(null != error)
{
- execContext.warn(XSLTErrorResources.WARNING0014, new Object[] {error}); //"Attr Template, "+error);
+ execContext.warn(XSLTErrorResources.WG_ATTR_TEMPLATE, new Object[] {error}); //"Attr Template, "+error);
break;
}
} // end while(tokenizer.hasMoreTokens())
1.2 +3 -3 xml-xalan/src/org/apache/xalan/xslt/ElemApplyImport.java
Index: ElemApplyImport.java
===================================================================
RCS file: /home/cvs/xml-xalan/src/org/apache/xalan/xslt/ElemApplyImport.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ElemApplyImport.java 1999/11/08 20:56:17 1.1
+++ ElemApplyImport.java 2000/01/05 23:05:30 1.2
@@ -88,7 +88,7 @@
String aname = atts.getName(i);
if(!isAttrOK(aname, atts, i))
{
- processor.error(XSLTErrorResources.ERROR0002, new Object[] {name, aname});//name+" has an illegal attribute: "+aname);
+ processor.error(XSLTErrorResources.ER_ILLEGAL_ATTRIBUTE, new Object[] {name, aname});//name+" has an illegal attribute: "+aname);
}
}
}
@@ -120,7 +120,7 @@
}
else // if(null == sourceNode)
{
- processor.error(XSLTErrorResources.ERROR0003); //"sourceNode is null in xsl:apply-imports!");
+ processor.error(XSLTErrorResources.ER_NULL_SOURCENODE_APPLYIMPORTS); //"sourceNode is null in xsl:apply-imports!");
}
}
@@ -131,7 +131,7 @@
public Node appendChild(Node newChild)
throws DOMException
{
- error(XSLTErrorResources.ERROR0004, new Object[] {((ElemTemplateElement)newChild).m_elemName, this.m_elemName}); //"Can not add " +((ElemTemplateElement)newChild).m_elemName +
+ error(XSLTErrorResources.ER_CANNOT_ADD, new Object[] {((ElemTemplateElement)newChild).m_elemName, this.m_elemName}); //"Can not add " +((ElemTemplateElement)newChild).m_elemName +
//" to " + this.m_elemName);
return null;
}
1.3 +3 -3 xml-xalan/src/org/apache/xalan/xslt/ElemApplyTemplates.java
Index: ElemApplyTemplates.java
===================================================================
RCS file: /home/cvs/xml-xalan/src/org/apache/xalan/xslt/ElemApplyTemplates.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ElemApplyTemplates.java 1999/12/13 08:08:00 1.2
+++ ElemApplyTemplates.java 2000/01/05 23:05:30 1.3
@@ -100,7 +100,7 @@
if(!isAttrOK(tok, aname, atts, i))
{
if(null != processor)
- processor.error(XSLTErrorResources.ERROR0002, new Object[] {name, aname}); //name+" has an illegal attribute: "+aname);
+ processor.error(XSLTErrorResources.ER_ILLEGAL_ATTRIBUTE, new Object[] {name, aname}); //name+" has an illegal attribute: "+aname);
}
}
}
@@ -160,7 +160,7 @@
}
else // if(null == sourceNode)
{
- processor.error(XSLTErrorResources.ERROR0005);//"sourceNode is null in handleApplyTemplatesInstruction!");
+ processor.error(XSLTErrorResources.ER_NULL_SOURCENODE_HANDLEAPPLYTEMPLATES);//"sourceNode is null in handleApplyTemplatesInstruction!");
}
}
@@ -184,7 +184,7 @@
break;
default:
- error(XSLTErrorResources.ERROR0004, new Object[] {((ElemTemplateElement)newChild).m_elemName, this.m_elemName}); //"Can not add " +((ElemTemplateElement)newChild).m_elemName +
+ error(XSLTErrorResources.ER_CANNOT_ADD, new Object[] {((ElemTemplateElement)newChild).m_elemName, this.m_elemName}); //"Can not add " +((ElemTemplateElement)newChild).m_elemName +
// " to " + this.m_elemName);
}
return super.appendChild(newChild);
1.4 +3 -3 xml-xalan/src/org/apache/xalan/xslt/ElemAttribute.java
Index: ElemAttribute.java
===================================================================
RCS file: /home/cvs/xml-xalan/src/org/apache/xalan/xslt/ElemAttribute.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ElemAttribute.java 1999/11/30 22:30:55 1.3
+++ ElemAttribute.java 2000/01/05 23:05:30 1.4
@@ -97,12 +97,12 @@
else if(!(isAttrOK(aname, atts, i) ||
processSpaceAttr(aname, atts, i)))
{
- processor.error(XSLTErrorResources.ERROR0002, new Object[] {name, aname}); //name+" has an illegal attribute: "+aname);
+ processor.error(XSLTErrorResources.ER_ILLEGAL_ATTRIBUTE, new Object[] {name, aname}); //name+" has an illegal attribute: "+aname);
}
}
if(null == m_name_avt)
{
- processor.error(XSLTErrorResources.ERROR0006, new Object[] {name}); //name+" must have a name attribute.");
+ processor.error(XSLTErrorResources.ER_NO_NAME_ATTRIB, new Object[] {name}); //name+" must have a name attribute.");
}
}
@@ -200,7 +200,7 @@
break;
default:
- error(XSLTErrorResources.ERROR0004, new Object[] {((ElemTemplateElement)newChild).m_elemName, this.m_elemName}); //"Can not add " +((ElemTemplateElement)newChild).m_elemName +
+ error(XSLTErrorResources.ER_CANNOT_ADD, new Object[] {((ElemTemplateElement)newChild).m_elemName, this.m_elemName}); //"Can not add " +((ElemTemplateElement)newChild).m_elemName +
//" to " + this.m_elemName);
}
return super.appendChild(newChild);
1.4 +3 -3 xml-xalan/src/org/apache/xalan/xslt/ElemAttributeSet.java
Index: ElemAttributeSet.java
===================================================================
RCS file: /home/cvs/xml-xalan/src/org/apache/xalan/xslt/ElemAttributeSet.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ElemAttributeSet.java 1999/12/16 03:50:35 1.3
+++ ElemAttributeSet.java 2000/01/05 23:05:30 1.4
@@ -91,12 +91,12 @@
}
else if(!(processUseAttributeSets(aname, atts, i) || isAttrOK(aname, atts, i)))
{
- processor.error(XSLTErrorResources.ERROR0002, new Object[] {name, aname}); //name+" has an illegal attribute: "+aname);
+ processor.error(XSLTErrorResources.ER_ILLEGAL_ATTRIBUTE, new Object[] {name, aname}); //name+" has an illegal attribute: "+aname);
}
}
if(null == m_qname)
{
- processor.error(XSLTErrorResources.ERROR0006, new Object[] {name}); //name+" must have a name attribute.");
+ processor.error(XSLTErrorResources.ER_NO_NAME_ATTRIB, new Object[] {name}); //name+" must have a name attribute.");
}
}
@@ -153,7 +153,7 @@
break;
default:
- error(XSLTErrorResources.ERROR0004, new Object[] {((ElemTemplateElement)newChild).m_elemName, this.m_elemName}); //"Can not add " +((ElemTemplateElement)newChild).m_elemName +
+ error(XSLTErrorResources.ER_CANNOT_ADD, new Object[] {((ElemTemplateElement)newChild).m_elemName, this.m_elemName}); //"Can not add " +((ElemTemplateElement)newChild).m_elemName +
//" to " + this.m_elemName);
}
return super.appendChild(newChild);
1.4 +3 -3 xml-xalan/src/org/apache/xalan/xslt/ElemCallTemplate.java
Index: ElemCallTemplate.java
===================================================================
RCS file: /home/cvs/xml-xalan/src/org/apache/xalan/xslt/ElemCallTemplate.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ElemCallTemplate.java 1999/12/24 17:00:49 1.3
+++ ElemCallTemplate.java 2000/01/05 23:05:30 1.4
@@ -90,7 +90,7 @@
}
else if(!isAttrOK(aname, atts, i))
{
- processor.error(XSLTErrorResources.ERROR0002,new Object[] {name, aname}); //name+" has an illegal attribute: "+aname);
+ processor.error(XSLTErrorResources.ER_ILLEGAL_ATTRIBUTE,new Object[] {name, aname}); //name+" has an illegal attribute: "+aname);
}
}
}
@@ -129,7 +129,7 @@
}
else
{
- processor.error(XSLTErrorResources.ERROR0007, new Object[] {m_templateName}); //"Could not find template named: '"+templateName+"'");
+ processor.error(XSLTErrorResources.ER_TEMPLATE_NOT_FOUND, new Object[] {m_templateName}); //"Could not find template named: '"+templateName+"'");
}
}
@@ -146,7 +146,7 @@
break;
default:
- error(XSLTErrorResources.ERROR0004, new Object[] {((ElemTemplateElement)newChild).m_elemName, this.m_elemName}); //"Can not add " +((ElemTemplateElement)newChild).m_elemName +
+ error(XSLTErrorResources.ER_CANNOT_ADD, new Object[] {((ElemTemplateElement)newChild).m_elemName, this.m_elemName}); //"Can not add " +((ElemTemplateElement)newChild).m_elemName +
//" to " + this.m_elemName);
}
return super.appendChild(newChild);
1.3 +2 -2 xml-xalan/src/org/apache/xalan/xslt/ElemChoose.java
Index: ElemChoose.java
===================================================================
RCS file: /home/cvs/xml-xalan/src/org/apache/xalan/xslt/ElemChoose.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ElemChoose.java 1999/12/13 08:22:54 1.2
+++ ElemChoose.java 2000/01/05 23:05:30 1.3
@@ -84,7 +84,7 @@
String aname = atts.getName(i);
if(!(isAttrOK(aname, atts, i) || processSpaceAttr(aname, atts, i)))
{
- processor.error(XSLTErrorResources.ERROR0002, new Object[] {name, aname}); //name+" has an illegal attribute: "+aname);
+ processor.error(XSLTErrorResources.ER_ILLEGAL_ATTRIBUTE, new Object[] {name, aname}); //name+" has an illegal attribute: "+aname);
}
}
}
@@ -151,7 +151,7 @@
break;
default:
- error(XSLTErrorResources.ERROR0004, new Object[] {((ElemTemplateElement)newChild).m_elemName, this.m_elemName}); //"Can not add " +((ElemTemplateElement)newChild).m_elemName +
+ error(XSLTErrorResources.ER_CANNOT_ADD, new Object[] {((ElemTemplateElement)newChild).m_elemName, this.m_elemName}); //"Can not add " +((ElemTemplateElement)newChild).m_elemName +
//" to " + this.m_elemName);
}
return super.appendChild(newChild);
1.2 +2 -2 xml-xalan/src/org/apache/xalan/xslt/ElemComment.java
Index: ElemComment.java
===================================================================
RCS file: /home/cvs/xml-xalan/src/org/apache/xalan/xslt/ElemComment.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ElemComment.java 1999/11/08 20:56:19 1.1
+++ ElemComment.java 2000/01/05 23:05:30 1.2
@@ -83,7 +83,7 @@
String aname = atts.getName(i);
if(!(isAttrOK(aname, atts, i) || processSpaceAttr(aname, atts, i)))
{
- processor.error(XSLTErrorResources.ERROR0002, new Object[] {name, aname}); //name+" has an illegal attribute: "+aname);
+ processor.error(XSLTErrorResources.ER_ILLEGAL_ATTRIBUTE, new Object[] {name, aname}); //name+" has an illegal attribute: "+aname);
}
}
}
@@ -146,7 +146,7 @@
break;
default:
- error(XSLTErrorResources.ERROR0004, new Object[] {((ElemTemplateElement)newChild).m_elemName, this.m_elemName}); //"Can not add " +((ElemTemplateElement)newChild).m_elemName +
+ error(XSLTErrorResources.ER_CANNOT_ADD, new Object[] {((ElemTemplateElement)newChild).m_elemName, this.m_elemName}); //"Can not add " +((ElemTemplateElement)newChild).m_elemName +
//" to " + this.m_elemName);
}
return super.appendChild(newChild);
1.3 +1 -1 xml-xalan/src/org/apache/xalan/xslt/ElemCopy.java
Index: ElemCopy.java
===================================================================
RCS file: /home/cvs/xml-xalan/src/org/apache/xalan/xslt/ElemCopy.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ElemCopy.java 1999/11/30 18:26:29 1.2
+++ ElemCopy.java 2000/01/05 23:05:30 1.3
@@ -88,7 +88,7 @@
if(!(processUseAttributeSets(aname, atts, i) || processSpaceAttr(aname, atts, i) ||
isAttrOK(aname, atts, i)))
{
- processor.error(XSLTErrorResources.ERROR0002, new Object[] {name, aname}); //name+" has an illegal attribute: "+aname);
+ processor.error(XSLTErrorResources.ER_ILLEGAL_ATTRIBUTE, new Object[] {name, aname}); //name+" has an illegal attribute: "+aname);
}
}
}
1.4 +2 -2 xml-xalan/src/org/apache/xalan/xslt/ElemCopyOf.java
Index: ElemCopyOf.java
===================================================================
RCS file: /home/cvs/xml-xalan/src/org/apache/xalan/xslt/ElemCopyOf.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ElemCopyOf.java 1999/12/14 20:49:20 1.3
+++ ElemCopyOf.java 2000/01/05 23:05:30 1.4
@@ -91,7 +91,7 @@
}
else if(!isAttrOK(aname, atts, i))
{
- processor.error(XSLTErrorResources.ERROR0002, new Object[] {name, aname}); //name+" has an illegal attribute: "+aname);
+ processor.error(XSLTErrorResources.ER_ILLEGAL_ATTRIBUTE, new Object[] {name, aname}); //name+" has an illegal attribute: "+aname);
}
}
}
@@ -176,7 +176,7 @@
public Node appendChild(Node newChild)
throws DOMException
{
- error(XSLTErrorResources.ERROR0004, new Object[] {((ElemTemplateElement)newChild).m_elemName, this.m_elemName}); //"Can not add " +((ElemTemplateElement)newChild).m_elemName +
+ error(XSLTErrorResources.ER_CANNOT_ADD, new Object[] {((ElemTemplateElement)newChild).m_elemName, this.m_elemName}); //"Can not add " +((ElemTemplateElement)newChild).m_elemName +
//" to " + this.m_elemName);
return null;
}
1.4 +4 -4 xml-xalan/src/org/apache/xalan/xslt/ElemDecimalFormat.java
Index: ElemDecimalFormat.java
===================================================================
RCS file: /home/cvs/xml-xalan/src/org/apache/xalan/xslt/ElemDecimalFormat.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ElemDecimalFormat.java 1999/12/14 23:42:44 1.3
+++ ElemDecimalFormat.java 2000/01/05 23:05:30 1.4
@@ -150,7 +150,7 @@
}
else if(!isAttrOK(aname, atts, i))
{
- processor.error(XSLTErrorResources.ERROR0002, new Object[] {name, aname}); //name+" has an illegal attribute: "+aname);
+ processor.error(XSLTErrorResources.ER_ILLEGAL_ATTRIBUTE, new Object[] {name, aname}); //name+" has an illegal attribute: "+aname);
}
}
if (null == m_infinity_avt)
@@ -162,14 +162,14 @@
if (null == m_name_avt)
{
if (null != m_stylesheet.getDecimalFormatElem(Constants.DEFAULT_DECIMAL_FORMAT))
- processor.warn(XSLTErrorResources.WARNING0019); //Only one default Decimal format is allowed
+ processor.warn(XSLTErrorResources.WG_ONE_DEFAULT_XSLDECIMALFORMAT_ALLOWED); //Only one default Decimal format is allowed
m_name_avt = Constants.DEFAULT_DECIMAL_FORMAT;
}
// Look for duplicate decimal-format names
else
{
if (null != m_stylesheet.getDecimalFormatElem(m_name_avt))
- processor.warn(XSLTErrorResources.WARNING0020); // All declarations have to be unique
+ processor.warn(XSLTErrorResources.WG_XSLDECIMALFORMAT_NAMES_MUST_BE_UNIQUE); // All declarations have to be unique
}
}
@@ -233,7 +233,7 @@
public Node appendChild(Node newChild)
throws DOMException
{
- error(XSLTErrorResources.ERROR0004, new Object[] {((ElemTemplateElement)newChild).m_elemName, this.m_elemName}); //"Can not add " +((ElemTemplateElement)newChild).m_elemName +
+ error(XSLTErrorResources.ER_CANNOT_ADD, new Object[] {((ElemTemplateElement)newChild).m_elemName, this.m_elemName}); //"Can not add " +((ElemTemplateElement)newChild).m_elemName +
//" to " + this.m_elemName);
return null;
}
1.4 +2 -2 xml-xalan/src/org/apache/xalan/xslt/ElemElement.java
Index: ElemElement.java
===================================================================
RCS file: /home/cvs/xml-xalan/src/org/apache/xalan/xslt/ElemElement.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ElemElement.java 1999/11/30 22:30:55 1.3
+++ ElemElement.java 2000/01/05 23:05:30 1.4
@@ -98,12 +98,12 @@
isAttrOK(aname, atts, i)
))
{
- processor.error(XSLTErrorResources.ERROR0002, new Object[] {name, aname}); //name+" has an illegal attribute: "+aname);
+ processor.error(XSLTErrorResources.ER_ILLEGAL_ATTRIBUTE, new Object[] {name, aname}); //name+" has an illegal attribute: "+aname);
}
}
if(null == m_name_avt)
{
- processor.error(XSLTErrorResources.ERROR0006, new Object[] {name}); //name+" must have a name attrbute.");
+ processor.error(XSLTErrorResources.ER_NO_NAME_ATTRIB, new Object[] {name}); //name+" must have a name attrbute.");
}
}
1.2 +1 -1 xml-xalan/src/org/apache/xalan/xslt/ElemFallback.java
Index: ElemFallback.java
===================================================================
RCS file: /home/cvs/xml-xalan/src/org/apache/xalan/xslt/ElemFallback.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ElemFallback.java 1999/12/03 08:43:14 1.1
+++ ElemFallback.java 2000/01/05 23:05:30 1.2
@@ -91,7 +91,7 @@
default:
if(!isAttrOK(tok, aname, atts, i))
{
- processor.error(XSLTErrorResources.ERROR0002, new Object[] {name, aname}); //name+" has an illegal attribute: "+aname);
+ processor.error(XSLTErrorResources.ER_ILLEGAL_ATTRIBUTE, new Object[] {name, aname}); //name+" has an illegal attribute: "+aname);
}
}
}
1.2 +3 -3 xml-xalan/src/org/apache/xalan/xslt/ElemForEach.java
Index: ElemForEach.java
===================================================================
RCS file: /home/cvs/xml-xalan/src/org/apache/xalan/xslt/ElemForEach.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ElemForEach.java 1999/11/08 20:56:22 1.1
+++ ElemForEach.java 2000/01/05 23:05:30 1.2
@@ -93,12 +93,12 @@
}
else if(!(isAttrOK(aname, atts, i) || processSpaceAttr(aname, atts, i)))
{
- processor.error(XSLTErrorResources.ERROR0002, new Object[] {name, aname}); //name+" has an illegal attribute: "+aname);
+ processor.error(XSLTErrorResources.ER_ILLEGAL_ATTRIBUTE, new Object[] {name, aname}); //name+" has an illegal attribute: "+aname);
}
}
if(null == m_selectPattern)
{
- processor.error(XSLTErrorResources.ERROR0009, new Object[] {name, Constants.ATTRNAME_SELECT}); //name+" requires attribute: "+Constants.ATTRNAME_SELECT);
+ processor.error(XSLTErrorResources.ER_REQUIRES_ATTRIB, new Object[] {name, Constants.ATTRNAME_SELECT}); //name+" requires attribute: "+Constants.ATTRNAME_SELECT);
}
}
}
@@ -127,7 +127,7 @@
}
else // if(null == sourceNode)
{
- processor.error(this, sourceNode, XSLTErrorResources.ERROR0005);
+ processor.error(this, sourceNode, XSLTErrorResources.ER_NULL_SOURCENODE_HANDLEAPPLYTEMPLATES);
//"sourceNode is null in handleApplyTemplatesInstruction!");
}
}
1.2 +2 -2 xml-xalan/src/org/apache/xalan/xslt/ElemIf.java
Index: ElemIf.java
===================================================================
RCS file: /home/cvs/xml-xalan/src/org/apache/xalan/xslt/ElemIf.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ElemIf.java 1999/11/08 20:56:23 1.1
+++ ElemIf.java 2000/01/05 23:05:30 1.2
@@ -96,13 +96,13 @@
default:
if(!isAttrOK(tok, aname, atts, i))
{
- processor.error(XSLTErrorResources.ERROR0002, new Object[] {name, aname}); //name+" has an illegal attribute: "+aname);
+ processor.error(XSLTErrorResources.ER_ILLEGAL_ATTRIBUTE, new Object[] {name, aname}); //name+" has an illegal attribute: "+aname);
}
}
}
if(null == m_test)
{
- processor.error(XSLTErrorResources.ERROR0010, new Object[] {name}); //name+" must have a 'test' attribute.");
+ processor.error(XSLTErrorResources.ER_MUST_HAVE_TEST_ATTRIB, new Object[] {name}); //name+" must have a 'test' attribute.");
}
}
1.9 +1 -1 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.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- ElemLiteralResult.java 1999/12/15 16:25:13 1.8
+++ ElemLiteralResult.java 2000/01/05 23:05:30 1.9
@@ -130,7 +130,7 @@
{
String versionStr = atts.getValue(i);
m_stylesheet.m_XSLTVerDeclared = Double.valueOf(versionStr).doubleValue();
- }
+ }
}
}
}
1.4 +1 -1 xml-xalan/src/org/apache/xalan/xslt/ElemMessage.java
Index: ElemMessage.java
===================================================================
RCS file: /home/cvs/xml-xalan/src/org/apache/xalan/xslt/ElemMessage.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ElemMessage.java 1999/12/13 08:22:54 1.3
+++ ElemMessage.java 2000/01/05 23:05:31 1.4
@@ -89,7 +89,7 @@
}
else if(!(isAttrOK(aname, atts, i) || processSpaceAttr(aname, atts, i)))
{
- processor.error(XSLTErrorResources.ERROR0002, new Object[] {name, aname}); //name+" has an illegal attribute: "+aname);
+ processor.error(XSLTErrorResources.ER_ILLEGAL_ATTRIBUTE, new Object[] {name, aname}); //name+" has an illegal attribute: "+aname);
}
}
}
1.5 +5 -5 xml-xalan/src/org/apache/xalan/xslt/ElemNumber.java
Index: ElemNumber.java
===================================================================
RCS file: /home/cvs/xml-xalan/src/org/apache/xalan/xslt/ElemNumber.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- ElemNumber.java 1999/12/13 08:11:53 1.4
+++ ElemNumber.java 2000/01/05 23:05:31 1.5
@@ -131,7 +131,7 @@
else if(levelValue.equals(Constants.ATTRVAL_SINGLE))
m_level = Constants.NUMBERLEVEL_SINGLE;
else
- error(XSLTErrorResources.ERROR0011, new Object[] {levelValue}); //"Bad value on level attribute: "+levelValue);
+ error(XSLTErrorResources.ER_BAD_VAL_ON_LEVEL_ATTRIB, new Object[] {levelValue}); //"Bad value on level attribute: "+levelValue);
}
}
else if(aname.equals(Constants.ATTRNAME_COUNT))
@@ -174,7 +174,7 @@
}
else if(!isAttrOK(aname, atts, i))
{
- processor.error(XSLTErrorResources.ERROR0002, new Object[] {name, aname}); //name+" has an illegal attribute: "+aname);
+ processor.error(XSLTErrorResources.ER_ILLEGAL_ATTRIBUTE, new Object[] {name, aname}); //name+" has an illegal attribute: "+aname);
}
}
@@ -214,7 +214,7 @@
public Node appendChild(Node newChild)
throws DOMException
{
- error(XSLTErrorResources.ERROR0004, new Object[] {((ElemTemplateElement)newChild).m_elemName, this.m_elemName}); //"Can not add " +((ElemTemplateElement)newChild).m_elemName +
+ error(XSLTErrorResources.ER_CANNOT_ADD, new Object[] {((ElemTemplateElement)newChild).m_elemName, this.m_elemName}); //"Can not add " +((ElemTemplateElement)newChild).m_elemName +
//" to " + this.m_elemName);
return null;
}
@@ -487,7 +487,7 @@
}
else
{
- processor.warn(XSLTErrorResources.WARNING0002, new Object[] {sourceNode.getNodeName()}); //"Warning: count attribute does not match an ancestor in xsl:number! Target = "+
+ processor.warn(XSLTErrorResources.WG_COUNT_ATTRIB_MATCHES_NO_ANCESTOR, new Object[] {sourceNode.getNodeName()}); //"Warning: count attribute does not match an ancestor in xsl:number! Target = "+
//sourceNode.getNodeName());
}
}
@@ -910,7 +910,7 @@
if(null == locale)
{
processor.warn(null, contextNode,
- XSLTErrorResources.WARNING0005, new Object[] {langValue}); //"Warning: Could not find locale for xml:lang="+langValue);
+ XSLTErrorResources.WG_LOCALE_NOT_FOUND, new Object[] {langValue}); //"Warning: Could not find locale for xml:lang="+langValue);
locale = Locale.getDefault();
}
}
1.2 +1 -1 xml-xalan/src/org/apache/xalan/xslt/ElemOtherwise.java
Index: ElemOtherwise.java
===================================================================
RCS file: /home/cvs/xml-xalan/src/org/apache/xalan/xslt/ElemOtherwise.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ElemOtherwise.java 1999/11/08 20:56:25 1.1
+++ ElemOtherwise.java 2000/01/05 23:05:31 1.2
@@ -82,7 +82,7 @@
String aname = atts.getName(i);
if(!(isAttrOK(aname, atts, i) || processSpaceAttr(aname, atts, i)))
{
- processor.error(XSLTErrorResources.ERROR0002, new Object[] {name, aname}); //name+" has an illegal attribute: "+aname);
+ processor.error(XSLTErrorResources.ER_ILLEGAL_ATTRIBUTE, new Object[] {name, aname}); //name+" has an illegal attribute: "+aname);
}
}
}
1.2 +5 -5 xml-xalan/src/org/apache/xalan/xslt/ElemPI.java
Index: ElemPI.java
===================================================================
RCS file: /home/cvs/xml-xalan/src/org/apache/xalan/xslt/ElemPI.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ElemPI.java 1999/11/08 20:56:25 1.1
+++ ElemPI.java 2000/01/05 23:05:31 1.2
@@ -91,12 +91,12 @@
else if(!(isAttrOK(aname, atts, i) ||
processSpaceAttr(aname, atts, i)))
{
- processor.error(XSLTErrorResources.ERROR0002, new Object[] {name, aname}); //name+" has an illegal attribute: "+aname);
+ processor.error(XSLTErrorResources.ER_ILLEGAL_ATTRIBUTE, new Object[] {name, aname}); //name+" has an illegal attribute: "+aname);
}
}
if(null == m_name_atv)
{
- processor.error(XSLTErrorResources.ERROR0006, new Object[] {name}); //name+" must have a name attribute.");
+ processor.error(XSLTErrorResources.ER_NO_NAME_ATTRIB, new Object[] {name}); //name+" must have a name attribute.");
}
}
@@ -115,11 +115,11 @@
new StringBuffer());
if(piName.equalsIgnoreCase("xml"))
{
- error(XSLTErrorResources.ERROR0012); //"processing-instruction name can not be 'xml'");
+ error(XSLTErrorResources.ER_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML); //"processing-instruction name can not be 'xml'");
}
else if(!isValidNCName(piName))
{
- error(XSLTErrorResources.ERROR0013, new Object[] {piName}); //"processing-instruction name must be a valid NCName: "+piName);
+ error(XSLTErrorResources.ER_PROCESSINGINSTRUCTION_NOTVALID_NCNAME, new Object[] {piName}); //"processing-instruction name must be a valid NCName: "+piName);
}
// Note the content model is:
@@ -169,7 +169,7 @@
break;
default:
- error(XSLTErrorResources.ERROR0004, new Object[] {((ElemTemplateElement)newChild).m_elemName, this.m_elemName}); //"Can not add " +((ElemTemplateElement)newChild).m_elemName +
+ error(XSLTErrorResources.ER_CANNOT_ADD, new Object[] {((ElemTemplateElement)newChild).m_elemName, this.m_elemName}); //"Can not add " +((ElemTemplateElement)newChild).m_elemName +
//" to " + this.m_elemName);
}
return super.appendChild(newChild);
1.2 +3 -3 xml-xalan/src/org/apache/xalan/xslt/ElemSort.java
Index: ElemSort.java
===================================================================
RCS file: /home/cvs/xml-xalan/src/org/apache/xalan/xslt/ElemSort.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ElemSort.java 1999/11/08 20:56:26 1.1
+++ ElemSort.java 2000/01/05 23:05:31 1.2
@@ -108,13 +108,13 @@
}
else if(aname.equals(Constants.ATTRNAME_CASEORDER))
{
- processor.warn(XSLTErrorResources.WARNING0016, new Object[] {Constants.ATTRNAME_CASEORDER}); //"XSLT4J does not yet handle the "+Constants.ATTRNAME_CASEORDER+" attribute!");
+ processor.warn(XSLTErrorResources.WG_ATTRIB_NOT_HANDLED, new Object[] {Constants.ATTRNAME_CASEORDER}); //"XSLT4J does not yet handle the "+Constants.ATTRNAME_CASEORDER+" attribute!");
caseOrder_avt = new AVT(aname, atts.getType(i), atts.getValue(i),
this, m_stylesheet, processor);
}
else if(!isAttrOK(aname, atts, i))
{
- processor.error(XSLTErrorResources.ERROR0002, new Object[] {name, aname}); //name+" has an illegal attribute: "+aname);
+ processor.error(XSLTErrorResources.ER_ILLEGAL_ATTRIBUTE, new Object[] {name, aname}); //name+" has an illegal attribute: "+aname);
}
}
if(null == dataType_avt)
@@ -139,7 +139,7 @@
public Node appendChild(Node newChild)
throws DOMException
{
- error(XSLTErrorResources.ERROR0004, new Object[] {((ElemTemplateElement)newChild).m_elemName, this.m_elemName}); //"Can not add " +((ElemTemplateElement)newChild).m_elemName +
+ error(XSLTErrorResources.ER_CANNOT_ADD, new Object[] {((ElemTemplateElement)newChild).m_elemName, this.m_elemName}); //"Can not add " +((ElemTemplateElement)newChild).m_elemName +
//" to " + this.m_elemName);
return null;
}
1.4 +4 -4 xml-xalan/src/org/apache/xalan/xslt/ElemTemplate.java
Index: ElemTemplate.java
===================================================================
RCS file: /home/cvs/xml-xalan/src/org/apache/xalan/xslt/ElemTemplate.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ElemTemplate.java 1999/12/16 15:00:36 1.3
+++ ElemTemplate.java 2000/01/05 23:05:31 1.4
@@ -110,18 +110,18 @@
if(!isAttrOK(tok, aname, atts, i))
{
if(null != processor)
- processor.error(XSLTErrorResources.ERROR0002, new Object[] {name, aname}); //name+" has an illegal attribute: "+aname);
+ processor.error(XSLTErrorResources.ER_ILLEGAL_ATTRIBUTE, new Object[] {name, aname}); //name+" has an illegal attribute: "+aname);
}
}
}
if((null == m_matchPattern) && (null != m_mode))
{
- processor.error(XSLTErrorResources.ERROR0014, new Object[] {name}); //name+" must have a match attribute if it has a mode.");
+ processor.error(XSLTErrorResources.ER_NEED_MATCH_ATTRIB, new Object[] {name}); //name+" must have a match attribute if it has a mode.");
}
if((null == m_matchPattern) && (null == m_name))
{
if(null != processor)
- processor.error(XSLTErrorResources.ERROR0015, new Object[] {name}); //name+" requires either a name or a match attribute.");
+ processor.error(XSLTErrorResources.ER_NEED_NAME_OR_MATCH_ATTRIB, new Object[] {name}); //name+" requires either a name or a match attribute.");
}
}
@@ -143,7 +143,7 @@
else // if(null == sourceNode)
{
processor.error(this, sourceNode,
- XSLTErrorResources.ERROR0005);
+ XSLTErrorResources.ER_NULL_SOURCENODE_HANDLEAPPLYTEMPLATES);
//"sourceNode is null in handleApplyTemplatesInstruction!");
}
}
1.11 +7 -7 xml-xalan/src/org/apache/xalan/xslt/ElemTemplateElement.java
Index: ElemTemplateElement.java
===================================================================
RCS file: /home/cvs/xml-xalan/src/org/apache/xalan/xslt/ElemTemplateElement.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- ElemTemplateElement.java 1999/12/15 16:25:13 1.10
+++ ElemTemplateElement.java 2000/01/05 23:05:32 1.11
@@ -265,7 +265,7 @@
namespace = m_stylesheet.getNamespaceForPrefixFromStack(prefix);
}
if(null == namespace)
- error(XSLTErrorResources.ERROR0016, new Object[] {prefix}); //"Can not resolve namespace prefix: "+prefix);
+ error(XSLTErrorResources.ER_CANT_RESOLVE_NSPREFIX, new Object[] {prefix}); //"Can not resolve namespace prefix: "+prefix);
return namespace;
}
@@ -339,7 +339,7 @@
}
else
{
- error(XSLTErrorResources.ERROR0017, new Object[] {spaceVal}); //"xml:space has an illegal value: "+spaceVal);
+ error(XSLTErrorResources.ER_ILLEGAL_VALUE, new Object[] {spaceVal}); //"xml:space has an illegal value: "+spaceVal);
}
}
@@ -368,7 +368,7 @@
}
else
{
- error(XSLTErrorResources.ERROR0017, new Object[] {spaceVal}); //"xml:space has an illegal value: "+spaceVal);
+ error(XSLTErrorResources.ER_ILLEGAL_VALUE, new Object[] {spaceVal}); //"xml:space has an illegal value: "+spaceVal);
}
}
return isSpaceAttr;
@@ -730,7 +730,7 @@
Document ownerDoc = childNode.getOwnerDocument();
if((Node.DOCUMENT_NODE != childNode.getNodeType()) && (null == ownerDoc))
{
- error(XSLTErrorResources.ERROR0018, null); //"Child node does not have an owner document!");
+ error(XSLTErrorResources.ER_NO_OWNERDOC, null); //"Child node does not have an owner document!");
}
transformChild(
@@ -749,7 +749,7 @@
Document ownerDoc = sourceNodeContext.getOwnerDocument();
if((Node.DOCUMENT_NODE != sourceNodeContext.getNodeType()) && (null == ownerDoc))
{
- error(XSLTErrorResources.ERROR0018, null); //"Child node does not have an owner document!");
+ error(XSLTErrorResources.ER_NO_OWNERDOC, null); //"Child node does not have an owner document!");
}
NodeList savedContextNodeList = tcontext.getExecContext().getContextNodeList();
MutableNodeList contextNodeList = new MutableNodeListImpl();
@@ -1033,7 +1033,7 @@
public void error(int msg, Object[] args)
{
String themsg = XSLMessages.createMessage(msg, args);
- throw new RuntimeException(XSLMessages.createMessage(XSLTErrorResources.ERROR0019, new Object[] {themsg})); //"ElemTemplateElement error: "+msg);
+ throw new RuntimeException(XSLMessages.createMessage(XSLTErrorResources.ER_ELEMTEMPLATEELEM_ERR, new Object[] {themsg})); //"ElemTemplateElement error: "+msg);
}
// Implemented DOM Element methods.
@@ -1049,7 +1049,7 @@
{
if(null == newChild)
{
- error(XSLTErrorResources.ERROR0020, null); //"Trying to add a null child!");
+ error(XSLTErrorResources.ER_NULL_CHILD, null); //"Trying to add a null child!");
}
ElemTemplateElement elem = (ElemTemplateElement)newChild;
if(null == m_firstChild)
1.2 +2 -2 xml-xalan/src/org/apache/xalan/xslt/ElemText.java
Index: ElemText.java
===================================================================
RCS file: /home/cvs/xml-xalan/src/org/apache/xalan/xslt/ElemText.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ElemText.java 1999/11/08 20:56:27 1.1
+++ ElemText.java 2000/01/05 23:05:32 1.2
@@ -97,7 +97,7 @@
}
else if(!isAttrOK(aname, atts, i))
{
- processor.error(XSLTErrorResources.ERROR0002, new Object[] {name, aname}); //name+" has an illegal attribute: "+aname);
+ processor.error(XSLTErrorResources.ER_ILLEGAL_ATTRIBUTE, new Object[] {name, aname}); //name+" has an illegal attribute: "+aname);
}
}
}
@@ -116,7 +116,7 @@
break;
default:
- error(XSLTErrorResources.ERROR0004, new Object[]{((ElemTemplateElement)newChild).m_elemName, this.m_elemName}); //"Can not add " +((ElemTemplateElement)newChild).m_elemName +
+ error(XSLTErrorResources.ER_CANNOT_ADD, new Object[]{((ElemTemplateElement)newChild).m_elemName, this.m_elemName}); //"Can not add " +((ElemTemplateElement)newChild).m_elemName +
//" to " + this.m_elemName);
}
return super.appendChild(newChild);
1.3 +3 -3 xml-xalan/src/org/apache/xalan/xslt/ElemValueOf.java
Index: ElemValueOf.java
===================================================================
RCS file: /home/cvs/xml-xalan/src/org/apache/xalan/xslt/ElemValueOf.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ElemValueOf.java 1999/12/13 08:12:31 1.2
+++ ElemValueOf.java 2000/01/05 23:05:32 1.3
@@ -114,13 +114,13 @@
if(!isAttrOK(tok, aname, atts, i))
{
if(null != processor)
- processor.error(XSLTErrorResources.ERROR0002, new Object[] {name, aname}); //name+" has an illegal attribute: "+aname);
+ processor.error(XSLTErrorResources.ER_ILLEGAL_ATTRIBUTE, new Object[] {name, aname}); //name+" has an illegal attribute: "+aname);
}
}
}
if((null == m_selectPattern) && (null != processor))
{
- processor.error(XSLTErrorResources.ERROR0021, new Object[] {name}); //name+" requires a select attribute.");
+ processor.error(XSLTErrorResources.ER_NEED_SELECT_ATTRIB, new Object[] {name}); //name+" requires a select attribute.");
}
}
@@ -222,7 +222,7 @@
public Node appendChild(Node newChild)
throws DOMException
{
- error(XSLTErrorResources.ERROR0004, new Object[] {((ElemTemplateElement)newChild).m_elemName, this.m_elemName}); //"Can not add " +((ElemTemplateElement)newChild).m_elemName +
+ error(XSLTErrorResources.ER_CANNOT_ADD, new Object[] {((ElemTemplateElement)newChild).m_elemName, this.m_elemName}); //"Can not add " +((ElemTemplateElement)newChild).m_elemName +
//" to " + this.m_elemName);
return null;
}
1.3 +2 -2 xml-xalan/src/org/apache/xalan/xslt/ElemVariable.java
Index: ElemVariable.java
===================================================================
RCS file: /home/cvs/xml-xalan/src/org/apache/xalan/xslt/ElemVariable.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ElemVariable.java 1999/11/28 10:26:22 1.2
+++ ElemVariable.java 2000/01/05 23:05:32 1.3
@@ -119,12 +119,12 @@
default:
if(!isAttrOK(tok, aname, atts, i))
{
- processor.error(XSLTErrorResources.ERROR0002, new Object[] {name, aname}); //name+" has an illegal attribute: "+aname);
+ processor.error(XSLTErrorResources.ER_ILLEGAL_ATTRIBUTE, new Object[] {name, aname}); //name+" has an illegal attribute: "+aname);
}
}
}
if(null == m_qname)
- processor.error(XSLTErrorResources.ERROR0006, new Object[] {name}); //name+" must have a 'name' attribute.");
+ processor.error(XSLTErrorResources.ER_NO_NAME_ATTRIB, new Object[] {name}); //name+" must have a 'name' attribute.");
}
public void execute(XSLTEngineImpl processor,
1.2 +2 -2 xml-xalan/src/org/apache/xalan/xslt/ElemWhen.java
Index: ElemWhen.java
===================================================================
RCS file: /home/cvs/xml-xalan/src/org/apache/xalan/xslt/ElemWhen.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ElemWhen.java 1999/11/08 20:56:30 1.1
+++ ElemWhen.java 2000/01/05 23:05:32 1.2
@@ -94,13 +94,13 @@
default:
if(!isAttrOK(tok, aname, atts, i))
{
- processor.error(XSLTErrorResources.ERROR0002, new Object[] {name, aname}); //name+" has an illegal attribute: "+aname);
+ processor.error(XSLTErrorResources.ER_ILLEGAL_ATTRIBUTE, new Object[] {name, aname}); //name+" has an illegal attribute: "+aname);
}
}
}
if(null == m_test)
{
- processor.error(XSLTErrorResources.ERROR0022); //"xsl:when must have a 'test' attribute.");
+ processor.error(XSLTErrorResources.ER_NEED_TEST_ATTRIB); //"xsl:when must have a 'test' attribute.");
}
}
1.2 +2 -2 xml-xalan/src/org/apache/xalan/xslt/ElemWithParam.java
Index: ElemWithParam.java
===================================================================
RCS file: /home/cvs/xml-xalan/src/org/apache/xalan/xslt/ElemWithParam.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ElemWithParam.java 1999/11/08 20:56:31 1.1
+++ ElemWithParam.java 2000/01/05 23:05:32 1.2
@@ -94,11 +94,11 @@
}
else if(!isAttrOK(aname, atts, i))
{
- processor.error(XSLTErrorResources.ERROR0002, new Object[] {name, aname}); //name+" has an illegal attribute: "+aname);
+ processor.error(XSLTErrorResources.ER_ILLEGAL_ATTRIBUTE, new Object[] {name, aname}); //name+" has an illegal attribute: "+aname);
}
}
if(null == m_qname)
- processor.error(XSLTErrorResources.ERROR0023); //"xsl:with-param must have a 'name' attribute.");
+ processor.error(XSLTErrorResources.ER_NEED_NAME_ATTRIB); //"xsl:with-param must have a 'name' attribute.");
}
}
1.8 +47 -5 xml-xalan/src/org/apache/xalan/xslt/FuncDocument.java
Index: FuncDocument.java
===================================================================
RCS file: /home/cvs/xml-xalan/src/org/apache/xalan/xslt/FuncDocument.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- FuncDocument.java 1999/12/15 21:53:08 1.7
+++ FuncDocument.java 2000/01/05 23:05:32 1.8
@@ -62,6 +62,7 @@
import org.apache.xalan.xpath.xml.XMLParserLiaison;
import org.apache.xalan.xslt.res.XSLTErrorResources;
import org.apache.xalan.xpath.xml.XMLParserLiaisonDefault;
+import org.apache.xalan.xpath.xml.*;
/**
* Execute the Doc() function.
@@ -127,7 +128,7 @@
continue;
if(null == docContext)
{
- path.error(context, XSLTErrorResources.ERROR0024); //"context does not have an owner document!");
+ error(execContext, XSLTErrorResources.ER_NO_CONTEXT_OWNERDOC, null); //"context does not have an owner document!");
}
// From http://www.ics.uci.edu/pub/ietf/uri/rfc1630.txt
@@ -173,10 +174,11 @@
{
// TODO: Note the the warning calls below go through XPath, instead
// of XSLT, as the should.
+ java.net.URL url = null;
try
{
XMLParserLiaison parserLiaison = (XMLParserLiaison)execContext;
- java.net.URL url = parserLiaison.getURLFromString(uri, base);
+ url = parserLiaison.getURLFromString(uri, base);
if((null != url) && (url.toString().length() > 0))
{
XSLTInputSource inputSource = new XSLTInputSource(url.toString());
@@ -185,17 +187,17 @@
}
else
{
- path.warn(XSLTErrorResources.WARNING0010, new Object[]{((base == null) ? "" : base )+uri}); //"Can not make URL from: "+((base == null) ? "" : base )+uri);
+ warn(execContext, XSLTErrorResources.WG_CANNOT_MAKE_URL_FROM, new Object[]{((base == null) ? "" : base )+uri}); //"Can not make URL from: "+((base == null) ? "" : base )+uri);
}
}
catch(Exception e)
{
newDoc = null;
- // path.warn(XSLTErrorResources.WARNING0011, new Object[]{((base == null) ? "" : base )+uri}); //"Can not load requested doc: "+((base == null) ? "" : base )+uri);
+ // path.warn(XSLTErrorResources.WG_ENCODING_NOT_SUPPORTED_USING_JAVA, new Object[]{((base == null) ? "" : base )+uri}); //"Can not load requested doc: "+((base == null) ? "" : base )+uri);
}
if(null == newDoc)
{
- path.warn(XSLTErrorResources.WARNING0011, new Object[]{((base == null) ? "" : base )+uri}); //"Can not load requested doc: "+((base == null) ? "" : base )+uri);
+ warn(execContext, XSLTErrorResources.WG_CANNOT_LOAD_REQUESTED_DOC, new Object[]{url== null ?((base == null) ? "" : base)+uri : url.toString()}); //"Can not load requested doc: "+((base == null) ? "" : base )+uri);
}
else
{
@@ -204,6 +206,46 @@
}
}
return newDoc;
+ }
+
+ /**
+ * Tell the user of an error, and probably throw an
+ * exception.
+ * @exception XSLProcessorException thrown if the active ProblemListener and XMLParserLiaison decide
+ * the error condition is severe enough to halt processing.
+ */
+ public void error(XPathSupport execContext, int msg, Object args[])
+ throws org.xml.sax.SAXException
+ {
+ String formattedMsg = XSLMessages.createMessage(msg, args);
+
+ XMLParserLiaison parserLiaison = (XMLParserLiaison)execContext;
+ boolean shouldThrow = parserLiaison.getProblemListener().problem(ProblemListener.XSLPROCESSOR,
+ ProblemListener.ERROR,
+ null, null, formattedMsg,
+ null, 0, 0);
+ }
+
+ /**
+ * Warn the user of a problem.
+ * @exception XSLProcessorException thrown if the active ProblemListener and XMLParserLiaison decide
+ * the error condition is severe enough to halt processing.
+ */
+ public void warn(XPathSupport execContext, int msg, Object args[])
+ throws org.xml.sax.SAXException
+ {
+ String formattedMsg = XSLMessages.createWarning(msg, args);
+
+ XMLParserLiaison parserLiaison = (XMLParserLiaison)execContext;
+ boolean shouldThrow = parserLiaison.getProblemListener().problem(ProblemListener.XSLPROCESSOR,
+ ProblemListener.WARNING,
+ null, null, formattedMsg,
+ null, 0, 0);
+
+ if(shouldThrow)
+ {
+ throw new XSLProcessorException(formattedMsg);
+ }
}
}
1.7 +27 -5 xml-xalan/src/org/apache/xalan/xslt/FuncFormatNumb.java
Index: FuncFormatNumb.java
===================================================================
RCS file: /home/cvs/xml-xalan/src/org/apache/xalan/xslt/FuncFormatNumb.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- FuncFormatNumb.java 1999/12/14 23:42:44 1.6
+++ FuncFormatNumb.java 2000/01/05 23:05:32 1.7
@@ -59,7 +59,7 @@
import org.w3c.dom.*;
import java.util.Vector;
import org.apache.xalan.xpath.*;
-import org.apache.xalan.xpath.xml.XMLParserLiaison;
+import org.apache.xalan.xpath.xml.*;
import org.apache.xalan.xslt.res.XSLTErrorResources;
/**
@@ -90,7 +90,7 @@
String patternStr = ((XObject)args.elementAt(1)).str();
// TODO: what should be the behavior here??
if (patternStr.indexOf(0x00A4)> 0)
- ss.error(XSLTErrorResources.ERROR0090); // currency sign not allowed
+ ss.error(XSLTErrorResources.ER_CURRENCY_SIGN_ILLEGAL); // currency sign not allowed
int nArgs = args.size();
// this third argument is not a locale name. It is the name of a
// decimal-format declared in the stylesheet!(xsl:decimal-format
@@ -102,8 +102,7 @@
dfs = ss.getDecimalFormatElem(formatStr);
if (null == dfs)
{
- path.warn(org.apache.xalan.xpath.res.XPATHErrorResources.WARNING0012,
- new Object[]{formatStr}); //"not found!!!
+ warn(execContext, XSLTErrorResources.WG_NO_DECIMALFORMAT_DECLARATION, new Object[]{formatStr}); //"not found!!!
//formatter = new java.text.DecimalFormat(patternStr);
}
else
@@ -132,9 +131,32 @@
}
catch(Exception iae)
{
- ss.error(XSLTErrorResources.ERROR0099, new Object[]{patternStr});
+ ss.error(XSLTErrorResources.ER_MALFORMED_FORMAT_STRING, new Object[]{patternStr});
return new XString("");
//throw new XSLProcessorException(iae);
}
}
+
+ /**
+ * Warn the user of a problem.
+ * @exception XSLProcessorException thrown if the active ProblemListener and XMLParserLiaison decide
+ * the error condition is severe enough to halt processing.
+ */
+ public void warn(XPathSupport execContext, int msg, Object args[])
+ throws org.xml.sax.SAXException
+ {
+ String formattedMsg = XSLMessages.createWarning(msg, args);
+
+ XMLParserLiaison parserLiaison = (XMLParserLiaison)execContext;
+ boolean shouldThrow = parserLiaison.getProblemListener().problem(ProblemListener.XSLPROCESSOR,
+ ProblemListener.WARNING,
+ null, null, formattedMsg,
+ null, 0, 0);
+
+ if(shouldThrow)
+ {
+ throw new XSLProcessorException(formattedMsg);
+ }
+ }
+
}
1.4 +1 -1 xml-xalan/src/org/apache/xalan/xslt/NodeSortKey.java
Index: NodeSortKey.java
===================================================================
RCS file: /home/cvs/xml-xalan/src/org/apache/xalan/xslt/NodeSortKey.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- NodeSortKey.java 1999/12/01 21:08:24 1.3
+++ NodeSortKey.java 2000/01/05 23:05:32 1.4
@@ -107,7 +107,7 @@
if(null == m_col)
{
m_processor.warn(
- XSLTErrorResources.WARNING0008, new Object[] {langValue}); //"Could not find Collator for <sort xml:lang="+langValue);
+ XSLTErrorResources.WG_CANNOT_FIND_COLLATOR, new Object[] {langValue}); //"Could not find Collator for <sort xml:lang="+langValue);
m_col = Collator.getInstance();
}
}
1.9 +24 -24 xml-xalan/src/org/apache/xalan/xslt/Process.java
Index: Process.java
===================================================================
RCS file: /home/cvs/xml-xalan/src/org/apache/xalan/xslt/Process.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- Process.java 1999/12/02 20:11:41 1.8
+++ Process.java 2000/01/05 23:05:32 1.9
@@ -137,7 +137,7 @@
java.io.PrintWriter dumpWriter = diagnosticsWriter;
XSLTErrorResources resbundle = (XSLTErrorResources)(XSLMessages.loadResourceBundle(Constants.ERROR_RESOURCES));
- //XSLTErrorResources resbundle = (XSLTErrorResources)(ResourceBundle.getBundle (Constants.ERROR_RESOURCES , Locale.getDefault()));
+
if(argv.length < 1)
{
printArgOptions(resbundle);
@@ -167,7 +167,7 @@
}
catch(Exception e)
{
- System.err.println(XSLMessages.createMessage(XSLTErrorResources.ERROR0025, new Object[] {parserLiaisonClassName})); //"Could not create XML Processor Liaison: "+parserLiaisonClassName);
+ System.err.println(XSLMessages.createMessage(XSLTErrorResources.ER_COULD_NOT_CREATE_XML_PROC_LIAISON, new Object[] {parserLiaisonClassName})); //"Could not create XML Processor Liaison: "+parserLiaisonClassName);
return;
}
@@ -236,11 +236,11 @@
}
catch(Exception e)
{
- System.err.println(XSLMessages.createMessage(XSLTErrorResources.ERROR0029, new Object[] {className})); //"Could not create TraceListener: "+className);
+ System.err.println(XSLMessages.createMessage(XSLTErrorResources.ER_COULD_NOT_CREATE_TRACELISTENER, new Object[] {className})); //"Could not create TraceListener: "+className);
}
}
else
- System.err.println(XSLMessages.createMessage(XSLTErrorResources.ERROR0097, new Object[] {"-TCLASS"})); //"Missing argument for);
+ System.err.println(XSLMessages.createMessage(XSLTErrorResources.ER_MISSING_ARG_FOR_OPTION, new Object[] {"-TCLASS"})); //"Missing argument for);
}
else if ("-ESCAPE".equalsIgnoreCase(argv[i]))
@@ -248,7 +248,7 @@
if ( i+1 < argv.length)
xmlProcessorLiaison.setSpecialCharacters(argv[++i]);
else
- System.err.println(XSLMessages.createMessage(XSLTErrorResources.ERROR0097, new Object[] {"-ESCAPE"})); //"Missing argument for);
+ System.err.println(XSLMessages.createMessage(XSLTErrorResources.ER_MISSING_ARG_FOR_OPTION, new Object[] {"-ESCAPE"})); //"Missing argument for);
}
else if ("-INDENT".equalsIgnoreCase(argv[i]))
@@ -269,7 +269,7 @@
if ( i+1 < argv.length)
inFileName = argv[++i];
else
- System.err.println(XSLMessages.createMessage(XSLTErrorResources.ERROR0097, new Object[] {"-IN"})); //"Missing argument for);
+ System.err.println(XSLMessages.createMessage(XSLTErrorResources.ER_MISSING_ARG_FOR_OPTION, new Object[] {"-IN"})); //"Missing argument for);
}
else if ("-OUT".equalsIgnoreCase(argv[i]))
@@ -277,7 +277,7 @@
if ( i+1 < argv.length)
outFileName = argv[++i];
else
- System.err.println(XSLMessages.createMessage(XSLTErrorResources.ERROR0097, new Object[] {"-OUT"})); //"Missing argument for);
+ System.err.println(XSLMessages.createMessage(XSLTErrorResources.ER_MISSING_ARG_FOR_OPTION, new Object[] {"-OUT"})); //"Missing argument for);
}
else if ("-XSL".equalsIgnoreCase(argv[i]))
@@ -285,7 +285,7 @@
if ( i+1 < argv.length)
xslFileName = argv[++i];
else
- System.err.println(XSLMessages.createMessage(XSLTErrorResources.ERROR0097, new Object[] {"-XSL"})); //"Missing argument for);
+ System.err.println(XSLMessages.createMessage(XSLTErrorResources.ER_MISSING_ARG_FOR_OPTION, new Object[] {"-XSL"})); //"Missing argument for);
}
else if("-LXCIN".equalsIgnoreCase(argv[i]))
@@ -293,7 +293,7 @@
if ( i+1 < argv.length)
compiledStylesheetFileNameIn = argv[++i];
else
- System.err.println(XSLMessages.createMessage(XSLTErrorResources.ERROR0097, new Object[] {"-LXCIN"})); //"Missing argument for);
+ System.err.println(XSLMessages.createMessage(XSLTErrorResources.ER_MISSING_ARG_FOR_OPTION, new Object[] {"-LXCIN"})); //"Missing argument for);
}
else if("-LXCOUT".equalsIgnoreCase(argv[i]))
@@ -301,7 +301,7 @@
if ( i+1 < argv.length)
compiledStylesheetFileNameOut = argv[++i];
else
- System.err.println(XSLMessages.createMessage(XSLTErrorResources.ERROR0097, new Object[] {"-LXCOUT"})); //"Missing argument for);
+ System.err.println(XSLMessages.createMessage(XSLTErrorResources.ER_MISSING_ARG_FOR_OPTION, new Object[] {"-LXCOUT"})); //"Missing argument for);
}
else if ("-PARAM".equalsIgnoreCase(argv[i]))
@@ -313,7 +313,7 @@
processor.setStylesheetParam(name, expression);
}
else
- System.err.println(XSLMessages.createMessage(XSLTErrorResources.ERROR0097, new Object[] {"-PARAM"})); //"Missing argument for);
+ System.err.println(XSLMessages.createMessage(XSLTErrorResources.ER_MISSING_ARG_FOR_OPTION, new Object[] {"-PARAM"})); //"Missing argument for);
}
else if ("-treedump".equalsIgnoreCase(argv[i]))
@@ -321,7 +321,7 @@
if ( i+1 < argv.length)
treedumpFileName = argv[++i];
else
- System.err.println(XSLMessages.createMessage(XSLTErrorResources.ERROR0097, new Object[] {"-treedump"})); //"Missing argument for);
+ System.err.println(XSLMessages.createMessage(XSLTErrorResources.ER_MISSING_ARG_FOR_OPTION, new Object[] {"-treedump"})); //"Missing argument for);
}
else if("-F".equalsIgnoreCase(argv[i]))
@@ -399,7 +399,7 @@
}
}
else
- System.err.println(XSLMessages.createMessage(XSLTErrorResources.ERROR0098, new Object[] {argv[i]})); //"Invalid argument:);
+ System.err.println(XSLMessages.createMessage(XSLTErrorResources.ER_INVALID_OPTION, new Object[] {argv[i]})); //"Invalid argument:);
}
@@ -430,8 +430,8 @@
catch(java.io.UnsupportedEncodingException uee)
{
stylesheet = null;
- diagnosticsWriter.println(XSLMessages.createMessage(XSLTErrorResources.ERROR0028, new Object[] {stylesheet.m_encoding})); //"Encoding not supported: "+stylesheet.m_encoding);
- throw new XSLProcessorException(XSLMessages.createMessage(XSLTErrorResources.ERROR0028, new Object[] {stylesheet.m_encoding})); //"Encoding not supported: "+stylesheet.m_encoding);
+ diagnosticsWriter.println(XSLMessages.createMessage(XSLTErrorResources.ER_ENCODING_NOT_SUPPORTED, new Object[] {stylesheet.m_encoding})); //"Encoding not supported: "+stylesheet.m_encoding);
+ throw new XSLProcessorException(XSLMessages.createMessage(XSLTErrorResources.ER_ENCODING_NOT_SUPPORTED, new Object[] {stylesheet.m_encoding})); //"Encoding not supported: "+stylesheet.m_encoding);
}
}
else if(null != xslFileName)
@@ -507,7 +507,7 @@
tmle.printStackTrace(dumpWriter);
// else
// System.out.println("Error! "+se.getMessage());
- diagnosticsWriter.println(XSLMessages.createMessage(XSLTErrorResources.ERROR0027, null)); //"XSL Process was not successful.");
+ diagnosticsWriter.println(XSLMessages.createMessage(XSLTErrorResources.ER_NOT_SUCCESSFUL, null)); //"XSL Process was not successful.");
}
catch(XPathException xpe)
{
@@ -533,7 +533,7 @@
diagnosticsWriter.println("XPATH: "+xpe.getMessage());
}
}
- diagnosticsWriter.println(XSLMessages.createMessage(XSLTErrorResources.ERROR0027, null)); //"XPATH: XSL Process was not successful.");
+ diagnosticsWriter.println(XSLMessages.createMessage(XSLTErrorResources.ER_NOT_SUCCESSFUL, null)); //"XPATH: XSL Process was not successful.");
}
catch(SAXException se)
{
@@ -544,7 +544,7 @@
containedException.printStackTrace(dumpWriter);
// else
// System.out.println("Error! "+se.getMessage());
- diagnosticsWriter.println(XSLMessages.createMessage(XSLTErrorResources.ERROR0027, null)); //"XSL Process was not successful.");
+ diagnosticsWriter.println(XSLMessages.createMessage(XSLTErrorResources.ER_NOT_SUCCESSFUL, null)); //"XSL Process was not successful.");
}
else
{
@@ -552,7 +552,7 @@
se.printStackTrace(dumpWriter);
// else
// System.out.println("Error! "+se.getMessage());
- diagnosticsWriter.println(XSLMessages.createMessage(XSLTErrorResources.ERROR0027, null) ); //"XSL Process was not successful.");
+ diagnosticsWriter.println(XSLMessages.createMessage(XSLTErrorResources.ER_NOT_SUCCESSFUL, null) ); //"XSL Process was not successful.");
}
}
catch(MalformedURLException mue)
@@ -561,7 +561,7 @@
mue.printStackTrace(dumpWriter);
else
System.out.println("Error! "+mue.getMessage());
- diagnosticsWriter.println(XSLMessages.createMessage(XSLTErrorResources.ERROR0027, null)); //"XSL Process was not successful.");
+ diagnosticsWriter.println(XSLMessages.createMessage(XSLTErrorResources.ER_NOT_SUCCESSFUL, null)); //"XSL Process was not successful.");
}
catch(ClassNotFoundException cnfe)
{
@@ -569,7 +569,7 @@
cnfe.printStackTrace(dumpWriter);
else
System.out.println("Error! "+cnfe.getMessage());
- diagnosticsWriter.println(XSLMessages.createMessage(XSLTErrorResources.ERROR0027, null)); //"XSL Process was not successful.");
+ diagnosticsWriter.println(XSLMessages.createMessage(XSLTErrorResources.ER_NOT_SUCCESSFUL, null)); //"XSL Process was not successful.");
}
catch(FileNotFoundException fne)
{
@@ -577,7 +577,7 @@
fne.printStackTrace(dumpWriter);
else
System.out.println("Error! "+fne.getMessage());
- diagnosticsWriter.println(XSLMessages.createMessage(XSLTErrorResources.ERROR0027, null)); //"XSL Process was not successful.");
+ diagnosticsWriter.println(XSLMessages.createMessage(XSLTErrorResources.ER_NOT_SUCCESSFUL, null)); //"XSL Process was not successful.");
}
catch(IOException ioe)
{
@@ -585,7 +585,7 @@
ioe.printStackTrace(dumpWriter);
else
System.out.println("Error! "+ioe.getMessage());
- diagnosticsWriter.println(XSLMessages.createMessage(XSLTErrorResources.ERROR0027, null)); //"XSL Process was not successful.");
+ diagnosticsWriter.println(XSLMessages.createMessage(XSLTErrorResources.ER_NOT_SUCCESSFUL, null)); //"XSL Process was not successful.");
}
catch(java.lang.NoClassDefFoundError ncdfe)
{
@@ -607,7 +607,7 @@
ncdfe.printStackTrace(dumpWriter);
else
System.out.println("Error! "+ncdfe.getMessage());
- diagnosticsWriter.println(XSLMessages.createMessage(XSLTErrorResources.ERROR0027, null)); //"XSL Process was not successful.");
+ diagnosticsWriter.println(XSLMessages.createMessage(XSLTErrorResources.ER_NOT_SUCCESSFUL, null)); //"XSL Process was not successful.");
}
}
finally
1.19 +20 -20 xml-xalan/src/org/apache/xalan/xslt/Stylesheet.java
Index: Stylesheet.java
===================================================================
RCS file: /home/cvs/xml-xalan/src/org/apache/xalan/xslt/Stylesheet.java,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- Stylesheet.java 1999/12/16 15:00:36 1.18
+++ Stylesheet.java 2000/01/05 23:05:32 1.19
@@ -357,7 +357,7 @@
prefix="";
String ns = getNamespaceForPrefixFromStack (prefix);
if(null == ns)
- throw new SAXException(XSLMessages.createMessage(XSLTErrorResources.ERROR0095, new Object[]{prefix}));
+ throw new SAXException(XSLMessages.createMessage(XSLTErrorResources.ER_INVALID_PREFIX_IN_EXCLUDERESULTPREFIX, new Object[]{prefix}));
excludeResultPrefixes.put(prefix, ns);
}
return excludeResultPrefixes;
@@ -386,7 +386,7 @@
return true;
if((prefix == null) || (prefix.length() == 0))
- prefix = "#default";
+ prefix = "#default";
while(null != elem)
{
@@ -690,7 +690,7 @@
}
else if(!isAttrOK(aname, atts, i))
{
- error(XSLTErrorResources.ERROR0002, new Object[] {name, aname}); //name+" has an illegal attribute: "+aname);
+ error(XSLTErrorResources.ER_ILLEGAL_ATTRIBUTE, new Object[] {name, aname}); //name+" has an illegal attribute: "+aname);
}
}
// Build a table of aliases, the key is the stylesheet uri and the
@@ -702,7 +702,7 @@
m_prefix_aliases.put(ns, ns2);
}
else
- error(XSLTErrorResources.ERROR0095);
+ error(XSLTErrorResources.ER_INVALID_PREFIX_IN_EXCLUDERESULTPREFIX);
}
/**
@@ -784,13 +784,13 @@
}
}
if(null == nameAttr)
- error(XSLTErrorResources.ERROR0030, new Object[] {Constants.ATTRNAME_NAME}); //"xsl:key requires a "+Constants.ATTRNAME_NAME+" attribute!");
+ error(XSLTErrorResources.ER_KEY_REQUIRES_NAME_ATTRIB, new Object[] {Constants.ATTRNAME_NAME}); //"xsl:key requires a "+Constants.ATTRNAME_NAME+" attribute!");
if(null == matchAttr)
- error(XSLTErrorResources.ERROR0031, new Object[] {Constants.ATTRNAME_MATCH}); //"xsl:key requires a "+Constants.ATTRNAME_MATCH+" attribute!");
+ error(XSLTErrorResources.ER_KEY_REQUIRES_MATCH_ATTRIB, new Object[] {Constants.ATTRNAME_MATCH}); //"xsl:key requires a "+Constants.ATTRNAME_MATCH+" attribute!");
if(null == useAttr)
- error(XSLTErrorResources.ERROR0032, new Object[] {Constants.ATTRNAME_USE}); //"xsl:key requires a "+Constants.ATTRNAME_USE+" attribute!");
+ error(XSLTErrorResources.ER_KEY_REQUIRES_USE_ATTRIB, new Object[] {Constants.ATTRNAME_USE}); //"xsl:key requires a "+Constants.ATTRNAME_USE+" attribute!");
m_keyDeclarations.addElement(new KeyDeclaration(nameAttr, matchAttr, useAttr));
m_needToBuildKeysTable = true;
@@ -885,7 +885,7 @@
}
catch(ClassCastException cce)
{
- error(XSLTErrorResources.ERROR0092); //"Can't resolve prefix of non-Prefix resolver!");
+ error(XSLTErrorResources.ER_CANT_RESOLVE_PREFIX_OF_NON_PREFIX_RESOLVER); //"Can't resolve prefix of non-Prefix resolver!");
return null;
}
}
@@ -1398,21 +1398,21 @@
/** Unimplemented. */
public DocumentType getDoctype()
{
- error(XSLTErrorResources.ERROR0091);
+ error(XSLTErrorResources.ER_DOCUMENT_FUNCTION_INVALID_IN_STYLESHEET_DOM);
return null;
}
/** Unimplemented. */
public DOMImplementation getImplementation()
{
- error(XSLTErrorResources.ERROR0091);
+ error(XSLTErrorResources.ER_DOCUMENT_FUNCTION_INVALID_IN_STYLESHEET_DOM);
return null;
}
/** Unimplemented. */
public Element getDocumentElement()
{
- error(XSLTErrorResources.ERROR0091);
+ error(XSLTErrorResources.ER_DOCUMENT_FUNCTION_INVALID_IN_STYLESHEET_DOM);
return null;
}
@@ -1420,28 +1420,28 @@
public Element createElement(String tagName)
throws DOMException
{
- error(XSLTErrorResources.ERROR0091);
+ error(XSLTErrorResources.ER_DOCUMENT_FUNCTION_INVALID_IN_STYLESHEET_DOM);
return null;
}
/** Unimplemented. */
public DocumentFragment createDocumentFragment()
{
- error(XSLTErrorResources.ERROR0091);
+ error(XSLTErrorResources.ER_DOCUMENT_FUNCTION_INVALID_IN_STYLESHEET_DOM);
return null;
}
/** Unimplemented. */
public Text createTextNode(String data)
{
- error(XSLTErrorResources.ERROR0091);
+ error(XSLTErrorResources.ER_DOCUMENT_FUNCTION_INVALID_IN_STYLESHEET_DOM);
return null;
}
/** Unimplemented. */
public Comment createComment(String data)
{
- error(XSLTErrorResources.ERROR0091);
+ error(XSLTErrorResources.ER_DOCUMENT_FUNCTION_INVALID_IN_STYLESHEET_DOM);
return null;
}
@@ -1450,7 +1450,7 @@
throws DOMException
{
- error(XSLTErrorResources.ERROR0091);
+ error(XSLTErrorResources.ER_DOCUMENT_FUNCTION_INVALID_IN_STYLESHEET_DOM);
return null;
}
@@ -1460,7 +1460,7 @@
throws DOMException
{
- error(XSLTErrorResources.ERROR0091);
+ error(XSLTErrorResources.ER_DOCUMENT_FUNCTION_INVALID_IN_STYLESHEET_DOM);
return null;
}
@@ -1468,7 +1468,7 @@
public Attr createAttribute(String name)
throws DOMException
{
- error(XSLTErrorResources.ERROR0091);
+ error(XSLTErrorResources.ER_DOCUMENT_FUNCTION_INVALID_IN_STYLESHEET_DOM);
return null;
}
@@ -1476,14 +1476,14 @@
public EntityReference createEntityReference(String name)
throws DOMException
{
- error(XSLTErrorResources.ERROR0091);
+ error(XSLTErrorResources.ER_DOCUMENT_FUNCTION_INVALID_IN_STYLESHEET_DOM);
return null;
}
/** Unimplemented. */
public NodeList getElementsByTagName(String tagname)
{
- error(XSLTErrorResources.ERROR0091);
+ error(XSLTErrorResources.ER_DOCUMENT_FUNCTION_INVALID_IN_STYLESHEET_DOM);
return null;
}
1.12 +36 -36 xml-xalan/src/org/apache/xalan/xslt/StylesheetHandler.java
Index: StylesheetHandler.java
===================================================================
RCS file: /home/cvs/xml-xalan/src/org/apache/xalan/xslt/StylesheetHandler.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- StylesheetHandler.java 1999/12/16 11:19:19 1.11
+++ StylesheetHandler.java 2000/01/05 23:05:32 1.12
@@ -261,7 +261,7 @@
}
else
{
- throw new SAXException(XSLMessages.createMessage(XSLTErrorResources.ERROR0085, new Object[]{spaceVal})); //"(StylesheetHandler) "+"xml:space has an illegal value: "+spaceVal);
+ throw new SAXException(XSLMessages.createMessage(XSLTErrorResources.ER_XMLSPACE_ILLEGAL_VAL, new Object[]{spaceVal})); //"(StylesheetHandler) "+"xml:space has an illegal value: "+spaceVal);
}
}
return isSpaceAttr;
@@ -290,7 +290,7 @@
if(isOld && !warnedAboutOldXSLTNamespace)
{
warnedAboutOldXSLTNamespace = true;
- m_processor.warn(XSLTErrorResources.WARNING0018, new Object[] {ns});
+ m_processor.warn(XSLTErrorResources.WG_OLD_XSLT_NS, new Object[] {ns});
}
return isXSLT;
}
@@ -358,12 +358,12 @@
}
else if(!isAttrOK(aname, atts, i))
{
- m_stylesheet.error(XSLTErrorResources.ERROR0002, new Object[] {name, aname}); //name+" has an illegal attribute: "+aname);
+ m_stylesheet.error(XSLTErrorResources.ER_ILLEGAL_ATTRIBUTE, new Object[] {name, aname}); //name+" has an illegal attribute: "+aname);
}
}
if(!foundIt)
{
- throw new SAXException(XSLMessages.createMessage(XSLTErrorResources.ERROR0033, new Object[]{name, Constants.ATTRNAME_ELEMENTS})); //"(StylesheetHandler) "+name+" requires a "+Constants.ATTRNAME_ELEMENTS+" attribute!");
+ throw new SAXException(XSLMessages.createMessage(XSLTErrorResources.ER_REQUIRES_ELEMENTS_ATTRIB, new Object[]{name, Constants.ATTRNAME_ELEMENTS})); //"(StylesheetHandler) "+name+" requires a "+Constants.ATTRNAME_ELEMENTS+" attribute!");
}
}
@@ -447,7 +447,7 @@
if((null != ns) && !(ns.equals("http://xml.apache.org/xslt") ||
ns.equals("http://xsl.lotus.com/")))
{
- m_processor.warn(XSLTErrorResources.WARNING0009, new Object[] {m_processor.m_XSLT4JNameSpaceURL}); //"Old syntax: the functions instruction should use a url of "+m_processor.m_XSLT4JNameSpaceURL);
+ m_processor.warn(XSLTErrorResources.WG_FUNCTIONS_SHOULD_USE_URL, new Object[] {m_processor.m_XSLT4JNameSpaceURL}); //"Old syntax: the functions instruction should use a url of "+m_processor.m_XSLT4JNameSpaceURL);
}
// m_processor.handleFunctionsInstruction((Element)child);
}
@@ -473,7 +473,7 @@
break;
// TODO: Remove this??
case Constants.ELEMNAME_LOCALE:
- m_processor.warn(XSLTErrorResources.ERROR0088); //"xsl:locale not yet supported!");
+ m_processor.warn(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"xsl:locale not yet supported!");
break;
case Constants.ELEMNAME_PRESERVESPACE:
@@ -559,7 +559,7 @@
case Constants.ELEMNAME_COUNTERRESET:
case Constants.ELEMNAME_COUNTERSCOPE:
case Constants.ELEMNAME_APPLY_IMPORTS:
- throw new SAXException(XSLMessages.createMessage(XSLTErrorResources.ERROR0062, new Object[]{name})); //"(StylesheetHandler) "+name+" not allowed inside a stylesheet!");
+ throw new SAXException(XSLMessages.createMessage(XSLTErrorResources.ER_NOT_ALLOWED_INSIDE_STYLESHEET, new Object[]{name})); //"(StylesheetHandler) "+name+" not allowed inside a stylesheet!");
// break;
case Constants.ELEMNAME_STYLESHEET:
@@ -572,11 +572,11 @@
String aname = atts.getName(i);
if(aname.equals("result-ns"))
{
- throw new SAXException(XSLMessages.createMessage(XSLTErrorResources.ERROR0063, null)); //"result-ns no longer supported! Use xsl:output instead.");
+ throw new SAXException(XSLMessages.createMessage(XSLTErrorResources.ER_RESULTNS_NOT_SUPPORTED, null)); //"result-ns no longer supported! Use xsl:output instead.");
}
else if(aname.equals(Constants.ATTRNAME_DEFAULTSPACE))
{
- throw new SAXException(XSLMessages.createMessage(XSLTErrorResources.ERROR0064, null)); //"default-space no longer supported! Use xsl:strip-space or xsl:preserve-space instead.");
+ throw new SAXException(XSLMessages.createMessage(XSLTErrorResources.ER_DEFAULTSPACE_NOT_SUPPORTED, null)); //"default-space no longer supported! Use xsl:strip-space or xsl:preserve-space instead.");
}
else if(aname.equals(Constants.ATTRNAME_EXCLUDE_RESULT_PREFIXES))
{
@@ -607,7 +607,7 @@
}
else if(aname.equals("indent-result"))
{
- throw new SAXException(XSLMessages.createMessage(XSLTErrorResources.ERROR0065,null)); //"indent-result no longer supported! Use xsl:output instead.");
+ throw new SAXException(XSLMessages.createMessage(XSLTErrorResources.ER_INDENTRESULT_NOT_SUPPORTED,null)); //"indent-result no longer supported! Use xsl:output instead.");
}
else if(aname.equals("version"))
{
@@ -618,7 +618,7 @@
{
if(false == m_stylesheet.getTemplateList().getIsWrapperless())
{
- throw new SAXException(XSLMessages.createMessage(XSLTErrorResources.ERROR0066, new Object[]{name, aname})); //"(StylesheetHandler) "+name+" has an illegal attribute: "+aname);
+ throw new SAXException(XSLMessages.createMessage(XSLTErrorResources.ER_ILLEGAL_ATTRIB, new Object[]{name, aname})); //"(StylesheetHandler) "+name+" has an illegal attribute: "+aname);
}
}
@@ -642,7 +642,7 @@
break;
default:
- throw new SAXException(XSLMessages.createMessage(XSLTErrorResources.ERROR0067, new Object[]{localName})); //"Unknown XSL element: "+localName);
+ throw new SAXException(XSLMessages.createMessage(XSLTErrorResources.ER_UNKNOWN_XSL_ELEM, new Object[]{localName})); //"Unknown XSL element: "+localName);
}
}
else
@@ -691,7 +691,7 @@
}
catch(ClassCastException cce)
{
- throw new SAXException(XSLMessages.createMessage(XSLTErrorResources.ERROR0068, null)); //"(StylesheetHandler) "+"xsl:sort can only be used with xsl:apply-templates or xsl:for-each.");
+ throw new SAXException(XSLMessages.createMessage(XSLTErrorResources.ER_BAD_XSLSORT_USE, null)); //"(StylesheetHandler) "+"xsl:sort can only be used with xsl:apply-templates or xsl:for-each.");
}
break;
@@ -758,12 +758,12 @@
}
else
{
- throw new SAXException(XSLMessages.createMessage(XSLTErrorResources.ERROR0069, null)); //"(StylesheetHandler) "+"misplaced xsl:when!");
+ throw new SAXException(XSLMessages.createMessage(XSLTErrorResources.ER_MISPLACED_XSLWHEN, null)); //"(StylesheetHandler) "+"misplaced xsl:when!");
}
}
else
{
- throw new SAXException(XSLMessages.createMessage(XSLTErrorResources.ERROR0070, null)); //"(StylesheetHandler) "+"xsl:when not parented by xsl:choose!");
+ throw new SAXException(XSLMessages.createMessage(XSLTErrorResources.ER_XSLWHEN_NOT_PARENTED_BY_XSLCHOOSE, null)); //"(StylesheetHandler) "+"xsl:when not parented by xsl:choose!");
}
}
break;
@@ -783,12 +783,12 @@
}
else
{
- throw new SAXException(XSLMessages.createMessage(XSLTErrorResources.ERROR0071, null)); //"(StylesheetHandler) "+"misplaced xsl:otherwise!");
+ throw new SAXException(XSLMessages.createMessage(XSLTErrorResources.ER_MISPLACED_XSLOTHERWISE, null)); //"(StylesheetHandler) "+"misplaced xsl:otherwise!");
}
}
else
{
- throw new SAXException(XSLMessages.createMessage(XSLTErrorResources.ERROR0072, null)); //"(StylesheetHandler) "+"xsl:otherwise not parented by xsl:choose!");
+ throw new SAXException(XSLMessages.createMessage(XSLTErrorResources.ER_XSLOTHERWISE_NOT_PARENTED_BY_XSLCHOOSE, null)); //"(StylesheetHandler) "+"xsl:otherwise not parented by xsl:choose!");
}
}
break;
@@ -867,14 +867,14 @@
case Constants.ELEMNAME_INCLUDE:
case Constants.ELEMNAME_PRESERVESPACE:
case Constants.ELEMNAME_STRIPSPACE:
- throw new SAXException(XSLMessages.createMessage(XSLTErrorResources.ERROR0073, new Object[]{name})); //"(StylesheetHandler) "+name+" is not allowed inside a template!");
+ throw new SAXException(XSLMessages.createMessage(XSLTErrorResources.ER_NOT_ALLOWED_INSIDE_TEMPLATE, new Object[]{name})); //"(StylesheetHandler) "+name+" is not allowed inside a template!");
// break;
default:
// If this stylesheet is declared to be of a higher version than the one
// supported, don't flag an error.
if(XSLTEngineImpl.m_XSLTVerSupported >= m_stylesheet.m_XSLTVerDeclared)
{
- throw new SAXException(XSLMessages.createMessage(XSLTErrorResources.ERROR0067, new Object[]{localName})); //"Unknown XSL element: "+localName);
+ throw new SAXException(XSLMessages.createMessage(XSLTErrorResources.ER_UNKNOWN_XSL_ELEM, new Object[]{localName})); //"Unknown XSL element: "+localName);
}
}
}
@@ -907,12 +907,12 @@
}
else if(!isAttrOK(aname, atts, i))
{
- m_stylesheet.error(XSLTErrorResources.ERROR0002, new Object[] {name, aname}); //name+" has an illegal attribute: "+aname);
+ m_stylesheet.error(XSLTErrorResources.ER_ILLEGAL_ATTRIBUTE, new Object[] {name, aname}); //name+" has an illegal attribute: "+aname);
}
}
if (prefix == null)
{
- throw new SAXException (XSLMessages.createMessage(XSLTErrorResources.ERROR0074, new Object[]{name})); //"(StylesheetHandler) " + name +
+ throw new SAXException (XSLMessages.createMessage(XSLTErrorResources.ER_MISSING_PREFIX_ATTRIB, new Object[]{name})); //"(StylesheetHandler) " + name +
//" attribute 'prefix' is missing");
}
// SCOTT: is the line below correct?
@@ -925,7 +925,7 @@
if (nsh == null)
{
if (elements != null)
- throw new SAXException (XSLMessages.createMessage(XSLTErrorResources.ERROR0075, new Object[]{name, prefix})); //"(StylesheetHandler) " + name +
+ throw new SAXException (XSLMessages.createMessage(XSLTErrorResources.ER_UNKNOWN_EXT_NS_PREFIX, new Object[]{name, prefix})); //"(StylesheetHandler) " + name +
if (null == extns)
extns = "";
@@ -967,7 +967,7 @@
}
else if(!isAttrOK(aname, atts, i))
{
- m_stylesheet.error(XSLTErrorResources.ERROR0002, new Object[] {name, aname}); //name+" has an illegal attribute: "+aname);
+ m_stylesheet.error(XSLTErrorResources.ER_ILLEGAL_ATTRIBUTE, new Object[] {name, aname}); //name+" has an illegal attribute: "+aname);
}
}
}
@@ -1162,7 +1162,7 @@
if(m_foundNotImport)
{
- throw new SAXException(XSLMessages.createMessage(XSLTErrorResources.ERROR0076, null)); //"(StylesheetHandler) "+"Imports can only occur as the first elements in the stylesheet!");
+ throw new SAXException(XSLMessages.createMessage(XSLTErrorResources.ER_IMPORTS_AS_FIRST_ELEM, null)); //"(StylesheetHandler) "+"Imports can only occur as the first elements in the stylesheet!");
}
String saved_XSLNameSpaceURL = m_stylesheet.m_XSLNameSpaceURL;
@@ -1171,7 +1171,7 @@
URL hrefUrl = m_processor.getURLFromString(href, m_stylesheet.m_baseIdent);
if(stackContains(m_stylesheet.m_stylesheetRoot.m_importStack, hrefUrl))
{
- throw new SAXException(XSLMessages.createMessage(XSLTErrorResources.ERROR0077, new Object[] {hrefUrl})); //"(StylesheetHandler) "+hrefUrl+" is directly or indirectly importing itself!");
+ throw new SAXException(XSLMessages.createMessage(XSLTErrorResources.ER_IMPORTING_ITSELF, new Object[] {hrefUrl})); //"(StylesheetHandler) "+hrefUrl+" is directly or indirectly importing itself!");
}
m_stylesheet.m_stylesheetRoot.m_importStack.push(hrefUrl);
@@ -1199,15 +1199,15 @@
}
catch(MalformedURLException mue)
{
- throw new SAXException(XSLMessages.createMessage(XSLTErrorResources.ERROR0078, new Object[] {atts.getValue(i)}), mue); //"Stylesheet URL is bad: "+atts.getValue(i), mue);
+ throw new SAXException(XSLMessages.createMessage(XSLTErrorResources.ER_BAD_STYLESHEET_URL, new Object[] {atts.getValue(i)}), mue); //"Stylesheet URL is bad: "+atts.getValue(i), mue);
}
catch(FileNotFoundException fnfe)
{
- throw new SAXException(XSLMessages.createMessage(XSLTErrorResources.ERROR0079, new Object[] {atts.getValue(i)}), fnfe); //"Stylesheet file was not found: "+atts.getValue(i), fnfe);
+ throw new SAXException(XSLMessages.createMessage(XSLTErrorResources.ER_FILE_NOT_FOUND, new Object[] {atts.getValue(i)}), fnfe); //"Stylesheet file was not found: "+atts.getValue(i), fnfe);
}
catch(IOException ioe)
{
- throw new SAXException(XSLMessages.createMessage(XSLTErrorResources.ERROR0080, new Object[] {atts.getValue(i)}), ioe); //"Had IO Exception with stylesheet file: "+atts.getValue(i), ioe);
+ throw new SAXException(XSLMessages.createMessage(XSLTErrorResources.ER_IOEXCEPTION, new Object[] {atts.getValue(i)}), ioe); //"Had IO Exception with stylesheet file: "+atts.getValue(i), ioe);
}
m_stylesheet.m_stylesheetRoot.m_importStack.pop();
@@ -1216,12 +1216,12 @@
}
else if(!isAttrOK(aname, atts, i))
{
- m_stylesheet.error(XSLTErrorResources.ERROR0002, new Object[] {name, aname}); //name+" has an illegal attribute: "+aname);
+ m_stylesheet.error(XSLTErrorResources.ER_ILLEGAL_ATTRIBUTE, new Object[] {name, aname}); //name+" has an illegal attribute: "+aname);
}
}
if(!foundIt)
{
- throw new SAXException(XSLMessages.createMessage(XSLTErrorResources.ERROR0081, new Object[] {name})); //"(StylesheetHandler) "+"Could not find href attribute for "+name);
+ throw new SAXException(XSLMessages.createMessage(XSLTErrorResources.ER_NO_HREF_ATTRIB, new Object[] {name})); //"(StylesheetHandler) "+"Could not find href attribute for "+name);
}
}
@@ -1281,7 +1281,7 @@
if(stackContains(m_stylesheet.m_includeStack, hrefUrl))
{
- throw new SAXException(XSLMessages.createMessage(XSLTErrorResources.ERROR0077, new Object[] {hrefUrl})); //"(StylesheetHandler) "+hrefUrl+" is directly or indirectly including itself!");
+ throw new SAXException(XSLMessages.createMessage(XSLTErrorResources.ER_IMPORTING_ITSELF, new Object[] {hrefUrl})); //"(StylesheetHandler) "+hrefUrl+" is directly or indirectly including itself!");
}
m_stylesheet.m_includeStack.push(hrefUrl);
@@ -1294,7 +1294,7 @@
}
catch(IOException ioe)
{
- throw new SAXException(XSLMessages.createMessage(XSLTErrorResources.ERROR0082, null), ioe);//"StylesheetHandler.processInclude error", ioe);
+ throw new SAXException(XSLMessages.createMessage(XSLTErrorResources.ER_PROCESSINCLUDE_ERROR, null), ioe);//"StylesheetHandler.processInclude error", ioe);
}
m_stylesheet.m_includeStack.pop();
@@ -1309,12 +1309,12 @@
}
else if(!isAttrOK(aname, atts, i))
{
- m_stylesheet.error(XSLTErrorResources.ERROR0002, new Object[] {name, aname}); //name+" has an illegal attribute: "+aname);
+ m_stylesheet.error(XSLTErrorResources.ER_ILLEGAL_ATTRIBUTE, new Object[] {name, aname}); //name+" has an illegal attribute: "+aname);
}
}
if(!foundIt)
{
- throw new SAXException(XSLMessages.createMessage(XSLTErrorResources.ERROR0081, new Object[] {name})); //"(StylesheetHandler) "+"Could not find href attribute for "+name);
+ throw new SAXException(XSLMessages.createMessage(XSLTErrorResources.ER_NO_HREF_ATTRIB, new Object[] {name})); //"(StylesheetHandler) "+"Could not find href attribute for "+name);
}
}
@@ -1363,11 +1363,11 @@
{
if (m_LXSLTScriptLang == null)
{
- throw new SAXException(XSLMessages.createMessage(XSLTErrorResources.ERROR0083, new Object[] {name})); //"(StylesheetHandler) " + name +
+ throw new SAXException(XSLMessages.createMessage(XSLTErrorResources.ER_MISSING_LANG_ATTRIB, new Object[] {name})); //"(StylesheetHandler) " + name +
}
if (m_LXSLTExtensionNSH == null)
{
- throw new SAXException(XSLMessages.createMessage(XSLTErrorResources.ERROR0084, new Object[] {name})); //"(StylesheetHandler) misplaced " + name +
+ throw new SAXException(XSLMessages.createMessage(XSLTErrorResources.ER_MISSING_CONTAINER_ELEMENT_COMPONENT, new Object[] {name})); //"(StylesheetHandler) misplaced " + name +
// " element?? Missing container element " +
// "'component'");
}
1.16 +4 -4 xml-xalan/src/org/apache/xalan/xslt/StylesheetRoot.java
Index: StylesheetRoot.java
===================================================================
RCS file: /home/cvs/xml-xalan/src/org/apache/xalan/xslt/StylesheetRoot.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- StylesheetRoot.java 1999/12/16 06:10:45 1.15
+++ StylesheetRoot.java 2000/01/05 23:05:32 1.16
@@ -362,7 +362,7 @@
(Element)outputTarget.getNode());
break;
default:
- error(XSLTErrorResources.ERROR0043); //"Can only output to an Element, DocumentFragment, Document, or PrintWriter.");
+ error(XSLTErrorResources.ER_CAN_ONLY_OUTPUT_TO_ELEMENT); //"Can only output to an Element, DocumentFragment, Document, or PrintWriter.");
}
}
else
@@ -388,7 +388,7 @@
}
catch(Exception e)
{
- throw new SAXException(XSLMessages.createMessage(XSLTErrorResources.ERROR0044, null), e); //"StylesheetRoot.process error", e);
+ throw new SAXException(XSLMessages.createMessage(XSLTErrorResources.ER_PROCESS_ERROR, null), e); //"StylesheetRoot.process error", e);
}
processor.m_resultTreeHandler.startDocument();
@@ -769,8 +769,8 @@
}
else
{
- throw new SAXException(XSLMessages.createMessage(XSLTErrorResources.ERROR0002, new Object[] {name,aname})); //"(StylesheetHandler) "+"xsl:sort can only be used with xsl:apply-templates or xsl:for-each.");
- // XSLTEngineImpl.error(XSLTErrorResources.ERROR0002, new Object[] {name,aname}); //name+" has an illegal attribute: "+aname);
+ throw new SAXException(XSLMessages.createMessage(XSLTErrorResources.ER_ILLEGAL_ATTRIBUTE, new Object[] {name,aname})); //"(StylesheetHandler) "+"xsl:sort can only be used with xsl:apply-templates or xsl:for-each.");
+ // XSLTEngineImpl.error(XSLTErrorResources.ER_ILLEGAL_ATTRIBUTE, new Object[] {name,aname}); //name+" has an illegal attribute: "+aname);
}
}
if((null != m_outputmethod) && (m_outputmethod.equals("html")) &&
1.2 +1 -1 xml-xalan/src/org/apache/xalan/xslt/TemplateList.java
Index: TemplateList.java
===================================================================
RCS file: /home/cvs/xml-xalan/src/org/apache/xalan/xslt/TemplateList.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- TemplateList.java 1999/12/16 11:19:19 1.1
+++ TemplateList.java 2000/01/05 23:05:32 1.2
@@ -396,7 +396,7 @@
{
//conflictsString += " ";
//conflictsString += "Last found in stylesheet will be used.";
- transformContext.warn(XSLTErrorResources.WARNING0012, new Object[] {conflictsString});
+ transformContext.warn(XSLTErrorResources.WG_SPECIFICITY_CONFLICTS, new Object[] {conflictsString});
}
}
1.4 +29 -29 xml-xalan/src/org/apache/xalan/xslt/UnImplNode.java
Index: UnImplNode.java
===================================================================
RCS file: /home/cvs/xml-xalan/src/org/apache/xalan/xslt/UnImplNode.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- UnImplNode.java 1999/12/14 23:42:44 1.3
+++ UnImplNode.java 2000/01/05 23:05:32 1.4
@@ -90,104 +90,104 @@
public Node appendChild(Node newChild)
throws DOMException
{
- error(XSLTErrorResources.ERROR0088); //"appendChild not supported!");
+ error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"appendChild not supported!");
return null;
}
/** Unimplemented. */
public boolean hasChildNodes()
{
- error(XSLTErrorResources.ERROR0088); //"hasChildNodes not supported!");
+ error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"hasChildNodes not supported!");
return false;
}
/** Unimplemented. */
public short getNodeType()
{
- error(XSLTErrorResources.ERROR0088); //"getNodeType not supported!");
+ error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"getNodeType not supported!");
return 0;
}
/** Unimplemented. */
public Node getParentNode()
{
- error(XSLTErrorResources.ERROR0088); //"getParentNode not supported!");
+ error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"getParentNode not supported!");
return null;
}
/** Unimplemented. */
public NodeList getChildNodes()
{
- error(XSLTErrorResources.ERROR0088); //"getChildNodes not supported!");
+ error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"getChildNodes not supported!");
return null;
}
/** Unimplemented. */
public Node getFirstChild()
{
- error(XSLTErrorResources.ERROR0088); //"getFirstChild not supported!");
+ error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"getFirstChild not supported!");
return null;
}
/** Unimplemented. */
public Node getLastChild()
{
- error(XSLTErrorResources.ERROR0088); //"getLastChild not supported!");
+ error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"getLastChild not supported!");
return null;
}
/** Unimplemented. */
public Node getNextSibling()
{
- error(XSLTErrorResources.ERROR0088); //"getNextSibling not supported!");
+ error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"getNextSibling not supported!");
return null;
}
/** Unimplemented. */
public int getLength()
{
- error(XSLTErrorResources.ERROR0088); //"getLength not supported!");
+ error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"getLength not supported!");
return 0;
} // getLength():int
/** Unimplemented. */
public Node item(int index)
{
- error(XSLTErrorResources.ERROR0088); //"item not supported!");
+ error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"item not supported!");
return null;
} // item(int):Node
/** Unimplemented. */
public Document getOwnerDocument()
{
- error(XSLTErrorResources.ERROR0088); //"getOwnerDocument not supported!");
+ error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"getOwnerDocument not supported!");
return null;
}
/** Unimplemented. */
public String getTagName()
{
- error(XSLTErrorResources.ERROR0088); //"getTagName not supported!");
+ error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"getTagName not supported!");
return null;
}
/** Unimplemented. */
public String getNodeName()
{
- error(XSLTErrorResources.ERROR0088); //"getNodeName not supported!");
+ error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"getNodeName not supported!");
return null;
}
/** Unimplemented. */
public void normalize()
{
- error(XSLTErrorResources.ERROR0088); //"normalize not supported!");
+ error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"normalize not supported!");
}
/** Unimplemented. */
public NodeList getElementsByTagName(String name)
{
- error(XSLTErrorResources.ERROR0088); //"getElementsByTagName not supported!");
+ error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"getElementsByTagName not supported!");
return null;
}
@@ -195,7 +195,7 @@
public Attr removeAttributeNode(Attr oldAttr)
throws DOMException
{
- error(XSLTErrorResources.ERROR0088); //"removeAttributeNode not supported!");
+ error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"removeAttributeNode not supported!");
return null;
}
@@ -203,13 +203,13 @@
public Attr setAttributeNode(Attr newAttr)
throws DOMException
{
- error(XSLTErrorResources.ERROR0088); //"setAttributeNode not supported!");
+ error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"setAttributeNode not supported!");
return null;
}
public Attr getAttributeNode(String name)
{
- error(XSLTErrorResources.ERROR0088); //"getAttributeNode not supported!");
+ error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"getAttributeNode not supported!");
return null;
}
@@ -217,7 +217,7 @@
public void removeAttribute(String name)
throws DOMException
{
- error(XSLTErrorResources.ERROR0088); //"removeAttribute not supported!");
+ error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"removeAttribute not supported!");
}
/** Unimplemented. */
@@ -225,27 +225,27 @@
String value)
throws DOMException
{
- error(XSLTErrorResources.ERROR0088); //"setAttribute not supported!");
+ error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"setAttribute not supported!");
}
/** Unimplemented. */
public String getAttribute(String name)
{
- error(XSLTErrorResources.ERROR0088); //"getAttribute not supported!");
+ error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"getAttribute not supported!");
return null;
}
/** Unimplemented. */
public Node getPreviousSibling()
{
- error(XSLTErrorResources.ERROR0088); //"getPreviousSibling not supported!");
+ error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"getPreviousSibling not supported!");
return null;
}
/** Unimplemented. */
public Node cloneNode(boolean deep)
{
- error(XSLTErrorResources.ERROR0088); //"cloneNode not supported!");
+ error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"cloneNode not supported!");
return null;
}
@@ -253,7 +253,7 @@
public String getNodeValue()
throws DOMException
{
- error(XSLTErrorResources.ERROR0088); //"getNodeValue not supported!");
+ error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"getNodeValue not supported!");
return null;
}
@@ -261,13 +261,13 @@
public void setNodeValue(String nodeValue)
throws DOMException
{
- error(XSLTErrorResources.ERROR0088); //"setNodeValue not supported!");
+ error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"setNodeValue not supported!");
}
/** Unimplemented. */
public NamedNodeMap getAttributes()
{
- error(XSLTErrorResources.ERROR0088); //"getAttributes not supported!");
+ error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"getAttributes not supported!");
return null;
}
@@ -276,7 +276,7 @@
Node refChild)
throws DOMException
{
- error(XSLTErrorResources.ERROR0088); //"insertBefore not supported!");
+ error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"insertBefore not supported!");
return null;
}
@@ -285,7 +285,7 @@
Node oldChild)
throws DOMException
{
- error(XSLTErrorResources.ERROR0088); //"replaceChild not supported!");
+ error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"replaceChild not supported!");
return null;
}
@@ -293,7 +293,7 @@
public Node removeChild(Node oldChild)
throws DOMException
{
- error(XSLTErrorResources.ERROR0088); //"replaceChild not supported!");
+ error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"replaceChild not supported!");
return null;
}
1.3 +4 -4 xml-xalan/src/org/apache/xalan/xslt/XSLProcessorException.java
Index: XSLProcessorException.java
===================================================================
RCS file: /home/cvs/xml-xalan/src/org/apache/xalan/xslt/XSLProcessorException.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- XSLProcessorException.java 1999/11/25 04:22:07 1.2
+++ XSLProcessorException.java 2000/01/05 23:05:32 1.3
@@ -73,19 +73,19 @@
public XSLProcessorException(String message)
{
- super((null == message) ? XSLMessages.createMessage(XSLTErrorResources.ERROR0089, null) : message);
+ super((null == message) ? XSLMessages.createMessage(XSLTErrorResources.ER_XSLT_ERROR, null) : message);
m_exception = null;
}
public XSLProcessorException (String message, Exception e)
{
- super((null == message) ? XSLMessages.createMessage(XSLTErrorResources.ERROR0089, null) : message);
+ super((null == message) ? XSLMessages.createMessage(XSLTErrorResources.ER_XSLT_ERROR, null) : message);
this.m_exception = e;
}
public XSLProcessorException (Exception e)
{
- super((null == e.getMessage()) ? XSLMessages.createMessage(XSLTErrorResources.ERROR0089, null) : e.getMessage());
+ super((null == e.getMessage()) ? XSLMessages.createMessage(XSLTErrorResources.ER_XSLT_ERROR, null) : e.getMessage());
this.m_exception = e;
}
@@ -114,7 +114,7 @@
public String getMessage()
{
- return (null == super.getMessage()) ? XSLMessages.createMessage(XSLTErrorResources.ERROR0089, null) : super.getMessage();
+ return (null == super.getMessage()) ? XSLMessages.createMessage(XSLTErrorResources.ER_XSLT_ERROR, null) : super.getMessage();
}
public void printStackTrace(java.io.PrintWriter s)
1.27 +50 -19 xml-xalan/src/org/apache/xalan/xslt/XSLTEngineImpl.java
Index: XSLTEngineImpl.java
===================================================================
RCS file: /home/cvs/xml-xalan/src/org/apache/xalan/xslt/XSLTEngineImpl.java,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- XSLTEngineImpl.java 1999/12/16 15:00:36 1.26
+++ XSLTEngineImpl.java 2000/01/05 23:05:33 1.27
@@ -468,7 +468,7 @@
throws org.xml.sax.SAXException, IOException
{
// System.out.println("Writing XSLTEngineImpl");
- error(XSLTErrorResources.ERROR0047); //,"Can not serialize an XSLTEngineImpl!");
+ error(XSLTErrorResources.ER_CANNOT_SERIALIZE_XSLPROCESSOR); //,"Can not serialize an XSLTEngineImpl!");
}
//==========================================================
@@ -568,12 +568,12 @@
}
else
{
- error(XSLTErrorResources.ERROR0048); //"Stylesheet input was not specified!");
+ error(XSLTErrorResources.ER_NO_INPUT_STYLESHEET); //"Stylesheet input was not specified!");
}
if(null == m_stylesheetRoot)
{
- error(XSLTErrorResources.ERROR0049); //"Failed to process stylesheet!");
+ error(XSLTErrorResources.ER_FAILED_PROCESS_STYLESHEET); //"Failed to process stylesheet!");
}
if(null != sourceTree)
@@ -603,7 +603,7 @@
}
catch(SAXException se)
{
- error(XSLTErrorResources.ERROR0087, se); //"SAX Exception", se);
+ error(XSLTErrorResources.ER_SAX_EXCEPTION, se); //"SAX Exception", se);
// throw se;
}
}
@@ -670,7 +670,7 @@
}
catch(Exception e)
{
- error(XSLTErrorResources.ERROR0050, new Object[] {xslIdentifier}, e); //"Could not parse "+xslIdentifier+" document!", e);
+ error(XSLTErrorResources.ER_COULDNT_PARSE_DOC, new Object[] {xslIdentifier}, e); //"Could not parse "+xslIdentifier+" document!", e);
}
return m_stylesheetRoot;
}
@@ -695,7 +695,7 @@
}
catch(SAXException se)
{
- error(XSLTErrorResources.ERROR0086, se); //"processStylesheet not succesfull!", se);
+ error(XSLTErrorResources.ER_PROCESSSTYLESHEET_NOT_SUCCESSFUL, se); //"processStylesheet not succesfull!", se);
return null; // shut up compiler
}
}
@@ -796,7 +796,7 @@
e = ((SAXException)e).getException();
}
sourceTree = null; // shutup compiler
- error(XSLTErrorResources.ERROR0050, new Object[] {xmlIdentifier}, e); //"Could not parse "+xmlIdentifier+" document!", e);
+ error(XSLTErrorResources.ER_COULDNT_PARSE_DOC, new Object[] {xmlIdentifier}, e); //"Could not parse "+xmlIdentifier+" document!", e);
}
}
@@ -921,7 +921,7 @@
}
if(nl.getLength() == 0)
{
- error(XSLTErrorResources.ERROR0051, new Object[] {fragID}); //"Could not find fragment: "+fragID);
+ error(XSLTErrorResources.ER_COULDNT_FIND_FRAGMENT, new Object[] {fragID}); //"Could not find fragment: "+fragID);
}
Node frag = nl.item(0);
@@ -949,14 +949,14 @@
else
{
stylesheetDoc = null;
- error(XSLTErrorResources.ERROR0052, new Object[] {fragID}); //"Node pointed to by fragment identifier was not an element: "+fragID);
+ error(XSLTErrorResources.ER_NODE_NOT_ELEMENT, new Object[] {fragID}); //"Node pointed to by fragment identifier was not an element: "+fragID);
}
}
else
{
// hmmm.. for now I'll rely on the XML parser to handle
// fragment URLs.
- diag(XSLMessages.createMessage(XSLTErrorResources.WARNING0013, new Object[] {xslURLString})); //"========= Parsing and preparing "+xslURLString+" ==========");
+ diag(XSLMessages.createMessage(XSLTErrorResources.WG_PARSING_AND_PREPARING, new Object[] {xslURLString})); //"========= Parsing and preparing "+xslURLString+" ==========");
pushTime(xslURLString);
if(isRoot)
@@ -1340,6 +1340,37 @@
throw new XSLProcessorException(formattedMsg);
}
}
+
+ /**
+ * Tell the user of an error, and probably throw an
+ * exception.
+ * @exception XSLProcessorException thrown if the active ProblemListener and XMLParserLiaison decide
+ * the error condition is severe enough to halt processing.
+ */
+ public void error(String msg)
+ throws SAXException
+ {
+ Locator locator = m_stylesheetLocatorStack.isEmpty()
+ ? null :
+ ((Locator)m_stylesheetLocatorStack.peek());
+ String id = (null == locator)
+ ? null
+ : (null == locator.getSystemId())
+ ? locator.getPublicId()
+ : locator.getSystemId();
+
+ boolean shouldThrow = getProblemListener().problem(ProblemListener.XSLPROCESSOR,
+ ProblemListener.ERROR,
+ null, null, msg,
+ id,
+ (null == locator) ? 0: locator.getLineNumber(),
+ (null == locator) ? 0: locator.getColumnNumber());
+
+ if(shouldThrow)
+ {
+ throw new XSLProcessorException("");
+ }
+ }
/**
* Tell the user of an error, and probably throw an
@@ -1386,7 +1417,7 @@
public void error(int msg, Object args[], Exception e)
throws SAXException
{
- //msg = (null == msg) ? XSLTErrorResources.ERROR0061 : msg;
+ //msg = (null == msg) ? XSLTErrorResources.ER_PROCESSOR_ERROR : msg;
String formattedMsg = m_XSLMessages.createMessage(msg, args);
Locator locator = m_stylesheetLocatorStack.isEmpty()
? null :
@@ -1647,13 +1678,13 @@
}
else
{
- error(XSLTErrorResources.ERROR0053); //"for-each must have either a match or name attribute");
+ error(XSLTErrorResources.ER_FOREACH_NEED_MATCH_OR_NAME_ATTRIB); //"for-each must have either a match or name attribute");
msg = null;
}
}
else
{
- error(XSLTErrorResources.ERROR0054); //"templates must have either a match or name attribute");
+ error(XSLTErrorResources.ER_TEMPLATES_NEED_MATCH_OR_NAME_ATTRIB); //"templates must have either a match or name attribute");
msg = null;
}
}
@@ -1815,7 +1846,7 @@
break;
case Node.DOCUMENT_FRAGMENT_NODE:
{
- error(null, node, XSLTErrorResources.ERROR0055); //"No clone of a document fragment!");
+ error(null, node, XSLTErrorResources.ER_NO_CLONE_OF_DOCUMENT_FRAG); //"No clone of a document fragment!");
}
break;
case Node.ENTITY_REFERENCE_NODE:
@@ -1831,7 +1862,7 @@
}
break;
default:
- error(XSLTErrorResources.ERROR0056, new Object[] {node.getNodeName()}); //"Can not create item in result tree: "+node.getNodeName());
+ error(XSLTErrorResources.ER_CANT_CREATE_ITEM, new Object[] {node.getNodeName()}); //"Can not create item in result tree: "+node.getNodeName());
}
} // end cloneToResultTree function
@@ -2517,7 +2548,7 @@
}
else
{
- error(XSLTErrorResources.ERROR0057, new Object[] {xmlSpaceVal}); //"xml:space in the source XML has an illegal value: "+xmlSpaceVal);
+ error(XSLTErrorResources.ER_XMLSPACE_ILLEGAL_VALUE, new Object[] {xmlSpaceVal}); //"xml:space in the source XML has an illegal value: "+xmlSpaceVal);
}
break;
}
@@ -2561,7 +2592,7 @@
}
else
{
- warn(XSLTErrorResources.WARNING0015); //"Match conflict between xsl:strip-space and xsl:preserve-space");
+ warn(XSLTErrorResources.WG_CONFLICT_BETWEEN_XSLSTRIPSPACE_AND_XSLPRESERVESPACE); //"Match conflict between xsl:strip-space and xsl:preserve-space");
}
break;
}
@@ -2919,7 +2950,7 @@
// Should this call the root or the current stylesheet?
NodeList nl = m_stylesheetRoot.getNodeSetByKey(this, doc, name, ref, nscontext);
if(null == nl)
- error(XSLTErrorResources.ERROR0058, new Object[] {name}); //"There is no xsl:key declaration for '"+name+"'!");
+ error(XSLTErrorResources.ER_NO_XSLKEY_DECLARATION, new Object[] {name}); //"There is no xsl:key declaration for '"+name+"'!");
return nl;
}
@@ -3214,7 +3245,7 @@
}
catch (MalformedURLException e2)
{
- diag(XSLMessages.createMessage(XSLTErrorResources.ERROR0059, new Object[] {urlString})); //"Error! Cannot create url for: " + urlString);
+ diag(XSLMessages.createMessage(XSLTErrorResources.ER_CANT_CREATE_URL, new Object[] {urlString})); //"Error! Cannot create url for: " + urlString);
throw e2;
}
}
1.8 +1 -1 xml-xalan/src/org/apache/xalan/xslt/client/XSLTProcessorApplet.java
Index: XSLTProcessorApplet.java
===================================================================
RCS file: /home/cvs/xml-xalan/src/org/apache/xalan/xslt/client/XSLTProcessorApplet.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- XSLTProcessorApplet.java 1999/12/15 17:22:21 1.7
+++ XSLTProcessorApplet.java 2000/01/05 23:05:37 1.8
@@ -260,7 +260,7 @@
catch(Exception e)
{
e.printStackTrace();
- //System.err.println(XSLMessages.createMessage(XSLTErrorResources.ERROR0025, new Object[] {parserLiaisonClassName})); //"Could not create XML Processor Liaison: "+parserLiaisonClassName);
+ //System.err.println(XSLMessages.createMessage(XSLTErrorResources.ER_COULD_NOT_CREATE_XML_PROC_LIAISON, new Object[] {parserLiaisonClassName})); //"Could not create XML Processor Liaison: "+parserLiaisonClassName);
return;
}
try
1.5 +1 -1 xml-xalan/src/org/apache/xalan/xslt/extensions/Redirect.java
Index: Redirect.java
===================================================================
RCS file: /home/cvs/xml-xalan/src/org/apache/xalan/xslt/extensions/Redirect.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- Redirect.java 1999/12/16 09:06:06 1.4
+++ Redirect.java 2000/01/05 23:05:37 1.5
@@ -263,7 +263,7 @@
}
if(null == fileName)
{
- context.processor.error(elem, context.sourceNode, XSLTErrorResources.ERROR0093);
+ context.processor.error(elem, context.sourceNode, XSLTErrorResources.ER_REDIRECT_COULDNT_GET_FILENAME);
//"Redirect extension: Could not get filename - file or select attribute must return vald string.");
}
return fileName;
1.9 +790 -322 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.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- XSLTErrorResources.java 1999/12/16 21:57:19 1.8
+++ XSLTErrorResources.java 2000/01/05 23:05:38 1.9
@@ -3,16 +3,770 @@
import java.text.DecimalFormat;
import org.apache.xalan.xslt.Constants;
import org.apache.xalan.xpath.xml.XSLResourceBundle;
-//
-// LangResources_en.properties
-//
+
+/**
+ * Set up error messages.
+ * We build a two dimensional array of message keys and
+ * message strings. In order to add a new message here,
+ * you need to first update the count of messages(MAX_CODE)or
+ * the count of warnings(MAX_WARNING). The array will be
+ * automatically filled in with the keys, but you need to
+ * fill in the actual message string. Follow the instructions
+ * below.
+ */
public class XSLTErrorResources extends XSLResourceBundle
-{
-public Object[][] getContents()
+{
+
+public static final String ERROR_SUFFIX = "ER";
+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_OTHERS = 41;
+public static final int MAX_MESSAGES = MAX_CODE + MAX_WARNING +1;
+
+static final Object[][] contents = new Object[MAX_MESSAGES + MAX_OTHERS +1][2];
+
+/*
+ * Now fill in the message keys.
+ * This does not need to be updated. If MAX_CODE and MAX_WARNING
+ * are correct, the keys will get filled in automatically with
+ * the value ERxxxx (WRxxxx for warnings) where xxxx is a
+ * formatted number corresponding to the error code (i.e. ER0001).
+ */
+static
{
- return contents;
+ for(int i = 0; i < MAX_CODE+1; i++)
+ {
+ contents[i][0] = getMKey(i);
+ }
+ for(int i = 1; i < MAX_WARNING+1; i++)
+ {
+ contents[i+ MAX_CODE][0] = getWKey(i);
+ }
+}
+
+/*
+ * Now fill in the message text.
+ * First create an int for the message code. Make sure you
+ * update MAX_CODE for error messages and MAX_WARNING for warnings
+ * Then fill in the message text for that message code in the
+ * array. Use the new error code as the index into the array.
+ */
+
+// Error messages...
+
+public static final int ERROR0000 = 0;
+static {contents[ERROR0000][1]
+ = "{0}";
+}
+
+public static final int ER_NO_CURLYBRACE = 1;
+static {contents[ER_NO_CURLYBRACE][1]
+ = "Error: Can not have '{' within expression";
+}
+
+public static final int ER_ILLEGAL_ATTRIBUTE = 2;
+static {contents[ER_ILLEGAL_ATTRIBUTE][1]
+ = "{0} has an illegal attribute: {1}";
+}
+
+public static final int ER_NULL_SOURCENODE_APPLYIMPORTS = 3;
+static {contents[ER_NULL_SOURCENODE_APPLYIMPORTS][1]
+ = "sourceNode is null in xsl:apply-imports!";
+}
+
+public static final int ER_CANNOT_ADD = 4;
+static {contents[ER_CANNOT_ADD][1]
+ = "Can not add {0} to {1}";
+}
+
+public static final int ER_NULL_SOURCENODE_HANDLEAPPLYTEMPLATES = 5;
+static {contents[ER_NULL_SOURCENODE_HANDLEAPPLYTEMPLATES][1]
+ = "sourceNode is null in handleApplyTemplatesInstruction!";
+}
+
+public static final int ER_NO_NAME_ATTRIB = 6;
+static {contents[ER_NO_NAME_ATTRIB][1]
+ = "{0} must have a name attribute.";
+}
+
+public static final int ER_TEMPLATE_NOT_FOUND = 7;
+static {contents[ER_TEMPLATE_NOT_FOUND][1]
+ = "Could not find template named: {0}";
+}
+
+public static final int ER_CANT_RESOLVE_NAME_AVT = 8;
+static {contents[ER_CANT_RESOLVE_NAME_AVT][1]
+ = "Could not resolve name AVT in xsl:call-template.";
+}
+
+public static final int ER_REQUIRES_ATTRIB = 9;
+static {contents[ER_REQUIRES_ATTRIB][1]
+ = "{0} requires attribute: {1}";
+}
+
+public static final int ER_MUST_HAVE_TEST_ATTRIB = 10;
+static {contents[ER_MUST_HAVE_TEST_ATTRIB][1]
+ = "{0} must have a 'test' attribute.";
+}
+
+public static final int ER_BAD_VAL_ON_LEVEL_ATTRIB = 11;
+static {contents[ER_BAD_VAL_ON_LEVEL_ATTRIB][1]
+ = "Bad value on level attribute: {0}";
+}
+
+public static final int ER_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML = 12;
+static {contents[ER_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML][1]
+ = "processing-instruction name can not be 'xml'";
+}
+
+public static final int ER_PROCESSINGINSTRUCTION_NOTVALID_NCNAME = 13;
+static {contents[ER_PROCESSINGINSTRUCTION_NOTVALID_NCNAME][1]
+ = "processing-instruction name must be a valid NCName: {0}";
+}
+
+public static final int ER_NEED_MATCH_ATTRIB = 14;
+static {contents[ER_NEED_MATCH_ATTRIB][1]
+ = "{0} must have a match attribute if it has a mode.";
+}
+
+public static final int ER_NEED_NAME_OR_MATCH_ATTRIB = 15;
+static {contents[ER_NEED_NAME_OR_MATCH_ATTRIB][1]
+ = "{0} requires either a name or a match attribute.";
+}
+
+public static final int ER_CANT_RESOLVE_NSPREFIX = 16;
+static {contents[ER_CANT_RESOLVE_NSPREFIX][1]
+ = "Can not resolve namespace prefix: {0}";
+}
+
+public static final int ER_ILLEGAL_VALUE = 17;
+static {contents[ER_ILLEGAL_VALUE][1]
+ = "xml:space has an illegal value: {0}";
+}
+
+public static final int ER_NO_OWNERDOC = 18;
+static {contents[ER_NO_OWNERDOC][1]
+ = "Child node does not have an owner document!";
+}
+
+public static final int ER_ELEMTEMPLATEELEM_ERR = 19;
+static {contents[ER_ELEMTEMPLATEELEM_ERR][1]
+ = "ElemTemplateElement error: {0}";
+}
+
+public static final int ER_NULL_CHILD = 20;
+static {contents[ER_NULL_CHILD][1]
+ = "Trying to add a null child!";
+}
+
+public static final int ER_NEED_SELECT_ATTRIB = 21;
+static {contents[ER_NEED_SELECT_ATTRIB][1]
+ = "{0} requires a select attribute.";
+}
+
+public static final int ER_NEED_TEST_ATTRIB = 22;
+static {contents[ER_NEED_TEST_ATTRIB][1]
+ = "xsl:when must have a 'test' attribute.";
+}
+
+public static final int ER_NEED_NAME_ATTRIB = 23;
+static {contents[ER_NEED_NAME_ATTRIB][1]
+ = "xsl:with-param must have a 'name' attribute.";
+}
+
+public static final int ER_NO_CONTEXT_OWNERDOC = 24;
+static {contents[ER_NO_CONTEXT_OWNERDOC][1]
+ = "context does not have an owner document!";
+}
+
+public static final int ER_COULD_NOT_CREATE_XML_PROC_LIAISON = 25;
+static {contents[ER_COULD_NOT_CREATE_XML_PROC_LIAISON][1]
+ = "Could not create XML Processor Liaison: {0}";
+}
+
+public static final int ER_PROCESS_NOT_SUCCESSFUL = 26;
+static {contents[ER_PROCESS_NOT_SUCCESSFUL][1]
+ = "Xalan: Process was not successful.";
+}
+
+public static final int ER_NOT_SUCCESSFUL = 27;
+static {contents[ER_NOT_SUCCESSFUL][1]
+ = "Xalan: was not successful.";
+}
+
+public static final int ER_ENCODING_NOT_SUPPORTED = 28;
+static {contents[ER_ENCODING_NOT_SUPPORTED][1]
+ = "Encoding not supported: {0}";
+}
+
+public static final int ER_COULD_NOT_CREATE_TRACELISTENER = 29;
+static {contents[ER_COULD_NOT_CREATE_TRACELISTENER][1]
+ = "Could not create TraceListener: {0}";
+}
+
+public static final int ER_KEY_REQUIRES_NAME_ATTRIB = 30;
+static {contents[ER_KEY_REQUIRES_NAME_ATTRIB][1]
+ = "xsl:key requires a 'name' attribute!";
+}
+
+public static final int ER_KEY_REQUIRES_MATCH_ATTRIB = 31;
+static {contents[ER_KEY_REQUIRES_MATCH_ATTRIB][1]
+ = "xsl:key requires a 'match' attribute!";
+}
+
+public static final int ER_KEY_REQUIRES_USE_ATTRIB = 32;
+static {contents[ER_KEY_REQUIRES_USE_ATTRIB][1]
+ = "xsl:key requires a 'use' attribute!";
+}
+
+public static final int ER_REQUIRES_ELEMENTS_ATTRIB = 33;
+static {contents[ER_REQUIRES_ELEMENTS_ATTRIB][1]
+ = "(StylesheetHandler) {0} requires an 'elements' attribute!";
+}
+
+public static final int ER_MISSING_PREFIX_ATTRIB = 34;
+static {contents[ER_MISSING_PREFIX_ATTRIB][1]
+ = "(StylesheetHandler) {0} attribute 'prefix' is missing";
+}
+
+public static final int ER_BAD_STYLESHEET_URL = 35;
+static {contents[ER_BAD_STYLESHEET_URL][1]
+ = "Stylesheet URL is bad: {0}";
+}
+
+public static final int ER_FILE_NOT_FOUND = 36;
+static {contents[ER_FILE_NOT_FOUND][1]
+ = "Stylesheet file was not found: {0}";
+}
+
+public static final int ER_IOEXCEPTION = 37;
+static {contents[ER_IOEXCEPTION][1]
+ = "Had IO Exception with stylesheet file: {0}";
+}
+
+public static final int ER_NO_HREF_ATTRIB = 38;
+static {contents[ER_NO_HREF_ATTRIB][1]
+ = "(StylesheetHandler) Could not find href attribute for {0}";
+}
+
+public static final int ER_STYLESHEET_INCLUDES_ITSELF = 39;
+static {contents[ER_STYLESHEET_INCLUDES_ITSELF][1]
+ = "(StylesheetHandler) {0} is directly or indirectly including itself!";
+}
+
+public static final int ER_PROCESSINCLUDE_ERROR = 40;
+static {contents[ER_PROCESSINCLUDE_ERROR][1]
+ = "StylesheetHandler.processInclude error, {0}";
+}
+
+public static final int ER_MISSING_LANG_ATTRIB = 41;
+static {contents[ER_MISSING_LANG_ATTRIB][1]
+ = "(StylesheetHandler) {0} attribute 'lang' is missing";
+}
+
+public static final int ER_MISSING_CONTAINER_ELEMENT_COMPONENT = 42;
+static {contents[ER_MISSING_CONTAINER_ELEMENT_COMPONENT][1]
+ = "(StylesheetHandler) misplaced {0} element?? Missing container element 'component'";
+}
+
+public static final int ER_CAN_ONLY_OUTPUT_TO_ELEMENT = 43;
+static {contents[ER_CAN_ONLY_OUTPUT_TO_ELEMENT][1]
+ = "Can only output to an Element, DocumentFragment, Document, or PrintWriter.";
+}
+
+public static final int ER_PROCESS_ERROR = 44;
+static {contents[ER_PROCESS_ERROR][1]
+ = "StylesheetRoot.process error";
+}
+
+public static final int ER_UNIMPLNODE_ERROR = 45;
+static {contents[ER_UNIMPLNODE_ERROR][1]
+ = "UnImplNode error: {0}";
+}
+
+public static final int ER_NO_SELECT_EXPRESSION = 46;
+static {contents[ER_NO_SELECT_EXPRESSION][1]
+ = "Error! Did not find xpath select expression (-select).";
+}
+
+public static final int ER_CANNOT_SERIALIZE_XSLPROCESSOR = 47;
+static {contents[ER_CANNOT_SERIALIZE_XSLPROCESSOR][1]
+ = "Can not serialize an XSLProcessor!";
+}
+
+public static final int ER_NO_INPUT_STYLESHEET = 48;
+static {contents[ER_NO_INPUT_STYLESHEET][1]
+ = "Stylesheet input was not specified!";
+}
+
+public static final int ER_FAILED_PROCESS_STYLESHEET = 49;
+static {contents[ER_FAILED_PROCESS_STYLESHEET][1]
+ = "Failed to process stylesheet!";
+}
+
+public static final int ER_COULDNT_PARSE_DOC = 50;
+static {contents[ER_COULDNT_PARSE_DOC][1]
+ = "Could not parse {0} document!";
+}
+
+public static final int ER_COULDNT_FIND_FRAGMENT = 51;
+static {contents[ER_COULDNT_FIND_FRAGMENT][1]
+ = "Could not find fragment: {0}";
+}
+
+public static final int ER_NODE_NOT_ELEMENT = 52;
+static {contents[ER_NODE_NOT_ELEMENT][1]
+ = "Node pointed to by fragment identifier was not an element: {0}";
+}
+
+public static final int ER_FOREACH_NEED_MATCH_OR_NAME_ATTRIB = 53;
+static {contents[ER_FOREACH_NEED_MATCH_OR_NAME_ATTRIB][1]
+ = "for-each must have either a match or name attribute";
+}
+
+public static final int ER_TEMPLATES_NEED_MATCH_OR_NAME_ATTRIB = 54;
+static {contents[ER_TEMPLATES_NEED_MATCH_OR_NAME_ATTRIB][1]
+ = "templates must have either a match or name attribute";
+}
+
+public static final int ER_NO_CLONE_OF_DOCUMENT_FRAG = 55;
+static {contents[ER_NO_CLONE_OF_DOCUMENT_FRAG][1]
+ = "No clone of a document fragment!";
+}
+
+public static final int ER_CANT_CREATE_ITEM = 56;
+static {contents[ER_CANT_CREATE_ITEM][1]
+ = "Can not create item in result tree: {0}";
+}
+
+public static final int ER_XMLSPACE_ILLEGAL_VALUE = 57;
+static {contents[ER_XMLSPACE_ILLEGAL_VALUE][1]
+ = "xml:space in the source XML has an illegal value: {0}";
+}
+
+public static final int ER_NO_XSLKEY_DECLARATION = 58;
+static {contents[ER_NO_XSLKEY_DECLARATION][1]
+ = "There is no xsl:key declaration for '{0}'!";
+}
+
+public static final int ER_CANT_CREATE_URL = 59;
+static {contents[ER_CANT_CREATE_URL][1]
+ = "Error! Cannot create url for: {0}";
+}
+
+public static final int ER_XSLFUNCTIONS_UNSUPPORTED = 60;
+static {contents[ER_XSLFUNCTIONS_UNSUPPORTED][1]
+ = "xsl:functions is unsupported";
+}
+
+public static final int ER_PROCESSOR_ERROR = 61;
+static {contents[ER_PROCESSOR_ERROR][1]
+ = "XSLT Processor Error";
+}
+
+public static final int ER_NOT_ALLOWED_INSIDE_STYLESHEET = 62;
+static {contents[ER_NOT_ALLOWED_INSIDE_STYLESHEET][1]
+ = "(StylesheetHandler) {0} not allowed inside a stylesheet!";
+}
+
+public static final int ER_RESULTNS_NOT_SUPPORTED = 63;
+static {contents[ER_RESULTNS_NOT_SUPPORTED][1]
+ = "result-ns no longer supported! Use xsl:output instead.";
}
+public static final int ER_DEFAULTSPACE_NOT_SUPPORTED = 64;
+static {contents[ER_DEFAULTSPACE_NOT_SUPPORTED][1]
+ = "default-space no longer supported! Use xsl:strip-space or xsl:preserve-space instead.";
+}
+
+public static final int ER_INDENTRESULT_NOT_SUPPORTED = 65;
+static {contents[ER_INDENTRESULT_NOT_SUPPORTED][1]
+ = "indent-result no longer supported! Use xsl:output instead.";
+}
+
+public static final int ER_ILLEGAL_ATTRIB = 66;
+static {contents[ER_ILLEGAL_ATTRIB][1]
+ = "(StylesheetHandler) {0} has an illegal attribute: {1}";
+}
+
+public static final int ER_UNKNOWN_XSL_ELEM = 67;
+static {contents[ER_UNKNOWN_XSL_ELEM][1]
+ = "Unknown XSL element: {0}";
+}
+
+public static final int ER_BAD_XSLSORT_USE = 68;
+static {contents[ER_BAD_XSLSORT_USE][1]
+ = "(StylesheetHandler) xsl:sort can only be used with xsl:apply-templates or xsl:for-each.";
+}
+
+public static final int ER_MISPLACED_XSLWHEN = 69;
+static {contents[ER_MISPLACED_XSLWHEN][1]
+ = "(StylesheetHandler) misplaced xsl:when!";
+}
+
+public static final int ER_XSLWHEN_NOT_PARENTED_BY_XSLCHOOSE = 70;
+static {contents[ER_XSLWHEN_NOT_PARENTED_BY_XSLCHOOSE][1]
+ = "(StylesheetHandler) xsl:when not parented by xsl:choose!";
+}
+
+public static final int ER_MISPLACED_XSLOTHERWISE = 71;
+static {contents[ER_MISPLACED_XSLOTHERWISE][1]
+ = "(StylesheetHandler) misplaced xsl:otherwise!";
+}
+
+public static final int ER_XSLOTHERWISE_NOT_PARENTED_BY_XSLCHOOSE = 72;
+static {contents[ER_XSLOTHERWISE_NOT_PARENTED_BY_XSLCHOOSE][1]
+ = "(StylesheetHandler) xsl:otherwise not parented by xsl:choose!";
+}
+
+public static final int ER_NOT_ALLOWED_INSIDE_TEMPLATE = 73;
+static {contents[ER_NOT_ALLOWED_INSIDE_TEMPLATE][1]
+ = "(StylesheetHandler) {0} is not allowed inside a template!";
+}
+
+public static final int ER_UNKNOWN_EXT_NS_PREFIX = 74;
+static {contents[ER_UNKNOWN_EXT_NS_PREFIX][1]
+ = "(StylesheetHandler) {0} extension namespace prefix '{1}' unknown";
+}
+
+public static final int ER_IMPORTS_AS_FIRST_ELEM = 75;
+static {contents[ER_IMPORTS_AS_FIRST_ELEM][1]
+ = "(StylesheetHandler) Imports can only occur as the first elements in the stylesheet!";
+}
+
+public static final int ER_IMPORTING_ITSELF = 76;
+static {contents[ER_IMPORTING_ITSELF][1]
+ = "(StylesheetHandler) {0} is directly or indirectly importing itself!";
+}
+
+public static final int ER_XMLSPACE_ILLEGAL_VAL = 77;
+static {contents[ER_XMLSPACE_ILLEGAL_VAL][1]
+ = "(StylesheetHandler) "+"xml:space has an illegal value: {0}";
+}
+
+public static final int ER_PROCESSSTYLESHEET_NOT_SUCCESSFUL = 78;
+static {contents[ER_PROCESSSTYLESHEET_NOT_SUCCESSFUL][1]
+ = "processStylesheet not succesfull!";
+}
+
+public static final int ER_SAX_EXCEPTION = 79;
+static {contents[ER_SAX_EXCEPTION][1]
+ = "SAX Exception";
+}
+
+public static final int ER_FUNCTION_NOT_SUPPORTED = 80;
+static {contents[ER_FUNCTION_NOT_SUPPORTED][1]
+ = "Function not supported!";
+}
+
+public static final int ER_XSLT_ERROR = 81;
+static {contents[ER_XSLT_ERROR][1]
+ = "XSLT Error";
+}
+
+public static final int ER_CURRENCY_SIGN_ILLEGAL = 82;
+static {contents[ER_CURRENCY_SIGN_ILLEGAL][1]
+ = "currency sign is not allowed in format pattern string";
+}
+
+public static final int ER_DOCUMENT_FUNCTION_INVALID_IN_STYLESHEET_DOM = 83;
+static {contents[ER_DOCUMENT_FUNCTION_INVALID_IN_STYLESHEET_DOM][1]
+ = "Document function not supported in Stylesheet DOM!";
+}
+
+public static final int ER_CANT_RESOLVE_PREFIX_OF_NON_PREFIX_RESOLVER = 84;
+static {contents[ER_CANT_RESOLVE_PREFIX_OF_NON_PREFIX_RESOLVER][1]
+ = "Can't resolve prefix of non-Prefix resolver!";
+}
+
+public static final int ER_REDIRECT_COULDNT_GET_FILENAME = 85;
+static {contents[ER_REDIRECT_COULDNT_GET_FILENAME][1]
+ = "Redirect extension: Could not get filename - file or select attribute must return vald string.";
+}
+
+public static final int ER_CANNOT_BUILD_FORMATTERLISTENER_IN_REDIRECT = 86;
+static {contents[ER_CANNOT_BUILD_FORMATTERLISTENER_IN_REDIRECT][1]
+ = "Can not build FormatterListener in Redirect extension!";
+}
+
+public static final int ER_INVALID_PREFIX_IN_EXCLUDERESULTPREFIX = 87;
+static {contents[ER_INVALID_PREFIX_IN_EXCLUDERESULTPREFIX][1]
+ = "Prefix in exclude-result-prefixes is not valid: {0}";
+}
+
+public static final int ER_MISSING_NS_URI = 88;
+static {contents[ER_MISSING_NS_URI][1]
+ = "Missing namespace URI for specified prefix";
+}
+
+public static final int ER_MISSING_ARG_FOR_OPTION = 89;
+static {contents[ER_MISSING_ARG_FOR_OPTION][1]
+ = "Missing argument for option: {0}";
+}
+
+public static final int ER_INVALID_OPTION = 90;
+static {contents[ER_INVALID_OPTION][1]
+ = "Invalid option: {0}";
+}
+
+public static final int ER_MALFORMED_FORMAT_STRING = 91;
+static {contents[ER_MALFORMED_FORMAT_STRING][1]
+ = "Malformed format string: {0}";
+}
+
+// Warnings...
+
+public static final int WG_FOUND_CURLYBRACE = 1;
+static {contents[WG_FOUND_CURLYBRACE + MAX_CODE][1]
+ = "Found '}' but no attribute template open!";
+}
+
+public static final int WG_COUNT_ATTRIB_MATCHES_NO_ANCESTOR = 2;
+static {contents[WG_COUNT_ATTRIB_MATCHES_NO_ANCESTOR + MAX_CODE][1]
+ = "Warning: count attribute does not match an ancestor in xsl:number! Target = {0}";
+}
+
+public static final int WG_EXPR_ATTRIB_CHANGED_TO_SELECT = 3;
+static {contents[WG_EXPR_ATTRIB_CHANGED_TO_SELECT + MAX_CODE][1]
+ = "Old syntax: The name of the 'expr' attribute has been changed to 'select'.";
+}
+
+public static final int WG_NO_LOCALE_IN_FORMATNUMBER = 4;
+static {contents[WG_NO_LOCALE_IN_FORMATNUMBER + MAX_CODE][1]
+ = "XSLT4J doesn't yet handle the locale name in the format-number function.";
+}
+
+public static final int WG_LOCALE_NOT_FOUND = 5;
+static {contents[WG_LOCALE_NOT_FOUND + MAX_CODE][1]
+ = "Warning: Could not find locale for xml:lang={0}";
+}
+
+public static final int WG_CANNOT_MAKE_URL_FROM = 6;
+static {contents[WG_CANNOT_MAKE_URL_FROM + MAX_CODE][1]
+ = "Can not make URL from: {0}";
+}
+
+public static final int WG_CANNOT_LOAD_REQUESTED_DOC = 7;
+static {contents[WG_CANNOT_LOAD_REQUESTED_DOC + MAX_CODE][1]
+ = "Can not load requested doc: {0}";
+}
+
+public static final int WG_CANNOT_FIND_COLLATOR = 8;
+static {contents[WG_CANNOT_FIND_COLLATOR + MAX_CODE][1]
+ = "Could not find Collator for <sort xml:lang={0}";
+}
+
+public static final int WG_FUNCTIONS_SHOULD_USE_URL = 9;
+static {contents[WG_FUNCTIONS_SHOULD_USE_URL + MAX_CODE][1]
+ = "Old syntax: the functions instruction should use a url of {0}";
+}
+
+public static final int WG_ENCODING_NOT_SUPPORTED_USING_UTF8 = 10;
+static {contents[WG_ENCODING_NOT_SUPPORTED_USING_UTF8 + MAX_CODE][1]
+ = "encoding not supported: {0}, using UTF-8";
+}
+
+public static final int WG_ENCODING_NOT_SUPPORTED_USING_JAVA = 11;
+static {contents[WG_ENCODING_NOT_SUPPORTED_USING_JAVA + MAX_CODE][1]
+ = "encoding not supported: {0}, using Java {1}";
+}
+
+public static final int WG_SPECIFICITY_CONFLICTS = 12;
+static {contents[WG_SPECIFICITY_CONFLICTS + MAX_CODE][1]
+ = "Specificity conflicts found: {0} Last found in stylesheet will be used.";
+}
+
+public static final int WG_PARSING_AND_PREPARING = 13;
+static {contents[WG_PARSING_AND_PREPARING + MAX_CODE][1]
+ = "========= Parsing and preparing {0} ==========";
+}
+
+public static final int WG_ATTR_TEMPLATE = 14;
+static {contents[WG_ATTR_TEMPLATE + MAX_CODE][1]
+ = "Attr Template, {0}";
+}
+
+public static final int WG_CONFLICT_BETWEEN_XSLSTRIPSPACE_AND_XSLPRESERVESPACE = 15;
+static {contents[WG_CONFLICT_BETWEEN_XSLSTRIPSPACE_AND_XSLPRESERVESPACE + MAX_CODE][1]
+ = "Match conflict between xsl:strip-space and xsl:preserve-space";
+}
+
+public static final int WG_ATTRIB_NOT_HANDLED = 16;
+static {contents[WG_ATTRIB_NOT_HANDLED + MAX_CODE][1]
+ = "XSLT4J does not yet handle the {0} attribute!";
+}
+
+public static final int WG_NO_DECIMALFORMAT_DECLARATION = 17;
+static {contents[WG_NO_DECIMALFORMAT_DECLARATION + MAX_CODE][1]
+ = "No declaration found for decimal format: {0}";
+}
+
+public static final int WG_OLD_XSLT_NS = 18;
+static {contents[WG_OLD_XSLT_NS + MAX_CODE][1]
+ = "Old XSLT Namespace: {0}";
+}
+
+public static final int WG_ONE_DEFAULT_XSLDECIMALFORMAT_ALLOWED = 19;
+static {contents[WG_ONE_DEFAULT_XSLDECIMALFORMAT_ALLOWED + MAX_CODE][1]
+ = "Only one default xsl:decimal-format declaration is allowed. The last one will be used.";
+}
+
+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.";
+}
+
+// Other miscellaneous text used inside the code...
+
+static {
+
+ contents[MAX_MESSAGES][0] = "ui_language";
+ contents[MAX_MESSAGES][1] = "en";
+
+ contents[MAX_MESSAGES + 1][0] = "help_language";
+ contents[MAX_MESSAGES + 1][1] = "en";
+
+ contents[MAX_MESSAGES + 2][0] = "language";
+ contents[MAX_MESSAGES + 2][1] = "en";
+
+ contents[MAX_MESSAGES + 3][0] = "BAD_CODE";
+ contents[MAX_MESSAGES + 3][1] = "Parameter to createMessage was out of bounds";
+
+ contents[MAX_MESSAGES + 4][0] = "FORMAT_FAILED";
+ contents[MAX_MESSAGES + 4][1] = "Exception thrown during messageFormat call";
+
+ contents[MAX_MESSAGES + 5][0] = "version";
+ contents[MAX_MESSAGES + 5][1] = ">>>>>>> XSLT4J Version ";
+
+ contents[MAX_MESSAGES + 6][0] = "version2";
+ contents[MAX_MESSAGES + 6][1] = "<<<<<<<";
+
+ contents[MAX_MESSAGES + 7][0] = "yes";
+ contents[MAX_MESSAGES + 7][1] = "yes";
+
+ contents[MAX_MESSAGES + 8][0] = "line";
+ contents[MAX_MESSAGES + 8][1] = "Line #";
+
+ contents[MAX_MESSAGES + 9][0] = "column";
+ contents[MAX_MESSAGES + 9][1] = "Column #";
+
+ contents[MAX_MESSAGES + 10][0] = "xsldone";
+ contents[MAX_MESSAGES + 10][1] = "XSLProcessor: done";
+
+ contents[MAX_MESSAGES + 11][0] = "xslProc_option";
+ contents[MAX_MESSAGES + 11][1] = "=xslproc options:";
+
+ contents[MAX_MESSAGES + 12][0] = "optionIN";
+ contents[MAX_MESSAGES + 12][1] = " -IN inputXMLURL";
+
+ contents[MAX_MESSAGES + 13][0] = "optionXSL";
+ contents[MAX_MESSAGES + 13][1] = " [-XSL XSLTransformationURL]";
+
+ contents[MAX_MESSAGES + 14][0] = "optionOUT";
+ contents[MAX_MESSAGES + 14][1] = " [-XSL XSLTransformationURL]";
+
+ contents[MAX_MESSAGES + 15][0] = "optionLXCIN";
+ contents[MAX_MESSAGES + 15][1] = " [-LXCIN compiledStylesheetFileNameIn]";
+
+ contents[MAX_MESSAGES + 16][0] = "optionLXCOUT";
+ contents[MAX_MESSAGES + 16][1] = " [-LXCOUT compiledStylesheetFileNameOutOut]";
+
+ contents[MAX_MESSAGES + 17][0] = "optionPARSER";
+ contents[MAX_MESSAGES + 17][1] = " [-PARSER fully qualified class name of parser liaison]";
+
+ contents[MAX_MESSAGES + 18][0] = "optionE";
+ contents[MAX_MESSAGES + 18][1] = " [-E (Do not expand entity refs)]";
+
+ contents[MAX_MESSAGES + 19][0] = "optionV";
+ contents[MAX_MESSAGES + 19][1] = " [-E (Do not expand entity refs)]";
+
+ contents[MAX_MESSAGES + 20][0] = "optionQC";
+ contents[MAX_MESSAGES + 20][1] = " [-QC (Quiet Pattern Conflicts Warnings)]";
+
+ contents[MAX_MESSAGES + 21][0] = "optionQ";
+ contents[MAX_MESSAGES + 21][1] = " [-Q (Quiet Mode)]";
+
+ contents[MAX_MESSAGES + 22][0] = "optionLF";
+ contents[MAX_MESSAGES + 22][1] = " [-LF (Use linefeeds only on output {default is CR/LF})]";
+
+ contents[MAX_MESSAGES + 23][0] = "optionCR";
+ contents[MAX_MESSAGES + 23][1] = " [-CR (Use carriage returns only on output {default is CR/LF})]";
+
+ contents[MAX_MESSAGES + 24][0] = "optionESCAPE";
+ contents[MAX_MESSAGES + 24][1] = " [-ESCAPE (Which characters to escape {default is <>&\"\'\\r\\n}]";
+
+ contents[MAX_MESSAGES + 25][0] = "optionINDENT";
+ contents[MAX_MESSAGES + 25][1] = " [-INDENT (Control how many spaces to indent {default is 0})]";
+
+ contents[MAX_MESSAGES + 26][0] = "optionTT";
+ contents[MAX_MESSAGES + 26][1] = " [-TT (Trace the templates as they are being called.)]";
+
+ contents[MAX_MESSAGES + 27][0] = "optionTG";
+ contents[MAX_MESSAGES + 27][1] = " [-TG (Trace each generation event.)]";
+
+ contents[MAX_MESSAGES + 28][0] = "optionTS";
+ contents[MAX_MESSAGES + 28][1] = " [-TS (Trace each selection event.)]";
+
+ contents[MAX_MESSAGES + 29][0] = "optionTTC";
+ contents[MAX_MESSAGES + 29][1] = " [-TTC (Trace the template children as they are being processed.)]";
+
+ contents[MAX_MESSAGES + 30][0] = "optionTCLASS";
+ contents[MAX_MESSAGES + 30][1] = " [-TCLASS (TraceListener class for trace extensions.)]";
+
+ contents[MAX_MESSAGES + 31][0] = "optionVALIDATE";
+ contents[MAX_MESSAGES + 31][1] = " [-VALIDATE (Set whether validation occurs. Validation is off by default.)]";
+
+ contents[MAX_MESSAGES + 32][0] = "optionEDUMP";
+ contents[MAX_MESSAGES + 32][1] = " [-EDUMP {optional filename} (Do stackdump on error.)]";
+
+ contents[MAX_MESSAGES + 33][0] = "optionXML";
+ contents[MAX_MESSAGES + 33][1] = " [-XML (Use XML formatter and add XML header.)]";
+
+ contents[MAX_MESSAGES + 34][0] = "optionTEXT";
+ contents[MAX_MESSAGES + 34][1] = " [-TEXT (Use simple Text formatter.)]";
+
+ contents[MAX_MESSAGES + 35][0] = "optionHTML";
+ contents[MAX_MESSAGES + 35][1] = " [-HTML (Use HTML formatter.)]";
+
+ contents[MAX_MESSAGES + 36][0] = "optionPARAM";
+ contents[MAX_MESSAGES + 36][1] = " [-PARAM name expression (Set a stylesheet parameter)]";
+
+ contents[MAX_MESSAGES + 37][0] = "noParsermsg1";
+ contents[MAX_MESSAGES + 37][1] = "XSL Process was not successful.";
+
+ contents[MAX_MESSAGES + 38][0] = "noParsermsg2";
+ contents[MAX_MESSAGES + 38][1] = "** Could not find parser **";
+
+ contents[MAX_MESSAGES + 39][0] = "noParsermsg3";
+ contents[MAX_MESSAGES + 39][1] = "Please check your classpath.";
+
+ contents[MAX_MESSAGES + 40][0] = "noParsermsg4";
+ contents[MAX_MESSAGES + 40][1] = "If you don't have IBM's XML Parser for Java, you can download it from";
+
+ contents[MAX_MESSAGES + 41][0] = "noParsermsg5";
+ contents[MAX_MESSAGES + 41][1] = "IBM's AlphaWorks: http://www.alphaworks.ibm.com/formula/xml";
+ }
+
+ // ================= INFRASTRUCTURE ======================
+
+ public static final String BAD_CODE = "BAD_CODE";
+ public static final String FORMAT_FAILED = "FORMAT_FAILED";
+
+ public static final String ERROR_STRING = "#error";
+ public static final String ERROR_HEADER = "Error: ";
+ public static final String WARNING_HEADER = "Warning: ";
+ public static final String XSL_HEADER = "XSL ";
+ public static final String XML_HEADER = "XML ";
+ public static final String QUERY_HEADER = "PATTERN ";
+
+
+ public Object[][] getContents()
+ {
+ return contents;
+ }
+
/**
* Return a named ResourceBundle for a particular locale. This method mimics the behavior
* of ResourceBundle.getBundle().
@@ -69,6 +823,7 @@
return suffix;
}
+
/**
* Get the error string associated with the error code
*/
@@ -96,320 +851,33 @@
return WARNING_SUFFIX + df.format(errorCode);
}
}
+
+ /**
+ * Get the error string associated with the error code
+ */
+ public static String getMKey(int errorCode)
+ {
+ if (errorCode > MAX_CODE)
+ return null;
+ else
+ {
+ DecimalFormat df = new DecimalFormat("0000");
+ return ERROR_SUFFIX + df.format(errorCode);
+ }
+ }
+
+ /**
+ * Get the error string associated with the error code
+ */
+ public static String getWKey(int errorCode)
+ {
+ if (errorCode > MAX_WARNING)
+ return null;
+ else
+ {
+ DecimalFormat df = new DecimalFormat("0000");
+ return WARNING_SUFFIX + df.format(errorCode);
+ }
+ }
+}
-public static final String ERROR_SUFFIX = "ER";
-public static final String WARNING_SUFFIX = "WR";
-public static final String BAD_CODE = "BAD_CODE";
-public static final String FORMAT_FAILED = "FORMAT_FAILED";
-
-public static final String ERROR_STRING = "#error";
-public static final String ERROR_HEADER = "Error: ";
-public static final String WARNING_HEADER = "Warning: ";
-public static final String XSL_HEADER = "XSL ";
-public static final String XML_HEADER = "XML ";
-public static final String QUERY_HEADER = "PATTERN ";
-
-public static final int
-ERROR0000 = 0,
-ERROR0001 = 1,
-ERROR0002 = 2,
-ERROR0003 = 3,
-ERROR0004 = 4,
-ERROR0005 = 5,
-ERROR0006 = 6,
-ERROR0007 = 7,
-ERROR0008 = 8,
-ERROR0009 = 9,
-ERROR0010 = 10,
-ERROR0011 = 11,
-ERROR0012 = 12,
-ERROR0013 = 13,
-ERROR0014 = 14,
-ERROR0015 = 15,
-ERROR0016 = 16,
-ERROR0017 = 17,
-ERROR0018 = 18,
-ERROR0019 = 19,
-ERROR0020 = 20,
-ERROR0021 = 21,
-ERROR0022 = 22,
-ERROR0023 = 23,
-ERROR0024 = 24,
-ERROR0025 = 25,
-ERROR0026 = 26,
-ERROR0027 = 27,
-ERROR0028 = 28,
-ERROR0029 = 29,
-ERROR0030 = 30,
-ERROR0031 = 31,
-ERROR0032 = 32,
-ERROR0033 = 33,
-ERROR0034 = 34,
-ERROR0035 = 35,
-ERROR0036 = 36,
-ERROR0037 = 37,
-ERROR0038 = 38,
-ERROR0039 = 39,
-ERROR0040 = 40,
-ERROR0041 = 41,
-ERROR0042 = 42,
-ERROR0043 = 43,
-ERROR0044 = 44,
-ERROR0045 = 45,
-ERROR0046 = 46,
-ERROR0047 = 47,
-ERROR0048 = 48,
-ERROR0049 = 49,
-ERROR0050 = 50,
-ERROR0051 = 51,
-ERROR0052 = 52,
-ERROR0053 = 53,
-ERROR0054 = 54,
-ERROR0055 = 55,
-ERROR0056 = 56,
-ERROR0057 = 57,
-ERROR0058 = 58,
-ERROR0059 = 59,
-ERROR0060 = 60,
-ERROR0061 = 61,
-ERROR0062 = 62,
-ERROR0063 = 63,
-ERROR0064 = 64,
-ERROR0065 = 65,
-ERROR0066 = 66,
-ERROR0067 = 67,
-ERROR0068 = 68,
-ERROR0069 = 69,
-ERROR0070 = 70,
-ERROR0071 = 71,
-ERROR0072 = 72,
-ERROR0073 = 73,
-ERROR0074 = 74,
-ERROR0075 = 75,
-ERROR0076 = 76,
-ERROR0077 = 77,
-ERROR0078 = 78,
-ERROR0079 = 79,
-ERROR0080 = 80,
-ERROR0081 = 81,
-ERROR0082 = 82,
-ERROR0083 = 83,
-ERROR0084 = 84,
-ERROR0085 = 85,
-ERROR0086 = 86,
-ERROR0087 = 87,
-ERROR0088 = 88,
-ERROR0089 = 89,
-ERROR0090 = 90,
-ERROR0091 = 91,
-ERROR0092 = 92,
-ERROR0093 = 93,
-ERROR0094 = 94,
-ERROR0095 = 95,
-ERROR0096 = 96,
-ERROR0097 = 97,
-ERROR0098 = 98,
-ERROR0099 = 99,
-MAX_CODE = 99; // this is needed to keep track of the number of messages
-
-public static final int
-WARNING0000 = 0,
-WARNING0001 = 1,
-WARNING0002 = 2,
-WARNING0003 = 3,
-WARNING0004 = 4,
-WARNING0005 = 5,
-WARNING0006 = 6,
-WARNING0007 = 7,
-WARNING0008 = 8,
-WARNING0009 = 9,
-WARNING0010 = 10,
-WARNING0011 = 11,
-WARNING0012 = 12,
-WARNING0013 = 13,
-WARNING0014 = 14,
-WARNING0015 = 15,
-WARNING0016 = 16,
-WARNING0017 = 17,
-WARNING0018 = 18,
-WARNING0019 = 19,
-WARNING0020 = 20,
-MAX_WARNING = 20; // this is needed to keep track of the number of warnings
-
-
-
-static final Object[][] contents = {
-
-{"ui_language","en"},
-{"help_language", "en"},
-{"language", "en"},
-
-{"ER0000","{0}"},
-{"ER0001","Error: Can not have '{' within expression"},
-{"ER0002", "{0} has an illegal attribute: {1}"},
-{"ER0003", "sourceNode is null in xsl:apply-imports!"},
-{"ER0004", "Can not add {0} to {1}"},
-{"ER0005", "sourceNode is null in handleApplyTemplatesInstruction!"},
-{"ER0006", "{0} must have a name attribute.6"},
-{"ER0007", "Could not find template named: {0}"},
-{"ER0008", "Could not resolve name AVT in xsl:call-template."},
-{"ER0009", "{0} requires attribute: {1}"},
-{"ER0010", "{0} must have a 'test' attribute."},
-{"ER0011", "Bad value on level attribute: {0}"},
-{"ER0012", "processing-instruction name can not be 'xml'"},
-{"ER0013", "processing-instruction name must be a valid NCName: {0}"},
-{"ER0014", "{0} must have a match attribute if it has a mode."},
-{"ER0015", "{0} requires either a name or a match attribute."},
-{"ER0016", "Can not resolve namespace prefix: {0}"},
-{"ER0017", "xml:space has an illegal value: {0}"},
-{"ER0018", "Child node does not have an owner document!"},
-{"ER0019", "ElemTemplateElement error: {0}"},
-{"ER0020", "Trying to add a null child!"},
-{"ER0021", "{0} requires a select attribute."},
-{"ER0022", "xsl:when must have a 'test' attribute."},
-{"ER0023", "xsl:with-param must have a 'name' attribute."},
-{"ER0024", "context does not have an owner document!"},
-{"ER0025", "Could not create XML Processor Liaison: {0}"},
-{"ER0026", "Xalan: Process was not successful."},
-{"ER0027", "Xalan: was not successful."},
-{"ER0028", "Encoding not supported: {0}"},
-{"ER0029", "Could not create TraceListener: {0}"},
-{"ER0030", "xsl:key requires a 'name' attribute!"},
-{"ER0031", "xsl:key requires a 'match' attribute!"},
-{"ER0032", "xsl:key requires a 'use' attribute!"},
-{"ER0033", "(StylesheetHandler) {0} requires an 'elements' attribute!"},
-{"ER0034", "(StylesheetHandler) {0} attribute 'prefix' is missing"},
-{"ER0035", "Stylesheet URL is bad: {0}"},
-{"ER0036", "Stylesheet file was not found: {0}"},
-{"ER0037", "Had IO Exception with stylesheet file: {0}"},
-{"ER0038", "(StylesheetHandler) Could not find href attribute for {0}"},
-{"ER0039", "(StylesheetHandler) {0} is directly or indirectly including itself!"},
-{"ER0040", "StylesheetHandler.processInclude error, {0}"},
-{"ER0041", "(StylesheetHandler) {0} attribute 'lang' is missing"},
-{"ER0042", "(StylesheetHandler) misplaced {0} element?? Missing container element 'component'"},
-{"ER0043", "Can only output to an Element, DocumentFragment, Document, or PrintWriter."},
-{"ER0044", "StylesheetRoot.process error4"},
-{"ER0045", "UnImplNode error: {0}"},
-{"ER0046", "Error! Did not find xpath select expression (-select)."},
-{"ER0047", "Can not serialize an XSLProcessor!"},
-{"ER0048", "Stylesheet input was not specified!"},
-{"ER0049", "Failed to process stylesheet!"},
-{"ER0050", "Could not parse {0} document!"},
-{"ER0051", "Could not find fragment: {0}"},
-{"ER0052", "Node pointed to by fragment identifier was not an element: {0}"},
-{"ER0053", "for-each must have either a match or name attribute"},
-{"ER0054", "templates must have either a match or name attribute"},
-{"ER0055", "No clone of a document fragment!"},
-{"ER0056", "Can not create item in result tree: {0}"},
-{"ER0057", "xml:space in the source XML has an illegal value: {0}"},
-{"ER0058", "There is no xsl:key declaration for '{0}'!"},
-{"ER0059", "Error! Cannot create url for: {0}"},
-{"ER0060", "xsl:functions is unsupported"},
-{"ER0061", "XSLT Processor Error"},
-{"ER0062", "(StylesheetHandler) {0} not allowed inside a stylesheet!"},
-{"ER0063", "result-ns no longer supported! Use xsl:output instead."},
-{"ER0064", "default-space no longer supported! Use xsl:strip-space or xsl:preserve-space instead."},
-{"ER0065", "indent-result no longer supported! Use xsl:output instead."},
-{"ER0066", "(StylesheetHandler) {0} has an illegal attribute: {1}"},
-{"ER0067", "Unknown XSL element: {0}"},
-{"ER0068", "(StylesheetHandler) xsl:sort can only be used with xsl:apply-templates or xsl:for-each."},
-{"ER069", "(StylesheetHandler) misplaced xsl:when!"},
-{"ER0070", "(StylesheetHandler) xsl:when not parented by xsl:choose!"},
-{"ER0071", "(StylesheetHandler) misplaced xsl:otherwise!"},
-{"ER0072", "(StylesheetHandler) xsl:otherwise not parented by xsl:choose!"},
-{"ER0073", "(StylesheetHandler) {0} is not allowed inside a template!"},
-{"ER0074", "(StylesheetHandler) {0} attribute 'prefix' is missing"},
-{"ER0075", "(StylesheetHandler) {0} extension namespace prefix '{1}' unknown"},
-{"ER0076", "(StylesheetHandler) Imports can only occur as the first elements in the stylesheet!"},
-{"ER0077", "(StylesheetHandler) {0} is directly or indirectly importing itself!"},
-{"ER0078", "Stylesheet URL is bad: {0}"},
-{"ER0079", "Stylesheet file was not found: {0}"},
-{"ER0080", "Had IO Exception with stylesheet file: {0}"},
-{"ER0081", "(StylesheetHandler) Could not find href attribute for {0}"},
-{"ER0082", "StylesheetHandler.processInclude error"},
-{"ER0083", "(StylesheetHandler) {0} attribute 'lang' is missing"},
-{"ER0084", "(StylesheetHandler) misplaced {0} element?? Missing container element 'component'"},
-{"ER0085", "(StylesheetHandler) "+"xml:space has an illegal value: {0}"},
-{"ER0086", "processStylesheet not succesfull!"},
-{"ER0087", "SAX Exception"},
-{"ER0088", "Function not supported!"},
-{"ER0089", "XSLT Error"},
-{"ER0090", "currency sign is not allowed in format pattern string"},
-{"ER0091", "Document function not supported in Stylesheet DOM!"},
-{"ER0092", "Can't resolve prefix of non-Prefix resolver!"},
-{"ER0093", "Redirect extension: Could not get filename - file or select attribute must return vald string."},
-{"ER0094", "Can not build FormatterListener in Redirect extension!"},
-{"ER0095", "Prefix in exclude-result-prefixes is not valid: {0}"},
-{"ER0096", "Missing namespace URI for specified prefix"},
-{"ER0097", "Missing argument for option: {0}"},
-{"ER0098", "Invalid option: {0}"},
-{"ER0099", "Malformed format string: {0}"},
-
-
-{"WR0001", "Found '}' but no attribute template open!"},
-{"WR0002", "Warning: count attribute does not match an ancestor in xsl:number! Target = {0}"},
-{"WR0003", "Old syntax: The name of the 'expr' attribute has been changed to 'select'."},
-{"WR0004", "XSLT4J doesn't yet handle the locale name in the format-number function."},
-{"WR0005", "Warning: Could not find locale for xml:lang={0}"},
-{"WR0006", "Can not make URL from: {0}"},
-{"WR0007", "Can not load requested doc: {0}"},
-{"WR0008", "Could not find Collator for <sort xml:lang={0}"},
-{"WR0009", "Old syntax: the functions instruction should use a url of {0}"},
-{"WR0010", "encoding not supported: {0}, using UTF-8"},
-{"WR0011", "encoding not supported: {0}, using Java {1}"},
-{"WR0012", "Specificity conflicts found: {0} Last found in stylesheet will be used."},
-{"WR0013", "========= Parsing and preparing {0} =========="},
-{"WR0014", "Attr Template, {0}"},
-{"WR0015", "Match conflict between xsl:strip-space and xsl:preserve-space"},
-{"WR0016", "XSLT4J does not yet handle the {0} attribute!"},
-{"WR0017", "No declaration found for decimal format: {0}"},
-{"WR0018", "Old XSLT Namespace: {0}"},
-{"WR0019", "Only one default xsl:decimal-format declaration is allowed. The last one will be used."},
-{"WR0020", "xsl:decimal-format names must be unique. The last one will be used."},
-
-
-{"BAD_CODE", "Parameter to createMessage was out of bounds"},
-{"FORMAT_FAILED", "Exception thrown during messageFormat call"},
-
-{"version", ">>>>>>> XSLT4J Version "},
-{"version2", "<<<<<<<"},
-
-{"yes", "yes"},
-{"line", "Line #"},
-{"column", "Column #"},
-{"xsldone", "XSLProcessor: done"},
-
-{"xslProc_option", "=xslproc options:"},
-{"optionIN", " -IN inputXMLURL"},
-{"optionXSL", " [-XSL XSLTransformationURL]"},
-{"optionOUT", " [-OUT outputFileName]"},
-{"optionLXCIN", " [-LXCIN compiledStylesheetFileNameIn]"},
-{"optionLXCOUT", " [-LXCOUT compiledStylesheetFileNameOutOut]"},
-{"optionPARSER", " [-PARSER fully qualified class name of parser liaison]"},
-{"optionE", " [-E (Do not expand entity refs)]"},
-{"optionV", " [-V (Version info)]"},
-{"optionQC", " [-QC (Quiet Pattern Conflicts Warnings)]"},
-{"optionQ", " [-Q (Quiet Mode)]"},
-{"optionLF", " [-LF (Use linefeeds only on output {default is CR/LF})]"},
-{"optionCR", " [-CR (Use carriage returns only on output {default is CR/LF})]"},
-{"optionESCAPE", " [-ESCAPE (Which characters to escape {default is <>&\"\'\\r\\n}]"},
-{"optionINDENT", " [-INDENT (Control how many spaces to indent {default is 0})]"},
-{"optionTT", " [-TT (Trace the templates as they are being called.)]"},
-{"optionTG", " [-TG (Trace each generation event.)]"},
-{"optionTS", " [-TS (Trace each selection event.)]"},
-{"optionTTC", " [-TTC (Trace the template children as they are being processed.)]"},
-{"optionTCLASS", " [-TCLASS (TraceListener class for trace extensions.)]"},
-{"optionVALIDATE", " [-VALIDATE (Set whether validation occurs. Validation is off by default.)]"},
-{"optionEDUMP", " [-EDUMP {optional filename} (Do stackdump on error.)]"},
-{"optionXML", " [-XML (Use XML formatter and add XML header.)]"},
-{"optionTEXT", " [-TEXT (Use simple Text formatter.)]"},
-{"optionHTML", " [-HTML (Use HTML formatter.)]"},
-{"optionPARAM", " [-PARAM name expression (Set a stylesheet parameter)]"},
-
-{"noParsermsg1", "XSL Process was not successful."},
-{"noParsermsg2", "** Could not find parser **"},
-{"noParsermsg3", "Please check your classpath."},
-{"noParsermsg4", "If you don't have IBM's XML Parser for Java, you can download it from"},
-{"noParsermsg5", "IBM's AlphaWorks: http://www.alphaworks.ibm.com/formula/xml"}
-};
-}
1.7 +0 -178 xml-xalan/src/org/apache/xalan/xslt/res/XSLTErrorResources_en.java
Index: XSLTErrorResources_en.java
===================================================================
RCS file: /home/cvs/xml-xalan/src/org/apache/xalan/xslt/res/XSLTErrorResources_en.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- XSLTErrorResources_en.java 1999/12/16 21:57:19 1.6
+++ XSLTErrorResources_en.java 2000/01/05 23:05:38 1.7
@@ -5,182 +5,4 @@
//
public class XSLTErrorResources_en extends XSLTErrorResources
{
-public Object[][] getContents()
-{
- return contents;
-}
-
-static final Object[][] contents = {
-
-{"ui_language","en"},
-{"help_language", "en"},
-{"language", "en"},
-
-{"ER0000","{0}"},
-{"ER0001","Error: Can not have '{' within expression"},
-{"ER0002", "{0} has an illegal attribute: {1}"},
-{"ER0003", "sourceNode is null in xsl:apply-imports!"},
-{"ER0004", "Can not add {0} to {1}"},
-{"ER0005", "sourceNode is null in handleApplyTemplatesInstruction!"},
-{"ER0006", "{0} must have a name attribute.6"},
-{"ER0007", "Could not find template named: {0}"},
-{"ER0008", "Could not resolve name AVT in xsl:call-template."},
-{"ER0009", "{0} requires attribute: {1}"},
-{"ER0010", "{0} must have a 'test' attribute."},
-{"ER0011", "Bad value on level attribute: {0}"},
-{"ER0012", "processing-instruction name can not be 'xml'"},
-{"ER0013", "processing-instruction name must be a valid NCName: {0}"},
-{"ER0014", "{0} must have a match attribute if it has a mode."},
-{"ER0015", "{0} requires either a name or a match attribute."},
-{"ER0016", "Can not resolve namespace prefix: {0}"},
-{"ER0017", "xml:space has an illegal value: {0}"},
-{"ER0018", "Child node does not have an owner document!"},
-{"ER0019", "ElemTemplateElement error: {0}"},
-{"ER0020", "Trying to add a null child!"},
-{"ER0021", "{0} requires a select attribute."},
-{"ER0022", "xsl:when must have a 'test' attribute."},
-{"ER0023", "xsl:with-param must have a 'name' attribute."},
-{"ER0024", "context does not have an owner document!"},
-{"ER0025", "Could not create XML Processor Liaison: {0}"},
-{"ER0026", "XPATH: XSL Process was not successful."},
-{"ER0027", "XSL Process was not successful."},
-{"ER0028", "Encoding not supported: {0}"},
-{"ER0029", "Could not create TraceListener: {0}"},
-{"ER0030", "xsl:key requires a 'name' attribute!"},
-{"ER0031", "xsl:key requires a 'match' attribute!"},
-{"ER0032", "xsl:key requires a 'use' attribute!"},
-{"ER0033", "(StylesheetHandler) {0} requires an 'elements' attribute!"},
-{"ER0034", "(StylesheetHandler) {0} attribute 'prefix' is missing"},
-{"ER0035", "Stylesheet URL is bad: {0}"},
-{"ER0036", "Stylesheet file was not found: {0}"},
-{"ER0037", "Had IO Exception with stylesheet file: {0}"},
-{"ER0038", "(StylesheetHandler) Could not find href attribute for {0}"},
-{"ER0039", "(StylesheetHandler) {0} is directly or indirectly including itself!"},
-{"ER0040", "StylesheetHandler.processInclude error, {0}"},
-{"ER0041", "(StylesheetHandler) {0} attribute 'lang' is missing"},
-{"ER0042", "(StylesheetHandler) misplaced {0} element?? Missing container element 'component'"},
-{"ER0043", "Can only output to an Element, DocumentFragment, Document, or PrintWriter."},
-{"ER0044", "StylesheetRoot.process error4"},
-{"ER0045", "UnImplNode error: {0}"},
-{"ER0046", "Error! Did not find xpath select expression (-select)."},
-{"ER0047", "Can not serialize an XSLProcessor!"},
-{"ER0048", "Stylesheet input was not specified!"},
-{"ER0049", "Failed to process stylesheet!"},
-{"ER0050", "Could not parse {0} document!"},
-{"ER0051", "Could not find fragment: {0}"},
-{"ER0052", "Node pointed to by fragment identifier was not an element: {0}"},
-{"ER0053", "for-each must have either a match or name attribute"},
-{"ER0054", "templates must have either a match or name attribute"},
-{"ER0055", "No clone of a document fragment!"},
-{"ER0056", "Can not create item in result tree: {0}"},
-{"ER0057", "xml:space in the source XML has an illegal value: {0}"},
-{"ER0058", "There is no xsl:key declaration for '{0}'!"},
-{"ER0059", "Error! Cannot create url for: {0}"},
-{"ER0060", "xsl:functions is unsupported"},
-{"ER0061", "XSLT Processor Error"},
-{"ER0062", "(StylesheetHandler) {0} not allowed inside a stylesheet!"},
-{"ER0063", "result-ns no longer supported! Use xsl:output instead."},
-{"ER0064", "default-space no longer supported! Use xsl:strip-space or xsl:preserve-space instead."},
-{"ER0065", "indent-result no longer supported! Use xsl:output instead."},
-{"ER0066", "(StylesheetHandler) {0} has an illegal attribute: {1}"},
-{"ER0067", "Unknown XSL element: {0}"},
-{"ER0068", "(StylesheetHandler) xsl:sort can only be used with xsl:apply-templates or xsl:for-each."},
-{"ER0069", "(StylesheetHandler) misplaced xsl:when!"},
-{"ER0070", "(StylesheetHandler) xsl:when not parented by xsl:choose!"},
-{"ER0071", "(StylesheetHandler) misplaced xsl:otherwise!"},
-{"ER0072", "(StylesheetHandler) xsl:otherwise not parented by xsl:choose!"},
-{"ER0073", "(StylesheetHandler) {0} is not allowed inside a template!"},
-{"ER0074", "(StylesheetHandler) {0} attribute 'prefix' is missing"},
-{"ER0075", "(StylesheetHandler) {0} extension namespace prefix '{1}' unknown"},
-{"ER0076", "(StylesheetHandler) Imports can only occur as the first elements in the stylesheet!"},
-{"ER0077", "(StylesheetHandler) {0} is directly or indirectly importing itself!"},
-{"ER0078", "Stylesheet URL is bad: {0}"},
-{"ER0079", "Stylesheet file was not found: {0}"},
-{"ER0080", "Had IO Exception with stylesheet file: {0}"},
-{"ER0081", "(StylesheetHandler) Could not find href attribute for {0}"},
-{"ER0082", "StylesheetHandler.processInclude error"},
-{"ER0083", "(StylesheetHandler) {0} attribute 'lang' is missing"},
-{"ER0084", "(StylesheetHandler) misplaced {0} element?? Missing container element 'component'"},
-{"ER0085", "(StylesheetHandler) "+"xml:space has an illegal value: {0}"},
-{"ER0086", "processStylesheet not succesfull!"},
-{"ER0087", "SAX Exception"},
-{"ER0088", "Function not supported!"},
-{"ER0089", "XSLT Error"},
-{"ER0090", "currency sign is not allowed in format pattern string"},
-{"ER0091", "Document function not supported in Stylesheet DOM!"},
-{"ER0092", "Can't resolve prefix of non-Prefix resolver!"},
-{"ER0093", "Redirect extension: Could not get filename - file or select attribute must return vald string."},
-{"ER0094", "Can not build FormatterListener in Redirect extension!"},
-{"ER0095", "Prefix in exclude-result-prefixes is not valid: {0}"},
-{"ER0096", "Missing namespace URI for specified prefix"},
-{"ER0097", "Missing argument for option: {0}"},
-{"ER0098", "Invalid option: {0}"},
-{"ER0099", "Malformed format string: {0}"},
-
-
-{"WR0001", "Found '}' but no attribute template open!"},
-{"WR0002", "Warning: count attribute does not match an ancestor in xsl:number! Target = {0}"},
-{"WR0003", "Old syntax: The name of the 'expr' attribute has been changed to 'select'."},
-{"WR0004", "XSLT4J doesn't yet handle the locale name in the format-number function."},
-{"WR0005", "Warning: Could not find locale for xml:lang={0}"},
-{"WRG0006", "Can not make URL from: {0}"},
-{"WR0007", "Can not load requested doc: {0}"},
-{"WR0008", "Could not find Collator for <sort xml:lang={0}"},
-{"WR0009", "Old syntax: the functions instruction should use a url of {0}"},
-{"WR0010", "encoding not supported: {0}, using UTF-8"},
-{"WR0011", "encoding not supported: {0}, using Java {1}"},
-{"WR0012", "Specificity conflicts found: {0} Last found in stylesheet will be used."},
-{"WR0013", "========= Parsing and preparing {0} =========="},
-{"WR0014", "Attr Template, {0}"},
-{"WR0015", "Match conflict between xsl:strip-space and xsl:preserve-space"},
-{"WR0016", "XSLT4J does not yet handle the {0} attribute!"},
-{"WR0017", "No declaration found for decimal format: {0}"},
-{"WR0018", "Old XSLT Namespace: {0}"},
-{"WR0019", "Only one default xsl:decimal-format declaration is allowed. The last one will be used."},
-{"WR0020", "xsl:decimal-format names must be unique. The last one will be used."},
-
-{"BAD_CODE", "Parameter to createMessage was out of bounds"},
-{"FORMAT_FAILED", "Exception thrown during messageFormat call"},
-
-{"version", ">>>>>>> XSLT4J Version "},
-{"version2", "<<<<<<<"},
-
-{"yes", "yes"},
-{"line", "Line #"},
-{"column", "Column #"},
-{"xsldone", "XSLProcessor: done"},
-
-{"xslProc_option", "=xslproc options:"},
-{"optionIN", " -IN inputXMLURL"},
-{"optionXSL", " [-XSL XSLTransformationURL]"},
-{"optionOUT", " [-OUT outputFileName]"},
-{"optionLXCIN", " [-LXCIN compiledStylesheetFileNameIn]"},
-{"optionLXCOUT", " [-LXCOUT compiledStylesheetFileNameOutOut]"},
-{"optionPARSER", " [-PARSER fully qualified class name of parser liaison]"},
-{"optionE", " [-E (Do not expand entity refs)]"},
-{"optionV", " [-V (Version info)]"},
-{"optionQC", " [-QC (Quiet Pattern Conflicts Warnings)]"},
-{"optionQ", " [-Q (Quiet Mode)]"},
-{"optionLF", " [-LF (Use linefeeds only on output {default is CR/LF})]"},
-{"optionCR", " [-CR (Use carriage returns only on output {default is CR/LF})]"},
-{"optionESCAPE", " [-ESCAPE (Which characters to escape {default is <>&\"\'\\r\\n}]"},
-{"optionINDENT", " [-INDENT (Control how many spaces to indent {default is 0})]"},
-{"optionTT", " [-TT (Trace the templates as they are being called.)]"},
-{"optionTG", " [-TG (Trace each generation event.)]"},
-{"optionTS", " [-TS (Trace each selection event.)]"},
-{"optionTTC", " [-TTC (Trace the template children as they are being processed.)]"},
-{"optionTCLASS", " [-TCLASS (TraceListener class for trace extensions.)]"},
-{"optionVALIDATE", " [-VALIDATE (Set whether validation occurs. Validation is off by default.)]"},
-{"optionEDUMP", " [-EDUMP {optional filename} (Do stackdump on error.)]"},
-{"optionXML", " [-XML (Use XML formatter and add XML header.)]"},
-{"optionTEXT", " [-TEXT (Use simple Text formatter.)]"},
-{"optionHTML", " [-HTML (Use HTML formatter.)]"},
-{"optionPARAM", " [-PARAM name expression (Set a stylesheet parameter)]"},
-
-{"noParsermsg1", "XSL Process was not successful."},
-{"noParsermsg2", "** Could not find parser **"},
-{"noParsermsg3", "Please check your classpath."},
-{"noParsermsg4", "If you don't have IBM's XML Parser for Java, you can download it from"},
-{"noParsermsg5", "IBM's AlphaWorks: http://www.alphaworks.ibm.com/formula/xml"}
-};
}