1 /** dec-templ.c - XML decoder template, used in code generation
2 ** Copyright (c) 2010 Sampo Kellomaki (sampo@iki.fi), All Rights Reserved.
3 ** Copyright (c) 2006-2007 Symlabs (symlabs@symlabs.com), All Rights Reserved.
4 ** Author: Sampo Kellomaki (sampo@iki.fi)
5 ** This is confidential unpublished proprietary source code of the author.
6 ** NO WARRANTY, not even implied warranties. Contains trade secrets.
7 ** Distribution prohibited unless authorized in writing.
8 ** Licensed under Apache License 2.0, see file COPYING.
9 ** $Id: dec-templ.c,v 1.30 2008-10-04 23:42:14 sampo Exp $
10 **
11 ** 28.5.2006, created, Sampo Kellomaki (sampo@iki.fi)
12 ** 8.8.2006, reworked namespace handling --Sampo
13 ** 12.8.2006, added special scanning of xmlns to avoid backtracking elem recognition --Sampo
14 ** 23.9.2006, added collection of WO information --Sampo
15 ** 21.6.2007, improved handling of undeclared namespace prefixes --Sampo
16 ** 27.10.2010, CSE refactoring, re-engineered namespace handling --Sampo
17 ** 21.11.2010, re-engineered to extract most code to zx_DEC_elem, leaving just switches --Sampo
18 **
19 ** N.B: This template is meant to be processed by pd/xsd2sg.pl. Beware
20 ** of special markers that xsd2sg.pl expects to find and understand.
21 **/
22
TXDEC_ATTR_ELNAME(struct zx_ctx * c,struct ELSTRUCT * x)23 int TXDEC_ATTR_ELNAME(struct zx_ctx* c, struct ELSTRUCT* x)
24 {
25 switch (x->gg.attr->g.tok) {
26 ATTRS;
27 default: return 0;
28 }
29 }
30
TXDEC_ELEM_ELNAME(struct zx_ctx * c,struct ELSTRUCT * x)31 int TXDEC_ELEM_ELNAME(struct zx_ctx* c, struct ELSTRUCT* x)
32 {
33 struct zx_elem_s* el = x->gg.kids;
34 switch (el->g.tok) {
35 ELEMS;
36 default: return 0;
37 }
38 }
39
40 /* EOF */
41