From: <ca...@in...> - 2006-03-21 16:27:42
|
Hi Lars,=20 First of all, thank you for your answer.=20 I've been trying your suggestions and I step to comment my results: [...] > Maybe it works if you use a double colon "::" between the "ned" >namespace and the predicate name? [...] I tried this one first and it works!! :). It seems that when parsing = tolog queries, colons are eliminated -or something like that-, could it = be? As I can read, the tolog 1.0 specification establishes that this = query has to be written with a single colon. If this is a bug, do I have = to report it?=20 On the other hand, when I tried to use the "import" directive -as you = told me- I got an exception (posted below), similar to the exception = obtained when I tried to use de "using" directive. Thanks a lot again, Carolina Anton The exception: ------------------------------------------ org.tm4j.tologx.TologParserException: Error parsing query string. at = org.tm4j.tologx.memory.QueryEvaluatorImpl.prepareQuery(QueryEvaluatorImpl= .java:156) at = org.tm4j.tologx.memory.QueryEvaluatorImpl.execute(QueryEvaluatorImpl.java= :166) at = es.indra.druida.ned.mapa.GestorMapa.ejecutaConsulta(GestorMapa.java:89) at = es.indra.druida.ned.mapa.test.FicheroReglasTest.main(FicheroReglasTest.ja= va:30) Caused by: line 1:1: unexpected token: import at org.tm4j.tologx.parser.TologParser.query(TologParser.java:508) at = org.tm4j.tologx.memory.QueryEvaluatorImpl.prepareQuery(QueryEvaluatorImpl= .java:152) ... 3 more -----Mensaje original----- De: Lars Heuer [mailto:he...@se...]=20 Enviado el: martes, 21 de marzo de 2006 15:23 Para: Ant=F3n Garc=EDa, Carolina CC: tm4...@li... Asunto: Re: [TM4J-users] Problems using a rule from an added module Hi Carolina, [...] > static String query =3D "ned:Reglas-del- =20 > Producto(i\"file:ned.xtm#packseguridadtotal\",$Reglas)?"; > qEvaluator.addRulesModule(new FileInputStream(new = File("Functions.tl")),"ned"); > qEvaluator.execute(sQuery); I think you've discovered another tolog parser bug. Maybe it works if you use a double colon "::" between the "ned" namespace and the predicate name? Did you try to import the "Functions.tl" module via the "import" directive, too? Does the following work: static String "import \"file://Functions.tl\" as ned\n" + = "ned::Reglas-del-Producto(i\"file:ned.xtm#packseguridadtotal\",$Reglas)?"= ? =20 Best regards, Lars --=20 http://semagia.com http://topicgarden.com/mailinglist/ German Topic Maps mailinglist |