Skip to content

Commit c00cb2f

Browse files
committed
Release Notes for 2.0.0.
1 parent 33afbeb commit c00cb2f

File tree

1 file changed

+48
-18
lines changed

1 file changed

+48
-18
lines changed

RELEASE_NOTES.txt

Lines changed: 48 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,12 @@
22
CSS4J RELEASE NOTES
33
===================
44

5-
Release 2.0.0-beta1 - November 11, 2019
6-
---------------------------------------
5+
Release 2.0.0 - December 4, 2019
6+
--------------------------------
77

8-
It is the first beta of the 2.0 (master) branch, looking forwards a final 2.0.0
9-
release in December 2019. Features NSAC 2.0 and a new Object Model Value API; it
8+
This new major release features NSAC 2.0 and a new Object Model Value API; it
109
is not backwards-compatible with 1.0, but the new 2.0 APIs are more appropriate
11-
to deal with modern CSS. Any new development should use the 2.0 API (and hence
12-
the interest in releasing it as soon as possible).
10+
to deal with modern CSS. Any new development should use the 2.0 API.
1311

1412
NSAC 2.0 no longer inherits from stuff in the org.w3c.css.sac package (provided
1513
by the -not needed anymore- sac.jar file) but is an independent API, with its
@@ -34,12 +32,44 @@ ease the transition (for example I keep getCssValueType() to retrieve the value
3432
category, instead of a more proper getCategory()).
3533

3634
Another important change is that the source-level compatibility is now for Java
37-
version 8 instead of 7. Comments about the new APIs are welcome.
35+
SE version 8 instead of 7. Comments about the new APIs are welcome.
3836

3937
Many 2.0 patches do not apply to 1.0 which makes it difficult to maintain. As a
40-
consequence, the end of life for 1.0.x would happen relatively early in 2020
41-
unless somebody volunteers for maintaining it (which would probably be a waste
42-
of time).
38+
consequence, the end of life for 1.0 shall happen in March 5, 2020 unless
39+
somebody volunteers for maintaining it (which would probably be a waste of time).
40+
41+
42+
Upgrading from 1.0
43+
------------------
44+
The extended CSS interfaces in 1.0 ('css' and 'nsac' packages) have now adopted
45+
the names of the interfaces that they were extending, due to the fact that they
46+
are no longer an extension but a full fork. This means that if you are using
47+
interfaces prefixed with 'Extended' or having the '2' suffix from those 'css'
48+
and 'nsac' packages, you need to remove that prefix/suffix to begin the upgrade,
49+
and then use the interfaces from css4j instead of the old W3C ones. Note that
50+
this is only for the CSS interfaces, so the 'Extended'-prefixed interfaces in
51+
the 'doc.dom' package were not changed.
52+
53+
SAC/NSAC 1.x users need to look closely at the new CSSHandler interface, and to
54+
the changes in LexicalUnit; the rest of the API changes should be easy to apply.
55+
The type identifiers in 2.0 use enumerations instead of integers (CSS unit
56+
identifiers are now separate from type identifiers and are still integer).
57+
58+
If you are using the CSSValue API, the upgrade is non-trivial and you should
59+
look at the new interfaces. In many cases where you were using the
60+
CSSPrimitiveValue interface, you should be using the new CSSTypedValue, although
61+
sometimes the renewed CSSValue type may be all that you need.
62+
63+
For example, calls to CSSPrimitiveValue.getRGBColorValue() should be changed to
64+
CSSTypedValue.toRGBColorValue(), but be sure that the type is a COLOR value in
65+
the RGB space before trying to edit the color (and you can use
66+
RGBColorValue.getRGBColorValue() to access the RGBAColor object).
67+
68+
DOM4J users should be aware that the document factory no longer automatically
69+
loads a default User Agent sheet. This backwards-incompatible change may seem
70+
gratuitous, but the old behaviour has shown to be problematic for users.
71+
72+
Finally, be sure that you are able to use Java SE 8 or higher.
4373

4474

4575
Description
@@ -51,14 +81,14 @@ different licensing).
5181

5282
The functionality in this library can be divided in the following areas:
5383

54-
- An implementation of the standard W3C CSS Object Model API, that allows
55-
to get computed styles for elements in a DOM Document. A DOM implementation
56-
is available, as well as a DOM4J backend (module css4j-dom4j) and also a DOM
57-
wrapper that can be used with an external DOM implementation.
58-
- An extension to the base W3C APIs.
59-
- A device profile API to encapsulate target device-specific information. An
60-
example implementation based on Java2D is in the 'render' module of the main
61-
Carte project.
84+
- A CSSOM API very similar to the standard W3C CSS Object Model API, that allows
85+
accessing the CSS information (style sheets, inline styles, etc.) in a DOM
86+
Document, as well as getting computed styles for its elements.
87+
- A CSS-enabled native DOM implementation.
88+
- A DOM wrapper that can be used with an external DOM implementation.
89+
- A DOM4J backend (module css4j-dom4j) which uses documents and elements that
90+
extend those of dom4j (for those who are comfortable with dom4j).
91+
- A device profile API to encapsulate target device-specific information.
6292
- A few AWT helper classes (AWT module).
6393
- Some helper XML-DTD classes.
6494

0 commit comments

Comments
 (0)