RE: [dom-xpath] Competing Proposals Proposal

     
     BTW, people should feel free to take my document and hack it 
     up into the 1)
     and 2) proposals, or even a competing 3) proposal.  The best 
     way towards
     good design is to have lots of options and ideas on the table.
     
Lets try for agreement on a 3 class first? At least we know
the end game then.

   
     
     > *if* the variable could be resolved (as per
     > an entity) outside the black box, 'compiled' then passed 
     into the black
     box
     > we have an answer. Feasability?
     
     Not sure how you would compile a variable.
     
     To be clear, here's how it would look:
     
     ExpressionFactory efactory = ExpressionFactory.newInstance("Xpath");
     Expression expr = efactory.create("foo/baz[greeting=$foo]",
     myPrefixResolver);
     myXEnvironment.pushVariable("foo", "hello");
     XObject val1 = expr.evaluate(myNode, myXEnvironment);
     myXEnvironment.popVariable();
     myXEnvironment.pushVariable("foo", "goodby");
     XObject val2 = expr.evaluate(myNode, myXEnvironment);
     myXEnvironment.popVariable();
     
Yuk. Looks horrible to me. At least that is clear ;-)

Regards, DaveP

Received on Friday, 12 May 2000 00:39:58 UTC