Two Questions
Thursday, 12 May 2011 · 6 messages · last reply 14 May 2011
JA
José Angel12 May 2011 04:22 #
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!.
--
José Angel Labbad
Estudiante de Ingeniería de la Computación
Universidad Simón Bolívar.
MS
Michael Seiferle12 May 2011 08:24 #
Hi José,
Quoted text · José Angel · 2 lines
Am 12.05.2011 um 02:22 schrieb José Angel <templerioinmortal at 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...
Quoted text · José Angel · 2 lines
> > 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
JA
José Angel12 May 2011 14:07 #
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!.
--
José Angel Labbad
Estudiante de Ingeniería de la Computación
Universidad Simón Bolívar
JA
José Angel13 May 2011 22:59 #
Quoted text · José Angel · 3 lines
> > 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.
CG
Christian Grün14 May 2011 09:51 #
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
Quoted text · José Angel · 15 lines
On Fri, May 13, 2011 at 8:58 PM, José Angel <templerioinmortal at 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 at mailman.uni-konstanz.de > https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk > >
MS
Michael Seiferle14 May 2011 13:12 #
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
Quoted text · Christian Grün · 5 lines
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.
Written for BaseX 6.6. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery