com.sun.org.apache.xml.internal.utils.SAXSourceLocator Java Examples
The following examples show how to use
com.sun.org.apache.xml.internal.utils.SAXSourceLocator.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: XPath.java From hottub with GNU General Public License v2.0 | 6 votes |
/** * Tell the user of an error, and probably throw an * exception. * * @param xctxt The XPath runtime context. * @param sourceNode Not used. * @param msg An error msgkey that corresponds to one of the constants found * in {@link com.sun.org.apache.xpath.internal.res.XPATHErrorResources}, which is * a key for a format string. * @param args An array of arguments represented in the format string, which * may be null. * * @throws TransformerException if the current ErrorListoner determines to * throw an exception. */ public void error( XPathContext xctxt, int sourceNode, String msg, Object[] args) throws javax.xml.transform.TransformerException { String fmsg = XSLMessages.createXPATHMessage(msg, args); ErrorListener ehandler = xctxt.getErrorListener(); if (null != ehandler) { ehandler.fatalError(new TransformerException(fmsg, (SAXSourceLocator)xctxt.getSAXLocator())); } else { SourceLocator slocator = xctxt.getSAXLocator(); System.out.println(fmsg + "; file " + slocator.getSystemId() + "; line " + slocator.getLineNumber() + "; column " + slocator.getColumnNumber()); } }
Example #2
Source File: Compiler.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
/** * Tell the user of an error, and probably throw an * exception. * * @param msg An error msgkey that corresponds to one of the constants found * in {@link com.sun.org.apache.xpath.internal.res.XPATHErrorResources}, which is * a key for a format string. * @param args An array of arguments represented in the format string, which * may be null. * * @throws TransformerException if the current ErrorListoner determines to * throw an exception. */ public void error(String msg, Object[] args) throws TransformerException { java.lang.String fmsg = XSLMessages.createXPATHMessage(msg, args); if (null != m_errorHandler) { m_errorHandler.fatalError(new TransformerException(fmsg, m_locator)); } else { // System.out.println(te.getMessage() // +"; file "+te.getSystemId() // +"; line "+te.getLineNumber() // +"; column "+te.getColumnNumber()); throw new TransformerException(fmsg, (SAXSourceLocator)m_locator); } }
Example #3
Source File: XPath.java From Bytecoder with Apache License 2.0 | 6 votes |
/** * Warn the user of an problem. * * @param xctxt The XPath runtime context. * @param sourceNode Not used. * @param msg An error msgkey that corresponds to one of the constants found * in {@link com.sun.org.apache.xpath.internal.res.XPATHErrorResources}, which is * a key for a format string. * @param args An array of arguments represented in the format string, which * may be null. * * @throws TransformerException if the current ErrorListoner determines to * throw an exception. */ public void warn( XPathContext xctxt, int sourceNode, String msg, Object[] args) throws javax.xml.transform.TransformerException { String fmsg = XSLMessages.createXPATHWarning(msg, args); ErrorListener ehandler = xctxt.getErrorListener(); if (null != ehandler) { // TO DO: Need to get stylesheet Locator from here. ehandler.warning(new TransformerException(fmsg, (SAXSourceLocator)xctxt.getSAXLocator())); } }
Example #4
Source File: XPath.java From Bytecoder with Apache License 2.0 | 6 votes |
/** * Tell the user of an error, and probably throw an * exception. * * @param xctxt The XPath runtime context. * @param sourceNode Not used. * @param msg An error msgkey that corresponds to one of the constants found * in {@link com.sun.org.apache.xpath.internal.res.XPATHErrorResources}, which is * a key for a format string. * @param args An array of arguments represented in the format string, which * may be null. * * @throws TransformerException if the current ErrorListoner determines to * throw an exception. */ public void error( XPathContext xctxt, int sourceNode, String msg, Object[] args) throws javax.xml.transform.TransformerException { String fmsg = XSLMessages.createXPATHMessage(msg, args); ErrorListener ehandler = xctxt.getErrorListener(); if (null != ehandler) { ehandler.fatalError(new TransformerException(fmsg, (SAXSourceLocator)xctxt.getSAXLocator())); } else { SourceLocator slocator = xctxt.getSAXLocator(); System.out.println(fmsg + "; file " + slocator.getSystemId() + "; line " + slocator.getLineNumber() + "; column " + slocator.getColumnNumber()); } }
Example #5
Source File: Compiler.java From Bytecoder with Apache License 2.0 | 6 votes |
/** * Tell the user of an error, and probably throw an * exception. * * @param msg An error msgkey that corresponds to one of the constants found * in {@link com.sun.org.apache.xpath.internal.res.XPATHErrorResources}, which is * a key for a format string. * @param args An array of arguments represented in the format string, which * may be null. * * @throws TransformerException if the current ErrorListoner determines to * throw an exception. */ public void error(String msg, Object[] args) throws TransformerException { java.lang.String fmsg = XSLMessages.createXPATHMessage(msg, args); if (null != m_errorHandler) { m_errorHandler.fatalError(new TransformerException(fmsg, m_locator)); } else { // System.out.println(te.getMessage() // +"; file "+te.getSystemId() // +"; line "+te.getLineNumber() // +"; column "+te.getColumnNumber()); throw new TransformerException(fmsg, (SAXSourceLocator)m_locator); } }
Example #6
Source File: XPath.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
/** * Warn the user of an problem. * * @param xctxt The XPath runtime context. * @param sourceNode Not used. * @param msg An error msgkey that corresponds to one of the constants found * in {@link com.sun.org.apache.xpath.internal.res.XPATHErrorResources}, which is * a key for a format string. * @param args An array of arguments represented in the format string, which * may be null. * * @throws TransformerException if the current ErrorListoner determines to * throw an exception. */ public void warn( XPathContext xctxt, int sourceNode, String msg, Object[] args) throws javax.xml.transform.TransformerException { String fmsg = XSLMessages.createXPATHWarning(msg, args); ErrorListener ehandler = xctxt.getErrorListener(); if (null != ehandler) { // TO DO: Need to get stylesheet Locator from here. ehandler.warning(new TransformerException(fmsg, (SAXSourceLocator)xctxt.getSAXLocator())); } }
Example #7
Source File: XPath.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
/** * Tell the user of an error, and probably throw an * exception. * * @param xctxt The XPath runtime context. * @param sourceNode Not used. * @param msg An error msgkey that corresponds to one of the constants found * in {@link com.sun.org.apache.xpath.internal.res.XPATHErrorResources}, which is * a key for a format string. * @param args An array of arguments represented in the format string, which * may be null. * * @throws TransformerException if the current ErrorListoner determines to * throw an exception. */ public void error( XPathContext xctxt, int sourceNode, String msg, Object[] args) throws javax.xml.transform.TransformerException { String fmsg = XSLMessages.createXPATHMessage(msg, args); ErrorListener ehandler = xctxt.getErrorListener(); if (null != ehandler) { ehandler.fatalError(new TransformerException(fmsg, (SAXSourceLocator)xctxt.getSAXLocator())); } else { SourceLocator slocator = xctxt.getSAXLocator(); System.out.println(fmsg + "; file " + slocator.getSystemId() + "; line " + slocator.getLineNumber() + "; column " + slocator.getColumnNumber()); } }
Example #8
Source File: Compiler.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
/** * Tell the user of an error, and probably throw an * exception. * * @param msg An error msgkey that corresponds to one of the constants found * in {@link com.sun.org.apache.xpath.internal.res.XPATHErrorResources}, which is * a key for a format string. * @param args An array of arguments represented in the format string, which * may be null. * * @throws TransformerException if the current ErrorListoner determines to * throw an exception. */ public void error(String msg, Object[] args) throws TransformerException { java.lang.String fmsg = XSLMessages.createXPATHMessage(msg, args); if (null != m_errorHandler) { m_errorHandler.fatalError(new TransformerException(fmsg, m_locator)); } else { // System.out.println(te.getMessage() // +"; file "+te.getSystemId() // +"; line "+te.getLineNumber() // +"; column "+te.getColumnNumber()); throw new TransformerException(fmsg, (SAXSourceLocator)m_locator); } }
Example #9
Source File: XPath.java From hottub with GNU General Public License v2.0 | 6 votes |
/** * Warn the user of an problem. * * @param xctxt The XPath runtime context. * @param sourceNode Not used. * @param msg An error msgkey that corresponds to one of the constants found * in {@link com.sun.org.apache.xpath.internal.res.XPATHErrorResources}, which is * a key for a format string. * @param args An array of arguments represented in the format string, which * may be null. * * @throws TransformerException if the current ErrorListoner determines to * throw an exception. */ public void warn( XPathContext xctxt, int sourceNode, String msg, Object[] args) throws javax.xml.transform.TransformerException { String fmsg = XSLMessages.createXPATHWarning(msg, args); ErrorListener ehandler = xctxt.getErrorListener(); if (null != ehandler) { // TO DO: Need to get stylesheet Locator from here. ehandler.warning(new TransformerException(fmsg, (SAXSourceLocator)xctxt.getSAXLocator())); } }
Example #10
Source File: XPath.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
/** * Tell the user of an error, and probably throw an * exception. * * @param xctxt The XPath runtime context. * @param sourceNode Not used. * @param msg An error msgkey that corresponds to one of the constants found * in {@link com.sun.org.apache.xpath.internal.res.XPATHErrorResources}, which is * a key for a format string. * @param args An array of arguments represented in the format string, which * may be null. * * @throws TransformerException if the current ErrorListoner determines to * throw an exception. */ public void error( XPathContext xctxt, int sourceNode, String msg, Object[] args) throws javax.xml.transform.TransformerException { String fmsg = XSLMessages.createXPATHMessage(msg, args); ErrorListener ehandler = xctxt.getErrorListener(); if (null != ehandler) { ehandler.fatalError(new TransformerException(fmsg, (SAXSourceLocator)xctxt.getSAXLocator())); } else { SourceLocator slocator = xctxt.getSAXLocator(); System.out.println(fmsg + "; file " + slocator.getSystemId() + "; line " + slocator.getLineNumber() + "; column " + slocator.getColumnNumber()); } }
Example #11
Source File: Compiler.java From hottub with GNU General Public License v2.0 | 6 votes |
/** * Tell the user of an error, and probably throw an * exception. * * @param msg An error msgkey that corresponds to one of the constants found * in {@link com.sun.org.apache.xpath.internal.res.XPATHErrorResources}, which is * a key for a format string. * @param args An array of arguments represented in the format string, which * may be null. * * @throws TransformerException if the current ErrorListoner determines to * throw an exception. */ public void error(String msg, Object[] args) throws TransformerException { java.lang.String fmsg = XSLMessages.createXPATHMessage(msg, args); if (null != m_errorHandler) { m_errorHandler.fatalError(new TransformerException(fmsg, m_locator)); } else { // System.out.println(te.getMessage() // +"; file "+te.getSystemId() // +"; line "+te.getLineNumber() // +"; column "+te.getColumnNumber()); throw new TransformerException(fmsg, (SAXSourceLocator)m_locator); } }
Example #12
Source File: XPath.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
/** * Warn the user of an problem. * * @param xctxt The XPath runtime context. * @param sourceNode Not used. * @param msg An error msgkey that corresponds to one of the constants found * in {@link com.sun.org.apache.xpath.internal.res.XPATHErrorResources}, which is * a key for a format string. * @param args An array of arguments represented in the format string, which * may be null. * * @throws TransformerException if the current ErrorListoner determines to * throw an exception. */ public void warn( XPathContext xctxt, int sourceNode, String msg, Object[] args) throws javax.xml.transform.TransformerException { String fmsg = XSLMessages.createXPATHWarning(msg, args); ErrorListener ehandler = xctxt.getErrorListener(); if (null != ehandler) { // TO DO: Need to get stylesheet Locator from here. ehandler.warning(new TransformerException(fmsg, (SAXSourceLocator)xctxt.getSAXLocator())); } }
Example #13
Source File: XPath.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
/** * Tell the user of an error, and probably throw an * exception. * * @param xctxt The XPath runtime context. * @param sourceNode Not used. * @param msg An error msgkey that corresponds to one of the constants found * in {@link com.sun.org.apache.xpath.internal.res.XPATHErrorResources}, which is * a key for a format string. * @param args An array of arguments represented in the format string, which * may be null. * * @throws TransformerException if the current ErrorListoner determines to * throw an exception. */ public void error( XPathContext xctxt, int sourceNode, String msg, Object[] args) throws javax.xml.transform.TransformerException { String fmsg = XSLMessages.createXPATHMessage(msg, args); ErrorListener ehandler = xctxt.getErrorListener(); if (null != ehandler) { ehandler.fatalError(new TransformerException(fmsg, (SAXSourceLocator)xctxt.getSAXLocator())); } else { SourceLocator slocator = xctxt.getSAXLocator(); System.out.println(fmsg + "; file " + slocator.getSystemId() + "; line " + slocator.getLineNumber() + "; column " + slocator.getColumnNumber()); } }
Example #14
Source File: Compiler.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
/** * Tell the user of an error, and probably throw an * exception. * * @param msg An error msgkey that corresponds to one of the constants found * in {@link com.sun.org.apache.xpath.internal.res.XPATHErrorResources}, which is * a key for a format string. * @param args An array of arguments represented in the format string, which * may be null. * * @throws TransformerException if the current ErrorListoner determines to * throw an exception. */ public void error(String msg, Object[] args) throws TransformerException { java.lang.String fmsg = XSLMessages.createXPATHMessage(msg, args); if (null != m_errorHandler) { m_errorHandler.fatalError(new TransformerException(fmsg, m_locator)); } else { // System.out.println(te.getMessage() // +"; file "+te.getSystemId() // +"; line "+te.getLineNumber() // +"; column "+te.getColumnNumber()); throw new TransformerException(fmsg, (SAXSourceLocator)m_locator); } }
Example #15
Source File: XPath.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
/** * Warn the user of an problem. * * @param xctxt The XPath runtime context. * @param sourceNode Not used. * @param msg An error msgkey that corresponds to one of the constants found * in {@link com.sun.org.apache.xpath.internal.res.XPATHErrorResources}, which is * a key for a format string. * @param args An array of arguments represented in the format string, which * may be null. * * @throws TransformerException if the current ErrorListoner determines to * throw an exception. */ public void warn( XPathContext xctxt, int sourceNode, String msg, Object[] args) throws javax.xml.transform.TransformerException { String fmsg = XSLMessages.createXPATHWarning(msg, args); ErrorListener ehandler = xctxt.getErrorListener(); if (null != ehandler) { // TO DO: Need to get stylesheet Locator from here. ehandler.warning(new TransformerException(fmsg, (SAXSourceLocator)xctxt.getSAXLocator())); } }
Example #16
Source File: XPath.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
/** * Tell the user of an error, and probably throw an * exception. * * @param xctxt The XPath runtime context. * @param sourceNode Not used. * @param msg An error msgkey that corresponds to one of the constants found * in {@link com.sun.org.apache.xpath.internal.res.XPATHErrorResources}, which is * a key for a format string. * @param args An array of arguments represented in the format string, which * may be null. * * @throws TransformerException if the current ErrorListoner determines to * throw an exception. */ public void error( XPathContext xctxt, int sourceNode, String msg, Object[] args) throws javax.xml.transform.TransformerException { String fmsg = XSLMessages.createXPATHMessage(msg, args); ErrorListener ehandler = xctxt.getErrorListener(); if (null != ehandler) { ehandler.fatalError(new TransformerException(fmsg, (SAXSourceLocator)xctxt.getSAXLocator())); } else { SourceLocator slocator = xctxt.getSAXLocator(); System.out.println(fmsg + "; file " + slocator.getSystemId() + "; line " + slocator.getLineNumber() + "; column " + slocator.getColumnNumber()); } }
Example #17
Source File: Compiler.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
/** * Tell the user of an error, and probably throw an * exception. * * @param msg An error msgkey that corresponds to one of the constants found * in {@link com.sun.org.apache.xpath.internal.res.XPATHErrorResources}, which is * a key for a format string. * @param args An array of arguments represented in the format string, which * may be null. * * @throws TransformerException if the current ErrorListoner determines to * throw an exception. */ public void error(String msg, Object[] args) throws TransformerException { java.lang.String fmsg = XSLMessages.createXPATHMessage(msg, args); if (null != m_errorHandler) { m_errorHandler.fatalError(new TransformerException(fmsg, m_locator)); } else { // System.out.println(te.getMessage() // +"; file "+te.getSystemId() // +"; line "+te.getLineNumber() // +"; column "+te.getColumnNumber()); throw new TransformerException(fmsg, (SAXSourceLocator)m_locator); } }
Example #18
Source File: XPath.java From jdk1.8-source-analysis with Apache License 2.0 | 6 votes |
/** * Warn the user of an problem. * * @param xctxt The XPath runtime context. * @param sourceNode Not used. * @param msg An error msgkey that corresponds to one of the constants found * in {@link com.sun.org.apache.xpath.internal.res.XPATHErrorResources}, which is * a key for a format string. * @param args An array of arguments represented in the format string, which * may be null. * * @throws TransformerException if the current ErrorListoner determines to * throw an exception. */ public void warn( XPathContext xctxt, int sourceNode, String msg, Object[] args) throws javax.xml.transform.TransformerException { String fmsg = XSLMessages.createXPATHWarning(msg, args); ErrorListener ehandler = xctxt.getErrorListener(); if (null != ehandler) { // TO DO: Need to get stylesheet Locator from here. ehandler.warning(new TransformerException(fmsg, (SAXSourceLocator)xctxt.getSAXLocator())); } }
Example #19
Source File: XPath.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
/** * Warn the user of an problem. * * @param xctxt The XPath runtime context. * @param sourceNode Not used. * @param msg An error msgkey that corresponds to one of the constants found * in {@link com.sun.org.apache.xpath.internal.res.XPATHErrorResources}, which is * a key for a format string. * @param args An array of arguments represented in the format string, which * may be null. * * @throws TransformerException if the current ErrorListoner determines to * throw an exception. */ public void warn( XPathContext xctxt, int sourceNode, String msg, Object[] args) throws javax.xml.transform.TransformerException { String fmsg = XSLMessages.createXPATHWarning(msg, args); ErrorListener ehandler = xctxt.getErrorListener(); if (null != ehandler) { // TO DO: Need to get stylesheet Locator from here. ehandler.warning(new TransformerException(fmsg, (SAXSourceLocator)xctxt.getSAXLocator())); } }
Example #20
Source File: Compiler.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
/** * Tell the user of an error, and probably throw an * exception. * * @param msg An error msgkey that corresponds to one of the constants found * in {@link com.sun.org.apache.xpath.internal.res.XPATHErrorResources}, which is * a key for a format string. * @param args An array of arguments represented in the format string, which * may be null. * * @throws TransformerException if the current ErrorListoner determines to * throw an exception. */ public void error(String msg, Object[] args) throws TransformerException { java.lang.String fmsg = XSLMessages.createXPATHMessage(msg, args); if (null != m_errorHandler) { m_errorHandler.fatalError(new TransformerException(fmsg, m_locator)); } else { // System.out.println(te.getMessage() // +"; file "+te.getSystemId() // +"; line "+te.getLineNumber() // +"; column "+te.getColumnNumber()); throw new TransformerException(fmsg, (SAXSourceLocator)m_locator); } }
Example #21
Source File: XPath.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
/** * Tell the user of an error, and probably throw an * exception. * * @param xctxt The XPath runtime context. * @param sourceNode Not used. * @param msg An error msgkey that corresponds to one of the constants found * in {@link com.sun.org.apache.xpath.internal.res.XPATHErrorResources}, which is * a key for a format string. * @param args An array of arguments represented in the format string, which * may be null. * * @throws TransformerException if the current ErrorListoner determines to * throw an exception. */ public void error( XPathContext xctxt, int sourceNode, String msg, Object[] args) throws javax.xml.transform.TransformerException { String fmsg = XSLMessages.createXPATHMessage(msg, args); ErrorListener ehandler = xctxt.getErrorListener(); if (null != ehandler) { ehandler.fatalError(new TransformerException(fmsg, (SAXSourceLocator)xctxt.getSAXLocator())); } else { SourceLocator slocator = xctxt.getSAXLocator(); System.out.println(fmsg + "; file " + slocator.getSystemId() + "; line " + slocator.getLineNumber() + "; column " + slocator.getColumnNumber()); } }
Example #22
Source File: XPath.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
/** * Warn the user of an problem. * * @param xctxt The XPath runtime context. * @param sourceNode Not used. * @param msg An error msgkey that corresponds to one of the constants found * in {@link com.sun.org.apache.xpath.internal.res.XPATHErrorResources}, which is * a key for a format string. * @param args An array of arguments represented in the format string, which * may be null. * * @throws TransformerException if the current ErrorListoner determines to * throw an exception. */ public void warn( XPathContext xctxt, int sourceNode, String msg, Object[] args) throws javax.xml.transform.TransformerException { String fmsg = XSLMessages.createXPATHWarning(msg, args); ErrorListener ehandler = xctxt.getErrorListener(); if (null != ehandler) { // TO DO: Need to get stylesheet Locator from here. ehandler.warning(new TransformerException(fmsg, (SAXSourceLocator)xctxt.getSAXLocator())); } }
Example #23
Source File: Compiler.java From JDKSourceCode1.8 with MIT License | 6 votes |
/** * Tell the user of an error, and probably throw an * exception. * * @param msg An error msgkey that corresponds to one of the constants found * in {@link com.sun.org.apache.xpath.internal.res.XPATHErrorResources}, which is * a key for a format string. * @param args An array of arguments represented in the format string, which * may be null. * * @throws TransformerException if the current ErrorListoner determines to * throw an exception. */ public void error(String msg, Object[] args) throws TransformerException { java.lang.String fmsg = XSLMessages.createXPATHMessage(msg, args); if (null != m_errorHandler) { m_errorHandler.fatalError(new TransformerException(fmsg, m_locator)); } else { // System.out.println(te.getMessage() // +"; file "+te.getSystemId() // +"; line "+te.getLineNumber() // +"; column "+te.getColumnNumber()); throw new TransformerException(fmsg, (SAXSourceLocator)m_locator); } }
Example #24
Source File: XPath.java From JDKSourceCode1.8 with MIT License | 6 votes |
/** * Tell the user of an error, and probably throw an * exception. * * @param xctxt The XPath runtime context. * @param sourceNode Not used. * @param msg An error msgkey that corresponds to one of the constants found * in {@link com.sun.org.apache.xpath.internal.res.XPATHErrorResources}, which is * a key for a format string. * @param args An array of arguments represented in the format string, which * may be null. * * @throws TransformerException if the current ErrorListoner determines to * throw an exception. */ public void error( XPathContext xctxt, int sourceNode, String msg, Object[] args) throws javax.xml.transform.TransformerException { String fmsg = XSLMessages.createXPATHMessage(msg, args); ErrorListener ehandler = xctxt.getErrorListener(); if (null != ehandler) { ehandler.fatalError(new TransformerException(fmsg, (SAXSourceLocator)xctxt.getSAXLocator())); } else { SourceLocator slocator = xctxt.getSAXLocator(); System.out.println(fmsg + "; file " + slocator.getSystemId() + "; line " + slocator.getLineNumber() + "; column " + slocator.getColumnNumber()); } }
Example #25
Source File: XPath.java From JDKSourceCode1.8 with MIT License | 6 votes |
/** * Warn the user of an problem. * * @param xctxt The XPath runtime context. * @param sourceNode Not used. * @param msg An error msgkey that corresponds to one of the constants found * in {@link com.sun.org.apache.xpath.internal.res.XPATHErrorResources}, which is * a key for a format string. * @param args An array of arguments represented in the format string, which * may be null. * * @throws TransformerException if the current ErrorListoner determines to * throw an exception. */ public void warn( XPathContext xctxt, int sourceNode, String msg, Object[] args) throws javax.xml.transform.TransformerException { String fmsg = XSLMessages.createXPATHWarning(msg, args); ErrorListener ehandler = xctxt.getErrorListener(); if (null != ehandler) { // TO DO: Need to get stylesheet Locator from here. ehandler.warning(new TransformerException(fmsg, (SAXSourceLocator)xctxt.getSAXLocator())); } }
Example #26
Source File: Compiler.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
/** * Tell the user of an error, and probably throw an * exception. * * @param msg An error msgkey that corresponds to one of the constants found * in {@link com.sun.org.apache.xpath.internal.res.XPATHErrorResources}, which is * a key for a format string. * @param args An array of arguments represented in the format string, which * may be null. * * @throws TransformerException if the current ErrorListoner determines to * throw an exception. */ public void error(String msg, Object[] args) throws TransformerException { java.lang.String fmsg = XSLMessages.createXPATHMessage(msg, args); if (null != m_errorHandler) { m_errorHandler.fatalError(new TransformerException(fmsg, m_locator)); } else { // System.out.println(te.getMessage() // +"; file "+te.getSystemId() // +"; line "+te.getLineNumber() // +"; column "+te.getColumnNumber()); throw new TransformerException(fmsg, (SAXSourceLocator)m_locator); } }
Example #27
Source File: XPath.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
/** * Tell the user of an error, and probably throw an * exception. * * @param xctxt The XPath runtime context. * @param sourceNode Not used. * @param msg An error msgkey that corresponds to one of the constants found * in {@link com.sun.org.apache.xpath.internal.res.XPATHErrorResources}, which is * a key for a format string. * @param args An array of arguments represented in the format string, which * may be null. * * @throws TransformerException if the current ErrorListoner determines to * throw an exception. */ public void error( XPathContext xctxt, int sourceNode, String msg, Object[] args) throws javax.xml.transform.TransformerException { String fmsg = XSLMessages.createXPATHMessage(msg, args); ErrorListener ehandler = xctxt.getErrorListener(); if (null != ehandler) { ehandler.fatalError(new TransformerException(fmsg, (SAXSourceLocator)xctxt.getSAXLocator())); } else { SourceLocator slocator = xctxt.getSAXLocator(); System.out.println(fmsg + "; file " + slocator.getSystemId() + "; line " + slocator.getLineNumber() + "; column " + slocator.getColumnNumber()); } }
Example #28
Source File: XPath.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
/** * Warn the user of an problem. * * @param xctxt The XPath runtime context. * @param sourceNode Not used. * @param msg An error msgkey that corresponds to one of the constants found * in {@link com.sun.org.apache.xpath.internal.res.XPATHErrorResources}, which is * a key for a format string. * @param args An array of arguments represented in the format string, which * may be null. * * @throws TransformerException if the current ErrorListoner determines to * throw an exception. */ public void warn( XPathContext xctxt, int sourceNode, String msg, Object[] args) throws javax.xml.transform.TransformerException { String fmsg = XSLMessages.createXPATHWarning(msg, args); ErrorListener ehandler = xctxt.getErrorListener(); if (null != ehandler) { // TO DO: Need to get stylesheet Locator from here. ehandler.warning(new TransformerException(fmsg, (SAXSourceLocator)xctxt.getSAXLocator())); } }
Example #29
Source File: Compiler.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
/** * Tell the user of an error, and probably throw an * exception. * * @param msg An error msgkey that corresponds to one of the constants found * in {@link com.sun.org.apache.xpath.internal.res.XPATHErrorResources}, which is * a key for a format string. * @param args An array of arguments represented in the format string, which * may be null. * * @throws TransformerException if the current ErrorListoner determines to * throw an exception. */ public void error(String msg, Object[] args) throws TransformerException { java.lang.String fmsg = XSLMessages.createXPATHMessage(msg, args); if (null != m_errorHandler) { m_errorHandler.fatalError(new TransformerException(fmsg, m_locator)); } else { // System.out.println(te.getMessage() // +"; file "+te.getSystemId() // +"; line "+te.getLineNumber() // +"; column "+te.getColumnNumber()); throw new TransformerException(fmsg, (SAXSourceLocator)m_locator); } }
Example #30
Source File: XPath.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
/** * Tell the user of an error, and probably throw an * exception. * * @param xctxt The XPath runtime context. * @param sourceNode Not used. * @param msg An error msgkey that corresponds to one of the constants found * in {@link com.sun.org.apache.xpath.internal.res.XPATHErrorResources}, which is * a key for a format string. * @param args An array of arguments represented in the format string, which * may be null. * * @throws TransformerException if the current ErrorListoner determines to * throw an exception. */ public void error( XPathContext xctxt, int sourceNode, String msg, Object[] args) throws javax.xml.transform.TransformerException { String fmsg = XSLMessages.createXPATHMessage(msg, args); ErrorListener ehandler = xctxt.getErrorListener(); if (null != ehandler) { ehandler.fatalError(new TransformerException(fmsg, (SAXSourceLocator)xctxt.getSAXLocator())); } else { SourceLocator slocator = xctxt.getSAXLocator(); System.out.println(fmsg + "; file " + slocator.getSystemId() + "; line " + slocator.getLineNumber() + "; column " + slocator.getColumnNumber()); } }