Project

Profile

Help

StaticQueryContext in Saxon 9.0: copy method

Added by Anonymous almost 17 years ago

Legacy ID: #4672258 Legacy Poster: Jeremy Volkman (jvolkman)

I'm working on a project that currently uses Nux (http://dsd.lbl.gov/nux/) in combination with Saxon and XOM. I realize that I'm in uncharted territory combining Nux with Saxon 9, especially since Nux hasn't seen any attention since some time in 2006. However, there appears to be only one incompatibility between Nux 1.6 and Saxon 9.0. StaticQueryContext used to have a copy() method which returned a cloned context object. In 9.0, this method appears to have gone missing. Was this method purposefully removed, and if so is there a way to accomplish the same thing? Thanks, Jeremy Volkman


Replies (2)

RE: StaticQueryContext in Saxon 9.0: copy met - Added by Anonymous almost 17 years ago

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

The method went missing because of a design change in this area that means an application that is using this method probably needs to change anyway. (As the Javadoc makes clear, stable methods in this class are labelled with the "@since" tag, and the copy() method was not one of those methods). The StaticQueryContext class is now used only to initialize context information before compiling a query. Saxon now copies the information to an internal class, QueryModule, which represents one module of a query. The static context information defined in the query prolog of a particular module overwrites the information initialized from the StaticQueryContext object. In the old design, if I remember right, context information initialized by the caller was not effective in library modules, only in the main module. Interface stability between releases has never been a particularly strong point with Saxon, although it has gradually been getting better. I haven't generally gone out of my way to ensure that a new release can be used as a drop-in replacement for a previous release. I'm hoping that matters will improve with the introduction of s9api, which does a much better job of separating the published and public API from the implementation classes and methods that aren't intended to be used by "ordinary" users. However, it's probably still the case that components wanting to achieve close integration with Saxon, like Nux, will end up having dependencies on internals that change from one release to another.

RE: StaticQueryContext in Saxon 9.0: copy met - Added by Anonymous almost 17 years ago

Legacy ID: #4674012 Legacy Poster: Jeremy Volkman (jvolkman)

Thanks for the quick reply, Michael. I resolved my issues with Nux by making it dependent upon StaticContext rather than StaticQueryContext, if that makes sense. Seems to work now. Kudos to you for keeping the API as stable as it has been.

    (1-2/2)

    Please register to reply