/** * From XSLTC */ public void characters(String characters) throws SAXException { final int length = characters.length(); if (length > m_charsBuff.length) { m_charsBuff = new char[length*2 + 1]; } characters.getChars(0, length, m_charsBuff, 0); characters(m_charsBuff, 0, length); }
/** * Called when a Comment is to be constructed. * Note that Xalan will normally invoke the other version of this method. * %REVIEW% In fact, is this one ever needed, or was it a mistake? * * @param data The comment data. * @throws org.xml.sax.SAXException Any SAX exception, possibly * wrapping another exception. */ public void comment(String data) throws org.xml.sax.SAXException { final int length = data.length(); if (length > m_charsBuff.length) { m_charsBuff = new char[length*2 + 1]; } data.getChars(0, length, m_charsBuff, 0); comment(m_charsBuff, 0, length); }
flushPending(); if (inTemporaryOutputState()) { writeNormalizedChars(ch, start, length, m_lineSepUse);
/** * From XSLTC */ public void startElement( String elementNamespaceURI, String elementLocalName, String elementName) throws SAXException { if (m_needToCallStartDocument) startDocumentInternal(); // time to fire off startlement event. if (m_tracer != null) { super.fireStartElem(elementName); this.firePseudoAttributes(); } return; }
/** * Receive notification of the end of a document. * * <p>The SAX parser will invoke this method only once, and it will * be the last method invoked during the parse. The parser shall * not invoke this method until it has either abandoned parsing * (because of an unrecoverable error) or reached the end of * input.</p> * * @throws org.xml.sax.SAXException Any SAX exception, possibly * wrapping another exception. * * @throws org.xml.sax.SAXException */ public void endDocument() throws org.xml.sax.SAXException { flushPending(); flushWriter(); if (m_tracer != null) super.fireEndDoc(); }
throws IOException, org.xml.sax.SAXException final String encoding = getEncoding(); final java.io.Writer writer = m_writer; final int end = start + length; final int codePoint = writeUTF16Surrogate(c, ch, i, end); if (codePoint != 0) {
public void flushPending() throws org.xml.sax.SAXException { if (m_needToCallStartDocument) { startDocumentInternal(); m_needToCallStartDocument = false; } } }
/** * If available, when the disable-output-escaping attribute is used, * output raw text without escaping. * * @param ch The characters from the XML document. * @param start The start position in the array. * @param length The number of characters to read from the array. * * @throws org.xml.sax.SAXException Any SAX exception, possibly * wrapping another exception. */ public void charactersRaw(char ch[], int start, int length) throws org.xml.sax.SAXException { try { writeNormalizedChars(ch, start, length, m_lineSepUse); } catch(IOException ioe) { throw new SAXException(ioe); } }
/** * Report an XML comment anywhere in the document. * * This callback will be used for comments inside or outside the * document element, including comments in the external DTD * subset (if read). * * @param ch An array holding the characters in the comment. * @param start The starting position in the array. * @param length The number of characters to use from the array. * @throws org.xml.sax.SAXException The application may raise an exception. */ public void comment(char ch[], int start, int length) throws org.xml.sax.SAXException { flushPending(); if (m_tracer != null) super.fireCommentEvent(ch, start, length); }
/** * From XSLTC */ public void startElement( String elementNamespaceURI, String elementLocalName, String elementName) throws SAXException { if (m_needToCallStartDocument) startDocumentInternal(); // time to fire off startlement event. if (m_tracer != null) { super.fireStartElem(elementName); this.firePseudoAttributes(); } return; }
/** * Receive notification of the end of a document. * * <p>The SAX parser will invoke this method only once, and it will * be the last method invoked during the parse. The parser shall * not invoke this method until it has either abandoned parsing * (because of an unrecoverable error) or reached the end of * input.</p> * * @throws org.xml.sax.SAXException Any SAX exception, possibly * wrapping another exception. * * @throws org.xml.sax.SAXException */ public void endDocument() throws org.xml.sax.SAXException { flushPending(); flushWriter(); if (m_tracer != null) super.fireEndDoc(); }
throws IOException, org.xml.sax.SAXException final String encoding = getEncoding(); final java.io.Writer writer = m_writer; final int end = start + length; final int codePoint = writeUTF16Surrogate(c, ch, i, end); if (codePoint != 0) {
public void flushPending() throws org.xml.sax.SAXException { if (m_needToCallStartDocument) { startDocumentInternal(); m_needToCallStartDocument = false; } } }
writeNormalizedChars(ch, start, length, m_lineSepUse);
/** * Receive notification of a processing instruction. * * <p>The Parser will invoke this method once for each processing * instruction found: note that processing instructions may occur * before or after the main document element.</p> * * <p>A SAX parser should never report an XML declaration (XML 1.0, * section 2.8) or a text declaration (XML 1.0, section 4.3.1) * using this method.</p> * * @param target The processing instruction target. * @param data The processing instruction data, or null if * none was supplied. * @throws org.xml.sax.SAXException Any SAX exception, possibly * wrapping another exception. * * @throws org.xml.sax.SAXException */ public void processingInstruction(String target, String data) throws org.xml.sax.SAXException { // flush anything pending first flushPending(); if (m_tracer != null) super.fireEscapingEvent(target, data); }
flushPending(); if (inTemporaryOutputState()) { writeNormalizedChars(ch, start, length, m_lineSepUse);
/** * From XSLTC */ public void startElement( String elementNamespaceURI, String elementLocalName, String elementName) throws SAXException { if (m_needToCallStartDocument) startDocumentInternal(); // time to fire off startlement event. if (m_tracer != null) { super.fireStartElem(elementName); this.firePseudoAttributes(); } return; }
/** * Receive notification of the end of a document. * * <p>The SAX parser will invoke this method only once, and it will * be the last method invoked during the parse. The parser shall * not invoke this method until it has either abandoned parsing * (because of an unrecoverable error) or reached the end of * input.</p> * * @throws org.xml.sax.SAXException Any SAX exception, possibly * wrapping another exception. * * @throws org.xml.sax.SAXException */ public void endDocument() throws org.xml.sax.SAXException { flushPending(); flushWriter(); if (m_tracer != null) super.fireEndDoc(); }