/* c/zx-mm7-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-mm7-data.h"
#define TPF zx_
#include "zx_ext_pt.h"



int zx_DEC_ATTR_mm7_AdditionalInformation(struct zx_ctx* c, struct zx_mm7_AdditionalInformation_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_href_ATTR:  x->href = x->gg.attr; return 1;

  default: return 0;
  }
}

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

  default: return 0;
  }
}




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

  default: return 0;
  }
}

int zx_DEC_ELEM_mm7_Bcc(struct zx_ctx* c, struct zx_mm7_Bcc_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_mm7_RFC2822Address_ELEM:
    if (!x->RFC2822Address)
      x->RFC2822Address = (struct zx_mm7_RFC2822Address_s*)el;
    return 1;
  case zx_mm7_Number_ELEM:
    if (!x->Number)
      x->Number = (struct zx_mm7_Number_s*)el;
    return 1;
  case zx_mm7_ShortCode_ELEM:
    if (!x->ShortCode)
      x->ShortCode = (struct zx_mm7_ShortCode_s*)el;
    return 1;
  case zx_mm7_Extension_ELEM:
    if (!x->Extension)
      x->Extension = (struct zx_mm7_Extension_s*)el;
    return 1;

  default: return 0;
  }
}




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

  default: return 0;
  }
}

int zx_DEC_ELEM_mm7_CancelReq(struct zx_ctx* c, struct zx_mm7_CancelReq_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_mm7_MM7Version_ELEM:
    if (!x->MM7Version)
      x->MM7Version = el;
    return 1;
  case zx_mm7_SenderIdentification_ELEM:
    if (!x->SenderIdentification)
      x->SenderIdentification = (struct zx_mm7_SenderIdentification_s*)el;
    return 1;
  case zx_mm7_Extension_ELEM:
    if (!x->Extension)
      x->Extension = (struct zx_mm7_Extension_s*)el;
    return 1;
  case zx_mm7_MessageID_ELEM:
    if (!x->MessageID)
      x->MessageID = el;
    return 1;
  case zx_mm7_Recipients_ELEM:
    if (!x->Recipients)
      x->Recipients = (struct zx_mm7_Recipients_s*)el;
    return 1;
  case zx_mm7_ApplicID_ELEM:
    if (!x->ApplicID)
      x->ApplicID = el;
    return 1;
  case zx_mm7_ReplyApplicID_ELEM:
    if (!x->ReplyApplicID)
      x->ReplyApplicID = el;
    return 1;
  case zx_mm7_AuxApplicInfo_ELEM:
    if (!x->AuxApplicInfo)
      x->AuxApplicInfo = el;
    return 1;

  default: return 0;
  }
}




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

  default: return 0;
  }
}

int zx_DEC_ELEM_mm7_CancelRsp(struct zx_ctx* c, struct zx_mm7_CancelRsp_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_mm7_MM7Version_ELEM:
    if (!x->MM7Version)
      x->MM7Version = el;
    return 1;
  case zx_mm7_Status_ELEM:
    if (!x->Status)
      x->Status = (struct zx_mm7_Status_s*)el;
    return 1;
  case zx_mm7_Extension_ELEM:
    if (!x->Extension)
      x->Extension = (struct zx_mm7_Extension_s*)el;
    return 1;

  default: return 0;
  }
}




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

  default: return 0;
  }
}

int zx_DEC_ELEM_mm7_Cc(struct zx_ctx* c, struct zx_mm7_Cc_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_mm7_RFC2822Address_ELEM:
    if (!x->RFC2822Address)
      x->RFC2822Address = (struct zx_mm7_RFC2822Address_s*)el;
    return 1;
  case zx_mm7_Number_ELEM:
    if (!x->Number)
      x->Number = (struct zx_mm7_Number_s*)el;
    return 1;
  case zx_mm7_ShortCode_ELEM:
    if (!x->ShortCode)
      x->ShortCode = (struct zx_mm7_ShortCode_s*)el;
    return 1;
  case zx_mm7_Extension_ELEM:
    if (!x->Extension)
      x->Extension = (struct zx_mm7_Extension_s*)el;
    return 1;

  default: return 0;
  }
}




int zx_DEC_ATTR_mm7_Content(struct zx_ctx* c, struct zx_mm7_Content_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_allowAdaptations_ATTR:  x->allowAdaptations = x->gg.attr; return 1;
    case zx_href_ATTR:  x->href = x->gg.attr; return 1;
    case zx_type_ATTR:  x->type = x->gg.attr; return 1;

  default: return 0;
  }
}

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

  default: return 0;
  }
}




int zx_DEC_ATTR_mm7_DateTime(struct zx_ctx* c, struct zx_mm7_DateTime_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_sequence_ATTR:  x->sequence = x->gg.attr; return 1;

  default: return 0;
  }
}

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

  default: return 0;
  }
}




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

  default: return 0;
  }
}

int zx_DEC_ELEM_mm7_DeliverReq(struct zx_ctx* c, struct zx_mm7_DeliverReq_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_mm7_MM7Version_ELEM:
    if (!x->MM7Version)
      x->MM7Version = el;
    return 1;
  case zx_mm7_MMSRelayServerID_ELEM:
    if (!x->MMSRelayServerID)
      x->MMSRelayServerID = el;
    return 1;
  case zx_mm7_Extension_ELEM:
    if (!x->Extension)
      x->Extension = (struct zx_mm7_Extension_s*)el;
    return 1;
  case zx_mm7_VASPID_ELEM:
    if (!x->VASPID)
      x->VASPID = el;
    return 1;
  case zx_mm7_VASID_ELEM:
    if (!x->VASID)
      x->VASID = el;
    return 1;
  case zx_mm7_LinkedID_ELEM:
    if (!x->LinkedID)
      x->LinkedID = el;
    return 1;
  case zx_mm7_Sender_ELEM:
    if (!x->Sender)
      x->Sender = (struct zx_mm7_Sender_s*)el;
    return 1;
  case zx_mm7_Recipients_ELEM:
    if (!x->Recipients)
      x->Recipients = (struct zx_mm7_Recipients_s*)el;
    return 1;
  case zx_mm7_Previouslysentby_ELEM:
    if (!x->Previouslysentby)
      x->Previouslysentby = (struct zx_mm7_Previouslysentby_s*)el;
    return 1;
  case zx_mm7_Previouslysentdateandtime_ELEM:
    if (!x->Previouslysentdateandtime)
      x->Previouslysentdateandtime = (struct zx_mm7_Previouslysentdateandtime_s*)el;
    return 1;
  case zx_mm7_SenderSPI_ELEM:
    if (!x->SenderSPI)
      x->SenderSPI = el;
    return 1;
  case zx_mm7_RecipientSPI_ELEM:
    if (!x->RecipientSPI)
      x->RecipientSPI = el;
    return 1;
  case zx_mm7_TimeStamp_ELEM:
    if (!x->TimeStamp)
      x->TimeStamp = el;
    return 1;
  case zx_mm7_ReplyChargingID_ELEM:
    if (!x->ReplyChargingID)
      x->ReplyChargingID = el;
    return 1;
  case zx_mm7_Priority_ELEM:
    if (!x->Priority)
      x->Priority = el;
    return 1;
  case zx_mm7_Subject_ELEM:
    if (!x->Subject)
      x->Subject = el;
    return 1;
  case zx_mm7_ApplicID_ELEM:
    if (!x->ApplicID)
      x->ApplicID = el;
    return 1;
  case zx_mm7_ReplyApplicID_ELEM:
    if (!x->ReplyApplicID)
      x->ReplyApplicID = el;
    return 1;
  case zx_mm7_AuxApplicInfo_ELEM:
    if (!x->AuxApplicInfo)
      x->AuxApplicInfo = el;
    return 1;
  case zx_mm7_UACapabilities_ELEM:
    if (!x->UACapabilities)
      x->UACapabilities = (struct zx_mm7_UACapabilities_s*)el;
    return 1;
  case zx_mm7_Content_ELEM:
    if (!x->Content)
      x->Content = (struct zx_mm7_Content_s*)el;
    return 1;
  case zx_mm7_AdditionalInformation_ELEM:
    if (!x->AdditionalInformation)
      x->AdditionalInformation = (struct zx_mm7_AdditionalInformation_s*)el;
    return 1;
  case zx_mm7_MessageExtraData_ELEM:
    if (!x->MessageExtraData)
      x->MessageExtraData = (struct zx_mm7_MessageExtraData_s*)el;
    return 1;

  default: return 0;
  }
}




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

  default: return 0;
  }
}

int zx_DEC_ELEM_mm7_DeliverRsp(struct zx_ctx* c, struct zx_mm7_DeliverRsp_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_mm7_MM7Version_ELEM:
    if (!x->MM7Version)
      x->MM7Version = el;
    return 1;
  case zx_mm7_Status_ELEM:
    if (!x->Status)
      x->Status = (struct zx_mm7_Status_s*)el;
    return 1;
  case zx_mm7_Extension_ELEM:
    if (!x->Extension)
      x->Extension = (struct zx_mm7_Extension_s*)el;
    return 1;
  case zx_mm7_ServiceCode_ELEM:
    if (!x->ServiceCode)
      x->ServiceCode = (struct zx_mm7_ServiceCode_s*)el;
    return 1;

  default: return 0;
  }
}




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

  default: return 0;
  }
}

int zx_DEC_ELEM_mm7_DeliveryCondition(struct zx_ctx* c, struct zx_mm7_DeliveryCondition_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_mm7_DC_ELEM:
    if (!x->DC)
      x->DC = el;
    return 1;

  default: return 0;
  }
}




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

  default: return 0;
  }
}

int zx_DEC_ELEM_mm7_DeliveryReportReq(struct zx_ctx* c, struct zx_mm7_DeliveryReportReq_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_mm7_MM7Version_ELEM:
    if (!x->MM7Version)
      x->MM7Version = el;
    return 1;
  case zx_mm7_MMSRelayServerID_ELEM:
    if (!x->MMSRelayServerID)
      x->MMSRelayServerID = el;
    return 1;
  case zx_mm7_Extension_ELEM:
    if (!x->Extension)
      x->Extension = (struct zx_mm7_Extension_s*)el;
    return 1;
  case zx_mm7_MessageID_ELEM:
    if (!x->MessageID)
      x->MessageID = el;
    return 1;
  case zx_mm7_Recipient_ELEM:
    if (!x->Recipient)
      x->Recipient = (struct zx_mm7_Recipient_s*)el;
    return 1;
  case zx_mm7_Sender_ELEM:
    if (!x->Sender)
      x->Sender = (struct zx_mm7_Sender_s*)el;
    return 1;
  case zx_mm7_Date_ELEM:
    if (!x->Date)
      x->Date = el;
    return 1;
  case zx_mm7_MMStatus_ELEM:
    if (!x->MMStatus)
      x->MMStatus = el;
    return 1;
  case zx_mm7_MMStatusExtension_ELEM:
    if (!x->MMStatusExtension)
      x->MMStatusExtension = el;
    return 1;
  case zx_mm7_StatusText_ELEM:
    if (!x->StatusText)
      x->StatusText = el;
    return 1;
  case zx_mm7_ApplicID_ELEM:
    if (!x->ApplicID)
      x->ApplicID = el;
    return 1;
  case zx_mm7_ReplyApplicID_ELEM:
    if (!x->ReplyApplicID)
      x->ReplyApplicID = el;
    return 1;
  case zx_mm7_AuxApplicInfo_ELEM:
    if (!x->AuxApplicInfo)
      x->AuxApplicInfo = el;
    return 1;
  case zx_mm7_UACapabilities_ELEM:
    if (!x->UACapabilities)
      x->UACapabilities = (struct zx_mm7_UACapabilities_s*)el;
    return 1;

  default: return 0;
  }
}




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

  default: return 0;
  }
}

int zx_DEC_ELEM_mm7_DeliveryReportRsp(struct zx_ctx* c, struct zx_mm7_DeliveryReportRsp_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_mm7_MM7Version_ELEM:
    if (!x->MM7Version)
      x->MM7Version = el;
    return 1;
  case zx_mm7_Status_ELEM:
    if (!x->Status)
      x->Status = (struct zx_mm7_Status_s*)el;
    return 1;
  case zx_mm7_Extension_ELEM:
    if (!x->Extension)
      x->Extension = (struct zx_mm7_Extension_s*)el;
    return 1;

  default: return 0;
  }
}




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

  default: return 0;
  }
}

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

  default: return 0;
  }
}




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

  default: return 0;
  }
}

int zx_DEC_ELEM_mm7_Extension(struct zx_ctx* c, struct zx_mm7_Extension_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_mm7_IdentityAddressingToken_ELEM:
    if (!x->IdentityAddressingToken)
      x->IdentityAddressingToken = (struct zx_mm7_IdentityAddressingToken_s*)el;
    return 1;
  case zx_mm7_MessageExtraData_ELEM:
    if (!x->MessageExtraData)
      x->MessageExtraData = (struct zx_mm7_MessageExtraData_s*)el;
    return 1;

  default: return 0;
  }
}




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

  default: return 0;
  }
}

int zx_DEC_ELEM_mm7_IdentityAddressingToken(struct zx_ctx* c, struct zx_mm7_IdentityAddressingToken_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_mm7_CredentialRef_ELEM:
    if (!x->CredentialRef)
      x->CredentialRef = el;
    return 1;

  default: return 0;
  }
}




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

  default: return 0;
  }
}

int zx_DEC_ELEM_mm7_MessageExtraData(struct zx_ctx* c, struct zx_mm7_MessageExtraData_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_mm7_element_ELEM:
    if (!x->element)
      x->element = (struct zx_mm7_element_s*)el;
    return 1;

  default: return 0;
  }
}




int zx_DEC_ATTR_mm7_Number(struct zx_ctx* c, struct zx_mm7_Number_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_addressCoding_ATTR:  x->addressCoding = x->gg.attr; return 1;
    case zx_displayOnly_ATTR:  x->displayOnly = x->gg.attr; return 1;
    case zx_id_ATTR:  x->id = x->gg.attr; return 1;

  default: return 0;
  }
}

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

  default: return 0;
  }
}




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

  default: return 0;
  }
}

int zx_DEC_ELEM_mm7_PreferredChannels(struct zx_ctx* c, struct zx_mm7_PreferredChannels_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_mm7_DeliverUsing_ELEM:
    if (!x->DeliverUsing)
      x->DeliverUsing = el;
    return 1;

  default: return 0;
  }
}




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

  default: return 0;
  }
}

int zx_DEC_ELEM_mm7_Previouslysentby(struct zx_ctx* c, struct zx_mm7_Previouslysentby_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_mm7_UserAgent_ELEM:
    if (!x->UserAgent)
      x->UserAgent = (struct zx_mm7_UserAgent_s*)el;
    return 1;

  default: return 0;
  }
}




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

  default: return 0;
  }
}

int zx_DEC_ELEM_mm7_Previouslysentdateandtime(struct zx_ctx* c, struct zx_mm7_Previouslysentdateandtime_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_mm7_DateTime_ELEM:
    if (!x->DateTime)
      x->DateTime = (struct zx_mm7_DateTime_s*)el;
    return 1;

  default: return 0;
  }
}




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

  default: return 0;
  }
}

int zx_DEC_ELEM_mm7_QueryStatusReq(struct zx_ctx* c, struct zx_mm7_QueryStatusReq_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_mm7_TransactionID_ELEM:
    if (!x->TransactionID)
      x->TransactionID = (struct zx_mm7_TransactionID_s*)el;
    return 1;
  case zx_mm7_MessageType_ELEM:
    if (!x->MessageType)
      x->MessageType = el;
    return 1;
  case zx_mm7_MM7Version_ELEM:
    if (!x->MM7Version)
      x->MM7Version = el;
    return 1;
  case zx_mm7_VASPID_ELEM:
    if (!x->VASPID)
      x->VASPID = el;
    return 1;
  case zx_mm7_VASID_ELEM:
    if (!x->VASID)
      x->VASID = el;
    return 1;
  case zx_mm7_MessageID_ELEM:
    if (!x->MessageID)
      x->MessageID = el;
    return 1;

  default: return 0;
  }
}




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

  default: return 0;
  }
}

int zx_DEC_ELEM_mm7_QueryStatusRsp(struct zx_ctx* c, struct zx_mm7_QueryStatusRsp_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_mm7_TransactionID_ELEM:
    if (!x->TransactionID)
      x->TransactionID = (struct zx_mm7_TransactionID_s*)el;
    return 1;
  case zx_mm7_MessageType_ELEM:
    if (!x->MessageType)
      x->MessageType = el;
    return 1;
  case zx_mm7_MM7Version_ELEM:
    if (!x->MM7Version)
      x->MM7Version = el;
    return 1;
  case zx_mm7_StatusCode_ELEM:
    if (!x->StatusCode)
      x->StatusCode = el;
    return 1;
  case zx_mm7_StatusText_ELEM:
    if (!x->StatusText)
      x->StatusText = el;
    return 1;
  case zx_mm7_Details_ELEM:
    if (!x->Details)
      x->Details = (struct zx_mm7_Details_s*)el;
    return 1;

  default: return 0;
  }
}




int zx_DEC_ATTR_mm7_RFC2822Address(struct zx_ctx* c, struct zx_mm7_RFC2822Address_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_addressCoding_ATTR:  x->addressCoding = x->gg.attr; return 1;
    case zx_displayOnly_ATTR:  x->displayOnly = x->gg.attr; return 1;
    case zx_id_ATTR:  x->id = x->gg.attr; return 1;

  default: return 0;
  }
}

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

  default: return 0;
  }
}




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

  default: return 0;
  }
}

int zx_DEC_ELEM_mm7_RSErrorRsp(struct zx_ctx* c, struct zx_mm7_RSErrorRsp_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_mm7_MM7Version_ELEM:
    if (!x->MM7Version)
      x->MM7Version = el;
    return 1;
  case zx_mm7_Status_ELEM:
    if (!x->Status)
      x->Status = (struct zx_mm7_Status_s*)el;
    return 1;
  case zx_mm7_Extension_ELEM:
    if (!x->Extension)
      x->Extension = (struct zx_mm7_Extension_s*)el;
    return 1;

  default: return 0;
  }
}




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

  default: return 0;
  }
}

int zx_DEC_ELEM_mm7_ReadReplyReq(struct zx_ctx* c, struct zx_mm7_ReadReplyReq_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_mm7_MM7Version_ELEM:
    if (!x->MM7Version)
      x->MM7Version = el;
    return 1;
  case zx_mm7_MMSRelayServerID_ELEM:
    if (!x->MMSRelayServerID)
      x->MMSRelayServerID = el;
    return 1;
  case zx_mm7_Extension_ELEM:
    if (!x->Extension)
      x->Extension = (struct zx_mm7_Extension_s*)el;
    return 1;
  case zx_mm7_MessageID_ELEM:
    if (!x->MessageID)
      x->MessageID = el;
    return 1;
  case zx_mm7_Recipient_ELEM:
    if (!x->Recipient)
      x->Recipient = (struct zx_mm7_Recipient_s*)el;
    return 1;
  case zx_mm7_Sender_ELEM:
    if (!x->Sender)
      x->Sender = (struct zx_mm7_Sender_s*)el;
    return 1;
  case zx_mm7_TimeStamp_ELEM:
    if (!x->TimeStamp)
      x->TimeStamp = el;
    return 1;
  case zx_mm7_MMStatus_ELEM:
    if (!x->MMStatus)
      x->MMStatus = el;
    return 1;
  case zx_mm7_StatusText_ELEM:
    if (!x->StatusText)
      x->StatusText = el;
    return 1;
  case zx_mm7_ApplicID_ELEM:
    if (!x->ApplicID)
      x->ApplicID = el;
    return 1;
  case zx_mm7_ReplyApplicID_ELEM:
    if (!x->ReplyApplicID)
      x->ReplyApplicID = el;
    return 1;
  case zx_mm7_AuxApplicInfo_ELEM:
    if (!x->AuxApplicInfo)
      x->AuxApplicInfo = el;
    return 1;

  default: return 0;
  }
}




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

  default: return 0;
  }
}

int zx_DEC_ELEM_mm7_ReadReplyRsp(struct zx_ctx* c, struct zx_mm7_ReadReplyRsp_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_mm7_MM7Version_ELEM:
    if (!x->MM7Version)
      x->MM7Version = el;
    return 1;
  case zx_mm7_Status_ELEM:
    if (!x->Status)
      x->Status = (struct zx_mm7_Status_s*)el;
    return 1;
  case zx_mm7_Extension_ELEM:
    if (!x->Extension)
      x->Extension = (struct zx_mm7_Extension_s*)el;
    return 1;

  default: return 0;
  }
}




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

  default: return 0;
  }
}

int zx_DEC_ELEM_mm7_Recipient(struct zx_ctx* c, struct zx_mm7_Recipient_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_mm7_RFC2822Address_ELEM:
    if (!x->RFC2822Address)
      x->RFC2822Address = (struct zx_mm7_RFC2822Address_s*)el;
    return 1;
  case zx_mm7_Number_ELEM:
    if (!x->Number)
      x->Number = (struct zx_mm7_Number_s*)el;
    return 1;
  case zx_mm7_ShortCode_ELEM:
    if (!x->ShortCode)
      x->ShortCode = (struct zx_mm7_ShortCode_s*)el;
    return 1;
  case zx_mm7_Extension_ELEM:
    if (!x->Extension)
      x->Extension = (struct zx_mm7_Extension_s*)el;
    return 1;

  default: return 0;
  }
}




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

  default: return 0;
  }
}

int zx_DEC_ELEM_mm7_Recipients(struct zx_ctx* c, struct zx_mm7_Recipients_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_mm7_To_ELEM:
    if (!x->To)
      x->To = (struct zx_mm7_To_s*)el;
    return 1;
  case zx_mm7_Cc_ELEM:
    if (!x->Cc)
      x->Cc = (struct zx_mm7_Cc_s*)el;
    return 1;
  case zx_mm7_Bcc_ELEM:
    if (!x->Bcc)
      x->Bcc = (struct zx_mm7_Bcc_s*)el;
    return 1;

  default: return 0;
  }
}




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

  default: return 0;
  }
}

int zx_DEC_ELEM_mm7_ReplaceReq(struct zx_ctx* c, struct zx_mm7_ReplaceReq_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_mm7_MM7Version_ELEM:
    if (!x->MM7Version)
      x->MM7Version = el;
    return 1;
  case zx_mm7_SenderIdentification_ELEM:
    if (!x->SenderIdentification)
      x->SenderIdentification = (struct zx_mm7_SenderIdentification_s*)el;
    return 1;
  case zx_mm7_Extension_ELEM:
    if (!x->Extension)
      x->Extension = (struct zx_mm7_Extension_s*)el;
    return 1;
  case zx_mm7_MessageID_ELEM:
    if (!x->MessageID)
      x->MessageID = el;
    return 1;
  case zx_mm7_ServiceCode_ELEM:
    if (!x->ServiceCode)
      x->ServiceCode = (struct zx_mm7_ServiceCode_s*)el;
    return 1;
  case zx_mm7_TimeStamp_ELEM:
    if (!x->TimeStamp)
      x->TimeStamp = el;
    return 1;
  case zx_mm7_ReadReply_ELEM:
    if (!x->ReadReply)
      x->ReadReply = el;
    return 1;
  case zx_mm7_EarliestDeliveryTime_ELEM:
    if (!x->EarliestDeliveryTime)
      x->EarliestDeliveryTime = el;
    return 1;
  case zx_mm7_DistributionIndicator_ELEM:
    if (!x->DistributionIndicator)
      x->DistributionIndicator = el;
    return 1;
  case zx_mm7_ContentClass_ELEM:
    if (!x->ContentClass)
      x->ContentClass = el;
    return 1;
  case zx_mm7_DRMContent_ELEM:
    if (!x->DRMContent)
      x->DRMContent = el;
    return 1;
  case zx_mm7_ApplicID_ELEM:
    if (!x->ApplicID)
      x->ApplicID = el;
    return 1;
  case zx_mm7_ReplyApplicID_ELEM:
    if (!x->ReplyApplicID)
      x->ReplyApplicID = el;
    return 1;
  case zx_mm7_AuxApplicInfo_ELEM:
    if (!x->AuxApplicInfo)
      x->AuxApplicInfo = el;
    return 1;
  case zx_mm7_Content_ELEM:
    if (!x->Content)
      x->Content = (struct zx_mm7_Content_s*)el;
    return 1;
  case zx_mm7_AdditionalInformation_ELEM:
    if (!x->AdditionalInformation)
      x->AdditionalInformation = (struct zx_mm7_AdditionalInformation_s*)el;
    return 1;
  case zx_mm7_MessageExtraData_ELEM:
    if (!x->MessageExtraData)
      x->MessageExtraData = (struct zx_mm7_MessageExtraData_s*)el;
    return 1;

  default: return 0;
  }
}




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

  default: return 0;
  }
}

int zx_DEC_ELEM_mm7_ReplaceRsp(struct zx_ctx* c, struct zx_mm7_ReplaceRsp_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_mm7_MM7Version_ELEM:
    if (!x->MM7Version)
      x->MM7Version = el;
    return 1;
  case zx_mm7_Status_ELEM:
    if (!x->Status)
      x->Status = (struct zx_mm7_Status_s*)el;
    return 1;
  case zx_mm7_Extension_ELEM:
    if (!x->Extension)
      x->Extension = (struct zx_mm7_Extension_s*)el;
    return 1;

  default: return 0;
  }
}




int zx_DEC_ATTR_mm7_ReplyCharging(struct zx_ctx* c, struct zx_mm7_ReplyCharging_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_replyChargingSize_ATTR:  x->replyChargingSize = x->gg.attr; return 1;
    case zx_replyDeadline_ATTR:  x->replyDeadline = x->gg.attr; return 1;

  default: return 0;
  }
}

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

  default: return 0;
  }
}




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

  default: return 0;
  }
}

int zx_DEC_ELEM_mm7_Sender(struct zx_ctx* c, struct zx_mm7_Sender_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_mm7_RFC2822Address_ELEM:
    if (!x->RFC2822Address)
      x->RFC2822Address = (struct zx_mm7_RFC2822Address_s*)el;
    return 1;
  case zx_mm7_Number_ELEM:
    if (!x->Number)
      x->Number = (struct zx_mm7_Number_s*)el;
    return 1;
  case zx_mm7_ShortCode_ELEM:
    if (!x->ShortCode)
      x->ShortCode = (struct zx_mm7_ShortCode_s*)el;
    return 1;
  case zx_mm7_Extension_ELEM:
    if (!x->Extension)
      x->Extension = (struct zx_mm7_Extension_s*)el;
    return 1;

  default: return 0;
  }
}




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

  default: return 0;
  }
}

int zx_DEC_ELEM_mm7_SenderAddress(struct zx_ctx* c, struct zx_mm7_SenderAddress_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_mm7_RFC2822Address_ELEM:
    if (!x->RFC2822Address)
      x->RFC2822Address = (struct zx_mm7_RFC2822Address_s*)el;
    return 1;
  case zx_mm7_Number_ELEM:
    if (!x->Number)
      x->Number = (struct zx_mm7_Number_s*)el;
    return 1;
  case zx_mm7_ShortCode_ELEM:
    if (!x->ShortCode)
      x->ShortCode = (struct zx_mm7_ShortCode_s*)el;
    return 1;
  case zx_mm7_Extension_ELEM:
    if (!x->Extension)
      x->Extension = (struct zx_mm7_Extension_s*)el;
    return 1;

  default: return 0;
  }
}




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

  default: return 0;
  }
}

int zx_DEC_ELEM_mm7_SenderIdentification(struct zx_ctx* c, struct zx_mm7_SenderIdentification_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_mm7_VASPID_ELEM:
    if (!x->VASPID)
      x->VASPID = el;
    return 1;
  case zx_mm7_VASID_ELEM:
    if (!x->VASID)
      x->VASID = el;
    return 1;
  case zx_mm7_SenderAddress_ELEM:
    if (!x->SenderAddress)
      x->SenderAddress = (struct zx_mm7_SenderAddress_s*)el;
    return 1;

  default: return 0;
  }
}




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

  default: return 0;
  }
}

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

  default: return 0;
  }
}




int zx_DEC_ATTR_mm7_ShortCode(struct zx_ctx* c, struct zx_mm7_ShortCode_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_addressCoding_ATTR:  x->addressCoding = x->gg.attr; return 1;
    case zx_displayOnly_ATTR:  x->displayOnly = x->gg.attr; return 1;
    case zx_id_ATTR:  x->id = x->gg.attr; return 1;

  default: return 0;
  }
}

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

  default: return 0;
  }
}




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

  default: return 0;
  }
}

int zx_DEC_ELEM_mm7_Status(struct zx_ctx* c, struct zx_mm7_Status_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_mm7_StatusCode_ELEM:
    if (!x->StatusCode)
      x->StatusCode = el;
    return 1;
  case zx_mm7_StatusText_ELEM:
    if (!x->StatusText)
      x->StatusText = el;
    return 1;
  case zx_mm7_Details_ELEM:
    if (!x->Details)
      x->Details = (struct zx_mm7_Details_s*)el;
    return 1;

  default: return 0;
  }
}




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

  default: return 0;
  }
}

int zx_DEC_ELEM_mm7_SubmitReq(struct zx_ctx* c, struct zx_mm7_SubmitReq_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_mm7_MM7Version_ELEM:
    if (!x->MM7Version)
      x->MM7Version = el;
    return 1;
  case zx_mm7_SenderIdentification_ELEM:
    if (!x->SenderIdentification)
      x->SenderIdentification = (struct zx_mm7_SenderIdentification_s*)el;
    return 1;
  case zx_mm7_Extension_ELEM:
    if (!x->Extension)
      x->Extension = (struct zx_mm7_Extension_s*)el;
    return 1;
  case zx_mm7_Recipients_ELEM:
    if (!x->Recipients)
      x->Recipients = (struct zx_mm7_Recipients_s*)el;
    return 1;
  case zx_mm7_PreferredChannels_ELEM:
    if (!x->PreferredChannels)
      x->PreferredChannels = (struct zx_mm7_PreferredChannels_s*)el;
    return 1;
  case zx_mm7_ServiceCode_ELEM:
    if (!x->ServiceCode)
      x->ServiceCode = (struct zx_mm7_ServiceCode_s*)el;
    return 1;
  case zx_mm7_LinkedID_ELEM:
    if (!x->LinkedID)
      x->LinkedID = el;
    return 1;
  case zx_mm7_MessageClass_ELEM:
    if (!x->MessageClass)
      x->MessageClass = el;
    return 1;
  case zx_mm7_TimeStamp_ELEM:
    if (!x->TimeStamp)
      x->TimeStamp = el;
    return 1;
  case zx_mm7_ReplyCharging_ELEM:
    if (!x->ReplyCharging)
      x->ReplyCharging = (struct zx_mm7_ReplyCharging_s*)el;
    return 1;
  case zx_mm7_EarliestDeliveryTime_ELEM:
    if (!x->EarliestDeliveryTime)
      x->EarliestDeliveryTime = el;
    return 1;
  case zx_mm7_ExpiryDate_ELEM:
    if (!x->ExpiryDate)
      x->ExpiryDate = el;
    return 1;
  case zx_mm7_DeliveryReport_ELEM:
    if (!x->DeliveryReport)
      x->DeliveryReport = el;
    return 1;
  case zx_mm7_ReadReply_ELEM:
    if (!x->ReadReply)
      x->ReadReply = el;
    return 1;
  case zx_mm7_Priority_ELEM:
    if (!x->Priority)
      x->Priority = el;
    return 1;
  case zx_mm7_Subject_ELEM:
    if (!x->Subject)
      x->Subject = el;
    return 1;
  case zx_mm7_ChargedParty_ELEM:
    if (!x->ChargedParty)
      x->ChargedParty = el;
    return 1;
  case zx_mm7_ChargedPartyID_ELEM:
    if (!x->ChargedPartyID)
      x->ChargedPartyID = el;
    return 1;
  case zx_mm7_ThirdPartyPayer_ELEM:
    if (!x->ThirdPartyPayer)
      x->ThirdPartyPayer = (struct zx_mm7_ThirdPartyPayer_s*)el;
    return 1;
  case zx_mm7_DistributionIndicator_ELEM:
    if (!x->DistributionIndicator)
      x->DistributionIndicator = el;
    return 1;
  case zx_mm7_DeliveryCondition_ELEM:
    if (!x->DeliveryCondition)
      x->DeliveryCondition = (struct zx_mm7_DeliveryCondition_s*)el;
    return 1;
  case zx_mm7_ApplicID_ELEM:
    if (!x->ApplicID)
      x->ApplicID = el;
    return 1;
  case zx_mm7_ReplyApplicID_ELEM:
    if (!x->ReplyApplicID)
      x->ReplyApplicID = el;
    return 1;
  case zx_mm7_AuxApplicInfo_ELEM:
    if (!x->AuxApplicInfo)
      x->AuxApplicInfo = el;
    return 1;
  case zx_mm7_ContentClass_ELEM:
    if (!x->ContentClass)
      x->ContentClass = el;
    return 1;
  case zx_mm7_DRMContent_ELEM:
    if (!x->DRMContent)
      x->DRMContent = el;
    return 1;
  case zx_mm7_Content_ELEM:
    if (!x->Content)
      x->Content = (struct zx_mm7_Content_s*)el;
    return 1;
  case zx_mm7_AdditionalInformation_ELEM:
    if (!x->AdditionalInformation)
      x->AdditionalInformation = (struct zx_mm7_AdditionalInformation_s*)el;
    return 1;
  case zx_mm7_MessageExtraData_ELEM:
    if (!x->MessageExtraData)
      x->MessageExtraData = (struct zx_mm7_MessageExtraData_s*)el;
    return 1;

  default: return 0;
  }
}




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

  default: return 0;
  }
}

int zx_DEC_ELEM_mm7_SubmitRsp(struct zx_ctx* c, struct zx_mm7_SubmitRsp_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_mm7_MM7Version_ELEM:
    if (!x->MM7Version)
      x->MM7Version = el;
    return 1;
  case zx_mm7_Status_ELEM:
    if (!x->Status)
      x->Status = (struct zx_mm7_Status_s*)el;
    return 1;
  case zx_mm7_Extension_ELEM:
    if (!x->Extension)
      x->Extension = (struct zx_mm7_Extension_s*)el;
    return 1;
  case zx_mm7_MessageID_ELEM:
    if (!x->MessageID)
      x->MessageID = el;
    return 1;

  default: return 0;
  }
}




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

  default: return 0;
  }
}

int zx_DEC_ELEM_mm7_ThirdPartyPayer(struct zx_ctx* c, struct zx_mm7_ThirdPartyPayer_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_mm7_RFC2822Address_ELEM:
    if (!x->RFC2822Address)
      x->RFC2822Address = (struct zx_mm7_RFC2822Address_s*)el;
    return 1;
  case zx_mm7_Number_ELEM:
    if (!x->Number)
      x->Number = (struct zx_mm7_Number_s*)el;
    return 1;
  case zx_mm7_ShortCode_ELEM:
    if (!x->ShortCode)
      x->ShortCode = (struct zx_mm7_ShortCode_s*)el;
    return 1;
  case zx_mm7_Extension_ELEM:
    if (!x->Extension)
      x->Extension = (struct zx_mm7_Extension_s*)el;
    return 1;

  default: return 0;
  }
}




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

  default: return 0;
  }
}

int zx_DEC_ELEM_mm7_To(struct zx_ctx* c, struct zx_mm7_To_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_mm7_RFC2822Address_ELEM:
    if (!x->RFC2822Address)
      x->RFC2822Address = (struct zx_mm7_RFC2822Address_s*)el;
    return 1;
  case zx_mm7_Number_ELEM:
    if (!x->Number)
      x->Number = (struct zx_mm7_Number_s*)el;
    return 1;
  case zx_mm7_ShortCode_ELEM:
    if (!x->ShortCode)
      x->ShortCode = (struct zx_mm7_ShortCode_s*)el;
    return 1;
  case zx_mm7_Extension_ELEM:
    if (!x->Extension)
      x->Extension = (struct zx_mm7_Extension_s*)el;
    return 1;

  default: return 0;
  }
}




int zx_DEC_ATTR_mm7_TransactionID(struct zx_ctx* c, struct zx_mm7_TransactionID_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_actor_ATTR|zx_e_NS:  x->actor = x->gg.attr; return 1;
    case zx_encodingStyle_ATTR|zx_e_NS:  x->encodingStyle = x->gg.attr; return 1;
    case zx_mustUnderstand_ATTR|zx_e_NS:  x->mustUnderstand = x->gg.attr; return 1;

  default: return 0;
  }
}

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

  default: return 0;
  }
}




int zx_DEC_ATTR_mm7_UACapabilities(struct zx_ctx* c, struct zx_mm7_UACapabilities_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_TimeStamp_ATTR:  x->TimeStamp = x->gg.attr; return 1;
    case zx_UAProf_ATTR:  x->UAProf = x->gg.attr; return 1;

  default: return 0;
  }
}

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

  default: return 0;
  }
}




int zx_DEC_ATTR_mm7_UserAgent(struct zx_ctx* c, struct zx_mm7_UserAgent_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_sequence_ATTR:  x->sequence = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_mm7_UserAgent(struct zx_ctx* c, struct zx_mm7_UserAgent_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_mm7_RFC2822Address_ELEM:
    if (!x->RFC2822Address)
      x->RFC2822Address = (struct zx_mm7_RFC2822Address_s*)el;
    return 1;
  case zx_mm7_Number_ELEM:
    if (!x->Number)
      x->Number = (struct zx_mm7_Number_s*)el;
    return 1;
  case zx_mm7_ShortCode_ELEM:
    if (!x->ShortCode)
      x->ShortCode = (struct zx_mm7_ShortCode_s*)el;
    return 1;
  case zx_mm7_Extension_ELEM:
    if (!x->Extension)
      x->Extension = (struct zx_mm7_Extension_s*)el;
    return 1;

  default: return 0;
  }
}




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

  default: return 0;
  }
}

int zx_DEC_ELEM_mm7_VASPErrorRsp(struct zx_ctx* c, struct zx_mm7_VASPErrorRsp_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_mm7_MM7Version_ELEM:
    if (!x->MM7Version)
      x->MM7Version = el;
    return 1;
  case zx_mm7_Status_ELEM:
    if (!x->Status)
      x->Status = (struct zx_mm7_Status_s*)el;
    return 1;
  case zx_mm7_Extension_ELEM:
    if (!x->Extension)
      x->Extension = (struct zx_mm7_Extension_s*)el;
    return 1;

  default: return 0;
  }
}




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

  default: return 0;
  }
}

int zx_DEC_ELEM_mm7_element(struct zx_ctx* c, struct zx_mm7_element_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_mm7_key_ELEM:
    if (!x->key)
      x->key = el;
    return 1;
  case zx_mm7_value_ELEM:
    if (!x->value)
      x->value = el;
    return 1;

  default: return 0;
  }
}




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

  default: return 0;
  }
}

int zx_DEC_ELEM_mm7_extendedCancelReq(struct zx_ctx* c, struct zx_mm7_extendedCancelReq_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_mm7_MM7Version_ELEM:
    if (!x->MM7Version)
      x->MM7Version = el;
    return 1;
  case zx_mm7_SenderIdentification_ELEM:
    if (!x->SenderIdentification)
      x->SenderIdentification = (struct zx_mm7_SenderIdentification_s*)el;
    return 1;
  case zx_mm7_Extension_ELEM:
    if (!x->Extension)
      x->Extension = (struct zx_mm7_Extension_s*)el;
    return 1;
  case zx_mm7_CancelID_ELEM:
    if (!x->CancelID)
      x->CancelID = el;
    return 1;

  default: return 0;
  }
}




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

  default: return 0;
  }
}

int zx_DEC_ELEM_mm7_extendedCancelRsp(struct zx_ctx* c, struct zx_mm7_extendedCancelRsp_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_mm7_MM7Version_ELEM:
    if (!x->MM7Version)
      x->MM7Version = el;
    return 1;
  case zx_mm7_Status_ELEM:
    if (!x->Status)
      x->Status = (struct zx_mm7_Status_s*)el;
    return 1;

  default: return 0;
  }
}




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

  default: return 0;
  }
}

int zx_DEC_ELEM_mm7_extendedReplaceReq(struct zx_ctx* c, struct zx_mm7_extendedReplaceReq_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_mm7_MM7Version_ELEM:
    if (!x->MM7Version)
      x->MM7Version = el;
    return 1;
  case zx_mm7_VASPID_ELEM:
    if (!x->VASPID)
      x->VASPID = el;
    return 1;
  case zx_mm7_VASID_ELEM:
    if (!x->VASID)
      x->VASID = el;
    return 1;
  case zx_mm7_ServiceCode_ELEM:
    if (!x->ServiceCode)
      x->ServiceCode = (struct zx_mm7_ServiceCode_s*)el;
    return 1;
  case zx_mm7_ReplaceID_ELEM:
    if (!x->ReplaceID)
      x->ReplaceID = el;
    return 1;
  case zx_mm7_TimeStamp_ELEM:
    if (!x->TimeStamp)
      x->TimeStamp = el;
    return 1;
  case zx_mm7_EarliestDeliveryTime_ELEM:
    if (!x->EarliestDeliveryTime)
      x->EarliestDeliveryTime = el;
    return 1;
  case zx_mm7_ExpiryDate_ELEM:
    if (!x->ExpiryDate)
      x->ExpiryDate = el;
    return 1;
  case zx_mm7_ReadReply_ELEM:
    if (!x->ReadReply)
      x->ReadReply = el;
    return 1;
  case zx_mm7_DeliveryReport_ELEM:
    if (!x->DeliveryReport)
      x->DeliveryReport = el;
    return 1;
  case zx_mm7_Content_ELEM:
    if (!x->Content)
      x->Content = (struct zx_mm7_Content_s*)el;
    return 1;
  case zx_mm7_AdditionalInformation_ELEM:
    if (!x->AdditionalInformation)
      x->AdditionalInformation = (struct zx_mm7_AdditionalInformation_s*)el;
    return 1;
  case zx_mm7_MessageExtraData_ELEM:
    if (!x->MessageExtraData)
      x->MessageExtraData = (struct zx_mm7_MessageExtraData_s*)el;
    return 1;

  default: return 0;
  }
}




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

  default: return 0;
  }
}

int zx_DEC_ELEM_mm7_extendedReplaceRsp(struct zx_ctx* c, struct zx_mm7_extendedReplaceRsp_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_mm7_MM7Version_ELEM:
    if (!x->MM7Version)
      x->MM7Version = el;
    return 1;
  case zx_mm7_MessageID_ELEM:
    if (!x->MessageID)
      x->MessageID = el;
    return 1;
  case zx_mm7_Status_ELEM:
    if (!x->Status)
      x->Status = (struct zx_mm7_Status_s*)el;
    return 1;

  default: return 0;
  }
}


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