Hi peole, i have two questions, i don't know if you can help me.
First: Which file describes the grammar of XQuery in BaseX?. Im trying to extend it and i need to modify the grammar.
Second: I created a new type called xs:truth, i need to modify the casting rules from this type with other types like xs:boolean or xs:decimal, which files should i modify for this?
Thanks for your time!.
Hi José,
Am 12.05.2011 um 02:22 schrieb José Angel templerioinmortal@gmail.com:
First: Which file describes the grammar of XQuery in BaseX?. Im trying to extend it and i need to modify the grammar.
The grammar is mostly defined in QueryParser.java, but...
Second: I created a new type called xs:truth, i need to modify the casting rules from this type with other types like xs:boolean or xs:decimal, which files should i modify for this?
...maybe you should try to abstract this behavior via pure xquery functions anyway. Changing core language features/semantics directly in Java might lead to undesired side effects and break compatibility with our source base. Maybe you could elaborate a little on what exactly you are working on.
Kind regards Michael
Hi Michael. Thanks for your time and patience. Im working on a language called "Fuzzy XQuery" defined here in Simón Bolívar University(Caracas - Venezuela). Just like the xml:id attribute i want to create a new attribute called xml:truth which has to indicate the truth degree for each element that has this attribute after evaluating the query. And i need to define new kinds like "declare fuzzy predicate young(-INF,0,,25,65)" for example. I need to implement this on your source base because it's more efficient and robust.
Any suggest that you can give me would help me. Thanks for all!.
Dear José,
I agree with Michael: a user-defined function might suffice to solve your task; or it might be a better point to get started. Changing the core of BaseX is an interesting challenge, but you will have to invest lots of efforts to accomplish your goal.
Regarding our code base, I recommend you to have a look at our elaborate JavaDoc comments, and work with tools/IDEs that help you to explore the sources (our standard tool is Eclipse).
Hope this helps, Christian ___________________________
Christian Grün Uni KN, Box 188 78457 Konstanz, Germany http://www.inf.uni-konstanz.de/~gruen
On Fri, May 13, 2011 at 8:58 PM, José Angel templerioinmortal@gmail.com wrote:
Do you have any suggestion for what im trying to do?.
-- José Angel Labbad Estudiante de Ingeniería de la Computación Universidad Simón Bolívar.
BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
Hi José,
sorry for getting back to you this late.
I can only repeat Christian's advice, for a start a XQuery library might be sufficient to get in touch with BaseX. Once you feel confident enough you might want to start poking around the code base.
As our implementation is schema oblivious (i.e. our implemantation has no semantic notion of e.g. xml:id), the task at hand calls for a pure XQuery approach anyway. Maybe you could have a look at our Function implementations (classes implementing the abstract class org.basex.query.func.Fun) and the QueryParser. Spend some time debugging those, so you get a feeling for the building blocks of the engine.
Hope this helped to clarify things a little :-)
Michael Am 14.05.2011 um 09:51 schrieb Christian Grün:
I agree with Michael: a user-defined function might suffice to solve your task; or it might be a better point to get started. Changing the core of BaseX is an interesting challenge, but you will have to invest lots of efforts to accomplish your goal.
basex-talk@mailman.uni-konstanz.de