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



int zx_DEC_ATTR_gl_AreaComparison(struct zx_ctx* c, struct zx_gl_AreaComparison_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_itemID_ATTR:  x->itemID = x->gg.attr; return 1;
    case zx_returnLocation_ATTR:  x->returnLocation = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_gl_AreaComparison(struct zx_ctx* c, struct zx_gl_AreaComparison_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_gl_CivilData_ELEM:
    if (!x->CivilData)
      x->CivilData = (struct zx_gl_CivilData_s*)el;
    return 1;
  case zx_gl_shape_ELEM:
    if (!x->shape)
      x->shape = (struct zx_gl_shape_s*)el;
    return 1;
  case zx_gl_Extension_ELEM:
    if (!x->Extension)
      x->Extension = (struct zx_gl_Extension_s*)el;
    return 1;

  default: return 0;
  }
}




int zx_DEC_ATTR_gl_Box(struct zx_ctx* c, struct zx_gl_Box_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_gid_ATTR:  x->gid = x->gg.attr; return 1;
    case zx_srsName_ATTR:  x->srsName = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_gl_Box(struct zx_ctx* c, struct zx_gl_Box_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_gl_coord_ELEM:
    if (!x->coord)
      x->coord = (struct zx_gl_coord_s*)el;
    return 1;

  default: return 0;
  }
}




int zx_DEC_ATTR_gl_ChangeArea(struct zx_ctx* c, struct zx_gl_ChangeArea_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_event_ATTR:  x->event = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_gl_ChangeArea(struct zx_ctx* c, struct zx_gl_ChangeArea_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_gl_CivilData_ELEM:
    if (!x->CivilData)
      x->CivilData = (struct zx_gl_CivilData_s*)el;
    return 1;
  case zx_gl_shape_ELEM:
    if (!x->shape)
      x->shape = (struct zx_gl_shape_s*)el;
    return 1;
  case zx_gl_Extension_ELEM:
    if (!x->Extension)
      x->Extension = (struct zx_gl_Extension_s*)el;
    return 1;

  default: return 0;
  }
}




int zx_DEC_ATTR_gl_CircularArcArea(struct zx_ctx* c, struct zx_gl_CircularArcArea_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_gid_ATTR:  x->gid = x->gg.attr; return 1;
    case zx_srsName_ATTR:  x->srsName = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_gl_CircularArcArea(struct zx_ctx* c, struct zx_gl_CircularArcArea_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_gl_coord_ELEM:
    if (!x->coord)
      x->coord = (struct zx_gl_coord_s*)el;
    return 1;
  case zx_gl_inRadius_ELEM:
    if (!x->inRadius)
      x->inRadius = el;
    return 1;
  case zx_gl_outRadius_ELEM:
    if (!x->outRadius)
      x->outRadius = el;
    return 1;
  case zx_gl_startAngle_ELEM:
    if (!x->startAngle)
      x->startAngle = el;
    return 1;
  case zx_gl_stopAngle_ELEM:
    if (!x->stopAngle)
      x->stopAngle = el;
    return 1;
  case zx_gl_angularUnit_ELEM:
    if (!x->angularUnit)
      x->angularUnit = el;
    return 1;
  case zx_gl_distanceUnit_ELEM:
    if (!x->distanceUnit)
      x->distanceUnit = el;
    return 1;

  default: return 0;
  }
}




int zx_DEC_ATTR_gl_CircularArea(struct zx_ctx* c, struct zx_gl_CircularArea_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_gid_ATTR:  x->gid = x->gg.attr; return 1;
    case zx_srsName_ATTR:  x->srsName = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_gl_CircularArea(struct zx_ctx* c, struct zx_gl_CircularArea_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_gl_coord_ELEM:
    if (!x->coord)
      x->coord = (struct zx_gl_coord_s*)el;
    return 1;
  case zx_gl_radius_ELEM:
    if (!x->radius)
      x->radius = el;
    return 1;
  case zx_gl_distanceUnit_ELEM:
    if (!x->distanceUnit)
      x->distanceUnit = el;
    return 1;

  default: return 0;
  }
}




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

  default: return 0;
  }
}

int zx_DEC_ELEM_gl_CivilData(struct zx_ctx* c, struct zx_gl_CivilData_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_gl_PostalAddress_ELEM:
    if (!x->PostalAddress)
      x->PostalAddress = el;
    return 1;
  case zx_gl_LPostalAddress_ELEM:
    if (!x->LPostalAddress)
      x->LPostalAddress = (struct zx_gl_LPostalAddress_s*)el;
    return 1;
  case zx_gl_PostalCode_ELEM:
    if (!x->PostalCode)
      x->PostalCode = el;
    return 1;
  case zx_gl_L_ELEM:
    if (!x->L)
      x->L = el;
    return 1;
  case zx_gl_LL_ELEM:
    if (!x->LL)
      x->LL = (struct zx_gl_LL_s*)el;
    return 1;
  case zx_gl_St_ELEM:
    if (!x->St)
      x->St = el;
    return 1;
  case zx_gl_LSt_ELEM:
    if (!x->LSt)
      x->LSt = (struct zx_gl_LSt_s*)el;
    return 1;
  case zx_gl_C_ELEM:
    if (!x->C)
      x->C = el;
    return 1;
  case zx_gl_MNC_ELEM:
    if (!x->MNC)
      x->MNC = el;
    return 1;
  case zx_gl_Extension_ELEM:
    if (!x->Extension)
      x->Extension = (struct zx_gl_Extension_s*)el;
    return 1;

  default: return 0;
  }
}




