Hi again,
Am 25.08.2010 16:04, schrieb Leonard Wörteler:
As you seem to use the client/server architecture you probably have to use the local API to get it:
import org.basex.core.Context; import org.basex.core.cmd.Close; import org.basex.core.cmd.Open; import org.basex.core.cmd.XQuery;
public class WildcardsBug {
static final String DB_NAME = ...;
public static void main(final String[] args) throws Exception { final Context ctx = new Context(); new Open(DB_NAME).execute(ctx); System.out.println(new XQuery("//b4a[shipNameNorm/text() " + "contains text 'mount .+' using wildcards]/shipNameNorm" ).execute(ctx)); new Close().execute(ctx); }
}
...as my code could also swallow the stack trace, please try this instead:
import org.basex.core.Context; import org.basex.core.cmd.Close; import org.basex.core.cmd.Open; import org.basex.query.QueryProcessor;
public class WildcardsBug {
static final String DB_NAME = ...;
public static void main(final String[] args) throws Exception { final Context ctx = new Context(); new Open(DB_NAME).execute(ctx); new QueryProcessor("//b4a[shipNameNorm/text() contains text " + "'mount .+' using wildcards]/shipNameNorm", ctx).execute(); new Close().execute(ctx); }
}
Sorry for the inconvenience...
"All problems in computer science can be solved by another level of indirection" -- David Wheeler "...except for the problem of too many layers of indirection." -- Kevlin Henney
Leo