Closed Bug 88745 Opened 24 years ago Closed 24 years ago

PathExpr::matches is broken if the path contains //

Categories

(Core :: XSLT, defect)

defect
Not set
normal

Tracking

()

VERIFIED FIXED

People

(Reporter: sicking, Assigned: sicking)

References

Details

Attachments

(3 files)

PathExpr is broken if any of the contained steps uses an ANCESTOR_OP (//). Consider for example the following pattern: "foo/bar//baz" We first need to check if the 'baz' part matches, then we need to walk up the tree until we find a node that matches 'bar'. If the next node up the tree is not an 'foo' we need to continue looking for another 'bar' to see if that has a 'foo' parent.
I think I can come up with a patch for this but I need bug 85189 checked in first.
Status: NEW → ASSIGNED
Depends on: 85189
This one is solved. Axel No, I'm not bored.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
nope, it dosn't work if there is a element that matches "bar" but it's parent dosn't match "foo"... (untested) testcase coming up
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
fight! If I understand your xml correctly, your example is supposed to dump <out> right </out> as well, huh? It does, buddy. (my testcase had two bar elements, so it wouldn't match for/bar/baz either) Axel
Status: REOPENED → RESOLVED
Closed: 24 years ago24 years ago
Resolution: --- → FIXED
shit! ok. but it's not optimized
this actually worked all along, and the code is rewritten now anyways
Status: RESOLVED → VERIFIED
Comment on attachment 43501 [details] attaching style sheet for verification Fixing mime type ...
Attachment #43501 - Attachment mime type: text/xml → text/xsl
Comment on attachment 43501 [details] attaching style sheet for verification Bah. text/xsl does not exist as a mime type, if you try to fix things, at least make sure you're right.
Attachment #43501 - Attachment mime type: text/xsl → text/xml
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: