more bugfixes updated the results Daniel

* relaxng.c: more bugfixes
* result/relaxng/*: updated the results
Daniel
This commit is contained in:
Daniel Veillard 2003-02-19 17:32:48 +00:00
parent 7e1d158a73
commit ce14fa545f
32 changed files with 113 additions and 52 deletions

View File

@ -1,3 +1,8 @@
Wed Feb 19 18:30:30 CET 2003 Daniel Veillard <daniel@veillard.com>
* relaxng.c: more bugfixes
* result/relaxng/*: updated the results
Wed Feb 19 15:39:56 CET 2003 Igor Zlatkovic <igor@zlatkovic.com>
* DOCBparser.c: obsoleted xmlNormalizeWindowsPath

View File

@ -709,6 +709,47 @@ xmlRelaxNGCopyValidState(xmlRelaxNGValidCtxtPtr ctxt,
return(ret);
}
/**
* xmlRelaxNGEqualValidState:
* @ctxt: a Relax-NG validation context
* @state1: a validation state
* @state2: a validation state
*
* Compare the validation states for equality
*
* Returns 1 if equald, 0 otherwise
*/
static int
xmlRelaxNGEqualValidState(xmlRelaxNGValidCtxtPtr ctxt ATTRIBUTE_UNUSED,
xmlRelaxNGValidStatePtr state1,
xmlRelaxNGValidStatePtr state2)
{
int i;
if ((state1 == NULL) || (state2 == NULL))
return(0);
if (state1 == state2)
return(1);
if (state1->node != state2->node)
return(0);
if (state1->seq != state2->seq)
return(0);
if (state1->nbAttrLeft != state2->nbAttrLeft)
return(0);
if (state1->nbAttrs != state2->nbAttrs)
return(0);
if (state1->endvalue != state2->endvalue)
return(0);
if ((state1->value != state2->value) &&
(!xmlStrEqual(state1->value, state2->value)))
return(0);
for (i = 0;i < state1->nbAttrs;i++) {
if (state1->attrs[i] != state2->attrs[i])
return(0);
}
return(1);
}
/**
* xmlRelaxNGFreeValidState:
* @state: a validation state structure
@ -5965,21 +6006,25 @@ xmlRelaxNGValidateDefinition(xmlRelaxNGValidCtxtPtr ctxt,
ret = -1;
break;
case XML_RELAXNG_TEXT:
#if 0
if (node == NULL) {
ret = 0;
break;
}
#endif
while ((node != NULL) &&
((node->type == XML_TEXT_NODE) ||
(node->type == XML_COMMENT_NODE) ||
(node->type == XML_PI_NODE) ||
(node->type == XML_CDATA_SECTION_NODE)))
node = node->next;
#if 0
if (node == ctxt->state->seq) {
VALID_CTXT();
VALID_ERROR("Expecting text content\n");
ret = -1;
}
#endif
ctxt->state->seq = node;
break;
case XML_RELAXNG_ELEMENT:
@ -6149,6 +6194,7 @@ xmlRelaxNGValidateDefinition(xmlRelaxNGValidCtxtPtr ctxt,
}
case XML_RELAXNG_CHOICE: {
xmlRelaxNGDefinePtr list = define->content;
int success = 0;
oldflags = ctxt->flags;
ctxt->flags |= FLAGS_IGNORABLE;
@ -6157,14 +6203,24 @@ xmlRelaxNGValidateDefinition(xmlRelaxNGValidCtxtPtr ctxt,
oldstate = xmlRelaxNGCopyValidState(ctxt, ctxt->state);
ret = xmlRelaxNGValidateDefinition(ctxt, list);
if (ret == 0) {
xmlRelaxNGFreeValidState(oldstate);
break;
if (xmlRelaxNGEqualValidState(ctxt, ctxt->state, oldstate)){
/*
* if that pattern was nullable flag it but try
* to make more progresses
*/
success = 1;
} else {
xmlRelaxNGFreeValidState(oldstate);
break;
}
}
xmlRelaxNGFreeValidState(ctxt->state);
ctxt->state = oldstate;
list = list->next;
}
ctxt->flags = oldflags;
if (success == 1)
ret = 0;
break;
}
case XML_RELAXNG_DEF:

View File

@ -1 +1 @@
Unimplemented block at relaxng.c:5656
Unimplemented block at relaxng.c:5697

View File

@ -1,4 +1,4 @@
error detected at relaxng.c:5840
error detected at relaxng.c:5881
Expecting a namespace for element foo
error detected at relaxng.c:6406
error detected at relaxng.c:6462
extra data on the document

View File

@ -1,4 +1,4 @@
error detected at relaxng.c:5845
error detected at relaxng.c:5886
Expecting element foo has wrong namespace: expecting http://www.example.com
error detected at relaxng.c:6406
error detected at relaxng.c:6462
extra data on the document

View File

@ -1,4 +1,4 @@
error detected at relaxng.c:5845
error detected at relaxng.c:5886
Expecting element foo has wrong namespace: expecting http://www.example.com
error detected at relaxng.c:6406
error detected at relaxng.c:6462
extra data on the document

View File

