|
Here are some explanations:
I am currently working on a high performance SVG engine and
use Xerces-C for loading the SVG document in memory.
For this, I need to parse CSS declarations inside the SVG
document. Therefore, I have implemented the W3C SAC API (Simple API
for CSS, see http://www.w3.org/Style/CSS/SAC/).
This implementation is very close the the
Java implementation and is complete, if not fully tested.
It can load and parse CSS from files, URL or memory
strings and call a handler for each event happening in the CSS
files.
SAC is the first step towards full DOM/CSS
implementation, much like SAX is the first step towards core
DOM.
Implementing SAC and CSS/DOM should be useful to any project
requiring to load and manage XML files along with the CSS style sheets.
SVG is one, XHTML another one, as well as SMIL and probably others to
come. Implementing SAC and DOM/CSS without the support of a package such
as Xerces-C would require the rewriting of several utility classes already
available with Xerces-C, which would be a loss of time and energy.
Including SAC and DOM/CSS in the Xerces-C distribution does not modify any
working software. If footprint is an issue, it could be made optional
in the configuration.
I can send a tar file of SAC on that list
or make it available on my web site for committers to check (the tgz
file is 60k long).
On this current version, all the files are located in the
src/sac directory but should probably migrate to others like internals, utils or
DOM.
I haven't fully understood the hierarchy in the distribution
and rely on different parts from the following src subdirectories: utils, dom,
framework and internal.
Besides, the parser is currently written using the ANTLR
parser generator (see www.antlr.org).
With sufficient energy, it could be done manually but ANTLR is great and
flexible and would allow for a much easier migration to DOM3 when times
come. The main drawback is the need for the ANTLR library, which can be
included in the source distribution without legal problem though.
Hoping it helps the community,
Jean-Daniel Fekete
Ecole des Mines de Nantes, 4 rue Alfred Kastler, La Chantrerie, BP 20722, 44307 Nantes Cedex 03, France Voice: +33-2-51-85-82-08 | Fax: +33-2-51-85-82-49 [EMAIL PROTECTED] | http://www.emn.fr/fekete/
|
- SAC and CSS Jean-Daniel Fekete
- Re: SAC and CSS Dean Roddey
- Re: SAC and CSS Jean-Daniel Fekete
- Re: SAC and CSS Curt Arnold
- Re: SAC and CSS Jean-Daniel Fekete
