Also see the XMLC 2.2 Release Note and XMLC 2.2.1 Release Note.
Added null check to BaseDOMFormatter#writeText(String) because setting a Text node value to null caused a null pointer exception. The Text node will simply be wiped out during serialization rather than causing XMLC to bomb out.
Modified HTMLFormatter#printableAttrValue(Attr) to return true in all cases except when the attribute actually is a known boolean attribute. This change results in non-boolean attributes which are set to null being left with an empty string as a value. Users may notice slightly different behavior with boolean attributes defined in the template as, for instance, <option selected="selected">. That used to be printed out in full like a normal attribute="value". It will now be serialized as <option selected> which is perfectly valid HTML. Of course the XMLFormatter will serialize the more verbose version as is required by XML
Pretty printing didn't actually seem to be implemented. It is now implemented for both the HTMLFormatter and XMLFormatter. As such, setting OutputOptions#setPrettyPrinting(true) and passing the custom OutputOptions object to the formatter will actually result in pretty printing rather than having no effect whatsoever as was the case before.
In containers such as JBoss, when a webapp is reloaded, it seems that static variables are not cleared. We were using static variables to record the fact that the XMLCContext had been loaded to avoid unnecessary synchronization and re-initialization. However, since we store the XMLCContext in the ServletContext and the ServletContext actually does get cleared upon application reload, our static variable ends up being out of sync with reality. Instead of storing this 'initialized' information or bothering to do synchronization, both of which have their drawbacks, we now just check the ServletContext to see if the XMLCContext exists and create it if it doesn't. This could lead to more than one initialization (but shouldn't happen often, if at all) and a very minor performance hit when looking the XMLCContext up each time in the ServletContext. However, it should work in any container now.