xmlns.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include "dtd.h"
#include "parser.h"

Functions

static xmlnsxmlns_push (dtd_parser *p, const ichar *ns, const ochar *url)
void xmlns_free (sgml_environment *env)
xmlnsxmlns_find (sgml_environment *env, dtd_symbol *ns)
static icharisxmlns (const ichar *s, int nschr)
void update_xmlns (dtd_parser *p, dtd_element *e, int natts, sgml_attribute *atts)
int xmlns_resolve_attribute (dtd_parser *p, dtd_symbol *id, const ichar **local, const ichar **url)
int xmlns_resolve_element (dtd_parser *p, const ichar **local, const ichar **url)

Function Documentation

static ichar* isxmlns const ichar s,
int  nschr
[static]
 

Function to determine if the string is 'xmlns' Input : string, namespace character Output : Remaining string

void update_xmlns dtd_parser p,
dtd_element e,
int  natts,
sgml_attribute atts
 

Internal function to aid in xml ns processing

xmlns* xmlns_find sgml_environment env,
dtd_symbol ns
 

Find the namespace for a given symbol Input : pointer to eonvironment object, given symbol Output : namespace

void xmlns_free sgml_environment env  ) 
 

Free the xml environment object Input : pointer to environment object Output : none

static xmlns* xmlns_push dtd_parser p,
const ichar ns,
const ochar url
[static]
 

Pushes the xml namespace Input : pointer to parser object, namespace declaration, url Output : pointer to created namespace object

int xmlns_resolve_attribute dtd_parser p,
dtd_symbol id,
const ichar **  local,
const ichar **  url
 

  • - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - xmlns_resolve() Convert a symbol as returned by the XML level-1.0 parser to its namespace tuple {url}localname. This function is not used internally, but provided for use from the call-back functions of the parser.

It exploits the stack of namespace-environments managed by the parser itself (see update_xmlns())

  • - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

int xmlns_resolve_element dtd_parser p,
const ichar **  local,
const ichar **  url
 

  • - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Resolve the namespace for the current element. This namespace is stored in the environment as `thisns' and acts as default for resolving the namespaces of the attributes (see above).
  • - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -


Generated on Wed Jul 26 13:26:56 2006 for XSB by  doxygen 1.4.5