當前位置: 首頁>>代碼示例>>Java>>正文


Java XSLMessages.createXPATHWarning方法代碼示例

本文整理匯總了Java中org.apache.xalan.res.XSLMessages.createXPATHWarning方法的典型用法代碼示例。如果您正苦於以下問題:Java XSLMessages.createXPATHWarning方法的具體用法?Java XSLMessages.createXPATHWarning怎麽用?Java XSLMessages.createXPATHWarning使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.apache.xalan.res.XSLMessages的用法示例。


在下文中一共展示了XSLMessages.createXPATHWarning方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: warn

import org.apache.xalan.res.XSLMessages; //導入方法依賴的package包/類
/**
 * 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 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 
 *             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()));
  }
}
 
開發者ID:keplersj,項目名稱:In-the-Box-Fork,代碼行數:30,代碼來源:XPath.java

示例2: warn

import org.apache.xalan.res.XSLMessages; //導入方法依賴的package包/類
/**
 * Warn the user of a problem.
 *
 * @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 
 *             may be null.
 *
 * @throws TransformerException if the current ErrorListoner determines to 
 *                              throw an exception.
 */
void warn(String msg, Object[] args) throws TransformerException
{

  String fmsg = XSLMessages.createXPATHWarning(msg, args);
  ErrorListener ehandler = this.getErrorListener();

  if (null != ehandler)
  {
    // TO DO: Need to get stylesheet Locator from here.
    ehandler.warning(new TransformerException(fmsg, m_sourceLocator));
  }
  else
  {
    // Should never happen.
    System.err.println(fmsg);
  }
}
 
開發者ID:keplersj,項目名稱:In-the-Box-Fork,代碼行數:30,代碼來源:XPathParser.java

示例3: warn

import org.apache.xalan.res.XSLMessages; //導入方法依賴的package包/類
/**
 * Warn the user of an problem.
 *
 * @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 
 *             may be null.
 *
 * @throws TransformerException if the current ErrorListoner determines to 
 *                              throw an exception.
 */
public void warn(String msg, Object[] args) throws TransformerException
{

  java.lang.String fmsg = XSLMessages.createXPATHWarning(msg, args);

  if (null != m_errorHandler)
  {
    m_errorHandler.warning(new TransformerException(fmsg, m_locator));
  }
  else
  {
    System.out.println(fmsg
                        +"; file "+m_locator.getSystemId()
                        +"; line "+m_locator.getLineNumber()
                        +"; column "+m_locator.getColumnNumber());
  }
}
 
開發者ID:keplersj,項目名稱:In-the-Box-Fork,代碼行數:30,代碼來源:Compiler.java

示例4: warn

import org.apache.xalan.res.XSLMessages; //導入方法依賴的package包/類
/**
 * Warn the user of an problem.
 *
 * @param xctxt The XPath runtime context.
 * @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
 *             may be null.
 *
 * @throws TransformerException if the current ErrorListoner determines to
 *                              throw an exception.
 *
 * @throws javax.xml.transform.TransformerException
 */
public void warn(XPathContext xctxt, String msg, Object[] args)
        throws javax.xml.transform.TransformerException
{

  java.lang.String fmsg = XSLMessages.createXPATHWarning(msg, args);

  if (null != xctxt)
  {
    ErrorListener eh = xctxt.getErrorListener();

    // TO DO: Need to get stylesheet Locator from here.
    eh.warning(new TransformerException(fmsg, xctxt.getSAXLocator()));
  }
}
 
開發者ID:keplersj,項目名稱:In-the-Box-Fork,代碼行數:30,代碼來源:Expression.java


注:本文中的org.apache.xalan.res.XSLMessages.createXPATHWarning方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。