-Sun Mar 4 13:21:16 CET 2001 Bjorn Reese <breese@users.sourceforge.net>
+Sun Mar 4 17:53:13 CET 2001 Bjorn Reese <breese@users.sourceforge.net>
* libxslt/pattern.c: fixed the compilation of patterns which
- contains XPath NodeTypes.
+ contains XPath NodeTypes. Handling of nested predicates.
Sat Mar 3 20:56:47 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
xmlChar *prefix = NULL;
xmlChar *ncname = NULL;
xmlChar *URL = NULL;
+ int level;
SKIP_BLANKS;
if ((token == NULL) && (CUR == '@')) {
}
parse_predicate:
SKIP_BLANKS;
+ level = 0;
while (CUR == '[') {
const xmlChar *q;
xmlChar *ret = NULL;
+ level++;
NEXT;
q = CUR_PTR;
/* TODO: avoid breaking in strings ... */
- while ((IS_CHAR(CUR)) && (CUR != ']'))
+ while (IS_CHAR(CUR)) {
+ /* Skip over nested predicates */
+ if (CUR == '[')
+ level++;
+ if (CUR == ']') {
+ level--;
+ if (level == 0)
+ break;
+ }
NEXT;
+ }
if (!IS_CHAR(CUR)) {
xsltGenericError(xsltGenericErrorContext,
"xsltCompileStepPattern : ']' expected\n");