load plugins, build plugin hash table load appropriate body.aXML while ( commands_remain_unprocessed ) { for each plugin_name in plugins hash { scan using a regex for a corresponding tag making sure it does not contain any subtags if tag has been found that is ready to be computed { eval the code from the plugin file, passing it the data from inside the tag and any attribute values place the $result back into the document in the place of the original tag&data } } }