int zx_DEC_ATTR_gl_ComparisonResult(struct zx_ctx* c, struct zx_gl_ComparisonResult_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_ItemIDRef_ATTR:  x->ItemIDRef = x->gg.attr; return 1;

  default: return 0;
  }
}

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

  default: return 0;
  }
}




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

  default: return 0;
  }
}

int zx_DEC_ELEM_gl_CoordinateReferenceSystem(struct zx_ctx* c, struct zx_gl_CoordinateReferenceSystem_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_gl_Identifier_ELEM:
    if (!x->Identifier)
      x->Identifier = (struct zx_gl_Identifier_s*)el;
    return 1;

  default: return 0;
  }
}




int zx_DEC_ATTR_gl_Create(struct zx_ctx* c, struct zx_gl_Create_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_id_ATTR:  x->id = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_gl_Create(struct zx_ctx* c, struct zx_gl_Create_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_gl_ResourceID_ELEM:
    if (!x->ResourceID)
      x->ResourceID = (struct zx_gl_ResourceID_s*)el;
    return 1;
  case zx_gl_EncryptedResourceID_ELEM:
    if (!x->EncryptedResourceID)
      x->EncryptedResourceID = (struct zx_gl_EncryptedResourceID_s*)el;
    return 1;
  case zx_gl_Subscription_ELEM:
    if (!x->Subscription)
      x->Subscription = (struct zx_gl_Subscription_s*)el;
    return 1;
  case zx_gl_CreateItem_ELEM:
    if (!x->CreateItem)
      x->CreateItem = (struct zx_gl_CreateItem_s*)el;
    return 1;
  case zx_gl_ItemSelection_ELEM:
    if (!x->ItemSelection)
      x->ItemSelection = (struct zx_gl_ItemSelection_s*)el;
    return 1;
  case zx_gl_Extension_ELEM:
    if (!x->Extension)
      x->Extension = (struct zx_gl_Extension_s*)el;
    return 1;

  default: return 0;
  }
}




int zx_DEC_ATTR_gl_CreateItem(struct zx_ctx* c, struct zx_gl_CreateItem_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_id_ATTR:  x->id = x->gg.attr; return 1;
    case zx_itemID_ATTR:  x->itemID = x->gg.attr; return 1;
    case zx_objectType_ATTR:  x->objectType = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_gl_CreateItem(struct zx_ctx* c, struct zx_gl_CreateItem_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_gl_NewData_ELEM:
    if (!x->NewData)
      x->NewData = (struct zx_gl_NewData_s*)el;
    return 1;

  default: return 0;
  }
}




int zx_DEC_ATTR_gl_CreateResponse(struct zx_ctx* c, struct zx_gl_CreateResponse_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_id_ATTR:  x->id = x->gg.attr; return 1;
    case zx_timeStamp_ATTR:  x->timeStamp = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_gl_CreateResponse(struct zx_ctx* c, struct zx_gl_CreateResponse_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_gl_Status_ELEM:
    if (!x->Status)
      x->Status = (struct zx_gl_Status_s*)el;
    return 1;
  case zx_gl_ItemData_ELEM:
    if (!x->ItemData)
      x->ItemData = (struct zx_gl_ItemData_s*)el;
    return 1;
  case zx_gl_Extension_ELEM:
    if (!x->Extension)
      x->Extension = (struct zx_gl_Extension_s*)el;
    return 1;

  default: return 0;
  }
}




int zx_DEC_ATTR_gl_Credential(struct zx_ctx* c, struct zx_gl_Credential_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_notOnOrAfter_ATTR:  x->notOnOrAfter = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_gl_Credential(struct zx_ctx* c, struct zx_gl_Credential_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_sa_Assertion_ELEM:
    if (!x->Assertion)
      x->Assertion = (struct zx_sa_Assertion_s*)el;
    return 1;

  default: return 0;
  }
}




int zx_DEC_ATTR_gl_Data(struct zx_ctx* c, struct zx_gl_Data_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_id_ATTR:  x->id = x->gg.attr; return 1;
    case zx_itemIDRef_ATTR:  x->itemIDRef = x->gg.attr; return 1;
    case zx_nextOffset_ATTR:  x->nextOffset = x->gg.attr; return 1;
    case zx_notSorted_ATTR:  x->notSorted = x->gg.attr; return 1;
    case zx_remaining_ATTR:  x->remaining = x->gg.attr; return 1;
    case zx_setID_ATTR:  x->setID = x->gg.attr; return 1;
    case zx_changeFormat_ATTR|zx_gl_NS:  x->changeFormat = x->gg.attr; return 1;

  default: return 0;
  }
}

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

  default: return 0;
  }
}




int zx_DEC_ATTR_gl_Delete(struct zx_ctx* c, struct zx_gl_Delete_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_id_ATTR:  x->id = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_gl_Delete(struct zx_ctx* c, struct zx_gl_Delete_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_gl_ResourceID_ELEM:
    if (!x->ResourceID)
      x->ResourceID = (struct zx_gl_ResourceID_s*)el;
    return 1;
  case zx_gl_EncryptedResourceID_ELEM:
    if (!x->EncryptedResourceID)
      x->EncryptedResourceID = (struct zx_gl_EncryptedResourceID_s*)el;
    return 1;
  case zx_gl_DeleteItem_ELEM:
    if (!x->DeleteItem)
      x->DeleteItem = (struct zx_gl_DeleteItem_s*)el;
    return 1;
  case zx_gl_Extension_ELEM:
    if (!x->Extension)
      x->Extension = (struct zx_gl_Extension_s*)el;
    return 1;

  default: return 0;
  }
}




