@Override public void startEntity(String name,XMLResourceIdentifier identifier,String encoding,Augmentations augs) throws XNIException {
  if (fEntityDepth == fEntityStack.length) {
    int[] entityarray=new int[fEntityStack.length * 2];
    System.arraycopy(fEntityStack,0,entityarray,0,fEntityStack.length);
    fEntityStack=entityarray;
  }
  fEntityStack[fEntityDepth]=fMarkupDepth;
  super.startEntity(name,identifier,encoding,augs);
  if (fStandalone && fEntityManager.isEntityDeclInExternalSubset(name)) {
    reportFatalError("MSG_REFERENCE_TO_EXTERNALLY_DECLARED_ENTITY_WHEN_STANDALONE",new Object[]{name});
  }
  if (fDocumentHandler != null && !fScanningAttribute) {
    if (!name.equals("[xml]")) {
      fDocumentHandler.startGeneralEntity(name,identifier,encoding,augs);
    }
  }
}

@ Override public void startEntity ( String name , XMLResourceIdentifier identifier , String encoding , Augmentations augs ) throws XNIException { if ( fEntityDepth == fEntityStack . length ) { int [ ] entityarray = new int [ fEntityStack . length * 2 ] ; System . arraycopy ( fEntityStack , 0 , entityarray , 0 , fEntityStack . length ) ; fEntityStack = entityarray ; } fEntityStack [ fEntityDepth ] = fMarkupDepth ; super . startEntity ( name , identifier , encoding , augs ) ; if ( fStandalone && fEntityManager . isEntityDeclInExternalSubset ( name ) ) { reportFatalError ( "MSG_REFERENCE_TO_EXTERNALLY_DECLARED_ENTITY_WHEN_STANDALONE" , new Object [ ] { name } ) ; } if ( fDocumentHandler != null && ! fScanningAttribute ) { if ( ! name . equals ( "[xml]" ) ) { fDocumentHandler . startGeneralEntity ( name , identifier , encoding , augs ) ; } } }
this method notifies of the start of an entity . the dtd has the pseudo - name of " [ dtd ] " parameter entity names start with ' % ' ; and general entities are just specified by their name .
