broke intoo genAttrDocPages and genElemDocPages