+static Z_APDU *create_xmlupdate_package(ZOOM_package p)
+{
+ Z_APDU *apdu = create_es_package(p, VAL_XMLUPDATE);
+ Z_ExtendedServicesRequest *req = apdu->u.extendedServicesRequest;
+ Z_External *ext = (Z_External *) odr_malloc(p->odr_out, sizeof(*ext));
+ const char *doc = ZOOM_options_get(p->options, "doc");
+
+ req->taskSpecificParameters = ext;
+ ext->direct_reference = req->packageType;
+ ext->descriptor = 0;
+ ext->indirect_reference = 0;
+
+ ext->which = Z_External_octet;
+ ext->u.single_ASN1_type = (Odr_oct *)
+ odr_malloc (p->odr_out, sizeof(Odr_oct));
+
+ if (!doc)
+ doc = "";
+ ext->u.single_ASN1_type->buf = (unsigned char*)
+ odr_strdup(p->odr_out, doc);
+ ext->u.single_ASN1_type->size = ext->u.single_ASN1_type->len = strlen(doc);
+ return apdu;
+}
+