[ANNOUNCEMENT] CSS4J 0.42

7 views
Skip to first unread message

admin

unread,
Jan 9, 2019, 4:12:17 PM1/9/19
to css4j
A new milestone release of css4j, 0.42, was just released and is now available at the Sourceforge download site:



Highlights

Native DOM
 The native DOM implementation has had a major refactor, improving the code readability and reusability, and allowing the introduction of a DOMDocument class (in addition to HTMLDocument) which can handle XML documents. Connected to that change, a new XMLDocumentBuilder allows to read XML and XHTML documents with namespace prefixes; if the document is XHTML, it returns an HTMLDocument.

 The new XMLDocumentBuilder could be used by users of the DOM4J back-end, and there are a few new tests doing just that. Using the Xerces SAX parser to build an XHTMLDocument/XHTMLElement dom4j tree works fine, and the library now has tests using four different ways to build css4j-dom4j documents: the dom4j native parser, the XPP3 parser (which does not support entities and is not recommended), the validator.nu's project HtmlDocumentBuilder [only for (X)HTML documents that do not use namespace prefixes], and finally css4j's XMLDocumentBuilder.


DefaultEntityResolver
 A change to DefaultEntityResolver introduced in 0.41.5 could break some setups, and now that issue is solved (although you still may want to look out for issues with security policy files). Additionally, now users of the XHTML transitional and strict DTDs get the full HTML5 body of entity declarations, instead of the old (smaller) XHTML1.1 ones. The same is true for HTML5-style DTDs.


CSS Object Model
 In the CSSOM front, the library now supports custom properties ('variables') in computed styles. A CSSCustomPropertyValue interface was added for completeness, although it is not especially useful: calling CSSPrimitiveValue.getStringValue() already gives you the name of the custom property.


Changes

 * Core:
- NSAC: a couple of small wording-style changes.
- NSAC implementation: add a missing @Override annotation.
- DefaultEntityResolver: allow retrieving remote resources with file ending 
  with a valid extension or the proper content type.
- DefaultEntityResolver: load HTML5 entities for XHTML strict and transitional 
  DTDs.
- DefaultEntityResolver: do not use an assumed publicId in getExternalSubset.
- DOM implementation: refactor for improved code readability and reusability.
- DOM implementation: introduce an XML-oriented DOMDocument.
- DOM implementation: add a generic XML DocumentBuilder.
- DOM impl.: createDocument() was not creating the document element when 
  requested.
- DOM impl.: methods of named attribute maps weren't correctly handling live 
  addition and removal.
- DOM implementation: fix a bug in Text.splitText(int).
- DOM implementation: fix NPE in Node.insertBefore().
- DOM implementation: fix several pending namespace issues.
- DOM implementation: allow namespaceless attributes.
- DOM implementation: fix a few attribute bugs.
- DOM impl.: Comments: Do not put additional space in toString() serialization.
- DOM implementation: initial support for changing Document's behavior via 
  strictErrorChecking.
- DOM impl.: transform HTML tagnames to lowercase in Document.createElementNS
- DOM implementation: more spec-compliant element serialization in toString().
- DOM impl.: CSSDOMImplementation.hasFeature now returns always true except for 
  "SVG".
- DOM implementation: implement getSchemaTypeInfo() in attributes.
- DOM implementation: do not attempt to return anything with 
  DOMDocument.getInputEncoding().
- DOM impl.: refactor to allow DocumentTypeImpl being used with other DOM 
  implementations.
- DOM impl.: DOMElementTest: remove unnecessary SAC parser configuration.
- Add getColorDepth and getPixelDepth to StyleDatabase, remove getBitsPerColor.
- Remove W3C's Screen interface, which provides information that this 
  implementation splits into CSSCanvas, CSSViewport and StyleDatabase.
- CSSOM: move two W3C interfaces from doc.style.css.w3c to parent package.
- CSSOM: have CSSMarginRule interface extend CSSDeclarationRule instead of 
  CSSRule.
- CSSOM: support custom properties ('variables').
- CSSOM: Shorthand setters and builders: clean up method visibility.
- CSSOM: OMCSSUnknownRule.java: add missing SPDX header information.
- StylableDocumentWrapper: refactor the handling of embedded and linked style 
  sheets.
- WrapperUserAgent: connect to resource before retrieving headers.
- Unit tests: better name for the HTML sample file.
- Unit tests: remove stack trace printing in selector parser NS tests.
- Unit tests: use the correct HTML5 doctype for the HTML sample.
- Update copyright notices to 2019.
 
 * Dom4j module:
- Small tweak to XHTMLDocumentFactory to be compatible with XMLDocumentBuilder.
- DOM4JUserAgent: connect to resource before retrieving headers.
- Unit tests: adapt to method name changes in core testing infrastructure.
- Update copyright notices to 2019.
 
 * Agent module:
- DefaultUserAgent: connect to resource before retrieving headers.
- Update copyright notices to 2019.
 
 * AWT module:
- Update copyright notices to 2019.

admin

unread,
Jan 18, 2019, 1:34:39 PM1/18/19
to css4j
Update 0.42.1 is now available. Copying from the Release Notes:

 - More work in the refactored DOM implementation and the XMLDocumentBuilder.
 - Changes to the DOM Wrapper to match the base style computation functionality
   in the native DOM.
 - Support for env() variables in CSSOM.
 - More non-CSS presentational hints (e.g. using the 'width' attribute in table
   elements) for native DOM and dom4j backend (the DOM Wrapper has no built-in
   hints).
 - Miscellaneous fixes and cleanups.
Reply all
Reply to author
Forward
0 new messages