/** * Copy the string value of a node directly to an output handler */ public void characters(final int node, SerializationHandler handler) throws TransletException { if (node != DTM.NULL) { try { dispatchCharactersEvents(node, handler, false); } catch (SAXException e) { throw new TransletException(e); } } }
if (_debug) e.printStackTrace(); System.err.println(new ErrorMsg(ErrorMsg.RUNTIME_ERROR_KEY)+ e.getMessage());
/** * This class wraps an ErrorListener into a MessageHandler in order to * capture messages reported via xsl:message. */ static class MessageHandler extends org.apache.xalan.xsltc.runtime.MessageHandler { private ErrorListener _errorListener; public MessageHandler(ErrorListener errorListener) { _errorListener = errorListener; } public void displayMessage(String msg) { if(_errorListener == null) { System.err.println(msg); } else { try { _errorListener.warning(new TransformerException(msg)); } catch (TransformerException e) { // ignored } } } }
/** * This class wraps an ErrorListener into a MessageHandler in order to * capture messages reported via xsl:message. */ static class MessageHandler extends org.apache.xalan.xsltc.runtime.MessageHandler { private ErrorListener _errorListener; public MessageHandler(ErrorListener errorListener) { _errorListener = errorListener; } public void displayMessage(String msg) { if(_errorListener == null) { System.err.println(msg); } else { try { _errorListener.warning(new TransformerException(msg)); } catch (TransformerException e) { // ignored } } } }
/** * Used by some compiled code as a shortcut for passing strings to the * output handler */ public final void characters(final String string, SerializationHandler handler) throws TransletException { if (string != null) { //final int length = string.length(); try { handler.characters(string); } catch (Exception e) { throw new TransletException(e); } } }
if (_debug) e.printStackTrace(); System.err.println(new ErrorMsg(ErrorMsg.RUNTIME_ERROR_KEY)+ e.getMessage());
/** * Copies a processing instruction node to an output handler */ private void copyPI(final int node, SerializationHandler handler) throws TransletException { final String target = getNodeName(node); final String value = getStringValueX(node); try { handler.processingInstruction(target, value); } catch (Exception e) { throw new TransletException(e); } }
/************************************************************************ * Multiple output document extension. * See compiler/TransletOutput for actual implementation. ************************************************************************/ public SerializationHandler openOutputHandler(String filename, boolean append) throws TransletException { try { final TransletOutputHandlerFactory factory = TransletOutputHandlerFactory.newInstance(); String dirStr = new File(filename).getParent(); if ((null != dirStr) && (dirStr.length() > 0)) { File dir = new File(dirStr); dir.mkdirs(); } factory.setEncoding(_encoding); factory.setOutputMethod(_method); factory.setWriter(new FileWriter(filename, append)); factory.setOutputType(TransletOutputHandlerFactory.STREAM); final SerializationHandler handler = factory.getSerializationHandler(); transferOutputSettings(handler); handler.startDocument(); return handler; } catch (Exception e) { throw new TransletException(e); } }
caseOrder); } catch (ClassNotFoundException e) { throw new TransletException(e);
throw new TransletException(e);
throw new TransletException(e);
_collatorFactory = (CollatorFactory)candObj; } catch (ClassNotFoundException e) { throw new TransletException(e);
throw new TransletException(e);
if (newdom == null) { final Exception e = new FileNotFoundException(originalUri); throw new TransletException(e);
throw new TransletException(e);
throw new TransletException(e);
/** * Copy the string value of a node directly to an output handler */ public void characters(final int node, SerializationHandler handler) throws TransletException { if (node != DTM.NULL) { try { dispatchCharactersEvents(node, handler, false); } catch (SAXException e) { throw new TransletException(e); } } }
/** * Copy the string value of a node directly to an output handler */ public void characters(final int node, SerializationHandler handler) throws TransletException { if (node != DTM.NULL) { try { dispatchCharactersEvents(node, handler, false); } catch (SAXException e) { throw new TransletException(e); } } }
/** * Copy the string value of a node directly to an output handler */ public void characters(final int node, SerializationHandler handler) throws TransletException { if (node != DTM.NULL) { try { dispatchCharactersEvents(node, handler, false); } catch (SAXException e) { throw new TransletException(e); } } }
/** * Used by some compiled code as a shortcut for passing strings to the * output handler */ public final void characters(final String string, SerializationHandler handler) throws TransletException { if (string != null) { //final int length = string.length(); try { handler.characters(string); } catch (Exception e) { throw new TransletException(e); } } }