Lines Matching refs:xi
415 dav_xmlns_info *xi = apr_pcalloc(pool, sizeof(*xi));
417 xi->pool = pool;
418 xi->uri_prefix = apr_hash_make(pool);
419 xi->prefix_uri = apr_hash_make(pool);
421 return xi;
424 DAV_DECLARE(void) dav_xmlns_add(dav_xmlns_info *xi,
428 apr_hash_set(xi->prefix_uri, prefix, APR_HASH_KEY_STRING, uri);
432 apr_hash_set(xi->uri_prefix, uri, APR_HASH_KEY_STRING, prefix);
435 DAV_DECLARE(const char *) dav_xmlns_add_uri(dav_xmlns_info *xi,
440 if ((prefix = apr_hash_get(xi->uri_prefix, uri,
444 prefix = apr_psprintf(xi->pool, "g%d", xi->count++);
445 dav_xmlns_add(xi, prefix, uri);
449 DAV_DECLARE(const char *) dav_xmlns_get_uri(dav_xmlns_info *xi,
452 return apr_hash_get(xi->prefix_uri, prefix, APR_HASH_KEY_STRING);
455 DAV_DECLARE(const char *) dav_xmlns_get_prefix(dav_xmlns_info *xi,
458 return apr_hash_get(xi->uri_prefix, uri, APR_HASH_KEY_STRING);
461 DAV_DECLARE(void) dav_xmlns_generate(dav_xmlns_info *xi,
464 apr_hash_index_t *hi = apr_hash_first(xi->pool, xi->prefix_uri);
473 s = apr_psprintf(xi->pool, " xmlns:%s=\"%s\"",
475 apr_text_append(xi->pool, phdr, s);