int zx_DEC_ATTR_gl_DeleteItem(struct zx_ctx* c, struct zx_gl_DeleteItem_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_id_ATTR:  x->id = x->gg.attr; return 1;
    case zx_itemID_ATTR:  x->itemID = x->gg.attr; return 1;
    case zx_notChangedSince_ATTR:  x->notChangedSince = x->gg.attr; return 1;
    case zx_objectType_ATTR:  x->objectType = x->gg.attr; return 1;
    case zx_predefined_ATTR:  x->predefined = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_gl_DeleteItem(struct zx_ctx* c, struct zx_gl_DeleteItem_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_gl_Select_ELEM:
    if (!x->Select)
      x->Select = el;
    return 1;

  default: return 0;
  }
}




int zx_DEC_ATTR_gl_DeleteResponse(struct zx_ctx* c, struct zx_gl_DeleteResponse_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_id_ATTR:  x->id = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_gl_DeleteResponse(struct zx_ctx* c, struct zx_gl_DeleteResponse_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_gl_Status_ELEM:
    if (!x->Status)
      x->Status = (struct zx_gl_Status_s*)el;
    return 1;
  case zx_gl_Extension_ELEM:
    if (!x->Extension)
      x->Extension = (struct zx_gl_Extension_s*)el;
    return 1;

  default: return 0;
  }
}




int zx_DEC_ATTR_gl_EllipticalArea(struct zx_ctx* c, struct zx_gl_EllipticalArea_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_gid_ATTR:  x->gid = x->gg.attr; return 1;
    case zx_srsName_ATTR:  x->srsName = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_gl_EllipticalArea(struct zx_ctx* c, struct zx_gl_EllipticalArea_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_gl_coord_ELEM:
    if (!x->coord)
      x->coord = (struct zx_gl_coord_s*)el;
    return 1;
  case zx_gl_angle_ELEM:
    if (!x->angle)
      x->angle = el;
    return 1;
  case zx_gl_semiMajor_ELEM:
    if (!x->semiMajor)
      x->semiMajor = el;
    return 1;
  case zx_gl_semiMinor_ELEM:
    if (!x->semiMinor)
      x->semiMinor = el;
    return 1;
  case zx_gl_angularUnit_ELEM:
    if (!x->angularUnit)
      x->angularUnit = el;
    return 1;
  case zx_gl_distanceUnit_ELEM:
    if (!x->distanceUnit)
      x->distanceUnit = el;
    return 1;

  default: return 0;
  }
}




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

  default: return 0;
  }
}

int zx_DEC_ELEM_gl_EncryptedResourceID(struct zx_ctx* c, struct zx_gl_EncryptedResourceID_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_xenc_EncryptedData_ELEM:
    if (!x->EncryptedData)
      x->EncryptedData = (struct zx_xenc_EncryptedData_s*)el;
    return 1;
  case zx_xenc_EncryptedKey_ELEM:
    if (!x->EncryptedKey)
      x->EncryptedKey = (struct zx_xenc_EncryptedKey_s*)el;
    return 1;

  default: return 0;
  }
}




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

  default: return 0;
  }
}

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

  default: return 0;
  }
}




int zx_DEC_ATTR_gl_GeometryCollection(struct zx_ctx* c, struct zx_gl_GeometryCollection_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_gid_ATTR:  x->gid = x->gg.attr; return 1;
    case zx_srsName_ATTR:  x->srsName = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_gl_GeometryCollection(struct zx_ctx* c, struct zx_gl_GeometryCollection_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_gl_shape_ELEM:
    if (!x->shape)
      x->shape = (struct zx_gl_shape_s*)el;
    return 1;

  default: return 0;
  }
}




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

  default: return 0;
  }
}

int zx_DEC_ELEM_gl_Identifier(struct zx_ctx* c, struct zx_gl_Identifier_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_gl_code_ELEM:
    if (!x->code)
      x->code = el;
    return 1;
  case zx_gl_codeSpace_ELEM:
    if (!x->codeSpace)
      x->codeSpace = el;
    return 1;
  case zx_gl_edition_ELEM:
    if (!x->edition)
      x->edition = el;
    return 1;

  default: return 0;
  }
}




int zx_DEC_ATTR_gl_ItemData(struct zx_ctx* c, struct zx_gl_ItemData_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_id_ATTR:  x->id = x->gg.attr; return 1;
    case zx_itemIDRef_ATTR:  x->itemIDRef = x->gg.attr; return 1;
    case zx_notSorted_ATTR:  x->notSorted = x->gg.attr; return 1;
    case zx_changeFormat_ATTR|zx_gl_NS:  x->changeFormat = x->gg.attr; return 1;

  default: return 0;
  }
}

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

  default: return 0;
  }
}




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

  default: return 0;
  }
}

int zx_DEC_ELEM_gl_ItemSelection(struct zx_ctx* c, struct zx_gl_ItemSelection_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_gl_AreaComparison_ELEM:
    if (!x->AreaComparison)
      x->AreaComparison = (struct zx_gl_AreaComparison_s*)el;
    return 1;
  case zx_gl_eqop_ELEM:
    if (!x->eqop)
      x->eqop = (struct zx_gl_eqop_s*)el;
    return 1;
  case zx_gl_geoinfo_ELEM:
    if (!x->geoinfo)
      x->geoinfo = (struct zx_gl_geoinfo_s*)el;
    return 1;
  case zx_gl_loc_type_ELEM:
    if (!x->loc_type)
      x->loc_type = (struct zx_gl_loc_type_s*)el;
    return 1;
  case zx_gl_prio_ELEM:
    if (!x->prio)
      x->prio = (struct zx_gl_prio_s*)el;
    return 1;
  case zx_gl_Extension_ELEM:
    if (!x->Extension)
      x->Extension = (struct zx_gl_Extension_s*)el;
    return 1;

  default: return 0;
  }
}




