[libcroco-list] Re: CSS



>Well, to begin with I'll concentrate on just integrating the parser
>part.
>
>How can I use libcroco to parse style= attributes?
>The approach I had
>taken in my own parser was to introduce a "ruleset body" production that
>was (more or less):
>
>	 ruleset_body: S* declaration [ ';' S* declaration ]*;
>
>But libcroco has no equivalent cr_parser_parse_* parser method...

Well, you can use cr_parser_parse_declaration (). But you are right,
You have to loop over the list of attribute yourself.
We can write a cr_parser_parse_decls_list () that does this.
This a matter of a couple of minutes. I can write it for you if you
need it.

If you want an example of how to retrieve characters from the
parser input stream, you can see the the code of
cr_parser_parse_ruleset at
http://www.freespiders.org/projects/libcroco/docs/apidoc/0.2/cr-parser_8c-source.html#l03922
.

All the best,

Dodji.

homepage: http://www.seketeli.org/dodji
gnome xml editor: http://www.freespiders.org/projects/gmlview
gnome css2 parsing toolkit: http://www.freespiders.org/projects/libcroco



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]