mElements[eHTMLTag_counter]=&mCounterElement;
void CElementTable::InitializeElements() {  int max=sizeof(mElements)/sizeof(mElements[0]);  int index=0;  for(index=0;index<max;++index){    mElements[index]=&mDfltElements[index];  }  CSpecialElement::Initialize(      mDfltElements[eHTMLTag_a],          eHTMLTag_a);  mDfltElements[eHTMLTag_a].mContainsGroups.mBits.mSelf=0;  CPhraseElement::Initialize(       mDfltElements[eHTMLTag_abbr],       eHTMLTag_abbr);  CPhraseElement::Initialize(       mDfltElements[eHTMLTag_acronym],    eHTMLTag_acronym);  CBlockElement::Initialize(        mDfltElements[eHTMLTag_address],    eHTMLTag_address);  CElement::Initialize(             mDfltElements[eHTMLTag_applet],     eHTMLTag_applet,CSpecialElement::GetGroup(), CFlowElement::GetContainedGroups());  CElement::Initialize(             mDfltElements[eHTMLTag_area],       eHTMLTag_area);  mDfltElements[eHTMLTag_area].mContainsGroups.mBits.mSelf=0;  CFontStyleElement::Initialize(    mDfltElements[eHTMLTag_b],          eHTMLTag_b);  CElement::InitializeLeaf(         mDfltElements[eHTMLTag_base],       eHTMLTag_base,  CHeadElement::GetMiscGroup(), CLeafElement::GetContainedGroups());  CElement::InitializeLeaf(         mDfltElements[eHTMLTag_basefont],   eHTMLTag_basefont, CSpecialElement::GetGroup(), CLeafElement::GetContainedGroups());  CSpecialElement::Initialize(      mDfltElements[eHTMLTag_bdo],        eHTMLTag_bdo);  CFontStyleElement::Initialize(    mDfltElements[eHTMLTag_big],        eHTMLTag_big);  CDeprecatedElement::Initialize(   mDfltElements[eHTMLTag_bgsound],    eHTMLTag_bgsound);  CElement::Initialize(             mDfltElements[eHTMLTag_blockquote], eHTMLTag_blockquote, CBlockElement::GetGroup(), CBlockElement::GetBlockGroupMembers());  mDfltElements[eHTMLTag_blockquote].mIncludeKids=kBlockQuoteKids;  //CBodyElement::Initialize(       mDfltElements[eHTMLTag_body],       eHTMLTag_body);  CElement::InitializeLeaf(         mDfltElements[eHTMLTag_br],         eHTMLTag_br,  CSpecialElement::GetGroup(), CLeafElement::GetContainedGroups());  CElement::Initialize(             mDfltElements[eHTMLTag_button],     eHTMLTag_button,  CFormControlElement::GetGroup(), CFlowElement::GetContainedGroups());  mDfltElements[eHTMLTag_button].mGroup.mBits.mBlock=1;  //make this a member of the block group.  mDfltElements[eHTMLTag_button].mExcludeKids=kButtonExcludeKids;    CElement::Initialize(             mDfltElements[eHTMLTag_caption],    eHTMLTag_caption, CTableElement::GetGroup(), CSpecialElement::GetContainedGroups());  mDfltElements[eHTMLTag_tr].mContainsGroups.mBits.mSelf=0;  CElement::Initialize(             mDfltElements[eHTMLTag_center],     eHTMLTag_center, CBlockElement::GetGroup(), CFlowElement::GetContainedGroups());  CPhraseElement::Initialize(       mDfltElements[eHTMLTag_cite],       eHTMLTag_cite);  CPhraseElement::Initialize(       mDfltElements[eHTMLTag_code],       eHTMLTag_code);  CElement::Initialize(             mDfltElements[eHTMLTag_col],        eHTMLTag_col, CTableElement::GetGroup(), CLeafElement::GetContainedGroups());  mDfltElements[eHTMLTag_col].mProperties.mIsContainer=0;  CTableElement::Initialize(        mDfltElements[eHTMLTag_colgroup],   eHTMLTag_colgroup);  mDfltElements[eHTMLTag_colgroup].mContainsGroups.mAllBits=0;  mDfltElements[eHTMLTag_colgroup].mIncludeKids=kColgroupKids;  CElement::Initialize(             mDfltElements[eHTMLTag_counter],    eHTMLTag_counter);  CElement::Initialize(             mDfltElements[eHTMLTag_dd],         eHTMLTag_dd,  CElement::GetEmptyGroup(),   CFlowElement::GetContainedGroups());  mDfltElements[eHTMLTag_dd].mAutoClose=kAutoCloseDD;  mDfltElements[eHTMLTag_dd].mContainsGroups.mBits.mSelf=0;  CElement::Initialize(             mDfltElements[eHTMLTag_del],        eHTMLTag_del, CPhraseElement::GetGroup(),  CFlowElement::GetContainedGroups());  mDfltElements[eHTMLTag_del].mGroup.mBits.mBlock=1;  //make this a member of the block group.  CElement::Initialize(             mDfltElements[eHTMLTag_dfn],        eHTMLTag_dfn, CPhraseElement::GetGroup(), CInlineElement::GetContainedGroups());  CBlockElement::Initialize(        mDfltElements[eHTMLTag_dir],        eHTMLTag_dir);  mDfltElements[eHTMLTag_dir].mGroup.mBits.mList=1;  mDfltElements[eHTMLTag_dir].mIncludeKids=kDirKids;  mDfltElements[eHTMLTag_dir].mContainsGroups.mAllBits=0;  CElement::Initialize(             mDfltElements[eHTMLTag_div],        eHTMLTag_div, CBlockElement::GetGroup(),  CFlowElement::GetContainedGroups());   CBlockElement::Initialize(        mDfltElements[eHTMLTag_dl],         eHTMLTag_dl);    mDfltElements[eHTMLTag_dl].mContainsGroups.mAllBits=0;  mDfltElements[eHTMLTag_dl].mIncludeKids=kDLKids;  CElement::Initialize(             mDfltElements[eHTMLTag_dt],         eHTMLTag_dt, CElement::GetEmptyGroup(), CInlineElement::GetContainedGroups());  mDfltElements[eHTMLTag_dt].mContainsGroups.mBits.mLeaf=1;  mDfltElements[eHTMLTag_dt].mAutoClose=kAutoCloseDD;    CPhraseElement::Initialize(       mDfltElements[eHTMLTag_em],         eHTMLTag_em);  CElement::Initialize(   mDfltElements[eHTMLTag_embed],                eHTMLTag_embed);  CElement::Initialize(             mDfltElements[eHTMLTag_fieldset],   eHTMLTag_fieldset, CBlockElement::GetGroup(),  CFlowElement::GetContainedGroups());  mDfltElements[eHTMLTag_fieldset].mIncludeKids=kFieldsetKids;  CSpecialElement::Initialize(      mDfltElements[eHTMLTag_font],       eHTMLTag_font);  CElement::Initialize(             mDfltElements[eHTMLTag_form],       eHTMLTag_form, CBlockElement::GetGroup(), CBlockElement::GetBlockGroupMembers());  mDfltElements[eHTMLTag_form].mContainsGroups.mBits.mFormControl=1;  mDfltElements[eHTMLTag_form].mIncludeKids=kFormKids;  CElement::Initialize(             mDfltElements[eHTMLTag_frame],      eHTMLTag_frame, CFrameElement::GetGroup(), CLeafElement::GetContainedGroups());  mDfltElements[eHTMLTag_frame].mProperties.mIsContainer=0;  CFrameElement::Initialize(        mDfltElements[eHTMLTag_frameset],   eHTMLTag_frameset);  mDfltElements[eHTMLTag_frameset].mIncludeKids=kFramesetKids;  CElement::Initialize(             mDfltElements[eHTMLTag_h1],         eHTMLTag_h1, CBlockElement::GetGroup(), CBlockElement::GetContainedGroups(PR_FALSE));  CElement::Initialize(             mDfltElements[eHTMLTag_h2],         eHTMLTag_h2, CBlockElement::GetGroup(), CBlockElement::GetContainedGroups(PR_FALSE));  CElement::Initialize(             mDfltElements[eHTMLTag_h3],         eHTMLTag_h3, CBlockElement::GetGroup(), CBlockElement::GetContainedGroups(PR_FALSE));  CElement::Initialize(             mDfltElements[eHTMLTag_h4],         eHTMLTag_h4, CBlockElement::GetGroup(), CBlockElement::GetContainedGroups(PR_FALSE));  CElement::Initialize(             mDfltElements[eHTMLTag_h5],         eHTMLTag_h5, CBlockElement::GetGroup(), CBlockElement::GetContainedGroups(PR_FALSE));  CElement::Initialize(             mDfltElements[eHTMLTag_h6],         eHTMLTag_h6, CBlockElement::GetGroup(), CBlockElement::GetContainedGroups(PR_FALSE));  CElement::InitializeLeaf(         mDfltElements[eHTMLTag_hr],         eHTMLTag_hr,        CBlockElement::GetGroup(), CLeafElement::GetContainedGroups());  CElement::Initialize(             mDfltElements[eHTMLTag_head],       eHTMLTag_head,      CHeadElement::GetGroup(), CHeadElement::GetContainedGroups());  // InitializeElement(             mDfltElements[eHTMLTag_head],       eHTMLTag_html,      CTopLevelElement::GetGroup(), CTopLevelElement::GetContainedGroups());  CFontStyleElement::Initialize(    mDfltElements[eHTMLTag_i],          eHTMLTag_i);  CElement::Initialize(             mDfltElements[eHTMLTag_iframe],     eHTMLTag_iframe,    CSpecialElement::GetGroup(),  CFlowElement::GetContainedGroups());  mDfltElements[eHTMLTag_iframe].mGroup.mBits.mBlock=1;  //make this a member of the block group.  CElement::InitializeLeaf(         mDfltElements[eHTMLTag_img],        eHTMLTag_img,       CSpecialElement::GetGroup(),  CLeafElement::GetContainedGroups());  CElement::Initialize(             mDfltElements[eHTMLTag_image],      eHTMLTag_image);  CElement::InitializeLeaf(         mDfltElements[eHTMLTag_input],      eHTMLTag_input,     CFormControlElement::GetGroup(),CLeafElement::GetContainedGroups());  CElement::Initialize(             mDfltElements[eHTMLTag_ins],        eHTMLTag_ins,       CPhraseElement::GetGroup(),  CFlowElement::GetContainedGroups());  mDfltElements[eHTMLTag_ins].mGroup.mBits.mBlock=1;  //make this a member of the block group.  CElement::InitializeLeaf(         mDfltElements[eHTMLTag_isindex],    eHTMLTag_isindex,   CBlockElement::GetGroup(), CLeafElement::GetContainedGroups());  CPhraseElement::Initialize(       mDfltElements[eHTMLTag_kbd],        eHTMLTag_kbd);  CDeprecatedElement::Initialize(   mDfltElements[eHTMLTag_keygen],     eHTMLTag_keygen);  CElement::Initialize(             mDfltElements[eHTMLTag_label],      eHTMLTag_label,     CFormControlElement::GetGroup(), CInlineElement::GetContainedGroups());  mDfltElements[eHTMLTag_label].mContainsGroups.mBits.mSelf=0;  CElement::Initialize(             mDfltElements[eHTMLTag_legend],     eHTMLTag_legend,    CElement::GetEmptyGroup(), CInlineElement::GetContainedGroups());  CElement::Initialize(             mDfltElements[eHTMLTag_li],         eHTMLTag_li,        CListElement::GetGroup(), CFlowElement::GetContainedGroups());  mDfltElements[eHTMLTag_li].mExcludeKids=kLIExcludeKids;  mDfltElements[eHTMLTag_li].mContainsGroups.mBits.mSelf=0;    CElement::InitializeLeaf(         mDfltElements[eHTMLTag_link],       eHTMLTag_link,  CHeadElement::GetMiscGroup(), CLeafElement::GetContainedGroups());  CElement::Initialize(             mDfltElements[eHTMLTag_listing],    eHTMLTag_listing);  CElement::Initialize(             mDfltElements[eHTMLTag_map],        eHTMLTag_map,   CSpecialElement::GetGroup(), CBlockElement::GetBlockGroupMembers());  mDfltElements[eHTMLTag_map].mIncludeKids=kMapKids;  CBlockElement::Initialize(        mDfltElements[eHTMLTag_menu],       eHTMLTag_menu);  mDfltElements[eHTMLTag_menu].mGroup.mBits.mList=1;  mDfltElements[eHTMLTag_menu].mIncludeKids=kDirKids;  mDfltElements[eHTMLTag_menu].mContainsGroups.mAllBits=0;  CElement::InitializeLeaf(         mDfltElements[eHTMLTag_meta],       eHTMLTag_meta,  CHeadElement::GetMiscGroup(), CLeafElement::GetContainedGroups());  CElement::Initialize(             mDfltElements[eHTMLTag_multicol],   eHTMLTag_multicol);  CElement::Initialize(             mDfltElements[eHTMLTag_nobr],       eHTMLTag_nobr);  CElement::Initialize(             mDfltElements[eHTMLTag_noembed],    eHTMLTag_noembed);      CElement::Initialize(             mDfltElements[eHTMLTag_noframes],   eHTMLTag_noframes,  CBlockElement::GetGroup(),  CFlowElement::GetContainedGroups());  CElement::Initialize(             mDfltElements[eHTMLTag_noscript],   eHTMLTag_noscript,  CBlockElement::GetGroup(),  CFlowElement::GetContainedGroups());  CElement::Initialize(             mDfltElements[eHTMLTag_object],     eHTMLTag_object,    CBlockElement::GetGroup(),  CFlowElement::GetContainedGroups());  mDfltElements[eHTMLTag_object].mGroup.mBits.mBlock=1;  //make this a member of the block group.  mDfltElements[eHTMLTag_object].mGroup.mBits.mHeadMisc=1;  mDfltElements[eHTMLTag_object].mIncludeKids=kObjectKids;  CBlockElement::Initialize(        mDfltElements[eHTMLTag_ol],         eHTMLTag_ol);  mDfltElements[eHTMLTag_ol].mGroup.mBits.mList=1;  mDfltElements[eHTMLTag_ol].mIncludeKids=kDirKids;  mDfltElements[eHTMLTag_ol].mContainsGroups.mAllBits=0;  CElement::Initialize(             mDfltElements[eHTMLTag_optgroup],   eHTMLTag_optgroup, CElement::GetEmptyGroup(), CElement::GetEmptyGroup());  mDfltElements[eHTMLTag_optgroup].mContainsGroups.mAllBits=0;  mDfltElements[eHTMLTag_optgroup].mIncludeKids=kOptionGroupKids;  CElement::Initialize(             mDfltElements[eHTMLTag_option],     eHTMLTag_option, CElement::GetEmptyGroup(), CElement::GetEmptyGroup());  mDfltElements[eHTMLTag_option].mContainsGroups.mAllBits=0;  mDfltElements[eHTMLTag_option].mContainsGroups.mBits.mLeaf=1;  CElement::Initialize(             mDfltElements[eHTMLTag_p],          eHTMLTag_p, CBlockElement::GetGroup(), CInlineElement::GetContainedGroups());  mDfltElements[eHTMLTag_p].mContainsGroups.mBits.mSelf=0;  CElement::InitializeLeaf(         mDfltElements[eHTMLTag_param],      eHTMLTag_param, CElement::GetEmptyGroup(), CLeafElement::GetContainedGroups());  CElement::Initialize(             mDfltElements[eHTMLTag_plaintext],  eHTMLTag_plaintext);  CBlockElement::Initialize(        mDfltElements[eHTMLTag_pre],        eHTMLTag_pre);  mDfltElements[eHTMLTag_pre].mExcludeKids=kPreExcludeKids;  CSpecialElement::Initialize(      mDfltElements[eHTMLTag_q],          eHTMLTag_q);    CFontStyleElement::Initialize(    mDfltElements[eHTMLTag_s],          eHTMLTag_s);  CPhraseElement::Initialize(       mDfltElements[eHTMLTag_samp],       eHTMLTag_samp );  CSpecialElement::Initialize(      mDfltElements[eHTMLTag_script],     eHTMLTag_script);  mDfltElements[eHTMLTag_script].mGroup.mBits.mBlock=1;  //make this a member of the block group.  mDfltElements[eHTMLTag_script].mGroup.mBits.mHeadMisc=1;  CFormControlElement::Initialize(  mDfltElements[eHTMLTag_select],     eHTMLTag_select);  mDfltElements[eHTMLTag_select].mContainsGroups.mAllBits=0;  mDfltElements[eHTMLTag_select].mIncludeKids=kSelectKids;  CElement::Initialize(             mDfltElements[eHTMLTag_server],     eHTMLTag_server);  CFontStyleElement::Initialize(    mDfltElements[eHTMLTag_small],      eHTMLTag_small);  CElement::Initialize(             mDfltElements[eHTMLTag_spacer],     eHTMLTag_spacer);  CSpecialElement::Initialize(      mDfltElements[eHTMLTag_span],       eHTMLTag_span);  CFontStyleElement::Initialize(    mDfltElements[eHTMLTag_strike],     eHTMLTag_strike);  CPhraseElement::Initialize(       mDfltElements[eHTMLTag_strong],     eHTMLTag_strong);  CHeadElement::Initialize(         mDfltElements[eHTMLTag_style],      eHTMLTag_style);  CSpecialElement::Initialize(      mDfltElements[eHTMLTag_sub],        eHTMLTag_sub);  CSpecialElement::Initialize(      mDfltElements[eHTMLTag_sup],        eHTMLTag_sup);  CElement::Initialize(             mDfltElements[eHTMLTag_table],      eHTMLTag_table,  CBlockElement::GetGroup(), CTableElement::GetContainedGroups());  CElement::Initialize(             mDfltElements[eHTMLTag_tbody],      eHTMLTag_tbody,  CTableElement::GetGroup(), CLeafElement::GetContainedGroups());  mDfltElements[eHTMLTag_tbody].mIncludeKids=kTBodyKids;  CElement::Initialize(             mDfltElements[eHTMLTag_td],         eHTMLTag_td,      CElement::GetEmptyGroup(), CFlowElement::GetContainedGroups());  mDfltElements[eHTMLTag_td].mContainsGroups.mBits.mSelf=0;  CElement::Initialize(             mDfltElements[eHTMLTag_textarea],   eHTMLTag_textarea);    CElement::Initialize(             mDfltElements[eHTMLTag_tfoot],      eHTMLTag_tfoot,   CTableElement::GetGroup(), CLeafElement::GetContainedGroups());  mDfltElements[eHTMLTag_tfoot].mIncludeKids=kTBodyKids;  mDfltElements[eHTMLTag_tfoot].mContainsGroups.mBits.mSelf=0;  CElement::Initialize(             mDfltElements[eHTMLTag_th],         eHTMLTag_th,      CElement::GetEmptyGroup(), CFlowElement::GetContainedGroups());  mDfltElements[eHTMLTag_th].mContainsGroups.mBits.mSelf=0;  CElement::Initialize(             mDfltElements[eHTMLTag_thead],      eHTMLTag_thead,   CTableElement::GetGroup(), CLeafElement::GetContainedGroups());  mDfltElements[eHTMLTag_thead].mIncludeKids=kTBodyKids;  CTableRowElement::Initialize(     mDfltElements[eHTMLTag_tr],         eHTMLTag_tr);  mDfltElements[eHTMLTag_tr].mContainsGroups.mBits.mSelf=0;  CElement::Initialize(             mDfltElements[eHTMLTag_title],      eHTMLTag_title);  CFontStyleElement::Initialize(    mDfltElements[eHTMLTag_tt],         eHTMLTag_tt);  CFontStyleElement::Initialize(    mDfltElements[eHTMLTag_u],          eHTMLTag_u);  CBlockElement::Initialize(        mDfltElements[eHTMLTag_ul],         eHTMLTag_ul);  mDfltElements[eHTMLTag_ul].mGroup.mBits.mList=1;  mDfltElements[eHTMLTag_ul].mIncludeKids=kDirKids;  mDfltElements[eHTMLTag_ul].mContainsGroups.mAllBits=0;    CPhraseElement::Initialize(       mDfltElements[eHTMLTag_var],        eHTMLTag_var);  CElement::Initialize(             mDfltElements[eHTMLTag_wbr],        eHTMLTag_wbr);  CElement::Initialize(             mDfltElements[eHTMLTag_xmp],        eHTMLTag_xmp);  CLeafElement::Initialize(         mDfltElements[eHTMLTag_text],      eHTMLTag_text);  CLeafElement::Initialize(         mDfltElements[eHTMLTag_comment],   eHTMLTag_comment);  CLeafElement::Initialize(         mDfltElements[eHTMLTag_newline],   eHTMLTag_newline);  CLeafElement::Initialize(         mDfltElements[eHTMLTag_whitespace],eHTMLTag_whitespace);  CLeafElement::Initialize(         mDfltElements[eHTMLTag_unknown],   eHTMLTag_unknown);  CElement::Initialize(mDfltElements[eHTMLTag_userdefined],                        eHTMLTag_userdefined,                        CElement::GetEmptyGroup(),                       CFlowElement::GetContainedGroups()); // allow userdefined tag to contain anything.  mDfltElements[eHTMLTag_unknown].mIncludeKids=kUnknownKids;  /************************************************************     Now let's initialize the elements that we created directly      to handle special cases.   ************************************************************/  mElements[eHTMLTag_body]=&mBodyElement;  mElements[eHTMLTag_frameset]=&mFramesetElement;  mElements[eHTMLTag_html]=&mHTMLElement;  mElements[eHTMLTag_script]=&mScriptElement;  mElements[eHTMLTag_style]=&mStyleElement;  mElements[eHTMLTag_title]=&mTitleElement;  mElements[eHTMLTag_textarea]=&mTextAreaElement;  mElements[eHTMLTag_pre]=&mPreElement;  mElements[eHTMLTag_table]=&mTableElement;  mElements[eHTMLTag_li]=&mLIElement;  mElements[eHTMLTag_applet]=&mAppletElement;  mElements[eHTMLTag_object]=&mObjectElement;  mElements[eHTMLTag_fieldset]=&mFieldsetElement;  mElements[eHTMLTag_counter]=&mCounterElement;  mElements[eHTMLTag_form]=&mFormElement;  mElements[eHTMLTag_head]=&mHeadElement;}