int zx_DEC_ATTR_gl_LL(struct zx_ctx* c, struct zx_gl_LL_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_lang_ATTR|zx_xml_NS:  x->lang = x->gg.attr; return 1;
    case zx_script_ATTR|zx_gl_NS:  x->script = x->gg.attr; return 1;

  default: return 0;
  }
}

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

  default: return 0;
  }
}




int zx_DEC_ATTR_gl_LPostalAddress(struct zx_ctx* c, struct zx_gl_LPostalAddress_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_lang_ATTR|zx_xml_NS:  x->lang = x->gg.attr; return 1;
    case zx_script_ATTR|zx_gl_NS:  x->script = x->gg.attr; return 1;

  default: return 0;
  }
}

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

  default: return 0;
  }
}




int zx_DEC_ATTR_gl_LSt(struct zx_ctx* c, struct zx_gl_LSt_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_lang_ATTR|zx_xml_NS:  x->lang = x->gg.attr; return 1;
    case zx_script_ATTR|zx_gl_NS:  x->script = x->gg.attr; return 1;

  default: return 0;
  }
}

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

  default: return 0;
  }
}




int zx_DEC_ATTR_gl_LineString(struct zx_ctx* c, struct zx_gl_LineString_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_gid_ATTR:  x->gid = x->gg.attr; return 1;
    case zx_srsName_ATTR:  x->srsName = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_gl_LineString(struct zx_ctx* c, struct zx_gl_LineString_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_gl_coord_ELEM:
    if (!x->coord)
      x->coord = (struct zx_gl_coord_s*)el;
    return 1;

  default: return 0;
  }
}




int zx_DEC_ATTR_gl_LinearRing(struct zx_ctx* c, struct zx_gl_LinearRing_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_gid_ATTR:  x->gid = x->gg.attr; return 1;
    case zx_srsName_ATTR:  x->srsName = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_gl_LinearRing(struct zx_ctx* c, struct zx_gl_LinearRing_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_gl_coord_ELEM:
    if (!x->coord)
      x->coord = (struct zx_gl_coord_s*)el;
    return 1;

  default: return 0;
  }
}




int zx_DEC_ATTR_gl_Modification(struct zx_ctx* c, struct zx_gl_Modification_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_id_ATTR:  x->id = x->gg.attr; return 1;
    case zx_itemID_ATTR:  x->itemID = x->gg.attr; return 1;
    case zx_notChangedSince_ATTR:  x->notChangedSince = x->gg.attr; return 1;
    case zx_objectType_ATTR:  x->objectType = x->gg.attr; return 1;
    case zx_overrideAllowed_ATTR:  x->overrideAllowed = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_gl_Modification(struct zx_ctx* c, struct zx_gl_Modification_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_gl_Select_ELEM:
    if (!x->Select)
      x->Select = el;
    return 1;
  case zx_gl_NewData_ELEM:
    if (!x->NewData)
      x->NewData = (struct zx_gl_NewData_s*)el;
    return 1;

  default: return 0;
  }
}




int zx_DEC_ATTR_gl_Modify(struct zx_ctx* c, struct zx_gl_Modify_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_id_ATTR:  x->id = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_gl_Modify(struct zx_ctx* c, struct zx_gl_Modify_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_gl_ResourceID_ELEM:
    if (!x->ResourceID)
      x->ResourceID = (struct zx_gl_ResourceID_s*)el;
    return 1;
  case zx_gl_EncryptedResourceID_ELEM:
    if (!x->EncryptedResourceID)
      x->EncryptedResourceID = (struct zx_gl_EncryptedResourceID_s*)el;
    return 1;
  case zx_gl_Subscription_ELEM:
    if (!x->Subscription)
      x->Subscription = (struct zx_gl_Subscription_s*)el;
    return 1;
  case zx_gl_Modification_ELEM:
    if (!x->Modification)
      x->Modification = (struct zx_gl_Modification_s*)el;
    return 1;
  case zx_gl_ItemSelection_ELEM:
    if (!x->ItemSelection)
      x->ItemSelection = (struct zx_gl_ItemSelection_s*)el;
    return 1;
  case zx_gl_Extension_ELEM:
    if (!x->Extension)
      x->Extension = (struct zx_gl_Extension_s*)el;
    return 1;

  default: return 0;
  }
}




int zx_DEC_ATTR_gl_ModifyResponse(struct zx_ctx* c, struct zx_gl_ModifyResponse_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_id_ATTR:  x->id = x->gg.attr; return 1;
    case zx_timeStamp_ATTR:  x->timeStamp = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_gl_ModifyResponse(struct zx_ctx* c, struct zx_gl_ModifyResponse_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_gl_Status_ELEM:
    if (!x->Status)
      x->Status = (struct zx_gl_Status_s*)el;
    return 1;
  case zx_gl_ItemData_ELEM:
    if (!x->ItemData)
      x->ItemData = (struct zx_gl_ItemData_s*)el;
    return 1;
  case zx_gl_Extension_ELEM:
    if (!x->Extension)
      x->Extension = (struct zx_gl_Extension_s*)el;
    return 1;

  default: return 0;
  }
}




int zx_DEC_ATTR_gl_MultiLineString(struct zx_ctx* c, struct zx_gl_MultiLineString_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_gid_ATTR:  x->gid = x->gg.attr; return 1;
    case zx_srsName_ATTR:  x->srsName = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_gl_MultiLineString(struct zx_ctx* c, struct zx_gl_MultiLineString_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_gl_LineString_ELEM:
    if (!x->LineString)
      x->LineString = (struct zx_gl_LineString_s*)el;
    return 1;

  default: return 0;
  }
}