@ -1,4 +1,4 @@
error detected at relaxng.c:5857
error detected at relaxng.c:5898
Expecting no namespace for element foo
error detected at relaxng.c:6406
error detected at relaxng.c:6462
extra data on the document

View File

@ -1,4 +1,4 @@
error detected at relaxng.c:5857
error detected at relaxng.c:5898
Expecting no namespace for element foo
error detected at relaxng.c:6406
error detected at relaxng.c:6462
extra data on the document

View File

@ -1,2 +1,2 @@
error detected at relaxng.c:6047
error detected at relaxng.c:6092
Extra content for element addressBook: card

View File

@ -1,2 +1,2 @@
error detected at relaxng.c:6047
error detected at relaxng.c:6092
Extra content for element addressBook: card

View File

@ -1,2 +1,2 @@
error detected at relaxng.c:6060
error detected at relaxng.c:6105
Invalid attribute foo for element card

View File

@ -1,2 +1,2 @@
error detected at relaxng.c:6060
error detected at relaxng.c:6105
Invalid attribute b for element card

View File

@ -1 +1 @@
Unimplemented block at relaxng.c:5656
Unimplemented block at relaxng.c:5697

View File

@ -1,4 +1,4 @@
error detected at relaxng.c:5832
error detected at relaxng.c:5873
Expecting element name, got email
error detected at relaxng.c:6047
error detected at relaxng.c:6092
Extra content for element card: email

View File

@ -1,2 +1,2 @@
error detected at relaxng.c:6047
error detected at relaxng.c:6092
Extra content for element addressBook: card

View File

@ -1,2 +1,2 @@
error detected at relaxng.c:6406
error detected at relaxng.c:6462
extra data on the document

View File

@ -1,6 +1,6 @@
error detected at relaxng.c:6200
error detected at relaxng.c:6256
Element bad has child elements
error detected at relaxng.c:5994
error detected at relaxng.c:6039
Expecting an element got 3 type
error detected at relaxng.c:6047
error detected at relaxng.c:6092
Extra content for element bad: text

View File

@ -1,2 +1,2 @@
error detected at relaxng.c:6060
error detected at relaxng.c:6105
Invalid attribute preferredFormat for element card

View File

@ -1,2 +1,2 @@
error detected at relaxng.c:6047
error detected at relaxng.c:6092
Extra content for element preferredFormat: text

View File

@ -1,2 +1,2 @@
error detected at relaxng.c:6060
error detected at relaxng.c:6105
Invalid attribute preferredFormat for element card

View File

@ -1,6 +1,6 @@
error detected at relaxng.c:4943
error detected at relaxng.c:4984
Internal: failed to validate type float
error detected at relaxng.c:6338
error detected at relaxng.c:6394
error validating list
error detected at relaxng.c:6047
error detected at relaxng.c:6092
Extra content for element vector: text

View File

@ -1,6 +1,6 @@
error detected at relaxng.c:5183
error detected at relaxng.c:5224
Extra data in list: 5.6
error detected at relaxng.c:6338
error detected at relaxng.c:6394
error validating list
error detected at relaxng.c:6047
error detected at relaxng.c:6092
Extra content for element vector: text

View File

@ -1,4 +1,4 @@
error detected at relaxng.c:4943
error detected at relaxng.c:4984
Internal: failed to validate type double
error detected at relaxng.c:6338
error detected at relaxng.c:6394
error validating list

View File

@ -1,6 +1,6 @@
error detected at relaxng.c:5183
error detected at relaxng.c:5224
Extra data in list: 5.6
error detected at relaxng.c:6338
error detected at relaxng.c:6394
error validating list
error detected at relaxng.c:6047
error detected at relaxng.c:6092
Extra content for element path: text

View File

@ -1,6 +1,6 @@
error detected at relaxng.c:4943
error detected at relaxng.c:4984
Internal: failed to validate type double
error detected at relaxng.c:6338
error detected at relaxng.c:6394
error validating list
error detected at relaxng.c:6047
error detected at relaxng.c:6092
Extra content for element path: text

View File

@ -1,4 +1,4 @@
Unimplemented block at relaxng.c:5656
Unimplemented block at relaxng.c:5656
error detected at relaxng.c:6047
Unimplemented block at relaxng.c:5697
Unimplemented block at relaxng.c:5697
error detected at relaxng.c:6092
Extra content for element head: meta

View File

@ -1,4 +1,4 @@
error detected at relaxng.c:5988
error detected at relaxng.c:6033
Expecting an element, got empty
error detected at relaxng.c:6047
error detected at relaxng.c:6092
Extra content for element head: meta

View File

@ -1,2 +1,2 @@
error detected at relaxng.c:6047
error detected at relaxng.c:6092
Extra content for element head: base

View File

@ -1,2 +1,2 @@
error detected at relaxng.c:6047
error detected at relaxng.c:6092
Extra content for element addressBook: card

View File

@ -1,2 +1,2 @@
error detected at relaxng.c:6047
error detected at relaxng.c:6092
Extra content for element addressBook: card

View File

@ -1,2 +1,2 @@
error detected at relaxng.c:6047
error detected at relaxng.c:6092
Extra content for element addressBook: card

View File

@ -1,2 +1,2 @@
error detected at relaxng.c:6047
error detected at relaxng.c:6092
Extra content for element addressBook: card