XML Namespaces

## XML Namespaces XML Namespaces — Namespaces in XML include stacks of Namespaces |

## Functions

raptor_namespace * | raptor_new_namespace_from_uri ()
raptor_namespace_stack * | raptor_new_namespaces ()
int | raptor_namespaces_init ()
void | raptor_namespaces_clear ()
void | raptor_free_namespaces ()
void | raptor_namespaces_start_namespace ()
int | raptor_namespaces_start_namespace_full ()
void | raptor_namespaces_end_for_depth ()
raptor_namespace * | raptor_namespaces_get_default_namespace ()
raptor_namespace * | raptor_namespaces_find_namespace ()
raptor_namespace * | raptor_namespaces_find_namespace_by_uri ()
int | raptor_namespaces_namespace_in_scope ()
raptor_namespace * | raptor_new_namespace ()
void | raptor_free_namespace ()
raptor_uri * | raptor_namespace_get_uri ()
const unsigned char * | raptor_namespace_get_prefix ()
const unsigned char * | raptor_namespace_get_counted_prefix ()
int | raptor_namespace_write ()
int | raptor_namespace_stack_start_namespace ()
unsigned char * | raptor_namespace_format_as_xml ()
int | raptor_xml_namespace_string_parse ()

## Types and Values

typedef | raptor_namespace
typedef | raptor_namespace_stack

## Description

Two classes that provide an XML namespace - short prefix (or none) and absolute URI (or none) to match the form `xmlns...="..."` seen in XML. A stack of namespaces raptor_namespace_stack is also provided to handle in-scope namespace calculations that happen inside XML documents where inner namespaces can override outer ones.

## Functions

### raptor_new_namespace_from_uri ()

    raptor_namespace *
    raptor_new_namespace_from_uri (raptor_namespace_stack *nstack,
                                   const unsigned char *prefix,
                                   raptor_uri *ns_uri,
                                   int depth);

#### Returns

### raptor_new_namespaces ()

    raptor_namespace_stack *
    raptor_new_namespaces (raptor_world *world,
                           int defaults);

#### Returns

### raptor_namespaces_init ()

    int
    raptor_namespaces_init (raptor_world *world,
                            raptor_namespace_stack *nstack,
                            int defaults);

#### Returns

### raptor_namespaces_clear ()

    void
    raptor_namespaces_clear (raptor_namespace_stack *nstack);

### raptor_free_namespaces ()

    void
    raptor_free_namespaces (raptor_namespace_stack *nstack);

### raptor_namespaces_start_namespace ()

    void
    raptor_namespaces_start_namespace (raptor_namespace_stack *nstack,
                                       raptor_namespace *nspace);

### raptor_namespaces_start_namespace_full ()

    int
    raptor_namespaces_start_namespace_full
                                   (raptor_namespace_stack *nstack,
                                    const unsigned char *prefix,
                                    const unsigned char *ns_uri_string,
                                    int depth);

#### Returns

### raptor_namespaces_end_for_depth ()

    void
    raptor_namespaces_end_for_depth (raptor_namespace_stack *nstack,
                                     int depth);

### raptor_namespaces_get_default_namespace ()

    raptor_namespace *
    raptor_namespaces_get_default_namespace
                                   (raptor_namespace_stack *nstack);

#### Returns

### raptor_namespaces_find_namespace ()

    raptor_namespace *
    raptor_namespaces_find_namespace (raptor_namespace_stack *nstack,
                                      const unsigned char *prefix,
                                      int prefix_length);

#### Returns

### raptor_namespaces_find_namespace_by_uri ()

    raptor_namespace *
    raptor_namespaces_find_namespace_by_uri
                                   (raptor_namespace_stack *nstack,
                                    raptor_uri *ns_uri);

#### Returns

### raptor_namespaces_namespace_in_scope ()

    int
    raptor_namespaces_namespace_in_scope (raptor_namespace_stack *nstack,
                                          const raptor_namespace *nspace);

#### Returns

### raptor_new_namespace ()

    raptor_namespace *
    raptor_new_namespace (raptor_namespace_stack *nstack,
                          const unsigned char *prefix,
                          const unsigned char *ns_uri_string,
                          int depth);

#### Returns

### raptor_free_namespace ()

    void
    raptor_free_namespace (raptor_namespace *ns);

### raptor_namespace_get_uri ()

    raptor_uri *
    raptor_namespace_get_uri (const raptor_namespace *ns);

#### Returns

### raptor_namespace_get_prefix ()

    const unsigned char *
    raptor_namespace_get_prefix (const raptor_namespace *ns);

#### Returns

### raptor_namespace_get_counted_prefix ()

    const unsigned char *
    raptor_namespace_get_counted_prefix (const raptor_namespace *ns,
                                         size_t *length_p);

#### Returns

### raptor_namespace_write ()

    int
    raptor_namespace_write (raptor_namespace *ns,
                            raptor_iostream *iostr);

#### Returns

### raptor_namespace_stack_start_namespace ()

    int
    raptor_namespace_stack_start_namespace
                                   (raptor_namespace_stack *nstack,
                                    raptor_namespace *ns,
                                    int new_depth);

#### Returns

### raptor_namespace_format_as_xml ()

    unsigned char *
    raptor_namespace_format_as_xml (const raptor_namespace *ns,
                                    size_t *length_p);

#### Returns

### raptor_xml_namespace_string_parse ()

    int
    raptor_xml_namespace_string_parse (const unsigned char *string,
                                       unsigned char **prefix,
                                       unsigned char **uri_string);

#### Returns

## Types and Values

### raptor_namespace

    raptor_namespace* raptor_namespace;

Raptor XML Namespace class

### raptor_namespace_stack

    raptor_namespace_stack* raptor_namespace_stack;

Raptor XML Namespace Stack class