int zx_DEC_ATTR_gl_MultiPoint(struct zx_ctx* c, struct zx_gl_MultiPoint_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_gid_ATTR:  x->gid = x->gg.attr; return 1;
    case zx_srsName_ATTR:  x->srsName = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_gl_MultiPoint(struct zx_ctx* c, struct zx_gl_MultiPoint_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_gl_Point_ELEM:
    if (!x->Point)
      x->Point = (struct zx_gl_Point_s*)el;
    return 1;

  default: return 0;
  }
}




int zx_DEC_ATTR_gl_MultiPolygon(struct zx_ctx* c, struct zx_gl_MultiPolygon_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_gid_ATTR:  x->gid = x->gg.attr; return 1;
    case zx_srsName_ATTR:  x->srsName = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_gl_MultiPolygon(struct zx_ctx* c, struct zx_gl_MultiPolygon_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_gl_Polygon_ELEM:
    if (!x->Polygon)
      x->Polygon = (struct zx_gl_Polygon_s*)el;
    return 1;
  case zx_gl_Box_ELEM:
    if (!x->Box)
      x->Box = (struct zx_gl_Box_s*)el;
    return 1;
  case zx_gl_CircularArea_ELEM:
    if (!x->CircularArea)
      x->CircularArea = (struct zx_gl_CircularArea_s*)el;
    return 1;
  case zx_gl_CircularArcArea_ELEM:
    if (!x->CircularArcArea)
      x->CircularArcArea = (struct zx_gl_CircularArcArea_s*)el;
    return 1;
  case zx_gl_EllipticalArea_ELEM:
    if (!x->EllipticalArea)
      x->EllipticalArea = (struct zx_gl_EllipticalArea_s*)el;
    return 1;

  default: return 0;
  }
}




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

  default: return 0;
  }
}

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

  default: return 0;
  }
}




int zx_DEC_ATTR_gl_Notification(struct zx_ctx* c, struct zx_gl_Notification_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_endReason_ATTR:  x->endReason = x->gg.attr; return 1;
    case zx_expires_ATTR:  x->expires = x->gg.attr; return 1;
    case zx_id_ATTR:  x->id = x->gg.attr; return 1;
    case zx_subscriptionID_ATTR:  x->subscriptionID = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_gl_Notification(struct zx_ctx* c, struct zx_gl_Notification_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_gl_ItemData_ELEM:
    if (!x->ItemData)
      x->ItemData = (struct zx_gl_ItemData_s*)el;
    return 1;

  default: return 0;
  }
}




int zx_DEC_ATTR_gl_Notify(struct zx_ctx* c, struct zx_gl_Notify_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_id_ATTR:  x->id = x->gg.attr; return 1;
    case zx_timeStamp_ATTR:  x->timeStamp = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_gl_Notify(struct zx_ctx* c, struct zx_gl_Notify_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_gl_Notification_ELEM:
    if (!x->Notification)
      x->Notification = (struct zx_gl_Notification_s*)el;
    return 1;
  case zx_gl_Extension_ELEM:
    if (!x->Extension)
      x->Extension = (struct zx_gl_Extension_s*)el;
    return 1;

  default: return 0;
  }
}




int zx_DEC_ATTR_gl_NotifyAdminTo(struct zx_ctx* c, struct zx_gl_NotifyAdminTo_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_id_ATTR:  x->id = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_gl_NotifyAdminTo(struct zx_ctx* c, struct zx_gl_NotifyAdminTo_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_gl_SecurityMechID_ELEM:
    if (!x->SecurityMechID)
      x->SecurityMechID = el;
    return 1;
  case zx_gl_Credential_ELEM:
    if (!x->Credential)
      x->Credential = (struct zx_gl_Credential_s*)el;
    return 1;
  case zx_gl_Endpoint_ELEM:
    if (!x->Endpoint)
      x->Endpoint = el;
    return 1;

  default: return 0;
  }
}




int zx_DEC_ATTR_gl_NotifyResponse(struct zx_ctx* c, struct zx_gl_NotifyResponse_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_id_ATTR:  x->id = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_gl_NotifyResponse(struct zx_ctx* c, struct zx_gl_NotifyResponse_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_gl_Status_ELEM:
    if (!x->Status)
      x->Status = (struct zx_gl_Status_s*)el;
    return 1;
  case zx_gl_Extension_ELEM:
    if (!x->Extension)
      x->Extension = (struct zx_gl_Extension_s*)el;
    return 1;

  default: return 0;
  }
}




int zx_DEC_ATTR_gl_NotifyTo(struct zx_ctx* c, struct zx_gl_NotifyTo_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_id_ATTR:  x->id = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_gl_NotifyTo(struct zx_ctx* c, struct zx_gl_NotifyTo_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_gl_SecurityMechID_ELEM:
    if (!x->SecurityMechID)
      x->SecurityMechID = el;
    return 1;
  case zx_gl_Credential_ELEM:
    if (!x->Credential)
      x->Credential = (struct zx_gl_Credential_s*)el;
    return 1;
  case zx_gl_Endpoint_ELEM:
    if (!x->Endpoint)
      x->Endpoint = el;
    return 1;

  default: return 0;
  }
}




int zx_DEC_ATTR_gl_Point(struct zx_ctx* c, struct zx_gl_Point_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_gid_ATTR:  x->gid = x->gg.attr; return 1;
    case zx_srsName_ATTR:  x->srsName = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_gl_Point(struct zx_ctx* c, struct zx_gl_Point_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_gl_coord_ELEM:
    if (!x->coord)
      x->coord = (struct zx_gl_coord_s*)el;
    return 1;

  default: return 0;
  }
}




