private void printAttrs(Out fout, int indent,
                            Node node, AttVal attr)
    {
        if (attr != null)
        {
            if (attr.next != null)
                printAttrs(fout, indent, node, attr.next);

            if (attr.attribute != null)
                printAttribute(fout, indent, node, attr);
            else if (attr.asp != null)
            {
                addC(' ', linelen++);
                printAsp(fout, indent, attr.asp);
            }
            else if (attr.php != null)
            {
                addC(' ', linelen++);
                printPhp(fout, indent, attr.php);
            }
        }

        /* add xml:space attribute to pre and other elements */
        if (configuration.XmlOut &&
                configuration.XmlSpace &&
                ParserImpl.XMLPreserveWhiteSpace(node, configuration.tt) &&
                node.getAttrByName("xml:space") == null)
            printString(fout, indent, " xml:space=\"preserve\"");
    }