[ Note: As there is limit on the mail size for sending it on this alias I am sending the contents in separate mails. This is mail-1 and contains 1) patch file for existing files src-patch.diff 2) list of files which were affected outside of "res" directories 3) xpath-res.jar [ localized files and contents in org.apache.xml.utils.res ] ] Hi:
It seems that nobody have objection for using ListResourceBundle instead of property files for doing I18N/L10N of Xalan. I am attaching the updated files including the localized files for the message strings until Xalan 2.4.1 release. I also updated the keys to be meaningful strings after defining the static constants as Strings. With this the constant strings are directly the keys into the contents array and we don't need to have one method call to have conversion from integer id to String key. This is more clearer to understand. And other advantage is that we don't need to worry about keeping the MAX_CODE and MAX_WARNINGS in sync whenver we are updating new messages. With the previous way if somebody miss updating these values, then eventhough content Array has the localized message, we maynot be able to use those messages. I am attaching the affected files list ( affected-xalan-files.txt), where error and warn methods were assuming "int" value for message code before to "String" value now. These files are outside "res" directories of xalan/xpath/xml. Can somebody review the contents and update the codebase. Thanks -Ramesh >Date: Tue, 3 Dec 2002 09:42:06 -0800 (PST) >From: Ramesh Mandava <[EMAIL PROTECTED]> >Subject: [Proposal] Using ListResourceBundle ( for I18N/L10N ) in all Xalan packages/ Donation of code and localized messages for Xalan >To: [EMAIL PROTECTED] >Cc: [EMAIL PROTECTED] >MIME-Version: 1.0 >Content-MD5: QqgvWcPEXsiEvTXEkCoySg== > >Hi, > > Sun Microsystems is willing to donote the translated localized messages ( 9 >languages + >English) for Xalan. These translated messages are also part of JDK which Sun >ships. This is done using ListResource bundle and standard property lookup. > > Right now Xalan uses ListResourceBundle for xml/util packages and for xalan >and xpath packages it uses PropertyResourceBundle. It would be better if all the >parts of Xalan uses the standard ListResource Bundle mechanism. This should >reduce customization ( of messages in GUI/ Non GUI environment ) quite a lot and >will enable every developer of Xalan to use I18n'ed and l10n'ed code out-of-box. > > Proposal: > -Use ListResourceBundle for all I18N/L10N of all Xalan pacakages > -Keep the Key Names same as we have them > > As the proposal is to keep the Keys same as we have now, there won't be much >impact of this change. > > What do we need from you ? > > - Feedback about how does it affect your application, if at all. > > > If we have agreement on using ListResourceBundle all around, then Sun can >contribute the needed code and localized messages in 9 languages apart from >English. > > Thanks > -Ramesh > > ------------- End Forwarded Message -------------
? org/apache/xalan/res ? org/apache/xalan/templates/ElemTemplateElement ? org/apache/xml/utils/res ? org/apache/xpath/res Index: org/apache/xalan/processor/ProcessorImport.java =================================================================== RCS file: /home/cvspublic/xml-xalan/java/src/org/apache/xalan/processor/ProcessorImport.java,v retrieving revision 1.10 diff -u -r1.10 ProcessorImport.java --- org/apache/xalan/processor/ProcessorImport.java 30 Nov 2000 09:57:29 -0000 1.10 +++ org/apache/xalan/processor/ProcessorImport.java 9 Jan 2003 19:43:27 -0000 @@ -100,7 +100,7 @@ * * @return the appropriate error number */ - protected int getStylesheetInclErr() + protected String getStylesheetInclErr() { return XSLTErrorResources.ER_IMPORTING_ITSELF; } Index: org/apache/xalan/processor/ProcessorInclude.java =================================================================== RCS file: /home/cvspublic/xml-xalan/java/src/org/apache/xalan/processor/ProcessorInclude.java,v retrieving revision 1.21 diff -u -r1.21 ProcessorInclude.java --- org/apache/xalan/processor/ProcessorInclude.java 30 Jul 2002 18:05:13 -0000 1.21 +++ org/apache/xalan/processor/ProcessorInclude.java 9 Jan 2003 19:43:27 -0000 @@ -136,7 +136,7 @@ * * @return the appropriate error number */ - protected int getStylesheetInclErr() + protected String getStylesheetInclErr() { return XSLTErrorResources.ER_STYLESHEET_INCLUDES_ITSELF; } Index: org/apache/xalan/processor/StylesheetHandler.java =================================================================== RCS file: /home/cvspublic/xml-xalan/java/src/org/apache/xalan/processor/StylesheetHandler.java,v retrieving revision 1.54 diff -u -r1.54 StylesheetHandler.java --- org/apache/xalan/processor/StylesheetHandler.java 4 Oct 2002 15:52:17 -0000 1.54 +++ org/apache/xalan/processor/StylesheetHandler.java 9 Jan 2003 19:43:27 -0000 @@ -883,7 +883,7 @@ * <meta name="usage" content="internal"/> * Warn the user of an problem. * - * @param msg An index into the {@link org.apache.xalan.res.XSLTErrorResources} + * @param msg An key into the {@link org.apache.xalan.res.XSLTErrorResources} * table, that is one of the WG_ prefixed definitions. * @param args An array of arguments for the given warning. * @@ -892,7 +892,7 @@ * {@link javax.xml.transform.ErrorListener#warning} * method chooses to flag this condition as an error. */ - public void warn(int msg, Object args[]) throws org.xml.sax.SAXException + public void warn(String msg, Object args[]) throws org.xml.sax.SAXException { String formattedMsg = m_XSLMessages.createWarning(msg, args); @@ -975,7 +975,7 @@ * Tell the user of an error, and probably throw an * exception. * - * @param msg An index into the {@link org.apache.xalan.res.XSLTErrorResources} + * @param msg A key into the {@link org.apache.xalan.res.XSLTErrorResources} * table, that is one of the WG_ prefixed definitions. * @param args An array of arguments for the given warning. * @param e An error which the SAXException should wrap. @@ -985,7 +985,7 @@ * {@link javax.xml.transform.ErrorListener#error} * method chooses to flag this condition as an error. */ - protected void error(int msg, Object args[], Exception e) + protected void error(String msg, Object args[], Exception e) throws org.xml.sax.SAXException { Index: org/apache/xalan/processor/XSLTAttributeDef.java =================================================================== RCS file: /home/cvspublic/xml-xalan/java/src/org/apache/xalan/processor/XSLTAttributeDef.java,v retrieving revision 1.26 diff -u -r1.26 XSLTAttributeDef.java --- org/apache/xalan/processor/XSLTAttributeDef.java 13 Sep 2002 18:07:56 -0000 1.26 +++ org/apache/xalan/processor/XSLTAttributeDef.java 9 Jan 2003 19:43:27 -0000 @@ -1637,7 +1637,7 @@ return true; } - private void handleError(StylesheetHandler handler, int msg, Object [] args, Exception exc) throws org.xml.sax.SAXException + private void handleError(StylesheetHandler handler, String msg, Object [] args, +Exception exc) throws org.xml.sax.SAXException { switch (getErrorType()) { Index: org/apache/xalan/templates/ElemTemplateElement.java =================================================================== RCS file: /home/cvspublic/xml-xalan/java/src/org/apache/xalan/templates/ElemTemplateElement.java,v retrieving revision 1.54 diff -u -r1.54 ElemTemplateElement.java --- org/apache/xalan/templates/ElemTemplateElement.java 3 Oct 2002 19:08:44 -0000 1.54 +++ org/apache/xalan/templates/ElemTemplateElement.java 9 Jan 2003 19:43:27 -0000 @@ -302,38 +302,28 @@ /** * Throw a template element runtime error. (Note: should we throw a TransformerException instead?) * - * @param msg Description of the error that occured. + * @param msg key of the error that occured. * @param args Arguments to be used in the message */ - public void error(int msg, Object[] args) + public void error(String msg, Object[] args) { String themsg = XSLMessages.createMessage(msg, args); - error( - XSLMessages.createMessage( - XSLTErrorResources.ER_ELEMTEMPLATEELEM_ERR, new Object[]{ themsg })); //"ElemTemplateElement error: "+msg); + throw new RuntimeException(XSLMessages.createMessage( + XSLTErrorResources.ER_ELEMTEMPLATEELEM_ERR, + new Object[]{ themsg })); } - /** + /* * Throw an error. * - * @param msg Message code for the error - */ - public void error(int msg) - { - error(msg, null); - } - - /** - * Throw a template element runtime error. (Note: should we throw a TransformerException instead?) + * @param msg Message key for the error * - * @param msg Description of the error that occured. - * @param args Arguments to be used in the message */ public void error(String msg) { - throw new RuntimeException(msg); + error(msg, null); } @@ -1217,7 +1207,20 @@ */ void executeNSDecls(TransformerImpl transformer) throws TransformerException { + executeNSDecls(transformer, null); + } + /** + * Send startPrefixMapping events to the result tree handler + * for all declared prefix mappings in the stylesheet. + * + * @param transformer non-null reference to the the current transform-time state. + * @param ignorePrefix string prefix to not startPrefixMapping + * + * @throws TransformerException + */ + void executeNSDecls(TransformerImpl transformer, String ignorePrefix) throws +TransformerException + { try { if (null != m_prefixTable) @@ -1229,7 +1232,7 @@ { XMLNSDecl decl = (XMLNSDecl) m_prefixTable.elementAt(i); - if (!decl.getIsExcluded()) + if (!decl.getIsExcluded() && !(null != ignorePrefix && +decl.getPrefix().equals(ignorePrefix))) { rhandler.startPrefixMapping(decl.getPrefix(), decl.getURI(), true); } @@ -1243,7 +1246,7 @@ } /** - * Send startPrefixMapping events to the result tree handler + * Send endPrefixMapping events to the result tree handler * for all declared prefix mappings in the stylesheet. * * @param transformer non-null reference to the the current transform-time state. @@ -1252,7 +1255,21 @@ */ void unexecuteNSDecls(TransformerImpl transformer) throws TransformerException { + unexecuteNSDecls(transformer, null); + } + /** + * Send endPrefixMapping events to the result tree handler + * for all declared prefix mappings in the stylesheet. + * + * @param transformer non-null reference to the the current transform-time state. + * @param ignorePrefix string prefix to not endPrefixMapping + * + * @throws TransformerException + */ + void unexecuteNSDecls(TransformerImpl transformer, String ignorePrefix) throws +TransformerException + { + try { if (null != m_prefixTable) @@ -1264,7 +1281,7 @@ { XMLNSDecl decl = (XMLNSDecl) m_prefixTable.elementAt(i); - if (!decl.getIsExcluded()) + if (!decl.getIsExcluded() && !(null != ignorePrefix && +decl.getPrefix().equals(ignorePrefix))) { rhandler.endPrefixMapping(decl.getPrefix()); } Index: org/apache/xalan/templates/FuncDocument.java =================================================================== RCS file: /home/cvspublic/xml-xalan/java/src/org/apache/xalan/templates/FuncDocument.java,v retrieving revision 1.27 diff -u -r1.27 FuncDocument.java --- org/apache/xalan/templates/FuncDocument.java 10 Jun 2002 20:47:44 -0000 1.27 +++ org/apache/xalan/templates/FuncDocument.java 9 Jan 2003 19:43:27 -0000 @@ -421,14 +421,14 @@ * exception. * * @param xctxt The XPath runtime state. - * @param msg The error message code + * @param msg The error message key * @param args Arguments to be used in the error message * @throws XSLProcessorException thrown if the active ProblemListener and XPathContext decide * the error condition is severe enough to halt processing. * * @throws javax.xml.transform.TransformerException */ - public void error(XPathContext xctxt, int msg, Object args[]) + public void error(XPathContext xctxt, String msg, Object args[]) throws javax.xml.transform.TransformerException { @@ -447,14 +447,14 @@ * Warn the user of a problem. * * @param xctxt The XPath runtime state. - * @param msg Warning message code + * @param msg Warning message key * @param args Arguments to be used in the warning message * @throws XSLProcessorException thrown if the active ProblemListener and XPathContext decide * the error condition is severe enough to halt processing. * * @throws javax.xml.transform.TransformerException */ - public void warn(XPathContext xctxt, int msg, Object args[]) + public void warn(XPathContext xctxt, String msg, Object args[]) throws javax.xml.transform.TransformerException { Index: org/apache/xalan/templates/FuncFormatNumb.java =================================================================== RCS file: /home/cvspublic/xml-xalan/java/src/org/apache/xalan/templates/FuncFormatNumb.java,v retrieving revision 1.17 diff -u -r1.17 FuncFormatNumb.java --- org/apache/xalan/templates/FuncFormatNumb.java 10 Jun 2002 20:47:44 -0000 1.17 +++ org/apache/xalan/templates/FuncFormatNumb.java 9 Jan 2003 19:43:27 -0000 @@ -186,14 +186,14 @@ * Warn the user of a problem. * * @param xctxt The XPath runtime state. - * @param msg Warning message code + * @param msg Warning message key * @param args Arguments to be used in warning message * @throws XSLProcessorException thrown if the active ProblemListener and XPathContext decide * the error condition is severe enough to halt processing. * * @throws javax.xml.transform.TransformerException */ - public void warn(XPathContext xctxt, int msg, Object args[]) + public void warn(XPathContext xctxt, String msg, Object args[]) throws javax.xml.transform.TransformerException { Index: org/apache/xalan/transformer/MsgMgr.java =================================================================== RCS file: /home/cvspublic/xml-xalan/java/src/org/apache/xalan/transformer/MsgMgr.java,v retrieving revision 1.10 diff -u -r1.10 MsgMgr.java --- org/apache/xalan/transformer/MsgMgr.java 26 Jan 2001 01:46:01 -0000 1.10 +++ org/apache/xalan/transformer/MsgMgr.java 9 Jan 2003 19:43:27 -0000 @@ -130,7 +130,7 @@ * * @throws TransformerException */ - public void warn(SourceLocator srcLctr, int msg) throws TransformerException + public void warn(SourceLocator srcLctr, String msg) throws TransformerException { warn(srcLctr, null, null, msg, null); } @@ -146,7 +146,7 @@ * * @throws TransformerException */ - public void warn(SourceLocator srcLctr, int msg, Object[] args) throws TransformerException + public void warn(SourceLocator srcLctr, String msg, Object[] args) throws +TransformerException { warn(srcLctr, null, null, msg, args); } @@ -164,7 +164,7 @@ * * @throws TransformerException */ - public void warn(SourceLocator srcLctr, Node styleNode, Node sourceNode, int msg) + public void warn(SourceLocator srcLctr, Node styleNode, Node sourceNode, String msg) throws TransformerException { warn(srcLctr, styleNode, sourceNode, msg, null); @@ -183,7 +183,7 @@ * * @throws TransformerException */ - public void warn(SourceLocator srcLctr, Node styleNode, Node sourceNode, int msg, Object args[]) + public void warn(SourceLocator srcLctr, Node styleNode, Node sourceNode, String +msg, Object args[]) throws TransformerException { @@ -196,7 +196,7 @@ System.out.println(formattedMsg); } - /** + /* This method is not properly i18nized. We need to use the following method * <meta name="usage" content="internal"/> * Tell the user of an error, and probably throw an * exception. @@ -206,7 +206,7 @@ * the error condition is severe enough to halt processing. * * @throws TransformerException - */ + * public void error(SourceLocator srcLctr, String msg) throws TransformerException { @@ -222,6 +222,8 @@ throw new TransformerException(msg, srcLctr); } + */ + /** * <meta name="usage" content="internal"/> * Tell the user of an error, and probably throw an @@ -233,7 +235,7 @@ * * @throws TransformerException */ - public void error(SourceLocator srcLctr, int msg) throws TransformerException + public void error(SourceLocator srcLctr, String msg) throws TransformerException { error(srcLctr, null, null, msg, null); } @@ -250,7 +252,7 @@ * * @throws TransformerException */ - public void error(SourceLocator srcLctr, int msg, Object[] args) throws TransformerException + public void error(SourceLocator srcLctr, String msg, Object[] args) throws +TransformerException { error(srcLctr, null, null, msg, args); } @@ -267,7 +269,7 @@ * * @throws TransformerException */ - public void error(SourceLocator srcLctr, int msg, Exception e) throws TransformerException + public void error(SourceLocator srcLctr, String msg, Exception e) throws +TransformerException { error(srcLctr, msg, null, e); } @@ -285,7 +287,7 @@ * * @throws TransformerException */ - public void error(SourceLocator srcLctr, int msg, Object args[], Exception e) throws TransformerException + public void error(SourceLocator srcLctr, String msg, Object args[], Exception e) +throws TransformerException { //msg = (null == msg) ? XSLTErrorResources.ER_PROCESSOR_ERROR : msg; @@ -316,7 +318,7 @@ * * @throws TransformerException */ - public void error(SourceLocator srcLctr, Node styleNode, Node sourceNode, int msg) + public void error(SourceLocator srcLctr, Node styleNode, Node sourceNode, String +msg) throws TransformerException { error(srcLctr, styleNode, sourceNode, msg, null); @@ -336,7 +338,7 @@ * * @throws TransformerException */ - public void error(SourceLocator srcLctr, Node styleNode, Node sourceNode, int msg, Object args[]) + public void error(SourceLocator srcLctr, Node styleNode, Node sourceNode, String +msg, Object args[]) throws TransformerException { Index: org/apache/xml/utils/UnImplNode.java =================================================================== RCS file: /home/cvspublic/xml-xalan/java/src/org/apache/xml/utils/UnImplNode.java,v retrieving revision 1.4 diff -u -r1.4 UnImplNode.java --- org/apache/xml/utils/UnImplNode.java 29 Jun 2001 17:40:58 -0000 1.4 +++ org/apache/xml/utils/UnImplNode.java 9 Jan 2003 19:43:28 -0000 @@ -77,9 +77,9 @@ /** * Throw an error. * - * @param msg Message code for the error + * @param msg Message Key for the error */ - public void error(int msg) + public void error(String msg) { System.out.println("DOM ERROR! class: " + this.getClass().getName()); @@ -90,10 +90,10 @@ /** * Throw an error. * - * @param msg Message code for the error + * @param msg Message Key for the error * @param args Array of arguments to be used in the error message */ - public void error(int msg, Object[] args) + public void error(String msg, Object[] args) { System.out.println("DOM ERROR! class: " + this.getClass().getName()); Index: org/apache/xpath/Expression.java =================================================================== RCS file: /home/cvspublic/xml-xalan/java/src/org/apache/xpath/Expression.java,v retrieving revision 1.18 diff -u -r1.18 Expression.java --- org/apache/xpath/Expression.java 22 Mar 2002 01:04:42 -0000 1.18 +++ org/apache/xpath/Expression.java 9 Jan 2003 19:43:28 -0000 @@ -418,7 +418,7 @@ * Warn the user of an problem. * * @param xctxt The XPath runtime context. - * @param msg An error number that corresponds to one of the numbers found + * @param msg An error msgkey that corresponds to one of the conststants found * in {@link org.apache.xpath.res.XPATHErrorResources}, which is * a key for a format string. * @param args An array of arguments represented in the format string, which @@ -429,7 +429,7 @@ * * @throws javax.xml.transform.TransformerException */ - public void warn(XPathContext xctxt, int msg, Object[] args) + public void warn(XPathContext xctxt, String msg, Object[] args) throws javax.xml.transform.TransformerException { @@ -473,7 +473,7 @@ * exception. * * @param xctxt The XPath runtime context. - * @param msg An error number that corresponds to one of the numbers found + * @param msg An error msgkey that corresponds to one of the constants found * in {@link org.apache.xpath.res.XPATHErrorResources}, which is * a key for a format string. * @param args An array of arguments represented in the format string, which @@ -484,7 +484,7 @@ * * @throws javax.xml.transform.TransformerException */ - public void error(XPathContext xctxt, int msg, Object[] args) + public void error(XPathContext xctxt, String msg, Object[] args) throws javax.xml.transform.TransformerException { Index: org/apache/xpath/XPath.java =================================================================== RCS file: /home/cvspublic/xml-xalan/java/src/org/apache/xpath/XPath.java,v retrieving revision 1.25 diff -u -r1.25 XPath.java --- org/apache/xpath/XPath.java 25 Oct 2002 17:41:51 -0000 1.25 +++ org/apache/xpath/XPath.java 9 Jan 2003 19:43:28 -0000 @@ -493,7 +493,7 @@ * * @param xctxt The XPath runtime context. * @param sourceNode Not used. - * @param msg An error number that corresponds to one of the numbers found + * @param msg An error msgkey that corresponds to one of the constants found * in {@link org.apache.xpath.res.XPATHErrorResources}, which is * a key for a format string. * @param args An array of arguments represented in the format string, which @@ -503,7 +503,7 @@ * throw an exception. */ public void warn( - XPathContext xctxt, int sourceNode, int msg, Object[] args) + XPathContext xctxt, int sourceNode, String msg, Object[] args) throws javax.xml.transform.TransformerException { @@ -546,7 +546,7 @@ * * @param xctxt The XPath runtime context. * @param sourceNode Not used. - * @param msg An error number that corresponds to one of the numbers found + * @param msg An error msgkey that corresponds to one of the constants found * in {@link org.apache.xpath.res.XPATHErrorResources}, which is * a key for a format string. * @param args An array of arguments represented in the format string, which @@ -556,7 +556,7 @@ * throw an exception. */ public void error( - XPathContext xctxt, int sourceNode, int msg, Object[] args) + XPathContext xctxt, int sourceNode, String msg, Object[] args) throws javax.xml.transform.TransformerException { Index: org/apache/xpath/compiler/Compiler.java =================================================================== RCS file: /home/cvspublic/xml-xalan/java/src/org/apache/xpath/compiler/Compiler.java,v retrieving revision 1.30 diff -u -r1.30 Compiler.java --- org/apache/xpath/compiler/Compiler.java 7 Oct 2002 15:29:02 -0000 1.30 +++ org/apache/xpath/compiler/Compiler.java 9 Jan 2003 19:43:28 -0000 @@ -1151,7 +1151,7 @@ /** * Warn the user of an problem. * - * @param msg An error number that corresponds to one of the numbers found + * @param msg An error msgkey that corresponds to one of the constants found * in {@link org.apache.xpath.res.XPATHErrorResources}, which is * a key for a format string. * @param args An array of arguments represented in the format string, which @@ -1160,7 +1160,7 @@ * @throws TransformerException if the current ErrorListoner determines to * throw an exception. */ - public void warn(int msg, Object[] args) throws TransformerException + public void warn(String msg, Object[] args) throws TransformerException { java.lang.String fmsg = XSLMessages.createXPATHWarning(msg, args); @@ -1204,7 +1204,7 @@ * Tell the user of an error, and probably throw an * exception. * - * @param msg An error number that corresponds to one of the numbers found + * @param msg An error msgkey that corresponds to one of the constants found * in {@link org.apache.xpath.res.XPATHErrorResources}, which is * a key for a format string. * @param args An array of arguments represented in the format string, which @@ -1213,7 +1213,7 @@ * @throws TransformerException if the current ErrorListoner determines to * throw an exception. */ - public void error(int msg, Object[] args) throws TransformerException + public void error(String msg, Object[] args) throws TransformerException { java.lang.String fmsg = XSLMessages.createXPATHMessage(msg, args); Index: org/apache/xpath/compiler/OpMap.java =================================================================== RCS file: /home/cvspublic/xml-xalan/java/src/org/apache/xpath/compiler/OpMap.java,v retrieving revision 1.13 diff -u -r1.13 OpMap.java --- org/apache/xpath/compiler/OpMap.java 7 Oct 2002 15:34:58 -0000 1.13 +++ org/apache/xpath/compiler/OpMap.java 9 Jan 2003 19:43:28 -0000 @@ -338,7 +338,7 @@ * Tell the user of an error, and probably throw an * exception. * - * @param msg An error number that corresponds to one of the numbers found + * @param msg An error msgkey that corresponds to one of the constants found * in {@link org.apache.xpath.res.XPATHErrorResources}, which is * a key for a format string. * @param args An array of arguments represented in the format string, which @@ -347,7 +347,7 @@ * @throws TransformerException if the current ErrorListoner determines to * throw an exception. */ - public void error(int msg, Object[] args) throws javax.xml.transform.TransformerException + public void error(String msg, Object[] args) throws +javax.xml.transform.TransformerException { java.lang.String fmsg = org.apache.xalan.res.XSLMessages.createXPATHMessage(msg, args); Index: org/apache/xpath/compiler/XPathParser.java =================================================================== RCS file: /home/cvspublic/xml-xalan/java/src/org/apache/xpath/compiler/XPathParser.java,v retrieving revision 1.22 diff -u -r1.22 XPathParser.java --- org/apache/xpath/compiler/XPathParser.java 7 Oct 2002 15:29:02 -0000 1.22 +++ org/apache/xpath/compiler/XPathParser.java 9 Jan 2003 19:43:28 -0000 @@ -578,7 +578,7 @@ /** * Warn the user of a problem. * - * @param msg An error number that corresponds to one of the numbers found + * @param msg An error msgkey that corresponds to one of the constants found * in {@link org.apache.xpath.res.XPATHErrorResources}, which is * a key for a format string. * @param args An array of arguments represented in the format string, which @@ -587,7 +587,7 @@ * @throws TransformerException if the current ErrorListoner determines to * throw an exception. */ - void warn(int msg, Object[] args) throws TransformerException + void warn(String msg, Object[] args) throws TransformerException { String fmsg = XSLMessages.createXPATHWarning(msg, args); @@ -631,7 +631,7 @@ * Notify the user of an error, and probably throw an * exception. * - * @param msg An error number that corresponds to one of the numbers found + * @param msg An error msgkey that corresponds to one of the constants found * in {@link org.apache.xpath.res.XPATHErrorResources}, which is * a key for a format string. * @param args An array of arguments represented in the format string, which @@ -640,7 +640,7 @@ * @throws TransformerException if the current ErrorListoner determines to * throw an exception. */ - void error(int msg, Object[] args) throws TransformerException + void error(String msg, Object[] args) throws TransformerException { String fmsg = XSLMessages.createXPATHMessage(msg, args); Index: org/apache/xpath/objects/XObject.java =================================================================== RCS file: /home/cvspublic/xml-xalan/java/src/org/apache/xpath/objects/XObject.java,v retrieving revision 1.20 diff -u -r1.20 XObject.java --- org/apache/xpath/objects/XObject.java 29 Mar 2002 15:18:39 -0000 1.20 +++ org/apache/xpath/objects/XObject.java 9 Jan 2003 19:43:28 -0000 @@ -711,7 +711,7 @@ * * @throws javax.xml.transform.TransformerException */ - protected void error(int msg) + protected void error(String msg) throws javax.xml.transform.TransformerException { error(msg, null); @@ -726,7 +726,7 @@ * * @throws javax.xml.transform.TransformerException */ - protected void error(int msg, Object[] args) + protected void error(String msg, Object[] args) throws javax.xml.transform.TransformerException {
1 ) org.apache.xpath.Expression 2) org.apache.xpath.compiler.XPathParser 3) org.apache.xpath.objects.XObject 4) org.apache.xpath.compiler.OpMap 5) org.apache.xpath.compiler.Compiler 6) org.apache.xalan.transformer.MsgMgr 7) org.apache.xalan.processor.StylesheetHandler 8) org.apache.xalan.processor.XSLTAttributeDef 9) org.apache.xalan.processor.processorInclude 10) org.apache.xalan.processor.processorImport 11) org.apache.xalan.templates.FuncDocument 12) org.apache.xml.utils.UnImplNode 13) org.apache.xalan.templates.ElemTemplateElement 14) org.apache.xpath.XPath 15) org.apache.xalan.templates.FuncFormatNumb
xml-res.jar
Description: xml-res.jar