rfe: make QueryParser a public class

View: New views
5 Messages — Rating Filter:   Alert me  

rfe: make QueryParser a public class

by Michael Allman :: Rate this Message:

| View Threaded | Show Only this Message

The subject pretty much says it all.

I want to implement some custom XQuery optimizations.  The approach I'm
pursuing is using a custom QueryParser and some custom Expressions to
build an optimized XQueryExpression.  Only thing foiling my plan is the
fact that QueryParser is package-private.

Currently, I'm creating my own subclass of ExpressionParser which is 99%
identical to QueryParser.  Obviously a hack.  Ironically, the methods I
want to override (so far) are all in ExpressionParser.

Is this a reasonable/feasible request?

Is there another way I should be pursuing custom optimizations?

Cheers,

Michael


_______________________________________________
saxon-help mailing list
saxon-help@...
https://lists.sourceforge.net/lists/listinfo/saxon-help

Re: rfe: make QueryParser a public class

by Michael Kay :: Rate this Message:

| View Threaded | Show Only this Message

I think there are two levels at which Saxon is extensible. It's extensible
through defined APIs designed for the purpose, such as the extension
function binding mechanism, the TraceListener, and so on; and it's
extensible by virtue of the fact that the code is open source. At the moment
I don't think it's a realistic proposition to provide a supported API for
extensibility at the kind of level you are envisaging. So rather than
tweaking a few classes and methods to make things public, I think it's
better to acknowledge that the kind of thing you are doing requires source
code changes.

(Actually, there's a benefit to this: under the Mozilla licensing rules,
this means you have to publish your changes...)

Michael Kay
http://www.saxonica.com/ 

> -----Original Message-----
> From: saxon-help-bounces@...
> [mailto:saxon-help-bounces@...] On Behalf
> Of Michael Allman
> Sent: 10 June 2006 02:39
> To: saxon-help@...
> Subject: [saxon] rfe: make QueryParser a public class
>
> The subject pretty much says it all.
>
> I want to implement some custom XQuery optimizations.  The
> approach I'm pursuing is using a custom QueryParser and some
> custom Expressions to build an optimized XQueryExpression.  
> Only thing foiling my plan is the fact that QueryParser is
> package-private.
>
> Currently, I'm creating my own subclass of ExpressionParser
> which is 99% identical to QueryParser.  Obviously a hack.  
> Ironically, the methods I want to override (so far) are all
> in ExpressionParser.
>
> Is this a reasonable/feasible request?
>
> Is there another way I should be pursuing custom optimizations?
>
> Cheers,
>
> Michael
>
>
> _______________________________________________
> saxon-help mailing list
> saxon-help@...
> https://lists.sourceforge.net/lists/listinfo/saxon-help



_______________________________________________
saxon-help mailing list
saxon-help@...
https://lists.sourceforge.net/lists/listinfo/saxon-help

Re: rfe: make QueryParser a public class

by Michael Allman :: Rate this Message:

| View Threaded | Show Only this Message

Damn.  I was afraid you were going to say that.

FWIW, my intention from the start has been to publish my work as open
source under a BSD style license.

I just don't like the idea of maintaining my own set of patches against
Saxon.

That being said, I respect and understand your position.  At some point,
you might find it worthwhile to open up the parsing/evaluation part of
Saxon a little more.

BTW, one of the reasons I'm adopting Saxon for XQuery implementation is
precisely because it's open source.  Thanks for that.  Now if only
Saxon-SA were open, that would be awesome . . .

I'm wondering if my source patches will be compatible with Saxon-SA.
Time will tell.  I'd like to support Saxon-SA as a pluggable alternative
to Saxon-B in my extension.

Cheers,

Michael

On Sat, 10 Jun 2006, Michael Kay wrote:

> I think there are two levels at which Saxon is extensible. It's extensible
> through defined APIs designed for the purpose, such as the extension
> function binding mechanism, the TraceListener, and so on; and it's
> extensible by virtue of the fact that the code is open source. At the moment
> I don't think it's a realistic proposition to provide a supported API for
> extensibility at the kind of level you are envisaging. So rather than
> tweaking a few classes and methods to make things public, I think it's
> better to acknowledge that the kind of thing you are doing requires source
> code changes.
>
> (Actually, there's a benefit to this: under the Mozilla licensing rules,
> this means you have to publish your changes...)
>
> Michael Kay
> http://www.saxonica.com/
>
>> -----Original Message-----
>> From: saxon-help-bounces@...
>> [mailto:saxon-help-bounces@...] On Behalf
>> Of Michael Allman
>> Sent: 10 June 2006 02:39
>> To: saxon-help@...
>> Subject: [saxon] rfe: make QueryParser a public class
>>
>> The subject pretty much says it all.
>>
>> I want to implement some custom XQuery optimizations.  The
>> approach I'm pursuing is using a custom QueryParser and some
>> custom Expressions to build an optimized XQueryExpression.
>> Only thing foiling my plan is the fact that QueryParser is
>> package-private.
>>
>> Currently, I'm creating my own subclass of ExpressionParser
>> which is 99% identical to QueryParser.  Obviously a hack.
>> Ironically, the methods I want to override (so far) are all
>> in ExpressionParser.
>>
>> Is this a reasonable/feasible request?
>>
>> Is there another way I should be pursuing custom optimizations?
>>
>> Cheers,
>>
>> Michael
>>
>>
>> _______________________________________________
>> saxon-help mailing list
>> saxon-help@...
>> https://lists.sourceforge.net/lists/listinfo/saxon-help
>
>
>
> _______________________________________________
> saxon-help mailing list
> saxon-help@...
> https://lists.sourceforge.net/lists/listinfo/saxon-help
>


_______________________________________________
saxon-help mailing list
saxon-help@...
https://lists.sourceforge.net/lists/listinfo/saxon-help

Re: rfe: make QueryParser a public class

by Michael Kay :: Rate this Message:

| View Threaded | Show Only this Message

> That being said, I respect and understand your position.  At
> some point, you might find it worthwhile to open up the
> parsing/evaluation part of Saxon a little more.

Yes: I'd like to have some kind of API that provides access to the
expression tree. One way of doing this might be through a model like
XQueryX. But it's not really very high on my list of priorities (a higher
priority, for example, is creating a cleaner interface between Saxon and the
compiled schema so that I can work with other products' schema compilers,
and other products can work with mine).

Michael Kay
http://www.saxonica.com/



_______________________________________________
saxon-help mailing list
saxon-help@...
https://lists.sourceforge.net/lists/listinfo/saxon-help

Re: rfe: make QueryParser a public class

by Bugzilla from frans.englich@telia.com :: Rate this Message:

| View Threaded | Show Only this Message

On Saturday 10 June 2006 18:44, Michael Allman wrote:
> Damn.  I was afraid you were going to say that.
>
> FWIW, my intention from the start has been to publish my work as open
> source under a BSD style license.
>
> I just don't like the idea of maintaining my own set of patches against
> Saxon.

Another solution could be to simply integrate your solutions into Saxon
itself. That was what I first was thinking, since optimizations on the level
you seem to do easily gain others.

Of course, that would likely mean Michael having to spend time on it, so in
several ways this might not work out.


Cheers,

                Frans


_______________________________________________
saxon-help mailing list
saxon-help@...
https://lists.sourceforge.net/lists/listinfo/saxon-help