fixed bug #157633 in relaxng choice optimization added regression tests

* relaxng.c: fixed bug #157633 in relaxng choice optimization
* result/relaxng/choice0* test/relaxng/choice0*: added regression
  tests about it.
* doc/*: rebuilt
* testdso.c: removed a warning due to a missing void in signature.
Daniel
diff --git a/relaxng.c b/relaxng.c
index af4de86..16174e0 100644
--- a/relaxng.c
+++ b/relaxng.c
@@ -10047,8 +10047,13 @@
                 node = xmlRelaxNGSkipIgnored(ctxt, node);
 
                 errNr = ctxt->errNr;
-                if ((define->dflags & IS_TRIABLE)
-                    && (define->data != NULL)) {
+                if ((define->dflags & IS_TRIABLE) && (define->data != NULL) &&
+		    (node != NULL)) {
+		    /*
+		     * node == NULL can't be optimized since IS_TRIABLE
+		     * doesn't account for choice which may lead to
+		     * only attributes.
+		     */
                     xmlHashTablePtr triage =
                         (xmlHashTablePtr) define->data;
 
@@ -10056,10 +10061,6 @@
                      * Something we can optimize cleanly there is only one
                      * possble branch out !
                      */
-                    if (node == NULL) {
-                        ret = -1;
-                        break;
-                    }
                     if ((node->type == XML_TEXT_NODE) ||
                         (node->type == XML_CDATA_SECTION_NODE)) {
                         list =