Closed
Bug 265460
Opened 20 years ago
Closed 20 years ago
Make XPath evaluation use context size and position
Categories
(Core Graveyard :: XForms, defect)
Core Graveyard
XForms
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: allan, Assigned: allan)
References
Details
Attachments
(3 files, 1 obsolete file)
Right now, XPath expressions are evaluated with context size and position == 1.
We need to fix that so the right values are used. Transformiix has support for it.
Assignee | ||
Comment 1•20 years ago
|
||
I've created a Transformiix bug (bug 292841) for adding context size and
position to the XPath expressions.
Depends on: 292841
No longer depends on: 292841
Depends on: 292841
Assignee | ||
Comment 2•20 years ago
|
||
Assignee | ||
Comment 3•20 years ago
|
||
Assignee | ||
Comment 4•20 years ago
|
||
Here's a rough patch for it. Rough == haven't looked it through, but it seems
to work :)
Assignee: aaronr → allan
Status: NEW → ASSIGNED
Assignee | ||
Comment 5•20 years ago
|
||
Bug 292841 is ready for check in, so here's a patch for xforms that uses the
new evaluate function.
Attachment #182588 -
Attachment is obsolete: true
Attachment #184912 -
Flags: review?(smaug)
Comment 6•20 years ago
|
||
Comment on attachment 184912 [details] [diff] [review]
Polished patch
>
> /// @todo Use aNode->contextPosition and aNode->contextSize (XXX)
> /// @see https://bugzilla.mozilla.org/show_bug.cgi?id=265460
Shouldn't you remove this comment now?
> nsISupports* retval;
> nsresult rv;
>
>- rv = aNode->mExpression->Evaluate(aNode->mContextNode,
>- nsIDOMXPathResult::BOOLEAN_TYPE,
>- nsnull,
>- &retval);
>+ rv = aNode->mExpression->EvaluateWithContext(aNode->mContextNode,
>+ aNode->mContextPosition,
>+ aNode->mContextSize,
>+ nsIDOMXPathResult::BOOLEAN_TYPE,
>+ nsnull,
>+ &retval);
> NS_ENSURE_SUCCESS(rv, rv);
Attachment #184912 -
Flags: review?(smaug) → review+
Assignee | ||
Comment 7•20 years ago
|
||
Comment on attachment 184912 [details] [diff] [review]
Polished patch
(In reply to comment #6)
> (From update of attachment 184912 [details] [diff] [review] [edit])
> >
> > /// @todo Use aNode->contextPosition and aNode->contextSize (XXX)
> > /// @see https://bugzilla.mozilla.org/show_bug.cgi?id=265460
>
> Shouldn't you remove this comment now?
Indeed.
Doron, will you do second r?
Attachment #184912 -
Flags: review?(doronr)
Updated•20 years ago
|
Attachment #184912 -
Flags: review?(doronr) → review+
Assignee | ||
Comment 8•20 years ago
|
||
Checked in.
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Updated•8 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•