/* c/zx-cdm-dec.c - WARNING: This file was auto generated by xsd2sg.pl. DO NOT EDIT!
 * $Id$ */
/* Code generation design Copyright (c) 2006 Sampo Kellomaki (sampo@iki.fi),
 * All Rights Reserved. NO WARRANTY. See file COPYING for terms and conditions
 * of use. Some aspects of code generation were driven by schema
 * descriptions that were used as input and may be subject to their own copyright.
 * Code generation uses a template, whose copyright statement follows. */

/** dec-templ.c  -  XML decoder template, used in code generation
 ** Copyright (c) 2010 Sampo Kellomaki (sampo@iki.fi), All Rights Reserved.
 ** Copyright (c) 2006-2007 Symlabs (symlabs@symlabs.com), All Rights Reserved.
 ** Author: Sampo Kellomaki (sampo@iki.fi)
 ** This is confidential unpublished proprietary source code of the author.
 ** NO WARRANTY, not even implied warranties. Contains trade secrets.
 ** Distribution prohibited unless authorized in writing.
 ** Licensed under Apache License 2.0, see file COPYING.
 ** Id: dec-templ.c,v 1.30 2008-10-04 23:42:14 sampo Exp $
 **
 ** 28.5.2006, created, Sampo Kellomaki (sampo@iki.fi)
 ** 8.8.2006,  reworked namespace handling --Sampo
 ** 12.8.2006, added special scanning of xmlns to avoid backtracking elem recognition --Sampo
 ** 23.9.2006, added collection of WO information --Sampo
 ** 21.6.2007, improved handling of undeclared namespace prefixes --Sampo
 ** 27.10.2010, CSE refactoring, re-engineered namespace handling --Sampo
 ** 21.11.2010, re-engineered to extract most code to zx_DEC_elem, leaving just switches --Sampo
 **
 ** N.B: This template is meant to be processed by pd/xsd2sg.pl. Beware
 ** of special markers that xsd2sg.pl expects to find and understand.
 **/

#include "errmac.h"
#include "zx.h"
#include "c/zx-const.h"
#include "c/zx-data.h"
#include "c/zx-cdm-data.h"
#define TPF zx_
#include "zx_ext_pt.h"



int zx_DEC_ATTR_cdm_ADR(struct zx_ctx* c, struct zx_cdm_ADR_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_id_ATTR|zx_cb_NS:  x->id = x->gg.attr; return 1;
    case zx_modificationTime_ATTR|zx_cb_NS:  x->modificationTime = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_cdm_ADR(struct zx_ctx* c, struct zx_cdm_ADR_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_cdm_HOME_ELEM:
    if (!x->HOME)
      x->HOME = el;
    return 1;
  case zx_cdm_WORK_ELEM:
    if (!x->WORK)
      x->WORK = el;
    return 1;
  case zx_cdm_POSTAL_ELEM:
    if (!x->POSTAL)
      x->POSTAL = el;
    return 1;
  case zx_cdm_PARCEL_ELEM:
    if (!x->PARCEL)
      x->PARCEL = el;
    return 1;
  case zx_cdm_DOM_ELEM:
    if (!x->DOM)
      x->DOM = el;
    return 1;
  case zx_cdm_INTL_ELEM:
    if (!x->INTL)
      x->INTL = el;
    return 1;
  case zx_cdm_PREF_ELEM:
    if (!x->PREF)
      x->PREF = el;
    return 1;
  case zx_cdm_POBOX_ELEM:
    if (!x->POBOX)
      x->POBOX = (struct zx_cdm_POBOX_s*)el;
    return 1;
  case zx_cdm_EXTADR_ELEM:
    if (!x->EXTADR)
      x->EXTADR = (struct zx_cdm_EXTADR_s*)el;
    return 1;
  case zx_cdm_STREET_ELEM:
    if (!x->STREET)
      x->STREET = (struct zx_cdm_STREET_s*)el;
    return 1;
  case zx_cdm_LOCALITY_ELEM:
    if (!x->LOCALITY)
      x->LOCALITY = (struct zx_cdm_LOCALITY_s*)el;
    return 1;
  case zx_cdm_REGION_ELEM:
    if (!x->REGION)
      x->REGION = (struct zx_cdm_REGION_s*)el;
    return 1;
  case zx_cdm_PCODE_ELEM:
    if (!x->PCODE)
      x->PCODE = (struct zx_cdm_PCODE_s*)el;
    return 1;
  case zx_cdm_CTRY_ELEM:
    if (!x->CTRY)
      x->CTRY = (struct zx_cdm_CTRY_s*)el;
    return 1;

  default: return 0;
  }
}




int zx_DEC_ATTR_cdm_AGENT(struct zx_ctx* c, struct zx_cdm_AGENT_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_id_ATTR|zx_cb_NS:  x->id = x->gg.attr; return 1;
    case zx_modificationTime_ATTR|zx_cb_NS:  x->modificationTime = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_cdm_AGENT(struct zx_ctx* c, struct zx_cdm_AGENT_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_cdm_vCard_ELEM:
    if (!x->vCard)
      x->vCard = (struct zx_cdm_vCard_s*)el;
    return 1;
  case zx_cdm_EXTVAL_ELEM:
    if (!x->EXTVAL)
      x->EXTVAL = (struct zx_cdm_EXTVAL_s*)el;
    return 1;

  default: return 0;
  }
}




int zx_DEC_ATTR_cdm_BDAY(struct zx_ctx* c, struct zx_cdm_BDAY_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_ACC_ATTR|zx_cb_NS:  x->ACC = x->gg.attr; return 1;
    case zx_ACCTime_ATTR|zx_cb_NS:  x->ACCTime = x->gg.attr; return 1;
    case zx_id_ATTR|zx_cb_NS:  x->id = x->gg.attr; return 1;
    case zx_modificationTime_ATTR|zx_cb_NS:  x->modificationTime = x->gg.attr; return 1;
    case zx_modifier_ATTR|zx_cb_NS:  x->modifier = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_cdm_BDAY(struct zx_ctx* c, struct zx_cdm_BDAY_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {

  default: return 0;
  }
}




int zx_DEC_ATTR_cdm_BINVAL(struct zx_ctx* c, struct zx_cdm_BINVAL_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_ACC_ATTR|zx_cb_NS:  x->ACC = x->gg.attr; return 1;
    case zx_ACCTime_ATTR|zx_cb_NS:  x->ACCTime = x->gg.attr; return 1;
    case zx_id_ATTR|zx_cb_NS:  x->id = x->gg.attr; return 1;
    case zx_modificationTime_ATTR|zx_cb_NS:  x->modificationTime = x->gg.attr; return 1;
    case zx_modifier_ATTR|zx_cb_NS:  x->modifier = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_cdm_BINVAL(struct zx_ctx* c, struct zx_cdm_BINVAL_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {

  default: return 0;
  }
}




int zx_DEC_ATTR_cdm_CALADRURI(struct zx_ctx* c, struct zx_cdm_CALADRURI_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_ACC_ATTR|zx_cb_NS:  x->ACC = x->gg.attr; return 1;
    case zx_ACCTime_ATTR|zx_cb_NS:  x->ACCTime = x->gg.attr; return 1;
    case zx_id_ATTR|zx_cb_NS:  x->id = x->gg.attr; return 1;
    case zx_modificationTime_ATTR|zx_cb_NS:  x->modificationTime = x->gg.attr; return 1;
    case zx_modifier_ATTR|zx_cb_NS:  x->modifier = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_cdm_CALADRURI(struct zx_ctx* c, struct zx_cdm_CALADRURI_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_cdm_PREF_ELEM:
    if (!x->PREF)
      x->PREF = el;
    return 1;
  case zx_cdm_URI_ELEM:
    if (!x->URI)
      x->URI = (struct zx_cdm_URI_s*)el;
    return 1;

  default: return 0;
  }
}




int zx_DEC_ATTR_cdm_CALURI(struct zx_ctx* c, struct zx_cdm_CALURI_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_ACC_ATTR|zx_cb_NS:  x->ACC = x->gg.attr; return 1;
    case zx_ACCTime_ATTR|zx_cb_NS:  x->ACCTime = x->gg.attr; return 1;
    case zx_id_ATTR|zx_cb_NS:  x->id = x->gg.attr; return 1;
    case zx_modificationTime_ATTR|zx_cb_NS:  x->modificationTime = x->gg.attr; return 1;
    case zx_modifier_ATTR|zx_cb_NS:  x->modifier = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_cdm_CALURI(struct zx_ctx* c, struct zx_cdm_CALURI_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_cdm_PREF_ELEM:
    if (!x->PREF)
      x->PREF = el;
    return 1;
  case zx_cdm_URI_ELEM:
    if (!x->URI)
      x->URI = (struct zx_cdm_URI_s*)el;
    return 1;

  default: return 0;
  }
}




int zx_DEC_ATTR_cdm_CAPURI(struct zx_ctx* c, struct zx_cdm_CAPURI_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_ACC_ATTR|zx_cb_NS:  x->ACC = x->gg.attr; return 1;
    case zx_ACCTime_ATTR|zx_cb_NS:  x->ACCTime = x->gg.attr; return 1;
    case zx_id_ATTR|zx_cb_NS:  x->id = x->gg.attr; return 1;
    case zx_modificationTime_ATTR|zx_cb_NS:  x->modificationTime = x->gg.attr; return 1;
    case zx_modifier_ATTR|zx_cb_NS:  x->modifier = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_cdm_CAPURI(struct zx_ctx* c, struct zx_cdm_CAPURI_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_cdm_PREF_ELEM:
    if (!x->PREF)
      x->PREF = el;
    return 1;
  case zx_cdm_URI_ELEM:
    if (!x->URI)
      x->URI = (struct zx_cdm_URI_s*)el;
    return 1;

  default: return 0;
  }
}




int zx_DEC_ATTR_cdm_CATEGORIES(struct zx_ctx* c, struct zx_cdm_CATEGORIES_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_id_ATTR|zx_cb_NS:  x->id = x->gg.attr; return 1;
    case zx_modificationTime_ATTR|zx_cb_NS:  x->modificationTime = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_cdm_CATEGORIES(struct zx_ctx* c, struct zx_cdm_CATEGORIES_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_cdm_KEYWORD_ELEM:
    if (!x->KEYWORD)
      x->KEYWORD = (struct zx_cdm_KEYWORD_s*)el;
    return 1;

  default: return 0;
  }
}




int zx_DEC_ATTR_cdm_CLASS(struct zx_ctx* c, struct zx_cdm_CLASS_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_ACC_ATTR|zx_cb_NS:  x->ACC = x->gg.attr; return 1;
    case zx_ACCTime_ATTR|zx_cb_NS:  x->ACCTime = x->gg.attr; return 1;
    case zx_id_ATTR|zx_cb_NS:  x->id = x->gg.attr; return 1;
    case zx_modificationTime_ATTR|zx_cb_NS:  x->modificationTime = x->gg.attr; return 1;
    case zx_modifier_ATTR|zx_cb_NS:  x->modifier = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_cdm_CLASS(struct zx_ctx* c, struct zx_cdm_CLASS_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_cdm_PUBLIC_ELEM:
    if (!x->PUBLIC)
      x->PUBLIC = el;
    return 1;
  case zx_cdm_PRIVATE_ELEM:
    if (!x->PRIVATE)
      x->PRIVATE = el;
    return 1;
  case zx_cdm_CONFIDENTIAL_ELEM:
    if (!x->CONFIDENTIAL)
      x->CONFIDENTIAL = el;
    return 1;

  default: return 0;
  }
}




int zx_DEC_ATTR_cdm_CRED(struct zx_ctx* c, struct zx_cdm_CRED_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_ACC_ATTR|zx_cb_NS:  x->ACC = x->gg.attr; return 1;
    case zx_ACCTime_ATTR|zx_cb_NS:  x->ACCTime = x->gg.attr; return 1;
    case zx_id_ATTR|zx_cb_NS:  x->id = x->gg.attr; return 1;
    case zx_modificationTime_ATTR|zx_cb_NS:  x->modificationTime = x->gg.attr; return 1;
    case zx_modifier_ATTR|zx_cb_NS:  x->modifier = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_cdm_CRED(struct zx_ctx* c, struct zx_cdm_CRED_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {

  default: return 0;
  }
}




int zx_DEC_ATTR_cdm_CTRY(struct zx_ctx* c, struct zx_cdm_CTRY_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_group_ATTR|zx_cb_NS:  x->group = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_cdm_CTRY(struct zx_ctx* c, struct zx_cdm_CTRY_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {

  default: return 0;
  }
}




int zx_DEC_ATTR_cdm_DESC(struct zx_ctx* c, struct zx_cdm_DESC_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_group_ATTR|zx_cb_NS:  x->group = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_cdm_DESC(struct zx_ctx* c, struct zx_cdm_DESC_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {

  default: return 0;
  }
}




int zx_DEC_ATTR_cdm_EMAIL(struct zx_ctx* c, struct zx_cdm_EMAIL_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_id_ATTR|zx_cb_NS:  x->id = x->gg.attr; return 1;
    case zx_modificationTime_ATTR|zx_cb_NS:  x->modificationTime = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_cdm_EMAIL(struct zx_ctx* c, struct zx_cdm_EMAIL_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_cdm_HOME_ELEM:
    if (!x->HOME)
      x->HOME = el;
    return 1;
  case zx_cdm_WORK_ELEM:
    if (!x->WORK)
      x->WORK = el;
    return 1;
  case zx_cdm_INTERNET_ELEM:
    if (!x->INTERNET)
      x->INTERNET = el;
    return 1;
  case zx_cdm_PREF_ELEM:
    if (!x->PREF)
      x->PREF = el;
    return 1;
  case zx_cdm_X400_ELEM:
    if (!x->X400)
      x->X400 = el;
    return 1;
  case zx_cdm_USERID_ELEM:
    if (!x->USERID)
      x->USERID = (struct zx_cdm_USERID_s*)el;
    return 1;

  default: return 0;
  }
}




int zx_DEC_ATTR_cdm_EXTADR(struct zx_ctx* c, struct zx_cdm_EXTADR_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_group_ATTR|zx_cb_NS:  x->group = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_cdm_EXTADR(struct zx_ctx* c, struct zx_cdm_EXTADR_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {

  default: return 0;
  }
}




int zx_DEC_ATTR_cdm_EXTVAL(struct zx_ctx* c, struct zx_cdm_EXTVAL_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_ACC_ATTR|zx_cb_NS:  x->ACC = x->gg.attr; return 1;
    case zx_ACCTime_ATTR|zx_cb_NS:  x->ACCTime = x->gg.attr; return 1;
    case zx_id_ATTR|zx_cb_NS:  x->id = x->gg.attr; return 1;
    case zx_modificationTime_ATTR|zx_cb_NS:  x->modificationTime = x->gg.attr; return 1;
    case zx_modifier_ATTR|zx_cb_NS:  x->modifier = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_cdm_EXTVAL(struct zx_ctx* c, struct zx_cdm_EXTVAL_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {

  default: return 0;
  }
}




int zx_DEC_ATTR_cdm_FAMILY(struct zx_ctx* c, struct zx_cdm_FAMILY_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_group_ATTR|zx_cb_NS:  x->group = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_cdm_FAMILY(struct zx_ctx* c, struct zx_cdm_FAMILY_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {

  default: return 0;
  }
}




int zx_DEC_ATTR_cdm_FBURL(struct zx_ctx* c, struct zx_cdm_FBURL_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_ACC_ATTR|zx_cb_NS:  x->ACC = x->gg.attr; return 1;
    case zx_ACCTime_ATTR|zx_cb_NS:  x->ACCTime = x->gg.attr; return 1;
    case zx_id_ATTR|zx_cb_NS:  x->id = x->gg.attr; return 1;
    case zx_modificationTime_ATTR|zx_cb_NS:  x->modificationTime = x->gg.attr; return 1;
    case zx_modifier_ATTR|zx_cb_NS:  x->modifier = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_cdm_FBURL(struct zx_ctx* c, struct zx_cdm_FBURL_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_cdm_PREF_ELEM:
    if (!x->PREF)
      x->PREF = el;
    return 1;
  case zx_cdm_URI_ELEM:
    if (!x->URI)
      x->URI = (struct zx_cdm_URI_s*)el;
    return 1;

  default: return 0;
  }
}




int zx_DEC_ATTR_cdm_FN(struct zx_ctx* c, struct zx_cdm_FN_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_group_ATTR|zx_cb_NS:  x->group = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_cdm_FN(struct zx_ctx* c, struct zx_cdm_FN_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {

  default: return 0;
  }
}




int zx_DEC_ATTR_cdm_GEO(struct zx_ctx* c, struct zx_cdm_GEO_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_id_ATTR|zx_cb_NS:  x->id = x->gg.attr; return 1;
    case zx_modificationTime_ATTR|zx_cb_NS:  x->modificationTime = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_cdm_GEO(struct zx_ctx* c, struct zx_cdm_GEO_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_cdm_LAT_ELEM:
    if (!x->LAT)
      x->LAT = (struct zx_cdm_LAT_s*)el;
    return 1;
  case zx_cdm_LON_ELEM:
    if (!x->LON)
      x->LON = (struct zx_cdm_LON_s*)el;
    return 1;

  default: return 0;
  }
}




int zx_DEC_ATTR_cdm_GIVEN(struct zx_ctx* c, struct zx_cdm_GIVEN_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_group_ATTR|zx_cb_NS:  x->group = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_cdm_GIVEN(struct zx_ctx* c, struct zx_cdm_GIVEN_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {

  default: return 0;
  }
}




int zx_DEC_ATTR_cdm_JABBERID(struct zx_ctx* c, struct zx_cdm_JABBERID_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_ACC_ATTR|zx_cb_NS:  x->ACC = x->gg.attr; return 1;
    case zx_ACCTime_ATTR|zx_cb_NS:  x->ACCTime = x->gg.attr; return 1;
    case zx_id_ATTR|zx_cb_NS:  x->id = x->gg.attr; return 1;
    case zx_modificationTime_ATTR|zx_cb_NS:  x->modificationTime = x->gg.attr; return 1;
    case zx_modifier_ATTR|zx_cb_NS:  x->modifier = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_cdm_JABBERID(struct zx_ctx* c, struct zx_cdm_JABBERID_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {

  default: return 0;
  }
}




int zx_DEC_ATTR_cdm_KEY(struct zx_ctx* c, struct zx_cdm_KEY_s* x)
{
  switch (x->gg.attr->g.tok) {

  default: return 0;
  }
}

int zx_DEC_ELEM_cdm_KEY(struct zx_ctx* c, struct zx_cdm_KEY_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_cdm_TYPE_ELEM:
    if (!x->TYPE)
      x->TYPE = (struct zx_cdm_TYPE_s*)el;
    return 1;
  case zx_cdm_CRED_ELEM:
    if (!x->CRED)
      x->CRED = (struct zx_cdm_CRED_s*)el;
    return 1;

  default: return 0;
  }
}




int zx_DEC_ATTR_cdm_KEYWORD(struct zx_ctx* c, struct zx_cdm_KEYWORD_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_ACC_ATTR|zx_cb_NS:  x->ACC = x->gg.attr; return 1;
    case zx_ACCTime_ATTR|zx_cb_NS:  x->ACCTime = x->gg.attr; return 1;
    case zx_id_ATTR|zx_cb_NS:  x->id = x->gg.attr; return 1;
    case zx_modificationTime_ATTR|zx_cb_NS:  x->modificationTime = x->gg.attr; return 1;
    case zx_modifier_ATTR|zx_cb_NS:  x->modifier = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_cdm_KEYWORD(struct zx_ctx* c, struct zx_cdm_KEYWORD_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {

  default: return 0;
  }
}




int zx_DEC_ATTR_cdm_LABEL(struct zx_ctx* c, struct zx_cdm_LABEL_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_id_ATTR|zx_cb_NS:  x->id = x->gg.attr; return 1;
    case zx_modificationTime_ATTR|zx_cb_NS:  x->modificationTime = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_cdm_LABEL(struct zx_ctx* c, struct zx_cdm_LABEL_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_cdm_HOME_ELEM:
    if (!x->HOME)
      x->HOME = el;
    return 1;
  case zx_cdm_WORK_ELEM:
    if (!x->WORK)
      x->WORK = el;
    return 1;
  case zx_cdm_POSTAL_ELEM:
    if (!x->POSTAL)
      x->POSTAL = el;
    return 1;
  case zx_cdm_PARCEL_ELEM:
    if (!x->PARCEL)
      x->PARCEL = el;
    return 1;
  case zx_cdm_DOM_ELEM:
    if (!x->DOM)
      x->DOM = el;
    return 1;
  case zx_cdm_INTL_ELEM:
    if (!x->INTL)
      x->INTL = el;
    return 1;
  case zx_cdm_PREF_ELEM:
    if (!x->PREF)
      x->PREF = el;
    return 1;
  case zx_cdm_LINE_ELEM:
    if (!x->LINE)
      x->LINE = (struct zx_cdm_LINE_s*)el;
    return 1;

  default: return 0;
  }
}




int zx_DEC_ATTR_cdm_LAT(struct zx_ctx* c, struct zx_cdm_LAT_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_ACC_ATTR|zx_cb_NS:  x->ACC = x->gg.attr; return 1;
    case zx_ACCTime_ATTR|zx_cb_NS:  x->ACCTime = x->gg.attr; return 1;
    case zx_id_ATTR|zx_cb_NS:  x->id = x->gg.attr; return 1;
    case zx_modificationTime_ATTR|zx_cb_NS:  x->modificationTime = x->gg.attr; return 1;
    case zx_modifier_ATTR|zx_cb_NS:  x->modifier = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_cdm_LAT(struct zx_ctx* c, struct zx_cdm_LAT_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {

  default: return 0;
  }
}




int zx_DEC_ATTR_cdm_LINE(struct zx_ctx* c, struct zx_cdm_LINE_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_group_ATTR|zx_cb_NS:  x->group = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_cdm_LINE(struct zx_ctx* c, struct zx_cdm_LINE_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {

  default: return 0;
  }
}




int zx_DEC_ATTR_cdm_LISTMEMBER(struct zx_ctx* c, struct zx_cdm_LISTMEMBER_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_ACC_ATTR|zx_cb_NS:  x->ACC = x->gg.attr; return 1;
    case zx_ACCTime_ATTR|zx_cb_NS:  x->ACCTime = x->gg.attr; return 1;
    case zx_id_ATTR|zx_cb_NS:  x->id = x->gg.attr; return 1;
    case zx_modificationTime_ATTR|zx_cb_NS:  x->modificationTime = x->gg.attr; return 1;
    case zx_modifier_ATTR|zx_cb_NS:  x->modifier = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_cdm_LISTMEMBER(struct zx_ctx* c, struct zx_cdm_LISTMEMBER_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {

  default: return 0;
  }
}




int zx_DEC_ATTR_cdm_LOCALITY(struct zx_ctx* c, struct zx_cdm_LOCALITY_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_group_ATTR|zx_cb_NS:  x->group = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_cdm_LOCALITY(struct zx_ctx* c, struct zx_cdm_LOCALITY_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {

  default: return 0;
  }
}




int zx_DEC_ATTR_cdm_LOGO(struct zx_ctx* c, struct zx_cdm_LOGO_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_id_ATTR|zx_cb_NS:  x->id = x->gg.attr; return 1;
    case zx_modificationTime_ATTR|zx_cb_NS:  x->modificationTime = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_cdm_LOGO(struct zx_ctx* c, struct zx_cdm_LOGO_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_cdm_TYPE_ELEM:
    if (!x->TYPE)
      x->TYPE = (struct zx_cdm_TYPE_s*)el;
    return 1;
  case zx_cdm_BINVAL_ELEM:
    if (!x->BINVAL)
      x->BINVAL = (struct zx_cdm_BINVAL_s*)el;
    return 1;
  case zx_cdm_EXTVAL_ELEM:
    if (!x->EXTVAL)
      x->EXTVAL = (struct zx_cdm_EXTVAL_s*)el;
    return 1;

  default: return 0;
  }
}




int zx_DEC_ATTR_cdm_LON(struct zx_ctx* c, struct zx_cdm_LON_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_ACC_ATTR|zx_cb_NS:  x->ACC = x->gg.attr; return 1;
    case zx_ACCTime_ATTR|zx_cb_NS:  x->ACCTime = x->gg.attr; return 1;
    case zx_id_ATTR|zx_cb_NS:  x->id = x->gg.attr; return 1;
    case zx_modificationTime_ATTR|zx_cb_NS:  x->modificationTime = x->gg.attr; return 1;
    case zx_modifier_ATTR|zx_cb_NS:  x->modifier = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_cdm_LON(struct zx_ctx* c, struct zx_cdm_LON_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {

  default: return 0;
  }
}




int zx_DEC_ATTR_cdm_MAILER(struct zx_ctx* c, struct zx_cdm_MAILER_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_ACC_ATTR|zx_cb_NS:  x->ACC = x->gg.attr; return 1;
    case zx_ACCTime_ATTR|zx_cb_NS:  x->ACCTime = x->gg.attr; return 1;
    case zx_id_ATTR|zx_cb_NS:  x->id = x->gg.attr; return 1;
    case zx_modificationTime_ATTR|zx_cb_NS:  x->modificationTime = x->gg.attr; return 1;
    case zx_modifier_ATTR|zx_cb_NS:  x->modifier = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_cdm_MAILER(struct zx_ctx* c, struct zx_cdm_MAILER_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {

  default: return 0;
  }
}




int zx_DEC_ATTR_cdm_MIDDLE(struct zx_ctx* c, struct zx_cdm_MIDDLE_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_group_ATTR|zx_cb_NS:  x->group = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_cdm_MIDDLE(struct zx_ctx* c, struct zx_cdm_MIDDLE_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {

  default: return 0;
  }
}




int zx_DEC_ATTR_cdm_N(struct zx_ctx* c, struct zx_cdm_N_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_id_ATTR|zx_cb_NS:  x->id = x->gg.attr; return 1;
    case zx_modificationTime_ATTR|zx_cb_NS:  x->modificationTime = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_cdm_N(struct zx_ctx* c, struct zx_cdm_N_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_cdm_FAMILY_ELEM:
    if (!x->FAMILY)
      x->FAMILY = (struct zx_cdm_FAMILY_s*)el;
    return 1;
  case zx_cdm_GIVEN_ELEM:
    if (!x->GIVEN)
      x->GIVEN = (struct zx_cdm_GIVEN_s*)el;
    return 1;
  case zx_cdm_MIDDLE_ELEM:
    if (!x->MIDDLE)
      x->MIDDLE = (struct zx_cdm_MIDDLE_s*)el;
    return 1;
  case zx_cdm_PREFIX_ELEM:
    if (!x->PREFIX)
      x->PREFIX = (struct zx_cdm_PREFIX_s*)el;
    return 1;
  case zx_cdm_SUFFIX_ELEM:
    if (!x->SUFFIX)
      x->SUFFIX = (struct zx_cdm_SUFFIX_s*)el;
    return 1;

  default: return 0;
  }
}




int zx_DEC_ATTR_cdm_NICKNAME(struct zx_ctx* c, struct zx_cdm_NICKNAME_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_group_ATTR|zx_cb_NS:  x->group = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_cdm_NICKNAME(struct zx_ctx* c, struct zx_cdm_NICKNAME_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {

  default: return 0;
  }
}




int zx_DEC_ATTR_cdm_NOTE(struct zx_ctx* c, struct zx_cdm_NOTE_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_group_ATTR|zx_cb_NS:  x->group = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_cdm_NOTE(struct zx_ctx* c, struct zx_cdm_NOTE_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {

  default: return 0;
  }
}




int zx_DEC_ATTR_cdm_NUMBER(struct zx_ctx* c, struct zx_cdm_NUMBER_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_ACC_ATTR|zx_cb_NS:  x->ACC = x->gg.attr; return 1;
    case zx_ACCTime_ATTR|zx_cb_NS:  x->ACCTime = x->gg.attr; return 1;
    case zx_id_ATTR|zx_cb_NS:  x->id = x->gg.attr; return 1;
    case zx_modificationTime_ATTR|zx_cb_NS:  x->modificationTime = x->gg.attr; return 1;
    case zx_modifier_ATTR|zx_cb_NS:  x->modifier = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_cdm_NUMBER(struct zx_ctx* c, struct zx_cdm_NUMBER_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {

  default: return 0;
  }
}




int zx_DEC_ATTR_cdm_ORG(struct zx_ctx* c, struct zx_cdm_ORG_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_id_ATTR|zx_cb_NS:  x->id = x->gg.attr; return 1;
    case zx_modificationTime_ATTR|zx_cb_NS:  x->modificationTime = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_cdm_ORG(struct zx_ctx* c, struct zx_cdm_ORG_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_cdm_ORGNAME_ELEM:
    if (!x->ORGNAME)
      x->ORGNAME = (struct zx_cdm_ORGNAME_s*)el;
    return 1;
  case zx_cdm_ORGUNIT_ELEM:
    if (!x->ORGUNIT)
      x->ORGUNIT = (struct zx_cdm_ORGUNIT_s*)el;
    return 1;

  default: return 0;
  }
}




int zx_DEC_ATTR_cdm_ORGNAME(struct zx_ctx* c, struct zx_cdm_ORGNAME_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_group_ATTR|zx_cb_NS:  x->group = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_cdm_ORGNAME(struct zx_ctx* c, struct zx_cdm_ORGNAME_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {

  default: return 0;
  }
}




int zx_DEC_ATTR_cdm_ORGUNIT(struct zx_ctx* c, struct zx_cdm_ORGUNIT_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_group_ATTR|zx_cb_NS:  x->group = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_cdm_ORGUNIT(struct zx_ctx* c, struct zx_cdm_ORGUNIT_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {

  default: return 0;
  }
}




int zx_DEC_ATTR_cdm_PCODE(struct zx_ctx* c, struct zx_cdm_PCODE_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_group_ATTR|zx_cb_NS:  x->group = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_cdm_PCODE(struct zx_ctx* c, struct zx_cdm_PCODE_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {

  default: return 0;
  }
}




int zx_DEC_ATTR_cdm_PHONETIC(struct zx_ctx* c, struct zx_cdm_PHONETIC_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_group_ATTR|zx_cb_NS:  x->group = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_cdm_PHONETIC(struct zx_ctx* c, struct zx_cdm_PHONETIC_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {

  default: return 0;
  }
}




int zx_DEC_ATTR_cdm_PHOTO(struct zx_ctx* c, struct zx_cdm_PHOTO_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_id_ATTR|zx_cb_NS:  x->id = x->gg.attr; return 1;
    case zx_modificationTime_ATTR|zx_cb_NS:  x->modificationTime = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_cdm_PHOTO(struct zx_ctx* c, struct zx_cdm_PHOTO_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_cdm_TYPE_ELEM:
    if (!x->TYPE)
      x->TYPE = (struct zx_cdm_TYPE_s*)el;
    return 1;
  case zx_cdm_BINVAL_ELEM:
    if (!x->BINVAL)
      x->BINVAL = (struct zx_cdm_BINVAL_s*)el;
    return 1;
  case zx_cdm_EXTVAL_ELEM:
    if (!x->EXTVAL)
      x->EXTVAL = (struct zx_cdm_EXTVAL_s*)el;
    return 1;

  default: return 0;
  }
}




int zx_DEC_ATTR_cdm_PHYSICALACCESS(struct zx_ctx* c, struct zx_cdm_PHYSICALACCESS_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_group_ATTR|zx_cb_NS:  x->group = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_cdm_PHYSICALACCESS(struct zx_ctx* c, struct zx_cdm_PHYSICALACCESS_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {

  default: return 0;
  }
}




int zx_DEC_ATTR_cdm_POBOX(struct zx_ctx* c, struct zx_cdm_POBOX_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_group_ATTR|zx_cb_NS:  x->group = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_cdm_POBOX(struct zx_ctx* c, struct zx_cdm_POBOX_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {

  default: return 0;
  }
}




int zx_DEC_ATTR_cdm_PREFIX(struct zx_ctx* c, struct zx_cdm_PREFIX_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_group_ATTR|zx_cb_NS:  x->group = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_cdm_PREFIX(struct zx_ctx* c, struct zx_cdm_PREFIX_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {

  default: return 0;
  }
}




int zx_DEC_ATTR_cdm_PRODID(struct zx_ctx* c, struct zx_cdm_PRODID_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_ACC_ATTR|zx_cb_NS:  x->ACC = x->gg.attr; return 1;
    case zx_ACCTime_ATTR|zx_cb_NS:  x->ACCTime = x->gg.attr; return 1;
    case zx_id_ATTR|zx_cb_NS:  x->id = x->gg.attr; return 1;
    case zx_modificationTime_ATTR|zx_cb_NS:  x->modificationTime = x->gg.attr; return 1;
    case zx_modifier_ATTR|zx_cb_NS:  x->modifier = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_cdm_PRODID(struct zx_ctx* c, struct zx_cdm_PRODID_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {

  default: return 0;
  }
}




int zx_DEC_ATTR_cdm_REGION(struct zx_ctx* c, struct zx_cdm_REGION_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_group_ATTR|zx_cb_NS:  x->group = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_cdm_REGION(struct zx_ctx* c, struct zx_cdm_REGION_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {

  default: return 0;
  }
}




int zx_DEC_ATTR_cdm_REV(struct zx_ctx* c, struct zx_cdm_REV_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_ACC_ATTR|zx_cb_NS:  x->ACC = x->gg.attr; return 1;
    case zx_ACCTime_ATTR|zx_cb_NS:  x->ACCTime = x->gg.attr; return 1;
    case zx_id_ATTR|zx_cb_NS:  x->id = x->gg.attr; return 1;
    case zx_modificationTime_ATTR|zx_cb_NS:  x->modificationTime = x->gg.attr; return 1;
    case zx_modifier_ATTR|zx_cb_NS:  x->modifier = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_cdm_REV(struct zx_ctx* c, struct zx_cdm_REV_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {

  default: return 0;
  }
}




int zx_DEC_ATTR_cdm_ROLE(struct zx_ctx* c, struct zx_cdm_ROLE_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_group_ATTR|zx_cb_NS:  x->group = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_cdm_ROLE(struct zx_ctx* c, struct zx_cdm_ROLE_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {

  default: return 0;
  }
}




int zx_DEC_ATTR_cdm_SORT_STRING(struct zx_ctx* c, struct zx_cdm_SORT_STRING_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_group_ATTR|zx_cb_NS:  x->group = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_cdm_SORT_STRING(struct zx_ctx* c, struct zx_cdm_SORT_STRING_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {

  default: return 0;
  }
}




int zx_DEC_ATTR_cdm_SOUND(struct zx_ctx* c, struct zx_cdm_SOUND_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_id_ATTR|zx_cb_NS:  x->id = x->gg.attr; return 1;
    case zx_modificationTime_ATTR|zx_cb_NS:  x->modificationTime = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_cdm_SOUND(struct zx_ctx* c, struct zx_cdm_SOUND_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_cdm_PHONETIC_ELEM:
    if (!x->PHONETIC)
      x->PHONETIC = (struct zx_cdm_PHONETIC_s*)el;
    return 1;
  case zx_cdm_BINVAL_ELEM:
    if (!x->BINVAL)
      x->BINVAL = (struct zx_cdm_BINVAL_s*)el;
    return 1;
  case zx_cdm_EXTVAL_ELEM:
    if (!x->EXTVAL)
      x->EXTVAL = (struct zx_cdm_EXTVAL_s*)el;
    return 1;

  default: return 0;
  }
}




int zx_DEC_ATTR_cdm_STREET(struct zx_ctx* c, struct zx_cdm_STREET_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_group_ATTR|zx_cb_NS:  x->group = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_cdm_STREET(struct zx_ctx* c, struct zx_cdm_STREET_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {

  default: return 0;
  }
}




int zx_DEC_ATTR_cdm_SUFFIX(struct zx_ctx* c, struct zx_cdm_SUFFIX_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_group_ATTR|zx_cb_NS:  x->group = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_cdm_SUFFIX(struct zx_ctx* c, struct zx_cdm_SUFFIX_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {

  default: return 0;
  }
}




int zx_DEC_ATTR_cdm_TEL(struct zx_ctx* c, struct zx_cdm_TEL_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_id_ATTR|zx_cb_NS:  x->id = x->gg.attr; return 1;
    case zx_modificationTime_ATTR|zx_cb_NS:  x->modificationTime = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_cdm_TEL(struct zx_ctx* c, struct zx_cdm_TEL_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_cdm_HOME_ELEM:
    if (!x->HOME)
      x->HOME = el;
    return 1;
  case zx_cdm_WORK_ELEM:
    if (!x->WORK)
      x->WORK = el;
    return 1;
  case zx_cdm_VOICE_ELEM:
    if (!x->VOICE)
      x->VOICE = el;
    return 1;
  case zx_cdm_FAX_ELEM:
    if (!x->FAX)
      x->FAX = el;
    return 1;
  case zx_cdm_PAGER_ELEM:
    if (!x->PAGER)
      x->PAGER = el;
    return 1;
  case zx_cdm_MSG_ELEM:
    if (!x->MSG)
      x->MSG = el;
    return 1;
  case zx_cdm_CELL_ELEM:
    if (!x->CELL)
      x->CELL = el;
    return 1;
  case zx_cdm_VIDEO_ELEM:
    if (!x->VIDEO)
      x->VIDEO = el;
    return 1;
  case zx_cdm_BBS_ELEM:
    if (!x->BBS)
      x->BBS = el;
    return 1;
  case zx_cdm_MODEM_ELEM:
    if (!x->MODEM)
      x->MODEM = el;
    return 1;
  case zx_cdm_ISDN_ELEM:
    if (!x->ISDN)
      x->ISDN = el;
    return 1;
  case zx_cdm_PCS_ELEM:
    if (!x->PCS)
      x->PCS = el;
    return 1;
  case zx_cdm_PREF_ELEM:
    if (!x->PREF)
      x->PREF = el;
    return 1;
  case zx_cdm_NUMBER_ELEM:
    if (!x->NUMBER)
      x->NUMBER = (struct zx_cdm_NUMBER_s*)el;
    return 1;

  default: return 0;
  }
}




int zx_DEC_ATTR_cdm_TITLE(struct zx_ctx* c, struct zx_cdm_TITLE_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_group_ATTR|zx_cb_NS:  x->group = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_cdm_TITLE(struct zx_ctx* c, struct zx_cdm_TITLE_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {

  default: return 0;
  }
}




int zx_DEC_ATTR_cdm_TYPE(struct zx_ctx* c, struct zx_cdm_TYPE_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_ACC_ATTR|zx_cb_NS:  x->ACC = x->gg.attr; return 1;
    case zx_ACCTime_ATTR|zx_cb_NS:  x->ACCTime = x->gg.attr; return 1;
    case zx_id_ATTR|zx_cb_NS:  x->id = x->gg.attr; return 1;
    case zx_modificationTime_ATTR|zx_cb_NS:  x->modificationTime = x->gg.attr; return 1;
    case zx_modifier_ATTR|zx_cb_NS:  x->modifier = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_cdm_TYPE(struct zx_ctx* c, struct zx_cdm_TYPE_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {

  default: return 0;
  }
}




int zx_DEC_ATTR_cdm_TZ(struct zx_ctx* c, struct zx_cdm_TZ_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_ACC_ATTR|zx_cb_NS:  x->ACC = x->gg.attr; return 1;
    case zx_ACCTime_ATTR|zx_cb_NS:  x->ACCTime = x->gg.attr; return 1;
    case zx_id_ATTR|zx_cb_NS:  x->id = x->gg.attr; return 1;
    case zx_modificationTime_ATTR|zx_cb_NS:  x->modificationTime = x->gg.attr; return 1;
    case zx_modifier_ATTR|zx_cb_NS:  x->modifier = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_cdm_TZ(struct zx_ctx* c, struct zx_cdm_TZ_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {

  default: return 0;
  }
}




int zx_DEC_ATTR_cdm_UID(struct zx_ctx* c, struct zx_cdm_UID_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_ACC_ATTR|zx_cb_NS:  x->ACC = x->gg.attr; return 1;
    case zx_ACCTime_ATTR|zx_cb_NS:  x->ACCTime = x->gg.attr; return 1;
    case zx_id_ATTR|zx_cb_NS:  x->id = x->gg.attr; return 1;
    case zx_modificationTime_ATTR|zx_cb_NS:  x->modificationTime = x->gg.attr; return 1;
    case zx_modifier_ATTR|zx_cb_NS:  x->modifier = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_cdm_UID(struct zx_ctx* c, struct zx_cdm_UID_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {

  default: return 0;
  }
}




int zx_DEC_ATTR_cdm_URI(struct zx_ctx* c, struct zx_cdm_URI_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_ACC_ATTR|zx_cb_NS:  x->ACC = x->gg.attr; return 1;
    case zx_ACCTime_ATTR|zx_cb_NS:  x->ACCTime = x->gg.attr; return 1;
    case zx_id_ATTR|zx_cb_NS:  x->id = x->gg.attr; return 1;
    case zx_modificationTime_ATTR|zx_cb_NS:  x->modificationTime = x->gg.attr; return 1;
    case zx_modifier_ATTR|zx_cb_NS:  x->modifier = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_cdm_URI(struct zx_ctx* c, struct zx_cdm_URI_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {

  default: return 0;
  }
}




int zx_DEC_ATTR_cdm_URL(struct zx_ctx* c, struct zx_cdm_URL_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_ACC_ATTR|zx_cb_NS:  x->ACC = x->gg.attr; return 1;
    case zx_ACCTime_ATTR|zx_cb_NS:  x->ACCTime = x->gg.attr; return 1;
    case zx_id_ATTR|zx_cb_NS:  x->id = x->gg.attr; return 1;
    case zx_modificationTime_ATTR|zx_cb_NS:  x->modificationTime = x->gg.attr; return 1;
    case zx_modifier_ATTR|zx_cb_NS:  x->modifier = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_cdm_URL(struct zx_ctx* c, struct zx_cdm_URL_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {

  default: return 0;
  }
}




int zx_DEC_ATTR_cdm_USERID(struct zx_ctx* c, struct zx_cdm_USERID_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_ACC_ATTR|zx_cb_NS:  x->ACC = x->gg.attr; return 1;
    case zx_ACCTime_ATTR|zx_cb_NS:  x->ACCTime = x->gg.attr; return 1;
    case zx_id_ATTR|zx_cb_NS:  x->id = x->gg.attr; return 1;
    case zx_modificationTime_ATTR|zx_cb_NS:  x->modificationTime = x->gg.attr; return 1;
    case zx_modifier_ATTR|zx_cb_NS:  x->modifier = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_cdm_USERID(struct zx_ctx* c, struct zx_cdm_USERID_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {

  default: return 0;
  }
}




int zx_DEC_ATTR_cdm_VERSION(struct zx_ctx* c, struct zx_cdm_VERSION_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_ACC_ATTR|zx_cb_NS:  x->ACC = x->gg.attr; return 1;
    case zx_ACCTime_ATTR|zx_cb_NS:  x->ACCTime = x->gg.attr; return 1;
    case zx_id_ATTR|zx_cb_NS:  x->id = x->gg.attr; return 1;
    case zx_modificationTime_ATTR|zx_cb_NS:  x->modificationTime = x->gg.attr; return 1;
    case zx_modifier_ATTR|zx_cb_NS:  x->modifier = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_cdm_VERSION(struct zx_ctx* c, struct zx_cdm_VERSION_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {

  default: return 0;
  }
}




int zx_DEC_ATTR_cdm_vCard(struct zx_ctx* c, struct zx_cdm_vCard_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_id_ATTR|zx_cb_NS:  x->id = x->gg.attr; return 1;
    case zx_modificationTime_ATTR|zx_cb_NS:  x->modificationTime = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_cdm_vCard(struct zx_ctx* c, struct zx_cdm_vCard_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_cdm_VERSION_ELEM:
    if (!x->VERSION_is_Perl_MakeMaker_gobbled)
      x->VERSION_is_Perl_MakeMaker_gobbled = (struct zx_cdm_VERSION_s*)el;
    return 1;
  case zx_cdm_CARDID_ELEM:
    if (!x->CARDID)
      x->CARDID = el;
    return 1;
  case zx_cdm_DISTRIBUTIONLIST_ELEM:
    if (!x->DISTRIBUTIONLIST)
      x->DISTRIBUTIONLIST = el;
    return 1;
  case zx_cdm_SELF_ELEM:
    if (!x->SELF)
      x->SELF = el;
    return 1;
  case zx_cdm_FAVORITE_ELEM:
    if (!x->FAVORITE)
      x->FAVORITE = el;
    return 1;
  case zx_cdm_FN_ELEM:
    if (!x->FN)
      x->FN = (struct zx_cdm_FN_s*)el;
    return 1;
  case zx_cdm_N_ELEM:
    if (!x->N)
      x->N = (struct zx_cdm_N_s*)el;
    return 1;
  case zx_cdm_LISTMEMBER_ELEM:
    if (!x->LISTMEMBER)
      x->LISTMEMBER = (struct zx_cdm_LISTMEMBER_s*)el;
    return 1;
  case zx_cdm_NICKNAME_ELEM:
    if (!x->NICKNAME)
      x->NICKNAME = (struct zx_cdm_NICKNAME_s*)el;
    return 1;
  case zx_cdm_PHOTO_ELEM:
    if (!x->PHOTO)
      x->PHOTO = (struct zx_cdm_PHOTO_s*)el;
    return 1;
  case zx_cdm_BDAY_ELEM:
    if (!x->BDAY)
      x->BDAY = (struct zx_cdm_BDAY_s*)el;
    return 1;
  case zx_cdm_ADR_ELEM:
    if (!x->ADR)
      x->ADR = (struct zx_cdm_ADR_s*)el;
    return 1;
  case zx_cdm_LABEL_ELEM:
    if (!x->LABEL)
      x->LABEL = (struct zx_cdm_LABEL_s*)el;
    return 1;
  case zx_cdm_TEL_ELEM:
    if (!x->TEL)
      x->TEL = (struct zx_cdm_TEL_s*)el;
    return 1;
  case zx_cdm_EMAIL_ELEM:
    if (!x->EMAIL)
      x->EMAIL = (struct zx_cdm_EMAIL_s*)el;
    return 1;
  case zx_cdm_JABBERID_ELEM:
    if (!x->JABBERID)
      x->JABBERID = (struct zx_cdm_JABBERID_s*)el;
    return 1;
  case zx_cdm_MAILER_ELEM:
    if (!x->MAILER)
      x->MAILER = (struct zx_cdm_MAILER_s*)el;
    return 1;
  case zx_cdm_TZ_ELEM:
    if (!x->TZ)
      x->TZ = (struct zx_cdm_TZ_s*)el;
    return 1;
  case zx_cdm_GEO_ELEM:
    if (!x->GEO)
      x->GEO = (struct zx_cdm_GEO_s*)el;
    return 1;
  case zx_cdm_TITLE_ELEM:
    if (!x->TITLE)
      x->TITLE = (struct zx_cdm_TITLE_s*)el;
    return 1;
  case zx_cdm_ROLE_ELEM:
    if (!x->ROLE)
      x->ROLE = (struct zx_cdm_ROLE_s*)el;
    return 1;
  case zx_cdm_LOGO_ELEM:
    if (!x->LOGO)
      x->LOGO = (struct zx_cdm_LOGO_s*)el;
    return 1;
  case zx_cdm_AGENT_ELEM:
    if (!x->AGENT)
      x->AGENT = (struct zx_cdm_AGENT_s*)el;
    return 1;
  case zx_cdm_ORG_ELEM:
    if (!x->ORG)
      x->ORG = (struct zx_cdm_ORG_s*)el;
    return 1;
  case zx_cdm_CATEGORIES_ELEM:
    if (!x->CATEGORIES)
      x->CATEGORIES = (struct zx_cdm_CATEGORIES_s*)el;
    return 1;
  case zx_cdm_NOTE_ELEM:
    if (!x->NOTE)
      x->NOTE = (struct zx_cdm_NOTE_s*)el;
    return 1;
  case zx_cdm_PRODID_ELEM:
    if (!x->PRODID)
      x->PRODID = (struct zx_cdm_PRODID_s*)el;
    return 1;
  case zx_cdm_REV_ELEM:
    if (!x->REV)
      x->REV = (struct zx_cdm_REV_s*)el;
    return 1;
  case zx_cdm_SORT_STRING_ELEM:
    if (!x->SORT_STRING)
      x->SORT_STRING = (struct zx_cdm_SORT_STRING_s*)el;
    return 1;
  case zx_cdm_SOUND_ELEM:
    if (!x->SOUND)
      x->SOUND = (struct zx_cdm_SOUND_s*)el;
    return 1;
  case zx_cdm_UID_ELEM:
    if (!x->UID)
      x->UID = (struct zx_cdm_UID_s*)el;
    return 1;
  case zx_cdm_URL_ELEM:
    if (!x->URL)
      x->URL = (struct zx_cdm_URL_s*)el;
    return 1;
  case zx_cdm_CLASS_ELEM:
    if (!x->CLASS)
      x->CLASS = (struct zx_cdm_CLASS_s*)el;
    return 1;
  case zx_cdm_KEY_ELEM:
    if (!x->KEY)
      x->KEY = (struct zx_cdm_KEY_s*)el;
    return 1;
  case zx_cdm_DESC_ELEM:
    if (!x->DESC)
      x->DESC = (struct zx_cdm_DESC_s*)el;
    return 1;
  case zx_cdm_PHYSICALACCESS_ELEM:
    if (!x->PHYSICALACCESS)
      x->PHYSICALACCESS = (struct zx_cdm_PHYSICALACCESS_s*)el;
    return 1;
  case zx_cdm_CALURI_ELEM:
    if (!x->CALURI)
      x->CALURI = (struct zx_cdm_CALURI_s*)el;
    return 1;
  case zx_cdm_CAPURI_ELEM:
    if (!x->CAPURI)
      x->CAPURI = (struct zx_cdm_CAPURI_s*)el;
    return 1;
  case zx_cdm_CALADRURI_ELEM:
    if (!x->CALADRURI)
      x->CALADRURI = (struct zx_cdm_CALADRURI_s*)el;
    return 1;
  case zx_cdm_FBURL_ELEM:
    if (!x->FBURL)
      x->FBURL = (struct zx_cdm_FBURL_s*)el;
    return 1;
  case zx_cb_Extension_ELEM:
    if (!x->Extension)
      x->Extension = (struct zx_cb_Extension_s*)el;
    return 1;

  default: return 0;
  }
}


/* EOF -- c/zx-cdm-dec.c */
