     {
         return isNameStartChar(char) ||
                (char >= "0" && char <= "9") ||
-               char == "-" ||
-               char == ".";
+               char == "-" || char == "." ||
+               char == ":";    // allow xml namespaces
     }
 
     private static function isNameStartChar(char:String):Boolean

            }
            else
            {
                if (HTMLReference.instance.isTextEntity(ent.substr(1).toLowerCase()) ||
                    HTMLReference.instance.isNumericEntity(ent))
                {
                    ent += ";";
                    putback();
                }
                else
                {
                    fail("Illegal character in entity");
                }

public class HTMLCleanLexer
{
    private static const TEXT:int = 0;
    private static const TAG_START:int = 1;
    private static const TAG_OPEN:int = 2;
    private static const TAG_EXCL:int = 3;
    private static const TAG_OPEN_TRAILER:int = 4;
    private static const TAG_ATTR_NAME:int = 5;
    private static const TAG_ATTR_EQUALS:int = 6;
    private static const TAG_ATTR_QUOTED_VALUE:int = 7;
    private static const TAG_ATTR_BARE_VALUE:int = 8;
    private static const TAG_CLOSE:int = 9;
    private static const TAG_CLOSE_TRAILER:int = 10;
    private static const CDATA_CONTENT:int = 11;  // <![CDATA[
    private static const COMMENT:int = 12;          // <!--
    private static const COMMENT_CLOSE:int = 13;  // -->
    private static const DECLARATION:int = 14;    // <!
    private static const PROC_INSTR:int = 15;     // <?

    private static const RETRY_COMMENT_CLOSE:String = "RETRY_COMMENT_CLOSE";
    private static const RETRY_PI_CLOSE:String = "RETRY_PI_CLOSE";
