On Wed, 26 Jan 2005 11:04:51 +0100, Homeijer, Michael
<[EMAIL PROTECTED]> wrote:
> Hi,
> 
> I am looking for classes that add mmbase support to jxpath. Since I could not 
> find an implementation on the web, I'll try a naive implementation myself.  
> It seems simple to create (not optimized) support for mmbase nodes, but I 
> could use some input on the implementation:
> 
> - how to access relations
> - do nodemanagers and relationmanagers need to be accessible (if so, which 
> syntax)
> - some examples

I think the editwizard  / Dove do some simple (one level xpaths)

> 
> - any other input

when we started the bridge project we wanted to support xpath like
queries , the syntax would have about the same as the mm:list but
constraints would havebeen  in in the query
//nodemanger/relationmanager/nodemanager
or
//nodemanager/nodemanager

constraints like the xpath stuff
//news/related/[EMAIL PROTECTED] ='test']

round quotes would have been used for selecting the wanted node
//news/related/[EMAIL PROTECTED] ='test'] return images

(//news/related/[EMAIL PROTECTED] ='test']) returns news

it was something like that :)

and to implement it now would be a few days work
just parsing the string and creating queries returning nodes.

I would be a efficient as the normal query methods.

Using the standard jxpath (only using getters and setters) a query
like above will become something like
foreach (node in node.getRelatedNode()){
   bla die bla
}
and that will not work if you have a lot of nodes.
I was confused onto how to extend jxpath. I know it's possible but
don't understand how.

If you really want to look at mmbase like a tree structure (what
project does not have a tree structure) you wil need to create a view
on your data , so why not make that view more DOM like.

isn't xpath inherently slow? are there optimizers around?
_______________________________________________
Developers mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/developers

Reply via email to