Open backplane-import opened 13 years ago
The way we currently do this is in the function:
NodesetExpression.prototype.determineDependentExpressions()
which is in the file:
third-party/uxf/src/lib/xforms/VertexTargets.js
The Ajaxslt code has been modified so that as the XPath expression is broken up, the various parts are stored for later use. The Ajaxslt function only does this if the global variable 'g_bSaveDependencies' is true.
I'd suggest that the easiest way to do this is as follows:
Create a new sub-directory called:
third-party/uxf/src/lib/backplane/xpath
(Creating unit-tests is described in the [http://code.google.com/p/backplanejs/wiki/TestingGuidelines TestingGuidelines] wiki page.)
Updates
Owner set to creaven
implemented in http://code.google.com/r/creavenmoro-backplanejs/source/detail?r=c3908b20d6375f25e65c5be73abb70200defdc13
Imported from backplanejs Google Code issue 54.
The dependency-graph tracks dependencies within XPath expressions, so as to optimise evaluation. This means that we need a function that returns an array of sub-expressions, given an XPath statement.
For example, given the XPath statement "a[b]" we would want to know that the expression is dependent on the value of 'b'.
Similarly, if we had "a[b or c]" we would want to know that the expression is dependent on both the value of 'b' and the value of 'c'.
These values are currently generated by modifications made to Ajaxslt, so that the sub-expressions are obtained during ordinary XPath evaluation.
However, since we want to replace Ajaxslt (issue 44 and issue 50) then we'll need to be able to obtain sub-expressions if we're to keep the dependency-graph correct.
Ticket status set to Accepted
Priority: Medium Type: Enhancement