nsDequeIterator b=gSharedParserObjects.mDTDDeque.Begin(); nsDequeIterator e=gSharedParserObjects.mDTDDeque.End();
nsDequeIterator b=gSharedParserObjects->mDTDDeque.Begin(); nsDequeIterator e=gSharedParserObjects->mDTDDeque.End();
PRBool FindSuitableDTD( CParserContext& aParserContext,nsString& aCommand,nsString& aBuffer) {    //Let's start by tring the defaultDTD, if one exists...  if(aParserContext.mDTD)    if(aParserContext.mDTD->CanParse(aParserContext.mSourceType,aCommand,aBuffer,0))      return PR_TRUE;  nsDequeIterator b=gSharedParserObjects.mDTDDeque.Begin();   nsDequeIterator e=gSharedParserObjects.mDTDDeque.End();   aParserContext.mAutoDetectStatus=eUnknownDetect;  nsIDTD* theBestDTD=0;  while((b<e) && (aParserContext.mAutoDetectStatus!=ePrimaryDetect)){    nsIDTD* theDTD=(nsIDTD*)b.GetCurrent();    if(theDTD) {      aParserContext.mAutoDetectStatus=theDTD->CanParse(aParserContext.mSourceType,aCommand,aBuffer,0);      if((eValidDetect==aParserContext.mAutoDetectStatus) || (ePrimaryDetect==aParserContext.mAutoDetectStatus)) {        theBestDTD=theDTD;      }    }    b++;  }   if(theBestDTD) {    theBestDTD->CreateNewInstance(&aParserContext.mDTD);    return PR_TRUE;  }  return PR_FALSE;}