- From: <jeroen@tcf.nl>
- Date: Fri, 12 May 2000 23:14:48 +0200 (CEST)
- To: www-dom-xpath@w3.org
Scott wrote: >> Implementing a specific expression language binding should be optional, >> with at >> least 1 of the available expression languages. >> compare it to DOM which might offer XSL besides CSS. > I believe CSS is optional... i.e. the core DOM only consists of basically > DOM1. Can someone on the DOM WG confirm this? I don't think a DOM > implementor should be required to implement any expression language. (or > I might be misunderstanding what you are saying...) Thats not what I meant, I meant that we should use the same mechanisme as dom does where you have a DOM compliance implementation if you implement the core + 1 of the extended interfaces. If you split up PAX in a PAX core and expression specific interfaces you can use the same mechanisme where an implementation can be DOM-PAX compliant if it has implemented f.i. the pax-core and the pax-xpath interfaces. (or pax-core and pax-inquirer patterns.. ). > the "create" function should be: > > public abstract Expression create(String expression, PrefixResolver > prefixResolver) > throws ParseException; ok > ExpressionFactory efactory = ExpressionFactory.newInstance("Xpath"); > Expression expr = efactory.create("foo/baz[yada]", myPrefixResolver); > XObject val1 = expr.evaluate(node1, myXEnvironment); > XObject val2 = expr.evaluate(node2, myXEnvironment); Setup is good compare it to: XPathExpression aExpression = PAXFactory.createXPathExpression(); or InquirerExpression aExpression = PAXFactory.createInquirerExpression(); It sounds more DOMmish in my point of view, and I think it's easier to make it language independent. > > Additional features: > > > > A separate > > Expression.parseExpression() DOMException PARSE_EXCEPTION > > might be usefull. > Given create(String expression, PrefixResolver prefixResolver), do you > really think so? I still think so but you might call it something like "ValidateExpression". The purpose was not to precompile stuff separately but to validate the expression separately without executing it. > Do you think more needs to be put on the Inquirer interface, like > boolean getBool(String queryString); > boolean getMatch(String queryString); > ?? It's supposed to be minimal though, so maybe not. Dunno. You're asking me ;-), I'm not a minimalist supporter but I think that easyness is important. Best regards, Jeroen
Received on Friday, 12 May 2000 17:14:56 UTC