Package com.inet.html

Interface InetHtmlWriter.AttributeFilter

Enclosing class:
InetHtmlWriter

public static interface InetHtmlWriter.AttributeFilter
The attribute filter can modify attribute value on the fly while the document is written. It's much faster than a modification of the element tree but to existing attributes. It cannot add new attributes.
Since:
1.12
  • Field Details

    • DONT_WRITE

      static final Object DONT_WRITE
  • Method Details

    • filterAttributeValue

      default Object filterAttributeValue(Object elementName, Object key, Object value, AttributeSet elementAttributes, Element element)
      Returns a certain attribute value
      Parameters:
      elementName - the name of the element, in most cases a HTML.Tag; null if inside a global style sheet rule
      key - the attribute key, in most cases a CSS CSS.Attribute or an HTML HTML.Attribute
      value - the value of the attribute as determined by the
      elementAttributes - the original attribute set containing this attribute, can be used to check for further styles on the same element, may be null; A modification of this set is no supported!
      element - the element which has this attribute, may be null if in the global style sheet
      Returns:
      the new attribute value; return DONT_WRITE to skip this attribute in the output