public static boolean XMLPreserveWhiteSpace(Node element, TagTable tt)
    {
        AttVal attribute;

        /* search attributes for xml:space */
        for (attribute = element.attributes; attribute != null; attribute = attribute.next)
        {
            if (attribute.attribute.equals("xml:space"))
            {
                if (attribute.value.equals("preserve"))
                    return true;

                return false;
            }
        }

        /* kludge for html docs without explicit xml:space attribute */
        if (Lexer.wstrcasecmp(element.element, "pre") == 0
            || Lexer.wstrcasecmp(element.element, "script") == 0
            || Lexer.wstrcasecmp(element.element, "style") == 0)
            return true;

        if ( (tt != null) && (tt.findParser(element) == getParsePre()) )
            return true;

        /* kludge for XSL docs */
        if (Lexer.wstrcasecmp(element.element, "xsl:text") == 0)
            return true;

        return false;
    }