A message from Tidy. (c) 1998-2000 (W3C) MIT, INRIA, Keio University See Tidy.cs for the copyright notice. Derived from HTML Tidy Release 4 Aug 2000
Exemplo n.º 1
0
        public static void ErrorSummary(Lexer lexer)
        {
            /* adjust badAccess to that its null if frames are ok */
            if ((lexer.BadAccess & (USING_FRAMES | USING_NOFRAMES)) != 0)
            {
                if (!(((lexer.BadAccess & USING_FRAMES) != 0) && ((lexer.BadAccess & USING_NOFRAMES) == 0)))
                {
                    lexer.BadAccess &= ~(USING_FRAMES | USING_NOFRAMES);
                }
            }

            if (lexer.BadChars != 0)
            {
                if ((lexer.BadChars & WINDOWS_CHARS) != 0)
                {
                    AddMessage(lexer, GetMessage("badchars_summary"), MessageLevel.Info);
                }
            }

            if (lexer.BadForm != 0)
            {
                AddMessage(lexer, GetMessage("badform_summary"), MessageLevel.Info);
            }

            if (lexer.BadAccess != 0)
            {
                if ((lexer.BadAccess & MISSING_SUMMARY) != 0)
                {
                    AddMessage(lexer, GetMessage("badaccess_missing_summary"), MessageLevel.Info);
                }

                if ((lexer.BadAccess & MISSING_IMAGE_ALT) != 0)
                {
                    AddMessage(lexer, GetMessage("badaccess_missing_image_alt"), MessageLevel.Info);
                }

                if ((lexer.BadAccess & MISSING_IMAGE_MAP) != 0)
                {
                    AddMessage(lexer, GetMessage("badaccess_missing_image_map"), MessageLevel.Info);
                }

                if ((lexer.BadAccess & MISSING_LINK_ALT) != 0)
                {
                    AddMessage(lexer, GetMessage("badaccess_missing_link_alt"), MessageLevel.Info);
                }

                if (((lexer.BadAccess & USING_FRAMES) != 0) && ((lexer.BadAccess & USING_NOFRAMES) == 0))
                {
                    AddMessage(lexer, GetMessage("badaccess_frames"), MessageLevel.Info);
                }

                var msg2 = new TidyMessage(lexer, String.Format(GetMessage("badaccess_summary"), ACCESS_URL),
                                           MessageLevel.Info);
                lexer.Messages.Add(msg2);
            }

            if (lexer.BadLayout != 0)
            {
                if ((lexer.BadLayout & USING_LAYER) != 0)
                {
                    AddMessage(lexer, GetMessage("badlayout_using_layer"), MessageLevel.Info);
                }

                if ((lexer.BadLayout & USING_SPACER) != 0)
                {
                    AddMessage(lexer, GetMessage("badlayout_using_spacer"), MessageLevel.Info);
                }

                if ((lexer.BadLayout & USING_FONT) != 0)
                {
                    AddMessage(lexer, GetMessage("badlayout_using_font"), MessageLevel.Info);
                }

                if ((lexer.BadLayout & USING_NOBR) != 0)
                {
                    AddMessage(lexer, GetMessage("badlayout_using_nobr"), MessageLevel.Info);
                }

                if ((lexer.BadLayout & USING_BODY) != 0)
                {
                    AddMessage(lexer, GetMessage("badlayout_using_body"), MessageLevel.Info);
                }
            }
        }
Exemplo n.º 2
0
        public static void ErrorSummary(Lexer lexer)
        {
            /* adjust badAccess to that its null if frames are ok */
            if ((lexer.BadAccess & (USING_FRAMES | USING_NOFRAMES)) != 0)
            {
                if (!(((lexer.BadAccess & USING_FRAMES) != 0) && ((lexer.BadAccess & USING_NOFRAMES) == 0)))
                {
                    lexer.BadAccess &= ~(USING_FRAMES | USING_NOFRAMES);
                }
            }

            if (lexer.BadChars != 0)
            {
                if ((lexer.BadChars & WINDOWS_CHARS) != 0)
                {
                    AddMessage(lexer, GetMessage("badchars_summary"), MessageLevel.Info);
                }
            }

            if (lexer.BadForm != 0)
            {
                AddMessage(lexer, GetMessage("badform_summary"), MessageLevel.Info);
            }

            if (lexer.BadAccess != 0)
            {
                if ((lexer.BadAccess & MISSING_SUMMARY) != 0)
                {
                    AddMessage(lexer, GetMessage("badaccess_missing_summary"), MessageLevel.Info);
                }

                if ((lexer.BadAccess & MISSING_IMAGE_ALT) != 0)
                {
                    AddMessage(lexer, GetMessage("badaccess_missing_image_alt"), MessageLevel.Info);
                }

                if ((lexer.BadAccess & MISSING_IMAGE_MAP) != 0)
                {
                    AddMessage(lexer, GetMessage("badaccess_missing_image_map"), MessageLevel.Info);
                }

                if ((lexer.BadAccess & MISSING_LINK_ALT) != 0)
                {
                    AddMessage(lexer, GetMessage("badaccess_missing_link_alt"), MessageLevel.Info);
                }

                if (((lexer.BadAccess & USING_FRAMES) != 0) && ((lexer.BadAccess & USING_NOFRAMES) == 0))
                {
                    AddMessage(lexer, GetMessage("badaccess_frames"), MessageLevel.Info);
                }

                var msg2 = new TidyMessage(lexer, String.Format(GetMessage("badaccess_summary"), ACCESS_URL),
                                           MessageLevel.Info);
                lexer.Messages.Add(msg2);
            }

            if (lexer.BadLayout != 0)
            {
                if ((lexer.BadLayout & USING_LAYER) != 0)
                {
                    AddMessage(lexer, GetMessage("badlayout_using_layer"), MessageLevel.Info);
                }

                if ((lexer.BadLayout & USING_SPACER) != 0)
                {
                    AddMessage(lexer, GetMessage("badlayout_using_spacer"), MessageLevel.Info);
                }

                if ((lexer.BadLayout & USING_FONT) != 0)
                {
                    AddMessage(lexer, GetMessage("badlayout_using_font"), MessageLevel.Info);
                }

                if ((lexer.BadLayout & USING_NOBR) != 0)
                {
                    AddMessage(lexer, GetMessage("badlayout_using_nobr"), MessageLevel.Info);
                }

                if ((lexer.BadLayout & USING_BODY) != 0)
                {
                    AddMessage(lexer, GetMessage("badlayout_using_body"), MessageLevel.Info);
                }
            }
        }