Project

Profile

Help

Saxon9 + Saxon6 in same JVM

Added by Anonymous almost 15 years ago

Legacy ID: #7404933 Legacy Poster: David Lee (daldei)

I'm considering the possibility of supporting both xslt1 and xslt2 simultaneously in xmlsh. I believe that saxon6 is xslt1 while saxon9 is xslt2. xmlsh currently uses the saxon9 jars. My gut feeling is that running both saxon6 and saxon9 in the same JVM would be very difficult due to conflicting classes and packages, but I havent fully researched it yet. Any suggestions along these lines appreciated ... Q) Have you tried or do you know of successfuly integrating saxon6 with saxon9 in the same JVM ? Q) Is there a way to tell saxon9 to run in pure "xslt1" mode ? Q) My first idea is that I should start a subprocess to run saxon6 if saxon9 is already in the CLASSPATH ... does this sound crazy? Thanks for any suggestions or hints on where to look. -David


Replies (3)

Please register to reply

RE: Saxon9 + Saxon6 in same JVM - Added by Anonymous almost 15 years ago

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

It shouldn't be a problem: the package names changed from com.icl.saxon.xxx to net.sf.saxon.xxx between Saxon6 and Saxon7. This was done partly because there was no longer any ICL involvement in the project, and partly to allow the kind of usage you have in mind. However, I think I would recommend most people running XSLT 1.0 stylesheets these days to use Saxon 9 in preference to Saxon 6. It's very unlikely you'll hit any XSLT compatibility issues, unless the code is using Saxon6 extensions that have since been withdrawn.

RE: Saxon9 + Saxon6 in same JVM - Added by Anonymous almost 15 years ago

Legacy ID: #7405052 Legacy Poster: David Lee (daldei)

This is great ! So the JAR's and classes are compatible in the sense that they wont interfere. But what about the data? Is it possible to pass a TinyTree model NodeInfo from Saxon9 to Saxon6 ? Or visa-versa ? My guess is no, in that they are entirely different classes so wouldn't be recognized. As for Saxon9 working on xlst 1.0 stylesheets ... thats good to hear. I admit I do not know enough about it to comment much except I've been trying to follow the discussions of people who want to run xslt 1.0. Thanks for your excellent advise as usual. -David

RE: Saxon9 + Saxon6 in same JVM - Added by Anonymous almost 15 years ago

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

>Is it possible to pass a TinyTree model NodeInfo from Saxon9 to Saxon6 ? No, not directly. It would be pretty easy to write a converter, though.

    (1-3/3)

    Please register to reply