Commit 08171918 authored by William M. Brack's avatar William M. Brack
Browse files

edited a couple of comments in accordance with posting on the mailing list

* xmlschemas.c: edited a couple of comments in accordance with
  posting on the mailing list (no logic change)
* xpointer.c: working on Bug 129967, added check for NULL
  nodeset to prevent crash.  Further work required.
* xpath.c: working on Bug 129967, added code to handle
  XPATH_LOCATIONSET in RANGETO code, also added code to
  handle it in xmlXPathEvaluatePredicateResult.  Further
  work required.
parent b15351e5
Mon Dec 28 10:47:32 HKT 2003 William Brack <wbrack@mmm.com.hk>
* xmlschemas.c: edited a couple of comments in accordance with
posting on the mailing list (no logic change)
* xpointer.c: working on Bug 129967, added check for NULL
nodeset to prevent crash. Further work required.
* xpath.c: working on Bug 129967, added code to handle
XPATH_LOCATIONSET in RANGETO code, also added code to
handle it in xmlXPathEvaluatePredicateResult. Further
work required.
Sat Dec 27 12:32:58 HKT 2003 William Brack <wbrack@mmm.com.hk>
 
* xmlschemas.c: added tests for xs:all to assure minOccurs
......
......@@ -356,7 +356,7 @@ xmlSchemaVErr(xmlSchemaValidCtxtPtr ctxt, xmlNodePtr node, int error,
/**
* xmlSchemaNewSchema:
* @ctxt: a schema validation context (optional)
* @ctxt: a schema validation context
*
* Allocate a new Schema structure.
*
......@@ -402,7 +402,7 @@ xmlSchemaNewFacet(void)
/**
* xmlSchemaNewAnnot:
* @ctxt: a schema validation context (optional)
* @ctxt: a schema validation context
* @node: a node
*
* Allocate a new annotation structure.
......
This diff is collapsed.
......@@ -2771,6 +2771,10 @@ xmlXPtrStringRangeFunction(xmlXPathParserContextPtr ctxt, int nargs) {
XP_ERROR(XPATH_INVALID_TYPE)
set = valuePop(ctxt);
newset = xmlXPtrLocationSetCreate(NULL);
if (set->nodesetval == NULL) {
goto error;
}
if (set->type == XPATH_NODESET) {
xmlXPathObjectPtr tmp;
......@@ -2787,7 +2791,6 @@ xmlXPtrStringRangeFunction(xmlXPathParserContextPtr ctxt, int nargs) {
* The loop is to search for each element in the location set
* the list of location set corresponding to that search
*/
newset = xmlXPtrLocationSetCreate(NULL);
for (i = 0;i < oldset->locNr;i++) {
#ifdef DEBUG_RANGES
xmlXPathDebugDumpObject(stdout, oldset->locTab[i], 0);
......@@ -2851,6 +2854,7 @@ xmlXPtrStringRangeFunction(xmlXPathParserContextPtr ctxt, int nargs) {
/*
* Save the new value and cleanup
*/
error:
valuePush(ctxt, xmlXPtrWrapLocationSet(newset));
xmlXPathFreeObject(set);
xmlXPathFreeObject(string);
......
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