diff --git a/ChangeLog b/ChangeLog index 226b7bee..c421f860 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +Tue Aug 9 23:37:22 CEST 2005 Daniel Veillard + + * xmlregexp.c: fixed a determinism detection problem exposed by + ##other tests commited by Kasimier, also added a small speedup + of determinism detection. + * test/results/any6_2_0* any8_1_0* any7_1_2* any7_2_2*: added + the results to the regression tests now + Tue Aug 9 15:54:09 CEST 2005 Kasimier Buchcik * test/schemas/any7_2.xml test/schemas/any6_2.xsd diff --git a/result/schemas/any6_2_0 b/result/schemas/any6_2_0 new file mode 100644 index 00000000..1bb493ca --- /dev/null +++ b/result/schemas/any6_2_0 @@ -0,0 +1 @@ +./test/schemas/any6_0.xml validates diff --git a/result/schemas/any6_2_0.err b/result/schemas/any6_2_0.err new file mode 100644 index 00000000..e69de29b diff --git a/result/schemas/any7_1_2 b/result/schemas/any7_1_2 new file mode 100644 index 00000000..6f35e2de --- /dev/null +++ b/result/schemas/any7_1_2 @@ -0,0 +1 @@ +./test/schemas/any7_2.xml validates diff --git a/result/schemas/any7_1_2.err b/result/schemas/any7_1_2.err new file mode 100644 index 00000000..e69de29b diff --git a/result/schemas/any7_2_2 b/result/schemas/any7_2_2 new file mode 100644 index 00000000..6f35e2de --- /dev/null +++ b/result/schemas/any7_2_2 @@ -0,0 +1 @@ +./test/schemas/any7_2.xml validates diff --git a/result/schemas/any7_2_2.err b/result/schemas/any7_2_2.err new file mode 100644 index 00000000..e69de29b diff --git a/result/schemas/any8_1_0 b/result/schemas/any8_1_0 new file mode 100644 index 00000000..f5f4ed97 --- /dev/null +++ b/result/schemas/any8_1_0 @@ -0,0 +1 @@ +./test/schemas/any8_0.xml validates diff --git a/result/schemas/any8_1_0.err b/result/schemas/any8_1_0.err new file mode 100644 index 00000000..e69de29b diff --git a/xmlregexp.c b/xmlregexp.c index cf5f942e..8eed8b23 100644 --- a/xmlregexp.c +++ b/xmlregexp.c @@ -1981,6 +1981,8 @@ xmlFAComputesDeterminism(xmlRegParserCtxtPtr ctxt) { state = ctxt->states[statenr]; if (state == NULL) continue; + if (state->nbTrans < 2) + continue; for (transnr = 0;transnr < state->nbTrans;transnr++) { t1 = &(state->trans[transnr]); /* @@ -2804,6 +2806,14 @@ xmlRegStrEqualWildcard(const xmlChar *expStr, const xmlChar *valStr) { * Eval if we have a wildcard for the current item. */ if (*expStr != *valStr) { + /* if one of them starts with a wildcard make valStr be it */ + if (*valStr == '*') { + const xmlChar *tmp; + + tmp = valStr; + valStr = expStr; + expStr = tmp; + } if ((*valStr != 0) && (*expStr != 0) && (*expStr++ == '*')) { do { if (*valStr == XML_REG_STRING_SEPARATOR)