publish::get_mime_handler (public)

 publish::get_mime_handler mime_type

Defined in packages/acs-content-repository/tcl/publish-procs.tcl

Parameters:
mime_type (required)
The full mime type, such as "text/html" or "image/jpg"
Returns:
The name of the proc which should be used to handle the mime-type, or an empty string on failure.
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 publish::handle_item publish::handle_item (private) publish::get_mime_handler publish::get_mime_handler publish::handle_item->publish::get_mime_handler publish::proc_exists publish::proc_exists (public) publish::get_mime_handler->publish::proc_exists

Testcases:
No testcase defined.
Source code:
  set mime_pair [split $mime_type "/"]
  lassign $mime_pair mime_prefix mime_suffix

  # Look for the specific handler
  if { [proc_exists "::publish::handle::${mime_prefix}" $mime_suffix] } {
    return "::publish::handle::${mime_prefix}::$mime_suffix"
  }

  # Look for the generic handler
  if { [proc_exists "::publish::handle" $mime_prefix] } {
    return "::publish::handle::${mime_prefix}"
  }

  # Failure
  return ""
Generic XQL file:
packages/acs-content-repository/tcl/publish-procs.xql

PostgreSQL XQL file:
packages/acs-content-repository/tcl/publish-procs-postgresql.xql

Oracle XQL file:
packages/acs-content-repository/tcl/publish-procs-oracle.xql

[ hide source ] | [ make this the default ]
Show another procedure: