I am using Emacs to write XHTML pages in a JSF project and the amount of boilerplate code that has to go at the header of each XHTML file is hard-to-type, ugly and error-prone. E.g:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ui="http://java.sun.com/jsf/facelets">
What would be the "emacs way" of dealing with this? I 've read about the nXhtml mode but haven't tried it and don't know if it auto-completes boilerplate like the above or just offers more rudimentary XML checking / completion syntax. At any rate I would like to evaluate more lightweight alternatives first.