diff --git a/ChangeLog b/ChangeLog index dc84fcdd..fef26623 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Wed Jan 29 23:44:58 CET 2003 Daniel Veillard + + * relaxng.c: debugging of externalRef + * test/relaxng/* result/relaxng/*: augmented/updated the + regression tests + Wed Jan 29 22:06:04 CET 2003 Daniel Veillard * relaxng.c: more work on Relax-NG, implementing externalRef diff --git a/relaxng.c b/relaxng.c index 9b553b13..85c49a07 100644 --- a/relaxng.c +++ b/relaxng.c @@ -2703,6 +2703,7 @@ static xmlRelaxNGPtr xmlRelaxNGParseDocument(xmlRelaxNGParserCtxtPtr ctxt, xmlNodePtr node) { xmlRelaxNGPtr schema = NULL; const xmlChar *olddefine; + xmlRelaxNGGrammarPtr old; if ((ctxt == NULL) || (node == NULL)) return (NULL); @@ -2721,8 +2722,11 @@ xmlRelaxNGParseDocument(xmlRelaxNGParserCtxtPtr ctxt, xmlNodePtr node) { return(schema); } schema->topgrammar->parent = NULL; + old = ctxt->grammar; ctxt->grammar = schema->topgrammar; xmlRelaxNGParseStart(ctxt, node); + if (old != NULL) + ctxt->grammar = old; } ctxt->define = olddefine; @@ -3318,8 +3322,12 @@ xmlRelaxNGDumpDefine(FILE * output, xmlRelaxNGDefinePtr define) { xmlRelaxNGDumpDefines(output, define->content); fprintf(output, "\n"); break; - case XML_RELAXNG_DATATYPE: case XML_RELAXNG_EXTERNALREF: + fprintf(output, "content); + fprintf(output, "\n"); + break; + case XML_RELAXNG_DATATYPE: case XML_RELAXNG_VALUE: TODO break; diff --git a/result/relaxng/tutor3_2_1.err b/result/relaxng/tutor3_2_1.err index 0e6dc047..bb09dbc8 100644 --- a/result/relaxng/tutor3_2_1.err +++ b/result/relaxng/tutor3_2_1.err @@ -1,3 +1,3 @@ -error detected at relaxng.c:4252 -error detected at relaxng.c:4300 +error detected at relaxng.c:4260 +error detected at relaxng.c:4308 xmlRelaxNGValidateDefinition(): validated card : -1 diff --git a/result/relaxng/tutor3_5_2.err b/result/relaxng/tutor3_5_2.err index bddb830f..3b9d5ead 100644 --- a/result/relaxng/tutor3_5_2.err +++ b/result/relaxng/tutor3_5_2.err @@ -1,5 +1,5 @@ xmlRelaxNGValidateAttribute(name): -1 xmlRelaxNGValidateDefinition(): validated email : 0 xmlRelaxNGValidateDefinition(): validated card : -1 -error detected at relaxng.c:4300 +error detected at relaxng.c:4308 xmlRelaxNGValidateDefinition(): validated addressBook : -1 diff --git a/result/relaxng/tutor5_3_1.err b/result/relaxng/tutor5_3_1.err index 16bccbc6..7c13c3c8 100644 --- a/result/relaxng/tutor5_3_1.err +++ b/result/relaxng/tutor5_3_1.err @@ -1,3 +1,3 @@ -error detected at relaxng.c:4431 +error detected at relaxng.c:4439 xmlRelaxNGValidateDefinition(): validated note : 0 xmlRelaxNGValidateDefinition(): validated bad : -1 diff --git a/result/relaxng/tutor6_1_3.err b/result/relaxng/tutor6_1_3.err index 8cfe3171..722275e5 100644 --- a/result/relaxng/tutor6_1_3.err +++ b/result/relaxng/tutor6_1_3.err @@ -1,5 +1,5 @@ xmlRelaxNGValidateAttribute(preferredFormat): -1 xmlRelaxNGValidateAttribute(email): 0 xmlRelaxNGValidateAttribute(name): 0 -error detected at relaxng.c:4308 +error detected at relaxng.c:4316 xmlRelaxNGValidateDefinition(): validated card : -1 diff --git a/result/relaxng/tutor6_2_4.err b/result/relaxng/tutor6_2_4.err index 37ab62be..86b2dbbb 100644 --- a/result/relaxng/tutor6_2_4.err +++ b/result/relaxng/tutor6_2_4.err @@ -1,5 +1,5 @@ xmlRelaxNGValidateDefinition(): validated name : 0 xmlRelaxNGValidateDefinition(): validated email : 0 -error detected at relaxng.c:4300 +error detected at relaxng.c:4308 xmlRelaxNGValidateDefinition(): validated preferredFormat : -1 xmlRelaxNGValidateDefinition(): validated card : -1 diff --git a/result/relaxng/tutor6_3_1.err b/result/relaxng/tutor6_3_1.err index 8cfe3171..722275e5 100644 --- a/result/relaxng/tutor6_3_1.err +++ b/result/relaxng/tutor6_3_1.err @@ -1,5 +1,5 @@ xmlRelaxNGValidateAttribute(preferredFormat): -1 xmlRelaxNGValidateAttribute(email): 0 xmlRelaxNGValidateAttribute(name): 0 -error detected at relaxng.c:4308 +error detected at relaxng.c:4316 xmlRelaxNGValidateDefinition(): validated card : -1 diff --git a/result/relaxng/tutor7_1_2.err b/result/relaxng/tutor7_1_2.err index 1a7a9a11..472f0e67 100644 --- a/result/relaxng/tutor7_1_2.err +++ b/result/relaxng/tutor7_1_2.err @@ -1,5 +1,5 @@ Unimplemented block at xmlschemastypes.c:1132 -error detected at relaxng.c:3510 -error detected at relaxng.c:4485 -error detected at relaxng.c:4300 +error detected at relaxng.c:3518 +error detected at relaxng.c:4493 +error detected at relaxng.c:4308 xmlRelaxNGValidateDefinition(): validated vector : -1 diff --git a/result/relaxng/tutor7_1_3.err b/result/relaxng/tutor7_1_3.err index 9fc66d84..095756e9 100644 --- a/result/relaxng/tutor7_1_3.err +++ b/result/relaxng/tutor7_1_3.err @@ -1,6 +1,6 @@ Unimplemented block at xmlschemastypes.c:1132 Unimplemented block at xmlschemastypes.c:1132 -error detected at relaxng.c:3698 -error detected at relaxng.c:4485 -error detected at relaxng.c:4300 +error detected at relaxng.c:3706 +error detected at relaxng.c:4493 +error detected at relaxng.c:4308 xmlRelaxNGValidateDefinition(): validated vector : -1 diff --git a/result/relaxng/tutor7_2_4.err b/result/relaxng/tutor7_2_4.err index cc028742..edb18a44 100644 --- a/result/relaxng/tutor7_2_4.err +++ b/result/relaxng/tutor7_2_4.err @@ -1,3 +1,3 @@ -error detected at relaxng.c:3673 -error detected at relaxng.c:4485 +error detected at relaxng.c:3681 +error detected at relaxng.c:4493 xmlRelaxNGValidateDefinition(): validated vector : -1 diff --git a/result/relaxng/tutor7_3_4.err b/result/relaxng/tutor7_3_4.err index 77a97b18..e955ba51 100644 --- a/result/relaxng/tutor7_3_4.err +++ b/result/relaxng/tutor7_3_4.err @@ -1,7 +1,7 @@ Unimplemented block at xmlschemastypes.c:1135 Unimplemented block at xmlschemastypes.c:1135 Unimplemented block at xmlschemastypes.c:1135 -error detected at relaxng.c:3698 -error detected at relaxng.c:4485 -error detected at relaxng.c:4300 +error detected at relaxng.c:3706 +error detected at relaxng.c:4493 +error detected at relaxng.c:4308 xmlRelaxNGValidateDefinition(): validated path : -1 diff --git a/result/relaxng/tutor7_3_5.err b/result/relaxng/tutor7_3_5.err index b33e88da..b0622fe7 100644 --- a/result/relaxng/tutor7_3_5.err +++ b/result/relaxng/tutor7_3_5.err @@ -1,5 +1,5 @@ Unimplemented block at xmlschemastypes.c:1135 -error detected at relaxng.c:3510 -error detected at relaxng.c:4485 -error detected at relaxng.c:4300 +error detected at relaxng.c:3518 +error detected at relaxng.c:4493 +error detected at relaxng.c:4308 xmlRelaxNGValidateDefinition(): validated path : -1 diff --git a/result/relaxng/tutor8_2_4.err b/result/relaxng/tutor8_2_4.err index a23a6fe1..e4d178a8 100644 --- a/result/relaxng/tutor8_2_4.err +++ b/result/relaxng/tutor8_2_4.err @@ -3,5 +3,5 @@ xmlRelaxNGComputeInterleaves(interleave0) 6 groups xmlRelaxNGValidateDefinition(): validated title : 0 xmlRelaxNGValidateDefinition(): validated title : 0 -error detected at relaxng.c:4300 +error detected at relaxng.c:4308 xmlRelaxNGValidateDefinition(): validated head : -1 diff --git a/result/relaxng/tutor8_2_5.err b/result/relaxng/tutor8_2_5.err index 7a122682..1ddcbe63 100644 --- a/result/relaxng/tutor8_2_5.err +++ b/result/relaxng/tutor8_2_5.err @@ -1,6 +1,6 @@ xmlRelaxNGComputeInterleaves(interleave0) 6 child 6 groups -error detected at relaxng.c:4246 -error detected at relaxng.c:4300 +error detected at relaxng.c:4254 +error detected at relaxng.c:4308 xmlRelaxNGValidateDefinition(): validated head : -1 diff --git a/result/relaxng/tutor8_2_6.err b/result/relaxng/tutor8_2_6.err index 7fe125ae..e4b1e126 100644 --- a/result/relaxng/tutor8_2_6.err +++ b/result/relaxng/tutor8_2_6.err @@ -4,5 +4,5 @@ xmlRelaxNGComputeInterleaves(interleave0) xmlRelaxNGValidateDefinition(): validated title : 0 xmlRelaxNGValidateDefinition(): validated base : 0 xmlRelaxNGValidateDefinition(): validated base : 0 -error detected at relaxng.c:4300 +error detected at relaxng.c:4308 xmlRelaxNGValidateDefinition(): validated head : -1 diff --git a/result/relaxng/tutor9_2_1 b/result/relaxng/tutor9_2_1 new file mode 100644 index 00000000..fc174ff1 --- /dev/null +++ b/result/relaxng/tutor9_2_1 @@ -0,0 +1 @@ +./test/relaxng/tutor9_2_1.xml validates diff --git a/result/relaxng/tutor9_2_1.err b/result/relaxng/tutor9_2_1.err new file mode 100644 index 00000000..73dc09ef --- /dev/null +++ b/result/relaxng/tutor9_2_1.err @@ -0,0 +1,3 @@ +xmlRelaxNGValidateDefinition(): validated a : 0 +xmlRelaxNGValidateDefinition(): validated b : 0 +xmlRelaxNGValidateDefinition(): validated data : 0 diff --git a/result/relaxng/tutor9_2_2 b/result/relaxng/tutor9_2_2 new file mode 100644 index 00000000..a07aa0db --- /dev/null +++ b/result/relaxng/tutor9_2_2 @@ -0,0 +1 @@ +./test/relaxng/tutor9_2_2.xml validates diff --git a/result/relaxng/tutor9_2_2.err b/result/relaxng/tutor9_2_2.err new file mode 100644 index 00000000..73dc09ef --- /dev/null +++ b/result/relaxng/tutor9_2_2.err @@ -0,0 +1,3 @@ +xmlRelaxNGValidateDefinition(): validated a : 0 +xmlRelaxNGValidateDefinition(): validated b : 0 +xmlRelaxNGValidateDefinition(): validated data : 0 diff --git a/test/relaxng/tutor9_2.rng b/test/relaxng/tutor9_2.rng new file mode 100644 index 00000000..cb434bdf --- /dev/null +++ b/test/relaxng/tutor9_2.rng @@ -0,0 +1,7 @@ + + + + + + + diff --git a/test/relaxng/tutor9_2_1.xml b/test/relaxng/tutor9_2_1.xml new file mode 100644 index 00000000..2ca54ee0 --- /dev/null +++ b/test/relaxng/tutor9_2_1.xml @@ -0,0 +1,4 @@ + + a + a + diff --git a/test/relaxng/tutor9_2_2.xml b/test/relaxng/tutor9_2_2.xml new file mode 100644 index 00000000..2ca54ee0 --- /dev/null +++ b/test/relaxng/tutor9_2_2.xml @@ -0,0 +1,4 @@ + + a + a +