diff options
author | Dodji Seketeli <dodji@gnome.org> | 2003-12-12 14:22:53 +0000 |
---|---|---|
committer | Dodji Seketeli <dodji@src.gnome.org> | 2003-12-12 14:22:53 +0000 |
commit | 953b643be4a2d4fe4bbf7bed4f5c355d3756be45 (patch) | |
tree | 4f281f0e270296eefa346b1ccd7888528b2438ad /docs | |
parent | 754268015a45bbe6df0382a4dba44efaf0ff176a (diff) | |
download | libcroco-953b643be4a2d4fe4bbf7bed4f5c355d3756be45.tar.gz |
a bit of cleanup and bug fix here. added more test cases.
2003-12-12 Dodji Seketeli <dodji@gnome.org>
* docs/examples/selection-example-1.c: a bit of cleanup
and bug fix here.
* docs/examples/selection-example-1.css: added more test
cases.
Diffstat (limited to 'docs')
-rw-r--r-- | docs/examples/selection-example-1.c | 32 | ||||
-rw-r--r-- | docs/examples/selection-example-1.css | 12 |
2 files changed, 35 insertions, 9 deletions
diff --git a/docs/examples/selection-example-1.c b/docs/examples/selection-example-1.c index 0e0f111..ab94492 100644 --- a/docs/examples/selection-example-1.c +++ b/docs/examples/selection-example-1.c @@ -86,12 +86,32 @@ int init(struct workspace *ws, char **args) /* ...and destruct in reverse order*/ void fini(struct workspace *ws) { - if (ws->selector) cr_sel_eng_destroy(ws->selector); - if (ws->cascade) cr_cascade_destroy(ws->cascade); - if (ws->stylesheet) cr_stylesheet_destroy(ws->stylesheet); - if (ws->result) xmlXPathFreeObject(ws->result); - if (ws->xpath) xmlXPathFreeContext(ws->xpath); - if (ws->document) xmlFreeDoc(ws->document); + if (ws->selector) + { + cr_sel_eng_destroy(ws->selector); + ws->selector = NULL ; + } + if (ws->cascade) + { + cr_cascade_destroy(ws->cascade); + ws->cascade = NULL ; + } + + if (ws->result) + { + xmlXPathFreeObject(ws->result); + ws->result = NULL ; + } + if (ws->xpath) + { + xmlXPathFreeContext(ws->xpath); + ws->xpath = NULL ; + } + if (ws->document) + { + xmlFreeDoc(ws->document); + ws->document = NULL ; + } } void print_property(gpointer name, gpointer decl, gpointer data) diff --git a/docs/examples/selection-example-1.css b/docs/examples/selection-example-1.css index 8bf681b..a50fdb4 100644 --- a/docs/examples/selection-example-1.css +++ b/docs/examples/selection-example-1.css @@ -10,22 +10,28 @@ report > entry note { - color : green; + color : note-color; frame : solid; } note[id] { - color : blue; + color : note-id-color; frame : solid; } note[id=bar] { margin : 5px; + color: note-id-bar-color ; +} + +note[id=foo] +{ + color : note-id-foo-color; } entry[type=notice] note[id=bar] { padding : 5px; -}
\ No newline at end of file +} |