After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 61627 - Template rule priority overriding failure
Template rule priority overriding failure
Status: VERIFIED FIXED
Product: libxslt
Classification: Platform
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Daniel Veillard
Daniel Veillard
Depends on:
Blocks:
 
 
Reported: 2001-10-03 00:52 UTC by Dan Egnor
Modified: 2009-08-15 18:40 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
XSLT stylesheet demonstrating bug (run on any input) (308 bytes, text/xml)
2001-10-03 00:53 UTC, Dan Egnor
Details

Description Dan Egnor 2001-10-03 00:52:17 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.
Comment 1 Dan Egnor 2001-10-03 00:53:08 UTC
Created attachment 5753 [details]
XSLT stylesheet demonstrating bug (run on any input)
Comment 2 Daniel Veillard 2001-10-06 10:55:20 UTC
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
Comment 3 Dan Egnor 2001-10-08 03:45:34 UTC
Thank you!
Comment 4 Daniel Veillard 2001-10-30 19:21:43 UTC
Should be fixed in the lastest  releases,

Daniel