Hi Agustin,
#1) to add possibility of processing custom tags and attributes we are using templates mechanizm. For example you can see source code for RichFaces processing https://anonsvn.jboss.org/repos/jbosstools/trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/
#2) I don't understand this question, could you clarify?