sshyran / genxdm

Automatically exported from code.google.com/p/genxdm
0 stars 0 forks source link

It appears that ExprContextStatic and ExprContextDynamic are spurious #9

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Both the ExprContextDynamicArgs and ExprContextStaticArgs classes have "build" 
methods, so that:

upon compiling an expression, the "built" form can be passed to the expression 
compiler
upon evaluating an expression, the "built" form can be used to evaluate.
In both cases, the "build" step appears to be a spurious burden on the client. 
Unless I'm misinterpreting the API, the "build" step can be performed directly 
by the XPath implementation, rather than by the caller of the API.

Further, upon removing the "build" method, these classes no longer need to be 
specialized by the processing context, and the "factory" methods to create them 
can probably be removed from the XPathToolKit API.

Note: these classes may exist as a consequence of the seven-handle 
generalization of the XPath API (I, U, N, A, S, T, X).  Since we now have *one* 
(<N>), it may be that the things that the "builds" were doing have dissolved, 
and so this can all just go away and be more slick.

Marked as priority high in Jira.

Original issue reported on code.google.com by aale...@gmail.com on 12 Oct 2010 at 4:36

GoogleCodeExporter commented 8 years ago
Open email thread on this, as well as changes on the branch

/branches/xpath-api-proposal

Original comment by eric%tib...@gtempaccount.com on 3 Mar 2011 at 3:07

GoogleCodeExporter commented 8 years ago

Original comment by eric%tib...@gtempaccount.com on 3 Mar 2011 at 3:07

GoogleCodeExporter commented 8 years ago
I was able to eliminate the ExprContextStaticArgs method.

The ExprContextDynamicArgs and ExprContextDynamic work slightly differently - 
there's more than one implementation of ExprContextDynamic, and the two classes 
play a different role in the API, so I've chosen to leave them separate.

Original comment by eric%tib...@gtempaccount.com on 10 Mar 2011 at 4:31

GoogleCodeExporter commented 8 years ago

Original comment by eric%tib...@gtempaccount.com on 29 Apr 2011 at 11:16