fehler in den namespaces

This commit is contained in:
Enno Rehling 2001-12-16 10:33:19 +00:00
parent 55969353e8
commit 4290439576
2 changed files with 6 additions and 5 deletions

View File

@ -203,7 +203,6 @@ parse_tagbegin(struct xml_stack *stack, void *data)
state->nrsection = tsection; state->nrsection = tsection;
mc_add(tsection); mc_add(tsection);
if (tlevel) state->nrlevel = atoi(tlevel); if (tlevel) state->nrlevel = atoi(tlevel);
return XML_OK;
} else if (strcasecmp(tag->name, "text")==0) { } else if (strcasecmp(tag->name, "text")==0) {
const char * zLocale = xml_value(tag, "locale"); const char * zLocale = xml_value(tag, "locale");
if (zLocale) { if (zLocale) {
@ -212,7 +211,6 @@ parse_tagbegin(struct xml_stack *stack, void *data)
state->lang = make_locale(zLocale); state->lang = make_locale(zLocale);
} }
} }
return XML_OK;
} else if (strcasecmp(tag->name, "arg")==0) { } else if (strcasecmp(tag->name, "arg")==0) {
if (state->mtname!=NULL) { if (state->mtname!=NULL) {
const char * zName = xml_value(tag, "name"); const char * zName = xml_value(tag, "name");
@ -221,8 +219,9 @@ parse_tagbegin(struct xml_stack *stack, void *data)
char zBuffer[128]; char zBuffer[128];
sprintf(zBuffer, "%s:%s", zName, zType); sprintf(zBuffer, "%s:%s", zName, zType);
state->argv[state->argc++] = strdup(zBuffer); state->argv[state->argc++] = strdup(zBuffer);
return XML_OK;
} }
} else {
return XML_USERERROR;
} }
} else if (strcasecmp(tag->name, "nr")==0) { } else if (strcasecmp(tag->name, "nr")==0) {
if (state->mtname!=NULL) { if (state->mtname!=NULL) {
@ -234,9 +233,11 @@ parse_tagbegin(struct xml_stack *stack, void *data)
} }
if (zLevel) state->nrlevel = atoi(zLevel); if (zLevel) state->nrlevel = atoi(zLevel);
} }
} } else {
return XML_USERERROR; return XML_USERERROR;
} }
return XML_OK;
}
static int static int
parse_tagend(struct xml_stack *stack, void *data) parse_tagend(struct xml_stack *stack, void *data)

View File

@ -185,7 +185,7 @@ const char *
mkname(const char * space, const char * name) mkname(const char * space, const char * name)
{ {
static char zBuffer[128]; static char zBuffer[128];
if (space) { if (space && *space) {
sprintf(zBuffer, "%s::%s", space, name); sprintf(zBuffer, "%s::%s", space, name);
} else { } else {
strcpy(zBuffer, name); strcpy(zBuffer, name);