int zx_DEC_ATTR_gl_Polygon(struct zx_ctx* c, struct zx_gl_Polygon_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_gid_ATTR:  x->gid = x->gg.attr; return 1;
    case zx_srsName_ATTR:  x->srsName = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_gl_Polygon(struct zx_ctx* c, struct zx_gl_Polygon_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_gl_outerBoundaryIs_ELEM:
    if (!x->outerBoundaryIs)
      x->outerBoundaryIs = (struct zx_gl_outerBoundaryIs_s*)el;
    return 1;
  case zx_gl_innerBoundaryIs_ELEM:
    if (!x->innerBoundaryIs)
      x->innerBoundaryIs = (struct zx_gl_innerBoundaryIs_s*)el;
    return 1;

  default: return 0;
  }
}




int zx_DEC_ATTR_gl_Query(struct zx_ctx* c, struct zx_gl_Query_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_id_ATTR:  x->id = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_gl_Query(struct zx_ctx* c, struct zx_gl_Query_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_gl_ResourceID_ELEM:
    if (!x->ResourceID)
      x->ResourceID = (struct zx_gl_ResourceID_s*)el;
    return 1;
  case zx_gl_EncryptedResourceID_ELEM:
    if (!x->EncryptedResourceID)
      x->EncryptedResourceID = (struct zx_gl_EncryptedResourceID_s*)el;
    return 1;
  case zx_gl_Subscription_ELEM:
    if (!x->Subscription)
      x->Subscription = (struct zx_gl_Subscription_s*)el;
    return 1;
  case zx_gl_QueryItem_ELEM:
    if (!x->QueryItem)
      x->QueryItem = (struct zx_gl_QueryItem_s*)el;
    return 1;
  case zx_gl_Extension_ELEM:
    if (!x->Extension)
      x->Extension = (struct zx_gl_Extension_s*)el;
    return 1;

  default: return 0;
  }
}




int zx_DEC_ATTR_gl_QueryItem(struct zx_ctx* c, struct zx_gl_QueryItem_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_count_ATTR:  x->count = x->gg.attr; return 1;
    case zx_offset_ATTR:  x->offset = x->gg.attr; return 1;
    case zx_setID_ATTR:  x->setID = x->gg.attr; return 1;
    case zx_setReq_ATTR:  x->setReq = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_gl_QueryItem(struct zx_ctx* c, struct zx_gl_QueryItem_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_gl_AreaComparison_ELEM:
    if (!x->AreaComparison)
      x->AreaComparison = (struct zx_gl_AreaComparison_s*)el;
    return 1;
  case zx_gl_eqop_ELEM:
    if (!x->eqop)
      x->eqop = (struct zx_gl_eqop_s*)el;
    return 1;
  case zx_gl_geoinfo_ELEM:
    if (!x->geoinfo)
      x->geoinfo = (struct zx_gl_geoinfo_s*)el;
    return 1;
  case zx_gl_loc_type_ELEM:
    if (!x->loc_type)
      x->loc_type = (struct zx_gl_loc_type_s*)el;
    return 1;
  case zx_gl_prio_ELEM:
    if (!x->prio)
      x->prio = (struct zx_gl_prio_s*)el;
    return 1;
  case zx_gl_Extension_ELEM:
    if (!x->Extension)
      x->Extension = (struct zx_gl_Extension_s*)el;
    return 1;

  default: return 0;
  }
}




int zx_DEC_ATTR_gl_QueryResponse(struct zx_ctx* c, struct zx_gl_QueryResponse_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_id_ATTR:  x->id = x->gg.attr; return 1;
    case zx_itemIDRef_ATTR:  x->itemIDRef = x->gg.attr; return 1;
    case zx_timeStamp_ATTR:  x->timeStamp = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_gl_QueryResponse(struct zx_ctx* c, struct zx_gl_QueryResponse_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_gl_Status_ELEM:
    if (!x->Status)
      x->Status = (struct zx_gl_Status_s*)el;
    return 1;
  case zx_gl_Data_ELEM:
    if (!x->Data)
      x->Data = (struct zx_gl_Data_s*)el;
    return 1;
  case zx_gl_Extension_ELEM:
    if (!x->Extension)
      x->Extension = (struct zx_gl_Extension_s*)el;
    return 1;

  default: return 0;
  }
}




int zx_DEC_ATTR_gl_RefItem(struct zx_ctx* c, struct zx_gl_RefItem_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_ItemIDRef_ATTR:  x->ItemIDRef = x->gg.attr; return 1;
    case zx_subscriptionID_ATTR:  x->subscriptionID = x->gg.attr; return 1;

  default: return 0;
  }
}

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

  default: return 0;
  }
}




int zx_DEC_ATTR_gl_ResourceID(struct zx_ctx* c, struct zx_gl_ResourceID_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_id_ATTR:  x->id = x->gg.attr; return 1;

  default: return 0;
  }
}

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

  default: return 0;
  }
}




int zx_DEC_ATTR_gl_Status(struct zx_ctx* c, struct zx_gl_Status_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_code_ATTR:  x->code = x->gg.attr; return 1;
    case zx_comment_ATTR:  x->comment = x->gg.attr; return 1;
    case zx_ref_ATTR:  x->ref = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_gl_Status(struct zx_ctx* c, struct zx_gl_Status_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_gl_Status_ELEM:
    if (!x->Status)
      x->Status = (struct zx_gl_Status_s*)el;
    return 1;

  default: return 0;
  }
}




