diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | docs/examples/selection-example-1.c | 32 | ||||
-rw-r--r-- | docs/examples/selection-example-1.css | 12 |
3 files changed, 41 insertions, 9 deletions
@@ -1,3 +1,9 @@ +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. + 2003-12-11 Dodji Seketeli <dodji@gnome.org> * configure.in: updated version numbers for 0.4. 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 +} |