Project

Profile

Help

StaticQueryContent - Why no Constructor?

Added by Anonymous almost 19 years ago

Legacy ID: #3283515 Legacy Poster: jim collins (jimcollins)

I don't understand the design decision to require a Config object to be passed to initialize a StaticQueryContent object. Why can't I create the object and then pass the Config using a function call? Why use a non-null Constructor? For those of us not working in Java this is a huge PITA.


Replies (1)

RE: StaticQueryContent - Why no Constructor? - Added by Anonymous almost 19 years ago

Legacy ID: #3284089 Legacy Poster: Michael Kay (mhkay)

Saxon requires the Configuration to be supplied when the StaticQueryContext is initialized because a StaticQueryContext with no Configuration would be unusable. In fact the setConfiguration() method serves no useful purpose since changing to a different Configuration is likely to cause all sorts of problems - so I will deprecate this method. I'm afraid this API has not been designed with non-Java clients in mind. I would suggest that if you want to design an API for a different language, you write some (Java) wrapper classes to implement it.

    (1-1/1)

    Please register to reply