int zx_DEC_ATTR_gl_Subscription(struct zx_ctx* c, struct zx_gl_Subscription_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_expires_ATTR:  x->expires = x->gg.attr; return 1;
    case zx_id_ATTR:  x->id = x->gg.attr; return 1;
    case zx_includeData_ATTR:  x->includeData = x->gg.attr; return 1;
    case zx_starts_ATTR:  x->starts = x->gg.attr; return 1;
    case zx_subscriptionID_ATTR:  x->subscriptionID = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_gl_Subscription(struct zx_ctx* c, struct zx_gl_Subscription_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_gl_ItemSelection_ELEM:
    if (!x->ItemSelection)
      x->ItemSelection = (struct zx_gl_ItemSelection_s*)el;
    return 1;
  case zx_gl_RefItem_ELEM:
    if (!x->RefItem)
      x->RefItem = (struct zx_gl_RefItem_s*)el;
    return 1;
  case zx_gl_NotifyTo_ELEM:
    if (!x->NotifyTo)
      x->NotifyTo = (struct zx_gl_NotifyTo_s*)el;
    return 1;
  case zx_gl_NotifyAdminTo_ELEM:
    if (!x->NotifyAdminTo)
      x->NotifyAdminTo = (struct zx_gl_NotifyAdminTo_s*)el;
    return 1;
  case zx_gl_Aggregation_ELEM:
    if (!x->Aggregation)
      x->Aggregation = el;
    return 1;
  case zx_gl_Trigger_ELEM:
    if (!x->Trigger)
      x->Trigger = (struct zx_gl_Trigger_s*)el;
    return 1;
  case zx_gl_Extension_ELEM:
    if (!x->Extension)
      x->Extension = (struct zx_gl_Extension_s*)el;
    return 1;

  default: return 0;
  }
}




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

  default: return 0;
  }
}

int zx_DEC_ELEM_gl_Trigger(struct zx_ctx* c, struct zx_gl_Trigger_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_gl_Granularity_ELEM:
    if (!x->Granularity)
      x->Granularity = el;
    return 1;
  case zx_gl_Interval_ELEM:
    if (!x->Interval)
      x->Interval = el;
    return 1;
  case zx_gl_ms_action_ELEM:
    if (!x->ms_action)
      x->ms_action = (struct zx_gl_ms_action_s*)el;
    return 1;
  case zx_gl_ChangeArea_ELEM:
    if (!x->ChangeArea)
      x->ChangeArea = (struct zx_gl_ChangeArea_s*)el;
    return 1;
  case zx_gl_Extension_ELEM:
    if (!x->Extension)
      x->Extension = (struct zx_gl_Extension_s*)el;
    return 1;

  default: return 0;
  }
}




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

  default: return 0;
  }
}

int zx_DEC_ELEM_gl_coord(struct zx_ctx* c, struct zx_gl_coord_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_gl_X_ELEM:
    if (!x->X)
      x->X = el;
    return 1;
  case zx_gl_Y_ELEM:
    if (!x->Y)
      x->Y = el;
    return 1;
  case zx_gl_Z_ELEM:
    if (!x->Z)
      x->Z = el;
    return 1;

  default: return 0;
  }
}




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

  default: return 0;
  }
}

int zx_DEC_ELEM_gl_eqop(struct zx_ctx* c, struct zx_gl_eqop_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_gl_resp_req_ELEM:
    if (!x->resp_req)
      x->resp_req = (struct zx_gl_resp_req_s*)el;
    return 1;
  case zx_gl_ll_acc_ELEM:
    if (!x->ll_acc)
      x->ll_acc = el;
    return 1;
  case zx_gl_hor_acc_ELEM:
    if (!x->hor_acc)
      x->hor_acc = el;
    return 1;
  case zx_gl_alt_acc_ELEM:
    if (!x->alt_acc)
      x->alt_acc = el;
    return 1;
  case zx_gl_max_loc_age_ELEM:
    if (!x->max_loc_age)
      x->max_loc_age = el;
    return 1;
  case zx_gl_Extension_ELEM:
    if (!x->Extension)
      x->Extension = (struct zx_gl_Extension_s*)el;
    return 1;

  default: return 0;
  }
}




int zx_DEC_ATTR_gl_esrd(struct zx_ctx* c, struct zx_gl_esrd_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_type_ATTR:  x->type = x->gg.attr; return 1;

  default: return 0;
  }
}

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

  default: return 0;
  }
}




int zx_DEC_ATTR_gl_esrk(struct zx_ctx* c, struct zx_gl_esrk_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_type_ATTR:  x->type = x->gg.attr; return 1;

  default: return 0;
  }
}

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

  default: return 0;
  }
}




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

  default: return 0;
  }
}

int zx_DEC_ELEM_gl_geoinfo(struct zx_ctx* c, struct zx_gl_geoinfo_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_gl_CoordinateReferenceSystem_ELEM:
    if (!x->CoordinateReferenceSystem)
      x->CoordinateReferenceSystem = (struct zx_gl_CoordinateReferenceSystem_s*)el;
    return 1;
  case zx_gl_CivilData_ELEM:
    if (!x->CivilData)
      x->CivilData = (struct zx_gl_CivilData_s*)el;
    return 1;
  case zx_gl_shape_ELEM:
    if (!x->shape)
      x->shape = (struct zx_gl_shape_s*)el;
    return 1;
  case zx_gl_speed_ELEM:
    if (!x->speed)
      x->speed = el;
    return 1;
  case zx_gl_alt_ELEM:
    if (!x->alt)
      x->alt = el;
    return 1;
  case zx_gl_direction_ELEM:
    if (!x->direction)
      x->direction = el;
    return 1;
  case zx_gl_Heading_ELEM:
    if (!x->Heading)
      x->Heading = el;
    return 1;
  case zx_gl_Extension_ELEM:
    if (!x->Extension)
      x->Extension = (struct zx_gl_Extension_s*)el;
    return 1;

  default: return 0;
  }
}




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

  default: return 0;
  }
}

