This is ready for review now.
============================================= http://code.google.com/p/google-caja/issues/detail?id=1115 Adds namespace support to caja XML/HTML lexing, parsing, manipulation, rendering, and quasiliterals. This change: (1) Removes Name.xml and Name.html since they cannot be relied upon. (2) Changes the HTML lexer to rely on normalized element names where it needs to deal with element names, e.g. HtmlTextEscapingMode. See the bug for discussion of the dialect of HTML with embedded XML that we support on input and why this approach is reasonable in light of that. (3) Introduces a Namespaces object that tracks the set of xmlns definitions in scope. (4) Introduces two key classes: ElKey and AttribKey which identify a type of XML/HTML Element and Attribute respectively. (5) Reworks HtmlSchema and its clients to use ElKey and AttribKey instead of Name. (6) Reworks the DomParser to recognize namespace declarations and to create elements and attributes using the namespace aware versions, e.g. doc.createElementNS instead of doc.createElement. (7) Add a fixup pass to DomParser to attach namespaces to prefixed HTML elements and attributes. (8) Reworks Nodes.render to prefix elements and attributes consistently, creating namespaces as necessary. (9) Updates all HTML generating code to use namespace aware DOM construction techniques. This change depends on http://codereview.appspot.com/124115/show To review, please look first at Namespaces and the key classes: ElKey and AttribKey and associated unittests. Then maybe look at how the key classes are used in HtmlSchema. Then look at the rendering code in Nodes.java, and the parsing code in DomParser, XmlElementStack, HtmlElementStack, and CajaTreeBuilder. Finally, review the clients of these classes.
