css4j / echosvg

SVG implementation in the Java™ Language, fork of Apache Batik, supporting level 4 selectors and colors.
Apache License 2.0
40 stars 2 forks source link

Migrate to an API not centered on SVGDocument #40

Open carlosame opened 2 years ago

carlosame commented 2 years ago

The APIs of this project were designed around the SVGDocument, but the current SVG specification uses the concept of a SVG document fragment instead.

The current code assumes that every and each SVG image is a separate document with the svg element being the root element. However, modern documents often contain a number of SVG sub-trees (each being a different image) and the API of a SVG toolkit like this project should allow that.

Supporting more modern SVG should not be controversial, however this implies breaking backwards compatibility at the API level and some people may believe that this makes no sense for a project with old roots like this one. This issue is opened to discuss the change: If you have an opinion on whether the current API should be kept or not, please post it here.