GNOME Bugzilla – Bug 61627
Template rule priority overriding failure
Last modified: 2009-08-15 18:40:50 UTC
Attached stylesheet has template rules for "/" and for "@*|node()". The rule for "/" is explicitly given a higher priority, but it never fires; instead, the rule for "@*|node()" is always invoked instead.
Created attachment 5753 [details] XSLT stylesheet demonstrating bug (run on any input)
Okay, surprizing the bug didn't get raised earlier, here is the patch which fixes it: ----------------------------------------------------- Index: libxslt/pattern.c =================================================================== RCS file: /cvs/gnome/libxslt/libxslt/pattern.c,v retrieving revision 1.45 diff -c -r1.45 pattern.c *** libxslt/pattern.c 2001/09/10 20:56:05 1.45 --- libxslt/pattern.c 2001/10/06 10:52:59 *************** *** 1944,1949 **** --- 1944,1950 ---- if (xsltTestCompMatch(ctxt, list, node, ctxt->mode, ctxt->modeURI)) { ret = list->template; + priority = list->priority; break; } list = list->next; *************** *** 1959,1964 **** --- 1960,1966 ---- if (xsltTestCompMatch(ctxt, list, node, ctxt->mode, ctxt->modeURI)) { ret = list->template; + priority = list->priority; break; } list = list->next; *************** *** 1972,1977 **** --- 1974,1980 ---- if (xsltTestCompMatch(ctxt, list, node, ctxt->mode, ctxt->modeURI)) { ret = list->template; + priority = list->priority; break; } list = list->next; ----------------------------------------------------- I fixed it in CVS, thanks for the report ! Daniel
Thank you!
Should be fixed in the lastest releases, Daniel