Hi,

In the editwizards, you can do stuff like this:

  <optionlist name="newstype"
              optionid="[EMAIL PROTECTED]'type']"
              optioncontent="[EMAIL PROTECTED]'name']">
    <query xpath="/[EMAIL PROTECTED]"/>
  </optionlist>

This will fill an optionlist with name 'newstype' with 'type/name' values
from the 'newstypes' builder. Very handy if you don't want to manually
edit your editwizards every time a new newstype is invented.

The problem is that there is no way to do a multilevel search here.
Sometimes, you have newstypes related to a 'site' object; and you only
want to select those. This syntax doesn't allow it.

I would propose a small extension to the query syntax to allow multilevel
searches. After browsing the code a bit, I found the queryparsing code to
be 'getList()' in Dove.java:

  if (xpath.indexOf("/*@")!=0) {
    Element err = addContentElement(ERROR,"invalid xpath",out);
    err.setAttribute(ELM_TYPE, IS_CLIENT);
  } else {
    //get node data, bit stupid
    try {
      NodeManager nm = cloud.getNodeManager(xpath.substring(3));
      for(NodeIterator i=nm.getList(where,orderby,directions).nodeIterator(); 
i.hasNext(); ) {
  ....

There is no supporting code for multilevels in Dove as far as I can see,
but it could easily be added here. For instance by using syntax like:

  /[EMAIL PROTECTED]/related/newstypes

Any comments?

Johannes
-- 
[EMAIL PROTECTED]   | It is always possible to agglutinate multiple
[EMAIL PROTECTED] | seperate problems into a single complex inter-
PGP ID: 0xFED127BD     | dependent solution. In most cases this is a
Tel: 035-6474202       | bad idea. (RFC 1925, Truth 5)

Reply via email to