# namespace
[AXIOM]

## Typedefs
typedef struct axiom_namespace | axiom_namespace_t
## Functions
AXIS2_EXTERN axiom_namespace_t * | axiom_namespace_create (const axutil_env_t *env, const axis2_char_t *uri, const axis2_char_t *prefix)
AXIS2_EXTERN void | axiom_namespace_free (struct axiom_namespace *om_namespace, const axutil_env_t *env)
AXIS2_EXTERN axis2_bool_t | axiom_namespace_equals (struct axiom_namespace *om_namespace, const axutil_env_t *env, struct axiom_namespace *om_namespace1)
AXIS2_EXTERN axis2_status_t | axiom_namespace_serialize (struct axiom_namespace *om_namespace, const axutil_env_t *env, axiom_output_t *om_output)
AXIS2_EXTERN axis2_char_t * | axiom_namespace_get_uri (struct axiom_namespace *om_namespace, const axutil_env_t *env)
AXIS2_EXTERN axis2_char_t * | axiom_namespace_get_prefix (struct axiom_namespace *om_namespace, const axutil_env_t *env)
AXIS2_EXTERN struct axiom_namespace * | axiom_namespace_clone (struct axiom_namespace *om_namespace, const axutil_env_t *env)
AXIS2_EXTERN axis2_char_t * | axiom_namespace_to_string (struct axiom_namespace *om_namespace, const axutil_env_t *env)
AXIS2_EXTERN axis2_status_t | axiom_namespace_increment_ref (struct axiom_namespace *om_namespace, const axutil_env_t *env)
AXIS2_EXTERN axiom_namespace_t * | axiom_namespace_create_str (const axutil_env_t *env, axutil_string_t *uri, axutil_string_t *prefix)
AXIS2_EXTERN axis2_status_t | axiom_namespace_set_uri_str (axiom_namespace_t *om_namespace, const axutil_env_t *env, axutil_string_t *uri)
AXIS2_EXTERN axutil_string_t * | axiom_namespace_get_uri_str (axiom_namespace_t *om_namespace, const axutil_env_t *env)
AXIS2_EXTERN axutil_string_t * | axiom_namespace_get_prefix_str (axiom_namespace_t *om_namespace, const axutil_env_t *env)

## Function Documentation

AXIS2_EXTERN struct axiom_namespace* axiom_namespace_clone | ( | struct axiom_namespace * | om_namespace,
|  | const axutil_env_t * | env |
| ) |  |  | `[read]`

Clones an om_namespace struct

Parameters:

  | om_namespace | pointer to namespace struct
  | env | Environment. MUST NOT be NULL

Returns:
  axiom_namespace on success , NULL on error

AXIS2_EXTERN axiom_namespace_t* axiom_namespace_create | ( | const axutil_env_t * | env,
|  | const axis2_char_t * | uri,
|  | const axis2_char_t * | prefix |
| ) |  |  |

Creates a namespace struct

Parameters:

  | uri | namespace URI
  | prefix | namespace prefix

Returns:
  a pointer to newly created namespace struct

AXIS2_EXTERN axiom_namespace_t* axiom_namespace_create_str | ( | const axutil_env_t * | env,
|  | axutil_string_t * | uri,
|  | axutil_string_t * | prefix |
| ) |  |  |

Create an OM namespace from a URI and a Prefix

Parameters:

  | om_namespace | pointer to the axiom namespace struct
  | env | Environment. MUST NOT be NULL

Returns:
  created OM namespace

AXIS2_EXTERN axis2_bool_t axiom_namespace_equals | ( | struct axiom_namespace * | om_namespace,
|  | const axutil_env_t * | env,
|  | struct axiom_namespace * | om_namespace1 |
| ) |  |  |

Compares two namepsaces

Parameters:

  | om_namespace | first namespase to be compared
  | env | Environment. MUST NOT be NULL.
  | om_namespace1 | second namespace to be compared

