code: private void installLexicalHandler ()
      {
          XMLReader parent = getParent();
          if (parent == null) {
              throw new NullPointerException("No parent for filter");
          }
          // try to register for lexical events
          for (int i = 0; i < LEXICAL_HANDLER_NAMES.length; i++) {
              try {
                  parent.setProperty(LEXICAL_HANDLER_NAMES[i], this);
                  break;
              }
              catch (SAXNotRecognizedException ex) {
                  // ignore
              }
              catch (SAXNotSupportedException ex) {
                  // ignore
              }
          }
      }
docs: Installs lexical handler before a parse.
  
  <p>Before every parse, check whether the parent is
  non-null, and re-register the filter for the lexical
  events.</p>