Top |
const char * | (*LassoRegistryTranslationFunction) () |
lasso_error_t | lasso_registry_default_add_direct_mapping () |
lasso_error_t | lasso_registry_default_add_functional_mapping () |
const char * | lasso_registry_default_get_mapping () |
A qualified name is a name or a string in the context of another name, or namespace. This object implement a function of a tuple (namespace, name, namespace) to a name. For the moment there is no need to enumerate all tuples (namespace, name) pair given a base pair, i.e. a function from tuple (namespace, name) to a list of tuples (namespace,name).
We support two kinds of mapping:
you can give a direct mapping between two QName,
or you can give a function that will manage mapping between one namespace and another one.
For internal use inside lasso we define the following namespaces:
For functional mappings the mapping function must return constant strings created using
g_intern_string()
or using g_type_name()
.
const char * (*LassoRegistryTranslationFunction) (const char *from_namespace
,const char *from_name
,const char *to_namespace
);
lasso_error_t lasso_registry_default_add_direct_mapping (const char *from_namespace
,const char *from_name
,const char *to_namespace
,const char *to_name
);
Add a new mapping from a QName to a QName.
lasso_error_t lasso_registry_default_add_functional_mapping (const char *from_namespace
,const char *to_namespace
,LassoRegistryTranslationFunction translation_function
);
from_namespace
: URI of the source namespace
to_namespace
: URI of the destination namespace
translation_function
: a function mapping string to string from the first namespace to the second one
Register a new mapping from from_namesapce to to_namespace using the translation_function into the default mapping. This functions is not forced to return a value for any string, it can return NULL.
const char * lasso_registry_default_get_mapping (const char *from_namespace
,const char *from_name
,const char *to_namespace
);
Retrieve the name of the QName in the namespace to_namespace that maps the QName from_namespace:from_name.