W3C home > Mailing lists > Public > www-dom-xpath@w3.org > May 2000

RE: [dom-xpath] Competing Proposals Proposal

From: Dave Pawson <dave.pawson@virgin.net>
Date: Fri, 12 May 2000 05:39:32 +0100
To: <www-dom-xpath@w3.org>
Message-ID: <NDBBKDFLFKGBNPJPGKDFMENFCDAA.dave.pawson@virgin.net>

     
     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

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 19:43:07 UTC