/** * Tell the user of an error, and probably throw an * exception. * * @param msg Error message to issue * @param args Arguments to use in the message * * @throws javax.xml.transform.TransformerException */ protected void error(String msg, Object[] args) throws javax.xml.transform.TransformerException { String fmsg = XSLMessages.createXPATHMessage(msg, args); // boolean shouldThrow = support.problem(m_support.XPATHPROCESSOR, // m_support.ERROR, // null, // null, fmsg, 0, 0); // if(shouldThrow) { throw new XPathException(fmsg, this); } }
/** * Get the XSLT ElemVariable that this sub-expression references. In order for * this to work, the SourceLocator must be the owning ElemTemplateElement. * @return The dereference to the ElemVariable, or null if not found. */ public org.w3c.dom.Node getStylesheetNode(ExpressionNode ex) { ExpressionNode owner = getExpressionOwner(ex); if (null != owner && owner instanceof org.w3c.dom.Node) { return ((org.w3c.dom.Node)owner); } return null; }
/** * Create an XPathException object that holds * an error message. * @param message The error message. */ public XPathException(String message, ExpressionNode ex) { super(message); this.setLocator(ex); setStylesheetNode(getStylesheetNode(ex)); }
/** * Create an XPathException object that holds * an error message. * @param message The error message. */ public XPathException(String message, ExpressionNode ex) { super(message); this.setLocator(ex); setStylesheetNode(getStylesheetNode(ex)); }
log.debug(e.getMessage()); log.debug(e.getMessage()); if (e.getMessage().contains("#BOOLEAN") ) { log.debug("Fallback handling XPath of form: " + xpath + " in case of " + e.getMessage() ); if (xo.bool(cachedXPathAPI.getXPathContext())) { return "true"; return "false"; } else if (e.getMessage().contains("#NUMBER") ) { log.debug("Fallback handling XPath of form: " + xpath + " in case of " + e.getMessage() ); double d = xo.num(cachedXPathAPI.getXPathContext()); if (xpath.trim().startsWith("count(") return "" + d; } else if (e.getMessage().contains("#STRING") ) { log.debug("Fallback handling XPath of form: " + xpath + " in case of " + e.getMessage() ); return xo.xstr(cachedXPathAPI.getXPathContext()).toString(); } else { log.error(e.getMessage()); log.error("Handle XPath of form: " + xpath); throw e;
/** * Create an XPathException object that holds * an error message. * @param message The error message. */ public XPathException(String message, ExpressionNode ex) { super(message); this.setLocator(ex); setStylesheetNode(getStylesheetNode(ex)); }
log.debug(e.getMessage()); log.debug(e.getMessage()); if (e.getMessage().contains("#BOOLEAN") ) { log.debug("Fallback handling XPath of form: " + xpath + " in case of " + e.getMessage() ); if (xo.bool(cachedXPathAPI.getXPathContext())) { return "true"; return "false"; } else if (e.getMessage().contains("#NUMBER") ) { log.debug("Fallback handling XPath of form: " + xpath + " in case of " + e.getMessage() ); double d = xo.num(cachedXPathAPI.getXPathContext()); if (xpath.trim().startsWith("count(") return "" + d; } else if (e.getMessage().contains("#STRING") ) { log.debug("Fallback handling XPath of form: " + xpath + " in case of " + e.getMessage() ); return xo.xstr(cachedXPathAPI.getXPathContext()).toString(); } else { log.error(e.getMessage()); log.error("Handle XPath of form: " + xpath); throw e;
/** * Create an XPathException object that holds * an error message. * @param message The error message. */ public XPathException(String message, ExpressionNode ex) { super(message); this.setLocator(ex); setStylesheetNode(getStylesheetNode(ex)); }
/** * Get the XSLT ElemVariable that this sub-expression references. In order for * this to work, the SourceLocator must be the owning ElemTemplateElement. * @return The dereference to the ElemVariable, or null if not found. */ public org.w3c.dom.Node getStylesheetNode(ExpressionNode ex) { ExpressionNode owner = getExpressionOwner(ex); if (null != owner && owner instanceof org.w3c.dom.Node) { return ((org.w3c.dom.Node)owner); } return null; }
/** * Tell the user of an error, and probably throw an * exception. * * @param msg Error message to issue * @param args Arguments to use in the message * * @throws javax.xml.transform.TransformerException */ protected void error(String msg, Object[] args) throws javax.xml.transform.TransformerException { String fmsg = XSLMessages.createXPATHMessage(msg, args); // boolean shouldThrow = support.problem(m_support.XPATHPROCESSOR, // m_support.ERROR, // null, // null, fmsg, 0, 0); // if(shouldThrow) { throw new XPathException(fmsg, this); } }
throw new TransformerException(e.getMessage(), e);
/** * Create an XPathException object that holds * an error message. * @param message The error message. */ public XPathException(String message, ExpressionNode ex) { super(message); this.setLocator(ex); setStylesheetNode(getStylesheetNode(ex)); }
/** * Get the XSLT ElemVariable that this sub-expression references. In order for * this to work, the SourceLocator must be the owning ElemTemplateElement. * @return The dereference to the ElemVariable, or null if not found. */ public org.w3c.dom.Node getStylesheetNode(ExpressionNode ex) { ExpressionNode owner = getExpressionOwner(ex); if (null != owner && owner instanceof org.w3c.dom.Node) { return ((org.w3c.dom.Node)owner); } return null; }
/** * Tell the user of an error, and probably throw an * exception. * * @param msg Error message to issue * @param args Arguments to use in the message * * @throws javax.xml.transform.TransformerException */ protected void error(String msg, Object[] args) throws javax.xml.transform.TransformerException { String fmsg = XSLMessages.createXPATHMessage(msg, args); // boolean shouldThrow = support.problem(m_support.XPATHPROCESSOR, // m_support.ERROR, // null, // null, fmsg, 0, 0); // if(shouldThrow) { throw new XPathException(fmsg, this); } }
throw new TransformerException(e.getMessage(), e);
/** * Create an XPathException object that holds * an error message. * @param message The error message. */ public XPathException(String message, ExpressionNode ex) { super(message); this.setLocator(ex); setStylesheetNode(getStylesheetNode(ex)); }
/** * Get the XSLT ElemVariable that this sub-expression references. In order for * this to work, the SourceLocator must be the owning ElemTemplateElement. * @return The dereference to the ElemVariable, or null if not found. */ public org.w3c.dom.Node getStylesheetNode(ExpressionNode ex) { ExpressionNode owner = getExpressionOwner(ex); if (null != owner && owner instanceof org.w3c.dom.Node) { return ((org.w3c.dom.Node)owner); } return null; }
/** * Tell the user of an error, and probably throw an * exception. * * @param msg Error message to issue * @param args Arguments to use in the message * * @throws javax.xml.transform.TransformerException */ protected void error(String msg, Object[] args) throws javax.xml.transform.TransformerException { String fmsg = XSLMessages.createXPATHMessage(msg, args); // boolean shouldThrow = support.problem(m_support.XPATHPROCESSOR, // m_support.ERROR, // null, // null, fmsg, 0, 0); // if(shouldThrow) { throw new XPathException(fmsg, this); } }
if(CONTINUE_AFTER_FATAL_ERROR.equals(e.getMessage()))
/** * Create an XPathException object that holds * an error message. * @param message The error message. */ public XPathException(String message, ExpressionNode ex) { super(message); this.setLocator(ex); setStylesheetNode(getStylesheetNode(ex)); }