Class HtmlProblemFinder

  • All Implemented Interfaces:
    IMarkupFilter

    public final class HtmlProblemFinder
    extends AbstractMarkupFilter
    This is a markup inline filter which by default is not added to the list of markup filter. It can be added by means of subclassing Application.newMarkupParser() like
     Application#init() {
       getMarkupSettings().setMarkupParserFactory() {
          new MarkupParserFactory() {
            MarkupParser newMarkupParser(final MarkupResourceStream resource) {
                      MarkupParser parser=super.newMarkupParser(resource);
                parser.appendMarkupFilter(new HtmlProblemFinder(HtmlProblemFinder.ERR_THROW_EXCEPTION));
                return parser;
              }
           }
        }
     }
     
    The purpose of the filter is to find possible HTML issues and to log a warning.
    Author:
    Juergen Donnerstag
    • Field Detail

      • ERR_INGORE

        public static final int ERR_INGORE
        Ignore the issue detected
        See Also:
        Constant Field Values
      • ERR_LOG_WARN

        public static final int ERR_LOG_WARN
        Log a warning on the issue detected
        See Also:
        Constant Field Values
      • ERR_LOG_ERROR

        public static final int ERR_LOG_ERROR
        Log an error on the issue detected
        See Also:
        Constant Field Values
      • ERR_THROW_EXCEPTION

        public static final int ERR_THROW_EXCEPTION
        Throw an exception on the issue detected
        See Also:
        Constant Field Values
    • Constructor Detail

      • HtmlProblemFinder

        public HtmlProblemFinder​(int problemEscalation)
        Construct.
        Parameters:
        problemEscalation - How to escalate the issue found.