[libcroco-list] How to build a CRStatement from buf?



cr_om_parser_simply_parse_buf() parse a buf and build CRStyleSheet.
This is convenient function to build CRStyleSheet from buf, directly.
And libcroco provide some of similar APIs to build object from buf.

How to build a CRStatement from buf then? Or how to build each kind
of union of CRStatement? For instance, CSSStyleSheet::insertRule()
just given a buf to be CSSRule. W3C says that the parsable text
representing the rule. For rule sets this contains both the selector
and the style declaration. For at-rules, this specifies both
the at-identifier and the rule content. You can read full spec here
http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleSheet

I'm implementing CSSRule on base of CRStatement. So ::insertRule()
is just a matter of how to build CRStatement from buf, directly.
You can read the code of implementation; impl_insertRule(), here
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/*checkout*/gybe/dominigue/dominigue/Style/cssstylesheet.c?rev=HEAD&content-type=text/plain

Regard,
kz.



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