code: static DocType asEngineDocType(final IDocType docType) {
  
          if (docType instanceof DocType) {
              return (DocType) docType;
          }
  
          return new DocType(
                  null,
                  docType.getKeyword(),
                  docType.getElementName(),
                  docType.getPublicId(),
                  docType.getSystemId(),
                  docType.getInternalSubset(),
                  docType.getTemplateName(), docType.getLine(), docType.getCol());
  
      }
docs: Meant to be called only from within the engine