Commit df292f7a authored by Daniel Veillard's avatar Daniel Veillard
Browse files

better fix for #151694 not killing c14n regression tests fixing bug

* parser.c: better fix for #151694 not killing c14n regression tests
* xmlschemastypes.c: fixing bug #157653
Daniel
parent e3740edc
Sun Jan 16 19:58:36 CET 2005 Daniel Veillard <daniel@veillard.com>
* parser.c: better fix for #151694 not killing c14n regression tests
* xmlschemastypes.c: fixing bug #157653
Sun Jan 16 19:01:06 CET 2005 Daniel Veillard <daniel@veillard.com>
 
* parser.c: fixing bug #151694, line should always be set in the
......
......@@ -11500,7 +11500,9 @@ xmlCreateURLParserCtxt(const char *filename, int options)
return(NULL);
}
xmlCtxtUseOptions(ctxt, options);
if (options)
xmlCtxtUseOptions(ctxt, options);
ctxt->linenumbers = 1;
inputStream = xmlLoadExternalEntity(filename, NULL, ctxt);
if (inputStream == NULL) {
......
......@@ -2101,8 +2101,18 @@ xmlSchemaValAtomicType(xmlSchemaTypePtr type, const xmlChar * value,
goto done;
case XML_SCHEMAS_NAME:
ret = xmlValidateName(value, 1);
if ((ret == 0) && (val != NULL)) {
TODO;
if ((ret == 0) && (val != NULL) && (value != NULL)) {
v = xmlSchemaNewValue(XML_SCHEMAS_NAME);
if (v != NULL) {
const xmlChar *start = value, *end;
while (IS_BLANK_CH(*start)) start++;
end = start;
while ((*end != 0) && (!IS_BLANK_CH(*end))) end++;
v->value.str = xmlStrndup(start, end - start);
*val = v;
} else {
goto error;
}
}
goto done;
case XML_SCHEMAS_QNAME:{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment