+ res->available = eh->true_value;
+ return res;
+}
+
+Z_StringOrNumeric *f_stringOrNumeric (ExpHandle *eh, data1_node *n)
+{
+ Z_StringOrNumeric *res = (Z_StringOrNumeric *)
+ odr_malloc (eh->o, sizeof(*res));
+ data1_node *c;
+ for (c = n->child; c; c = c->next)
+ {
+ switch (is_numeric_tag (eh, c))
+ {
+ case 1001:
+ res->which = Z_StringOrNumeric_string;
+ res->u.string = f_string (eh, c);
+ break;
+ case 1002:
+ res->which = Z_StringOrNumeric_numeric;
+ res->u.numeric = f_integer (eh, c);
+ break;
+ }
+ }
+ return res;
+}
+
+Z_AttributeDescription *f_attributeDescription (
+ ExpHandle *eh, data1_node *n)
+{
+ Z_AttributeDescription *res = (Z_AttributeDescription *)
+ odr_malloc(eh->o, sizeof(*res));
+ data1_node *c;
+ int i = 0;
+
+ res->name = 0;
+ res->description = 0;
+ res->attributeValue = 0;
+ res->num_equivalentAttributes = 0;
+ res->equivalentAttributes = 0;
+
+ for (c = n->child; c; c = c->next)
+ {
+ switch (is_numeric_tag (eh, c))
+ {
+ case 102: res->name = f_string (eh, c); break;
+ case 113: res->description = f_humstring (eh, c); break;
+ case 710: res->attributeValue = f_stringOrNumeric (eh, c); break;
+ case 752: (res->num_equivalentAttributes++); break;
+ }
+ }
+ if (res->num_equivalentAttributes)
+ res->equivalentAttributes = (Z_StringOrNumeric **)
+ odr_malloc (eh->o, sizeof(*res->equivalentAttributes) *
+ res->num_equivalentAttributes);
+ for (c = n->child; c; c = c->next)
+ if (is_numeric_tag (eh, c) == 752)
+ res->equivalentAttributes[i++] = f_stringOrNumeric (eh, c);
+ return res;
+}
+
+Z_AttributeType *f_attributeType (ExpHandle *eh, data1_node *n)
+{
+ Z_AttributeType *res = (Z_AttributeType *)
+ odr_malloc(eh->o, sizeof(*res));
+ data1_node *c;
+
+ res->name = 0;
+ res->description = 0;
+ res->attributeType = 0;
+ res->num_attributeValues = 0;
+ res->attributeValues = 0;
+
+ for (c = n->child; c; c = c->next)
+ {
+ int i = 0;
+ switch (is_numeric_tag (eh, c))
+ {
+ case 102: res->name = f_string (eh, c); break;
+ case 113: res->description = f_humstring (eh, c); break;
+ case 704: res->attributeType = f_integer (eh, c); break;
+ case 708:
+ for (n = c->child; n; n = n->next)
+ {
+ if (is_numeric_tag(eh, n) != 709)
+ continue;
+ (res->num_attributeValues)++;
+ }
+ if (res->num_attributeValues)
+ res->attributeValues = (Z_AttributeDescription **)
+ odr_malloc (eh->o, res->num_attributeValues
+ * sizeof(*res->attributeValues));
+ for (n = c->child; n; n = n->next)
+ {
+ if (is_numeric_tag(eh, n) != 709)
+ continue;
+ res->attributeValues[i++] = f_attributeDescription (eh, n);
+ }
+ break;
+ }
+ }
+ return res;
+}
+
+Z_AttributeSetInfo *f_attributeSetInfo (ExpHandle *eh, data1_node *n)
+{
+ Z_AttributeSetInfo *res = (Z_AttributeSetInfo *)
+ odr_malloc(eh->o, sizeof(*res));
+ data1_node *c;
+
+ res->commonInfo = 0;
+ res->attributeSet = 0;
+ res->name = 0;
+ res->num_attributes = 0;
+ res->attributes = 0;
+ res->description = 0;
+ for (c = n->child; c; c = c->next)
+ {
+ int i = 0;
+ switch (is_numeric_tag (eh, c))
+ {
+ case 600: res->commonInfo = f_commonInfo (eh, c); break;
+ case 1000: res->attributeSet = f_oid (eh, c, CLASS_ATTSET); break;
+ case 102: res->name = f_string (eh, c); break;
+ case 750:
+ for (n = c->child; n; n = n->next)
+ {
+ if (is_numeric_tag(eh, n) != 751)
+ continue;
+ (res->num_attributes)++;
+ }
+ if (res->num_attributes)
+ res->attributes = (Z_AttributeType **)
+ odr_malloc (eh->o, res->num_attributes
+ * sizeof(*res->attributes));
+ for (n = c->child; n; n = n->next)
+ {
+ if (is_numeric_tag(eh, n) != 751)
+ continue;
+ res->attributes[i++] = f_attributeType (eh, n);
+ }
+ break;
+ case 113: res->description = f_humstring (eh, c); break;
+ }
+ }
+ return res;
+}
+
+Z_OmittedAttributeInterpretation *f_omittedAttributeInterpretation (
+ ExpHandle *eh, data1_node *n)
+{
+ Z_OmittedAttributeInterpretation *res = (Z_OmittedAttributeInterpretation*)
+ odr_malloc (eh->o, sizeof(*res));
+ data1_node *c;
+
+ res->defaultValue = 0;
+ res->defaultDescription = 0;
+ for (c = n->child; c; c = c->next)
+ {
+ switch (is_numeric_tag (eh, c))
+ {
+ case 706:
+ res->defaultValue = f_stringOrNumeric (eh, c);
+ break;
+ case 113:
+ res->defaultDescription = f_humstring(eh, c);
+ break;
+ }
+ }
+ return res;
+}
+
+Z_AttributeValue *f_attributeValue (ExpHandle *eh, data1_node *n)
+{
+ Z_AttributeValue *res = (Z_AttributeValue *)
+ odr_malloc (eh->o, sizeof(*res));
+ data1_node *c;
+
+ res->value = 0;
+ res->description = 0;
+ res->num_subAttributes = 0;
+ res->subAttributes = 0;
+ res->num_superAttributes = 0;
+ res->superAttributes = 0;
+ res->partialSupport = 0;
+ for (c = n->child; c; c = c->next)
+ {
+ int i = 0;
+ switch (is_numeric_tag (eh, c))
+ {
+ case 710:
+ res->value = f_stringOrNumeric (eh, c); break;
+ case 113:
+ res->description = f_humstring (eh, c); break;
+ case 712:
+ for (n = c->child; n; n = n->next)
+ {
+ if (is_numeric_tag(eh, n) != 713)
+ continue;
+ (res->num_subAttributes)++;
+ }
+ if (res->num_subAttributes)
+ res->subAttributes =
+ (Z_StringOrNumeric **)
+ odr_malloc (eh->o, res->num_subAttributes
+ * sizeof(*res->subAttributes));
+ for (n = c->child; n; n = n->next)
+ {
+ if (is_numeric_tag(eh, n) != 713)
+ continue;
+ res->subAttributes[i++] = f_stringOrNumeric (eh, n);
+ }
+ break;
+ case 714:
+ for (n = c->child; n; n = n->next)
+ {
+ if (is_numeric_tag(eh, n) != 715)
+ continue;
+ (res->num_superAttributes)++;
+ }
+ if (res->num_superAttributes)
+ res->superAttributes =
+ (Z_StringOrNumeric **)
+ odr_malloc (eh->o, res->num_superAttributes
+ * sizeof(*res->superAttributes));
+ for (n = c->child; n; n = n->next)
+ {
+ if (is_numeric_tag(eh, n) != 715)
+ continue;
+ res->superAttributes[i++] = f_stringOrNumeric (eh, n);
+ }
+ break;
+ case 711:
+ res->partialSupport = odr_nullval ();
+ break;
+ }
+ }
+ return res;
+}
+
+Z_AttributeTypeDetails *f_attributeTypeDetails (ExpHandle *eh, data1_node *n)
+{
+ Z_AttributeTypeDetails *res = (Z_AttributeTypeDetails *)
+ odr_malloc(eh->o, sizeof(*res));
+ data1_node *c;
+ res->attributeType = 0;
+ res->defaultIfOmitted = 0;
+ res->num_attributeValues = 0;
+ res->attributeValues = 0;
+ for (c = n->child; c; c = c->next)
+ {
+ int i = 0;
+ switch (is_numeric_tag (eh, c))
+ {
+ case 704: res->attributeType = f_integer (eh, c); break;
+ case 705:
+ res->defaultIfOmitted = f_omittedAttributeInterpretation (eh, c);
+ break;
+ case 708:
+ for (n = c->child; n; n = n->next)
+ {
+ if (is_numeric_tag(eh, n) != 709)
+ continue;
+ (res->num_attributeValues)++;
+ }
+ if (res->num_attributeValues)
+ res->attributeValues =
+ (Z_AttributeValue **)
+ odr_malloc (eh->o, res->num_attributeValues
+ * sizeof(*res->attributeValues));
+ for (n = c->child; n; n = n->next)
+ {
+ if (is_numeric_tag(eh, n) != 709)
+ continue;
+ res->attributeValues[i++] = f_attributeValue (eh, n);
+ }
+ break;
+ }
+ }
+ return res;
+}
+
+Z_AttributeSetDetails *f_attributeSetDetails (ExpHandle *eh, data1_node *n)
+{
+ Z_AttributeSetDetails *res = (Z_AttributeSetDetails *)
+ odr_malloc(eh->o, sizeof(*res));
+ data1_node *c;
+
+ res->attributeSet = 0;
+ res->num_attributesByType = 0;
+ res->attributesByType = 0;
+ for (c = n->child; c; c = c->next)
+ {
+ int i = 0;
+ switch (is_numeric_tag (eh, c))
+ {
+ case 1000: res->attributeSet = f_oid(eh, c, CLASS_ATTSET); break;
+ case 702:
+ for (n = c->child; n; n = n->next)
+ {
+ if (is_numeric_tag(eh, n) != 703)
+ continue;
+ (res->num_attributesByType)++;
+ }
+ if (res->num_attributesByType)
+ res->attributesByType =
+ (Z_AttributeTypeDetails **)
+ odr_malloc (eh->o, res->num_attributesByType
+ * sizeof(*res->attributesByType));
+ for (n = c->child; n; n = n->next)
+ {
+ if (is_numeric_tag(eh, n) != 703)
+ continue;
+ res->attributesByType[i++] = f_attributeTypeDetails (eh, n);
+ }
+ break;
+ }
+ }
+ return res;
+}
+
+Z_AttributeValueList *f_attributeValueList (ExpHandle *eh, data1_node *n)
+{
+ Z_AttributeValueList *res = (Z_AttributeValueList *)
+ odr_malloc (eh->o, sizeof(*res));
+ data1_node *c;
+ int i = 0;
+
+ res->num_attributes = 0;
+ res->attributes = 0;
+ for (c = n->child; c; c = c->next)
+ if (is_numeric_tag (eh, c) == 710)
+ (res->num_attributes)++;
+ if (res->num_attributes)
+ {
+ res->attributes = (Z_StringOrNumeric **)
+ odr_malloc (eh->o, res->num_attributes * sizeof(*res->attributes));
+ }
+ for (c = n->child; c; c = c->next)
+ if (is_numeric_tag(eh, c) == 710)
+ res->attributes[i++] = f_stringOrNumeric (eh, c);
+ return res;
+}
+
+Z_AttributeOccurrence *f_attributeOccurrence (ExpHandle *eh, data1_node *n)
+{
+ Z_AttributeOccurrence *res = (Z_AttributeOccurrence *)
+ odr_malloc (eh->o, sizeof(*res));
+ data1_node *c;
+
+ res->attributeSet = 0;
+ res->attributeType = 0;
+ res->mustBeSupplied = 0;
+ res->which = Z_AttributeOcc_any_or_none;
+ res->attributeValues.any_or_none = odr_nullval ();
+
+ for (c = n->child; c; c = c->next)
+ {
+ switch (is_numeric_tag (eh, c))
+ {
+ case 1000:
+ res->attributeSet = f_oid (eh, c, CLASS_ATTSET); break;
+ case 704:
+ res->attributeType = f_integer (eh, c); break;
+ case 720:
+ res->mustBeSupplied = odr_nullval (); break;
+ case 721:
+ res->which = Z_AttributeOcc_any_or_none;
+ res->attributeValues.any_or_none = odr_nullval ();
+ break;
+ case 722:
+ res->which = Z_AttributeOcc_specific;
+ res->attributeValues.specific = f_attributeValueList (eh, c);
+ break;
+ }
+ }
+ return res;
+}
+
+Z_AttributeCombination *f_attributeCombination (ExpHandle *eh, data1_node *n)
+{
+ Z_AttributeCombination *res = (Z_AttributeCombination *)
+ odr_malloc (eh->o, sizeof(*res));
+ data1_node *c;
+ int i = 0;
+
+ res->num_occurrences = 0;
+ res->occurrences = 0;
+ for (c = n->child; c; c = c->next)
+ if (is_numeric_tag (eh, c) == 719)
+ (res->num_occurrences)++;
+ if (res->num_occurrences)
+ {
+ res->occurrences = (Z_AttributeOccurrence **)
+ odr_malloc (eh->o, res->num_occurrences * sizeof(*res->occurrences));
+ }
+ for (c = n->child; c; c = c->next)
+ if (is_numeric_tag(eh, c) == 719)
+ res->occurrences[i++] = f_attributeOccurrence (eh, c);
+ assert (res->num_occurrences);
+ return res;
+}
+
+Z_AttributeCombinations *f_attributeCombinations (ExpHandle *eh, data1_node *n)
+{
+ Z_AttributeCombinations *res = (Z_AttributeCombinations *)
+ odr_malloc (eh->o, sizeof(*res));
+ data1_node *c;
+ res->defaultAttributeSet = 0;
+ res->num_legalCombinations = 0;
+ res->legalCombinations = 0;
+
+ for (c = n->child; c; c = c->next)
+ {
+ int i = 0;
+ switch (is_numeric_tag (eh, c))
+ {
+ case 1000:
+ res->defaultAttributeSet = f_oid (eh, c, CLASS_ATTSET);
+ break;
+ case 717:
+ for (n = c->child; n; n = n->next)
+ {
+ if (is_numeric_tag(eh, n) != 718)
+ continue;
+ (res->num_legalCombinations)++;
+ }
+ if (res->num_legalCombinations)
+ res->legalCombinations =
+ (Z_AttributeCombination **)
+ odr_malloc (eh->o, res->num_legalCombinations
+ * sizeof(*res->legalCombinations));
+ for (n = c->child; n; n = n->next)
+ {
+ if (is_numeric_tag(eh, n) != 718)
+ continue;
+ res->legalCombinations[i++] = f_attributeCombination (eh, n);
+ }
+ break;
+ }
+ }
+ assert (res->num_legalCombinations);
+ return res;
+}
+
+Z_AttributeDetails *f_attributeDetails (ExpHandle *eh, data1_node *n)
+{
+ Z_AttributeDetails *res = (Z_AttributeDetails *)
+ odr_malloc(eh->o, sizeof(*res));
+ data1_node *c;
+
+ res->commonInfo = 0;
+ res->databaseName = 0;
+ res->num_attributesBySet = 0;
+ res->attributesBySet = NULL;
+ res->attributeCombinations = NULL;
+
+ for (c = n->child; c; c = c->next)
+ {
+ int i = 0;
+ switch (is_numeric_tag (eh, c))
+ {
+ case 600: res->commonInfo = f_commonInfo(eh, c); break;
+ case 102: res->databaseName = f_string (eh, c); break;
+ case 700:
+ for (n = c->child; n; n = n->next)
+ {
+ if (is_numeric_tag(eh, n) != 701)
+ continue;
+ (res->num_attributesBySet)++;
+ }
+ if (res->num_attributesBySet)
+ res->attributesBySet =
+ (Z_AttributeSetDetails **)
+ odr_malloc (eh->o, res->num_attributesBySet
+ * sizeof(*res->attributesBySet));
+ for (n = c->child; n; n = n->next)
+ {
+ if (is_numeric_tag(eh, n) != 701)
+ continue;
+ res->attributesBySet[i++] = f_attributeSetDetails (eh, n);
+ }
+ break;
+ case 716:
+ res->attributeCombinations = f_attributeCombinations (eh, c);
+ break;
+ }
+ }