gwenhywfar  4.3.3
g_generic.c
Go to the documentation of this file.
1 /***************************************************************************
2  begin : Sat Feb 20 2010
3  copyright : (C) 2010 by Martin Preuss
4  email : martin@libchipcard.de
5 
6  ***************************************************************************
7  * Please see toplevel file COPYING for license details *
8  ***************************************************************************/
9 
10 
11 #ifdef HAVE_CONFIG_H
12 # include <config.h>
13 #endif
14 
15 #define DISABLE_DEBUGLOG
16 
17 #include "g_generic_p.h"
18 #include "htmlctx_l.h"
19 
20 #include <gwenhywfar/misc.h>
21 #include <gwenhywfar/debug.h>
22 
23 
24 
25 
26 HTML_GROUP *HtmlGroup_Generic_new(const char *groupName,
27  HTML_GROUP *parent,
28  GWEN_XML_CONTEXT *ctx) {
29  HTML_GROUP *g;
30 
31  /* create base group */
32  g=HtmlGroup_new(groupName, parent, ctx);
33  assert(g);
34 
35  /* set virtual functions */
39 
40  return g;
41 }
42 
43 
44 
45 int HtmlGroup_Generic_EndTag(HTML_GROUP *g, const char *tagName) {
46  assert(g);
47 
48  if (strcasecmp(HtmlGroup_GetGroupName(g), tagName)!=0) {
50  "Tag [%s] does not close [%s], ignoring",
51  tagName, HtmlGroup_GetGroupName(g));
52  /*return GWEN_ERROR_BAD_DATA;*/
53  return 0;
54  }
55 
56  /* always end this tag */
57  return 1;
58 }
59 
60 
61 
62 int HtmlGroup_Generic_AddData(HTML_GROUP *g, const char *data) {
63  assert(g);
64 
65  /* just ignore the data */
66  return 0;
67 }
68 
69 
70 
72  assert(g);
73 
74  /* just ignore the end of sub group */
75  return 0;
76 }
77 
78 
79 
80 
81 
82 
83 
84 
85 
86 
87