Class XmlStreamFilter

    • Constructor Detail

      • XmlStreamFilter

        public XmlStreamFilter()
    • Method Detail

      • startFilter

        protected void startFilter()
        Initialize rule state and parser. Called before processing of each input.
        Overrides:
        startFilter in class AbstractMarkupFilter
      • setNewlineType

        protected void setNewlineType​(String newlineType)
        All new line types are normalized to \n in the XML processor.
        Overrides:
        setNewlineType in class AbstractFilter
        Parameters:
        newlineType - one of '\n', '\r' or '\r\n'.
      • handleText

        protected void handleText​(CharSequence text)
        An XML procesor must behave as if it normalized all line breaks by translating \r\n, and any \r not followed by \n, to a single \n character: https://www.w3.org/TR/xml/#sec-line-ends
        Overrides:
        handleText in class AbstractMarkupFilter
      • normalizeAttributeName

        protected String normalizeAttributeName​(String attrName,
                                                String attrValue,
                                                net.htmlparser.jericho.Tag tag)
        Description copied from class: AbstractMarkupFilter
        Some attributes names are converted to Okapi standards such as HTML charset to "encoding" and lang to "language"
        Specified by:
        normalizeAttributeName in class AbstractMarkupFilter
        Parameters:
        attrName - - the attribute name
        attrValue - - the attribute value
        tag - - the Jericho Tag that contains the attribute
        Returns:
        the attribute name after it as passe through the normalization rules
      • setParametersFromURL

        public void setParametersFromURL​(URL config)
        Initialize filter parameters from a URL.
        Parameters:
        config -