MCPcopy Create free account
hub / github.com/apache/httpd / dav_propdb_define_namespaces

Function dav_propdb_define_namespaces

modules/dav/fs/dbm.c:541–564  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

539}
540
541static dav_error * dav_propdb_define_namespaces(dav_db *db, dav_xmlns_info *xi)
542{
543 int ns;
544 const char *uri = db->ns_table.buf + sizeof(dav_propdb_metadata);
545
546 /* within the prop values, we use "ns%d" for prefixes... register them */
547 for (ns = 0; ns < db->ns_count; ++ns, uri += strlen(uri) + 1) {
548
549 /* Empty URIs signify the empty namespace. These do not get a
550 namespace prefix. when we generate the value, we will simply
551 leave off the prefix, which is defined by mod_dav to be the
552 empty namespace. */
553 if (*uri == '\0')
554 continue;
555
556 /* ns_table.buf can move, so copy its value (we want the values to
557 last as long as the provided dav_xmlns_info). */
558 dav_xmlns_add(xi,
559 apr_psprintf(xi->pool, "ns%d", ns),
560 apr_pstrdup(xi->pool, uri));
561 }
562
563 return NULL;
564}
565
566static dav_error * dav_propdb_output_value(dav_db *db,
567 const dav_prop_name *name,

Callers

nothing calls this directly

Calls 1

dav_xmlns_addFunction · 0.85

Tested by

no test coverage detected