Project

Profile

Help

Error after upgrading to Saxon-B 8.8

Added by Anonymous about 18 years ago

Legacy ID: #3930217 Legacy Poster: Igor (igorotov)

This is the error I got: "Externally supplied NodeInfo belongs to the wrong Configuration"


Replies (5)

Please register to reply

RE: Error after upgrading to Saxon-B 8.8 - Added by Anonymous about 18 years ago

Legacy ID: #3930241 Legacy Poster: Igor (igorotov)

Additional info: I have a custom object model and have not been using the ExternalObjectModel interface but manually wrapping my object model in a DocumentInfo before passing it to Saxon. I have been instantiating dummy Configurations so far. Would that be related to this problem? Looking into the ExternalObjectModel interface, used by the Configuration class, most of the methods make sense, but what is the preferred way to set Configuration instances using JAXP? Or should I cast it to the Saxon specific class ans set it manually?

RE: Error after upgrading to Saxon-B 8.8 - Added by Anonymous about 18 years ago

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

This occurs because of a bug fix introduced in Saxon 8.8: see the second paragraph of http://www.saxonica.com/documentation/changes/intro/misc88.html It's a little unfortunate; previous releases allowed different documents to belong to different Configurations, but the consequence was that tests on node identity could give wrong answers. 8.8 has fixed this bug by requiring all documents used in a single query or transformation to be built under the same Configuration.

RE: Error after upgrading to Saxon-B 8.8 - Added by Anonymous about 18 years ago

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

It's hard to advise you what to change without seeing which interfaces you are using. But if you call an interface that requires a Configuration, it must be the same one for all documents.

RE: Error after upgrading to Saxon-B 8.8 - Added by Anonymous about 18 years ago

Legacy ID: #3930329 Legacy Poster: Igor (igorotov)

I see. Looking at the source for Controller.unravel I am seeing that the exception is being thrown after comparing the NodeInfo.configuration with the Controll.config. Would that mean that not only all documents but also the Controller needs to use the same configuration instance? What is the preffered way to set the Configuration in a Transformer using JAXP?

RE: Error after upgrading to Saxon-B 8.8 - Added by Anonymous about 18 years ago

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

I would recommend creating the TransformerFactory in the normal way; and if you then use interfaces that require a Configuration, get the configuration from the TransformerFactory by calling ((TransformerFactoryImpl)tfactory).getConfiguration() Michael Kay

    (1-5/5)

    Please register to reply