Returns:
  AXIS2_TRUE if the two namespaces are equal,AXIS2_FALSE otherwise

AXIS2_EXTERN void axiom_namespace_free | ( | struct axiom_namespace * | om_namespace,
|  | const axutil_env_t * | env |
| ) |  |  |

Frees given AXIOM namespcae

Parameters:

  | om_namespace | namespace to be freed.
  | env | Environment. MUST NOT be NULL.

Returns:
  satus of the op. AXIS2_SUCCESS on success else AXIS2_FAILURE.

AXIS2_EXTERN axis2_char_t* axiom_namespace_get_prefix | ( | struct axiom_namespace * | om_namespace,
|  | const axutil_env_t * | env |
| ) |  |  |

Parameters:

  | om_namespace | pointer to om namespace struct
  | env | environment, MUST NOT be NULL

Returns:
  prefix , NULL on error

AXIS2_EXTERN axutil_string_t* axiom_namespace_get_prefix_str | ( | axiom_namespace_t * | om_namespace,
|  | const axutil_env_t * | env |
| ) |  |  |

Get the prefix as a string

Parameters:

  | om_namespace | pointer to the axiom namespace struct
  | env | Environment. MUST NOT be NULL

Returns:
  the prefix as a string

AXIS2_EXTERN axis2_char_t* axiom_namespace_get_uri | ( | struct axiom_namespace * | om_namespace,
|  | const axutil_env_t * | env |
| ) |  |  |

Parameters:

  | om_namespace | pointer to om_namespace struct
  | env | environment , MUST NOT be NULL.

Returns:
  namespace uri , NULL on error

AXIS2_EXTERN axutil_string_t* axiom_namespace_get_uri_str | ( | axiom_namespace_t * | om_namespace,
|  | const axutil_env_t * | env |
| ) |  |  |

Get the uri as a string

Parameters:

  | om_namespace | pointer to the axiom namespace struct
  | env | Environment. MUST NOT be NULL

Returns:
  the uri as a string

AXIS2_EXTERN axis2_status_t axiom_namespace_increment_ref | ( | struct axiom_namespace * | om_namespace,
|  | const axutil_env_t * | env |
| ) |  |  |

Incerament the reference value. The struct will be freed when the ref value is zero

Parameters:

  | om_namespace | pointer to the axiom namespace struct
  | env | Environment. MUST NOT be NULL

Returns:
  AXIS2_SUCCESS on success else AXIS2_FAILURE

AXIS2_EXTERN axis2_status_t axiom_namespace_serialize | ( | struct axiom_namespace * | om_namespace,
|  | const axutil_env_t * | env,
|  | axiom_output_t * | om_output |
| ) |  |  |

Serializes given namespace

Parameters:

  | om_namespace | namespace to be serialized.
  | env | Environment. MUST NOT be NULL.
  | om_output | AXIOM output handler to be used in serializing

Returns:
  satus of the op. AXIS2_SUCCESS on success else AXIS2_FAILURE.

AXIS2_EXTERN axis2_status_t axiom_namespace_set_uri_str | ( | axiom_namespace_t * | om_namespace,
|  | const axutil_env_t * | env,
|  | axutil_string_t * | uri |
| ) |  |  |

Set the uri string

Parameters:

  | om_namespace | pointer to the axiom namespace struct
  | env | Environment. MUST NOT be NULL

Returns:
  AXIS2_SUCCESS on success else AXIS2_FAILURE

AXIS2_EXTERN axis2_char_t* axiom_namespace_to_string | ( | struct axiom_namespace * | om_namespace,
|  | const axutil_env_t * | env |
| ) |  |  |

to string , returns the string by combining namespace_uri, and prefix seperated by a '|' character

Parameters:

  | om_namespace |
  | env | Environment. MUST NOT be NULL

Returns:
  pointer to string , This is a property of namespace, should not be freed by user