m_docIsEmpty = false;
    public void characters(final char chars[], final int start, final int length)        throws org.xml.sax.SAXException    {        // It does not make sense to continue with rest of the method if the number of         // characters to read from array is 0.        // Section 7.6.1 of XSLT 1.0 (http://www.w3.org/TR/xslt#value-of) suggest no text node        // is created if string is empty.	        if (length == 0 || (m_inEntityRef && !m_expandDTDEntities))            return;        if (m_elemContext.m_startTagOpen)        {            closeStartTag();            m_elemContext.m_startTagOpen = false;        }        else if (m_needToCallStartDocument)        {            startDocumentInternal();        }        if (m_cdataStartCalled || m_elemContext.m_isCdataSection)        {            /* either due to startCDATA() being called or due to              * cdata-section-elements atribute, we need this as cdata             */            cdata(chars, start, length);            return;        }        if (m_cdataTagOpen)            closeCDATA();        // the check with _escaping is a bit of a hack for XLSTC        if (m_disableOutputEscapingStates.peekOrFalse() || (!m_escaping))        {            charactersRaw(chars, start, length);            // time to fire off characters generation event            if (m_tracer != null)                super.fireCharEvent(chars, start, length);            return;        }        if (m_elemContext.m_startTagOpen)        {            closeStartTag();            m_elemContext.m_startTagOpen = false;        }                try        {            int i;            char ch1;            int startClean;                        // skip any leading whitspace             // don't go off the end and use a hand inlined version            // of isWhitespace(ch)            final int end = start + length;            int lastDirty = start - 1; // last character that needed processing            for (i = start;                ((i < end)                                    && ((ch1 = chars[i]) == 0x20                        || (ch1 == 0xA && m_lineSepUse)                        || ch1 == 0xD                        || ch1 == 0x09));                i++)            {                /*                 * We are processing leading whitespace, but are doing the same                 * processing for dirty characters here as for non-whitespace.                 *                  */                if (!m_charInfo.isTextASCIIClean(ch1))                {                    lastDirty = processDirty(chars,end, i,ch1, lastDirty, true);                    i = lastDirty;                }            }            /* If there is some non-whitespace, mark that we may need             * to preserve this. This is only important if we have indentation on.             */                        if (i < end)                 m_ispreserve = true;                //            int lengthClean;    // number of clean characters in a row//            final boolean[] isAsciiClean = m_charInfo.getASCIIClean();                        final boolean isXML10 = XMLVERSION10.equals(getVersion());            // we've skipped the leading whitespace, now deal with the rest            for (; i < end; i++)            {                                      {                    // A tight loop to skip over common clean chars                    // This tight loop makes it easier for the JIT                    // to optimize.                    char ch2;                    while (i<end                             && ((ch2 = chars[i])<127)                            && m_charInfo.isTextASCIIClean(ch2))                            i++;                    if (i == end)                        break;                }                                     final char ch = chars[i];                /*  The check for isCharacterInC0orC1Ranger and                  *  isNELorLSEPCharacter has been added                 *  to support Control Characters in XML 1.1                 */                     if (!isCharacterInC0orC1Range(ch) &&                     (isXML10 || !isNELorLSEPCharacter(ch)) &&                    (escapingNotNeeded(ch) && (!m_charInfo.isSpecialTextChar(ch)))                        || ('"' == ch))                {                    ; // a character needing no special processing                }                else                {                    lastDirty = processDirty(chars,end, i, ch, lastDirty, true);                    i = lastDirty;                }            }                        // we've reached the end. Any clean characters at the            // end of the array than need to be written out?            startClean = lastDirty + 1;            if (i > startClean)            {                int lengthClean = i - startClean;                m_writer.write(chars, startClean, lengthClean);            }            // For indentation purposes, mark that we've just writen text out            m_isprevtext = true;        }        catch (IOException e)        {            throw new SAXException(e);        }        // time to fire off characters generation event        if (m_tracer != null)            super.fireCharEvent(chars, start, length);    }     