diff --git a/ChangeLog b/ChangeLog index 4b2a830f..2e3c4550 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +Sun Apr 18 21:46:17 CEST 2004 Daniel Veillard + + * xpath.c: work around Microsoft compiler NaN bug raise reported + by Mark Vakoc + * xmlschemas.c include/libxml/schemasInternals.h + include/libxml/xmlerror.h: fixed a recusive expection schemas + compilation error raised by taihei goi + Sun Apr 18 16:57:02 CEST 2004 Daniel Veillard * libxml.spec.in: keep the ChangeLog compressed diff --git a/include/libxml/schemasInternals.h b/include/libxml/schemasInternals.h index 280a7ae6..740747b2 100644 --- a/include/libxml/schemasInternals.h +++ b/include/libxml/schemasInternals.h @@ -222,6 +222,7 @@ struct _xmlSchemaType { xmlSchemaTypePtr baseType; xmlSchemaFacetPtr facets; struct _xmlSchemaType *redef;/* possible redefinitions for the type */ + int recurse; }; /* diff --git a/include/libxml/xmlerror.h b/include/libxml/xmlerror.h index f988d73c..76515582 100644 --- a/include/libxml/xmlerror.h +++ b/include/libxml/xmlerror.h @@ -546,6 +546,7 @@ typedef enum { XML_SCHEMAP_NOT_SCHEMA, /* 1771 */ XML_SCHEMAP_UNKNOWN_MEMBER_TYPE, /* 1772 */ XML_SCHEMAP_INVALID_ATTR_USE, /* 1723 */ + XML_SCHEMAP_RECURSIVE, /* 1724 */ XML_SCHEMAV_NOROOT = 1800, XML_SCHEMAV_UNDECLAREDELEM, /* 1801 */ XML_SCHEMAV_NOTTOPLEVEL, /* 1802 */ diff --git a/xmlschemas.c b/xmlschemas.c index f6bc63d4..25f94001 100644 --- a/xmlschemas.c +++ b/xmlschemas.c @@ -4548,7 +4548,16 @@ xmlSchemaTypeFixup(xmlSchemaTypePtr typeDecl, typeDecl->base, name); return; } + if (typeDecl->recurse) { + xmlSchemaPErr(ctxt, typeDecl->node, + XML_SCHEMAP_UNKNOWN_BASE_TYPE, + "Schemas: extension type %s is recursive\n", + name, NULL); + return; + } + typeDecl->recurse = 1; xmlSchemaTypeFixup(base, ctxt, NULL); + typeDecl->recurse = 0; if (explicitContentType == XML_SCHEMA_CONTENT_EMPTY) { /* 2.1 */ typeDecl->contentType = base->contentType; diff --git a/xpath.c b/xpath.c index 881e9367..ccf6c6cd 100644 --- a/xpath.c +++ b/xpath.c @@ -10917,7 +10917,12 @@ xmlXPathEvaluatePredicateResult(xmlXPathParserContextPtr ctxt, case XPATH_BOOLEAN: return(res->boolval); case XPATH_NUMBER: +#ifdef WIN32 + return(((res->floatval == ctxt->context->proximityPosition) && + (!xmlXPathIsNaN(res->floatval)) /* MSC pbm Mark Vadoc !*/); +#else return(res->floatval == ctxt->context->proximityPosition); +#endif case XPATH_NODESET: case XPATH_XSLT_TREE: if (res->nodesetval == NULL)