docs: protected void initDocument(CmsObject cms, Document document, String encoding, CmsXmlContentDefinition definition) {
  
          initDocument(document, encoding, definition);
          // check invalid links
          if (cms != null) {
              // this will remove all invalid links
              getHandler().invalidateBrokenLinks(cms, this);
          }
      }