int zx_DEC_ELEM_gl_innerBoundaryIs(struct zx_ctx* c, struct zx_gl_innerBoundaryIs_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_gl_LinearRing_ELEM:
    if (!x->LinearRing)
      x->LinearRing = (struct zx_gl_LinearRing_s*)el;
    return 1;

  default: return 0;
  }
}




int zx_DEC_ATTR_gl_loc_type(struct zx_ctx* c, struct zx_gl_loc_type_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_type_ATTR:  x->type = x->gg.attr; return 1;

  default: return 0;
  }
}

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

  default: return 0;
  }
}




int zx_DEC_ATTR_gl_ms_action(struct zx_ctx* c, struct zx_gl_ms_action_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_type_ATTR:  x->type = x->gg.attr; return 1;

  default: return 0;
  }
}

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

  default: return 0;
  }
}




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

  default: return 0;
  }
}

int zx_DEC_ELEM_gl_outerBoundaryIs(struct zx_ctx* c, struct zx_gl_outerBoundaryIs_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_gl_LinearRing_ELEM:
    if (!x->LinearRing)
      x->LinearRing = (struct zx_gl_LinearRing_s*)el;
    return 1;

  default: return 0;
  }
}




int zx_DEC_ATTR_gl_pd(struct zx_ctx* c, struct zx_gl_pd_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_ACC_ATTR|zx_gl_NS:  x->ACC = x->gg.attr; return 1;

  default: return 0;
  }
}

int zx_DEC_ELEM_gl_pd(struct zx_ctx* c, struct zx_gl_pd_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_gl_time_ELEM:
    if (!x->time)
      x->time = el;
    return 1;
  case zx_gl_CivilData_ELEM:
    if (!x->CivilData)
      x->CivilData = (struct zx_gl_CivilData_s*)el;
    return 1;
  case zx_gl_shape_ELEM:
    if (!x->shape)
      x->shape = (struct zx_gl_shape_s*)el;
    return 1;
  case zx_gl_alt_ELEM:
    if (!x->alt)
      x->alt = el;
    return 1;
  case zx_gl_alt_acc_ELEM:
    if (!x->alt_acc)
      x->alt_acc = el;
    return 1;
  case zx_gl_speed_ELEM:
    if (!x->speed)
      x->speed = el;
    return 1;
  case zx_gl_direction_ELEM:
    if (!x->direction)
      x->direction = el;
    return 1;
  case zx_gl_Heading_ELEM:
    if (!x->Heading)
      x->Heading = el;
    return 1;
  case zx_gl_lev_conf_ELEM:
    if (!x->lev_conf)
      x->lev_conf = el;
    return 1;
  case zx_gl_Extension_ELEM:
    if (!x->Extension)
      x->Extension = (struct zx_gl_Extension_s*)el;
    return 1;

  default: return 0;
  }
}




int zx_DEC_ATTR_gl_prio(struct zx_ctx* c, struct zx_gl_prio_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_type_ATTR:  x->type = x->gg.attr; return 1;

  default: return 0;
  }
}

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

  default: return 0;
  }
}




int zx_DEC_ATTR_gl_resp_req(struct zx_ctx* c, struct zx_gl_resp_req_s* x)
{
  switch (x->gg.attr->g.tok) {
    case zx_type_ATTR:  x->type = x->gg.attr; return 1;

  default: return 0;
  }
}

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

  default: return 0;
  }
}




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

  default: return 0;
  }
}

int zx_DEC_ELEM_gl_shape(struct zx_ctx* c, struct zx_gl_shape_s* x)
{
  struct zx_elem_s* el = x->gg.kids;
  switch (el->g.tok) {
  case zx_gl_Point_ELEM:
    if (!x->Point)
      x->Point = (struct zx_gl_Point_s*)el;
    return 1;
  case zx_gl_LineString_ELEM:
    if (!x->LineString)
      x->LineString = (struct zx_gl_LineString_s*)el;
    return 1;
  case zx_gl_Polygon_ELEM:
    if (!x->Polygon)
      x->Polygon = (struct zx_gl_Polygon_s*)el;
    return 1;
  case zx_gl_Box_ELEM:
    if (!x->Box)
      x->Box = (struct zx_gl_Box_s*)el;
    return 1;
  case zx_gl_CircularArea_ELEM:
    if (!x->CircularArea)
      x->CircularArea = (struct zx_gl_CircularArea_s*)el;
    return 1;
  case zx_gl_CircularArcArea_ELEM:
    if (!x->CircularArcArea)
      x->CircularArcArea = (struct zx_gl_CircularArcArea_s*)el;
    return 1;
  case zx_gl_EllipticalArea_ELEM:
    if (!x->EllipticalArea)
      x->EllipticalArea = (struct zx_gl_EllipticalArea_s*)el;
    return 1;
  case zx_gl_GeometryCollection_ELEM:
    if (!x->GeometryCollection)
      x->GeometryCollection = (struct zx_gl_GeometryCollection_s*)el;
    return 1;
  case zx_gl_MultiLineString_ELEM:
    if (!x->MultiLineString)
      x->MultiLineString = (struct zx_gl_MultiLineString_s*)el;
    return 1;
  case zx_gl_MultiPoint_ELEM:
    if (!x->MultiPoint)
      x->MultiPoint = (struct zx_gl_MultiPoint_s*)el;
    return 1;
  case zx_gl_MultiPolygon_ELEM:
    if (!x->MultiPolygon)
      x->MultiPolygon = (struct zx_gl_MultiPolygon_s*)el;
    return 1;
  case zx_gl_Extension_ELEM:
    if (!x->Extension)
      x->Extension = (struct zx_gl_Extension_s*)el;
    return 1;

  default: return 0;
  }
}


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