css4j v3.1.0
- Previous versions are vulnerable to DoS attacks, and the new protections use the new
CSSDocument.isAuthorizedOrigin(URL)method. - The method
ErrorHandler.hasErrors()now returns true if there are I/O errors. Those errors were previously considered transient, and therefore weren't appearing there. - DOM:
DOMDocument.getDomConfig()was undeprecated, and theDOMConfigurationcan be used to control the normalization of the document. - DOM: on attribute nodes,
getTextContent()now returns the attribute value instead of the empty string. - DOM: DOM nodes now implement
java.io.Serializable. DefaultEntityResolver.resolveEntity(DocumentTypeDeclaration)is deprecated.
("DOM:" means that the change applies to "Native DOM implementation").
These new behaviors mean that this release is not fully backwards-compatible with 3.0, so the minor version was bumped to 3.1. Additionally, the following are important fixes/improvements:
- Case sensitivity fixes: Native DOM correctly matched the selector
[Foo]to the attributefoo="bar"in HTML documents, but neither the XML-oriented DOM implementations in the DOM wrapper nor the DOM4J back-end did. Now they both do, and a few other smaller case sensitivity fixes were applied as well. - DOM: normalization of element-content whitespace is now based on the value of the
whitespaceCSS property, and so doesDOMWriterserialization. - DOM: indented serialization of
inline-blockelements inDOMWriter.