Project

Profile

Help

Revision 250c5839

Added by O'Neil Delpratt 10 months ago

Saxon/C fixes

View differences:

latest10/hec/Saxon.C.API/SaxonProcessor.cpp
28 28
//jobject cpp;
29 29
const char * failure;
30 30
sxnc_environment * SaxonProcessor::sxn_environ = 0;
31
int SaxonProcessor::refCount = 0;
32 31
int SaxonProcessor::jvmCreatedCPP=0;
33 32

  
34 33
bool SaxonProcessor::exceptionOccurred(){
......
170 169
    cwd="";
171 170
    licensei = l;
172 171
    versionStr = NULL;
173
    SaxonProcessor::refCount++;
174 172

  
175 173
     if(SaxonProcessor::jvmCreatedCPP == 0){
176 174
	SaxonProcessor::jvmCreatedCPP=1;
......
201 199
    procClass = lookForClass(SaxonProcessor::sxn_environ->env, "net/sf/saxon/s9api/Processor");
202 200
    saxonCAPIClass = lookForClass(SaxonProcessor::sxn_environ->env, "net/sf/saxon/option/cpp/SaxonCAPI");
203 201
    
204
    proc = createSaxonProcessor (SaxonProcessor::sxn_environ->env, procClass, "(Z)V", NULL, licensei);
202
    jobject proci = createSaxonProcessor (SaxonProcessor::sxn_environ->env, procClass, "(Z)V", NULL, licensei);
203
    proc = SaxonProcessor::sxn_environ->env->NewGlobalRef(proci);
205 204
	if(!proc) {
206 205
		std::cout<<"proc is NULL in SaxonProcessor constructor"<<std::endl;
207 206
	}
......
216 215
SaxonProcessor::SaxonProcessor(const char * configFile){
217 216
    cwd="";
218 217
    versionStr = NULL;
219
    SaxonProcessor::refCount++;
220 218

  
221 219
    if(SaxonProcessor::jvmCreatedCPP == 0){
222 220
	SaxonProcessor::jvmCreatedCPP=1;
......
249 247
				<< " not found\n" << std::endl;
250 248
			return ;
251 249
		}
252
	proc = SaxonProcessor::sxn_environ->env->CallStaticObjectMethod(saxonCAPIClass, mIDcreateProc,SaxonProcessor::sxn_environ->env->NewStringUTF(configFile));
253
		
250
	jboject proci = SaxonProcessor::sxn_environ->env->CallStaticObjectMethod(saxonCAPIClass, mIDcreateProc,SaxonProcessor::sxn_environ->env->NewStringUTF(configFile));
251
	proc = SaxonProcessor::sxn_environ->env->NewGlobalRef(proci);
254 252
	if(!proc) {
255 253
		checkAndCreateException(saxonCAPIClass);
256 254
		std::cerr << "Error: "<<getDllname() << ". processor is NULL in constructor(configFile)"<< std::endl;
......
267 265

  
268 266
    SaxonProcessor::~SaxonProcessor(){
269 267
	clearConfigurationProperties();
268
	SaxonProcessor::sxn_environ->env->NewDeleteGlobalRef(proc);
270 269
	if(versionStr != NULL) {
271 270
		delete versionStr;
272 271
	}
273
	SaxonProcessor::refCount--;	//This might be redundant due to the bug fix 2670
274 272
   }
275 273

  
276 274

  
latest10/hec/Saxon.C.API/SaxonProcessor.h
483 483
   // static JNIEnv *env;
484 484
    static int jvmCreatedCPP;
485 485
    static sxnc_environment * sxn_environ;
486
    static int refCount;
487 486
    std::string cwd; /*!< current working directory */
488 487
    jobject proc; /*!< Java Processor object */
489 488
    
latest10/hec/Saxon.C.API/XdmItem.h
50 50
    
51 51
    virtual bool isAtomic();
52 52

  
53
//TODO: isNode
54
//TODO: isFunction
53
    virtual bool isNode();
54

  
55
    virtual bool isFunction();
55 56

  
56 57
    /**
57 58
     * Get Java XdmValue object.
......
59 60
     */
60 61
     virtual  jobject getUnderlyingValue();
61 62

  
62
     sxnc_value * getUnderlyingCValue(){
63
	return value;
64
     }
65 63

  
66 64

  
67 65
    /**
......
110 108
	virtual XDM_TYPE getType();
111 109

  
112 110
 protected:  
113
	sxnc_value* value;
111
	jobject value;
114 112
	std::string stringValue;  /*!< Cached. String representation of the XdmValue, if available */
115 113
};
116 114

  
latest10/hec/Saxon.C.API/python-saxon/saxonc.pyx
2707 2707
        evaluate_single(self, xpath_str)
2708 2708

  
2709 2709
        Args:
2710
            xpath_str (str): The XPath query suplied as a string
2710
            xpath_str (str): The XPath query supplied as a string
2711 2711

  
2712 2712
        Returns:
2713 2713
            PyXdmItem: A single Xdm Item is returned 
latest9.9/hej/net/sf/saxon/Version.java
13 13

  
14 14
public final class Version {
15 15

  
16
    private static final int[] STRUCTURED_VERSION = {9, 9, 1, 7};
17
    private static final String VERSION = "9.9.1.7";
16
    private static final int[] STRUCTURED_VERSION = {9, 9, 1, 8};
17
    private static final String VERSION = "9.9.1.8";
18 18
    private static final String BUILD = "030415"; //mmddhh
19 19
    private static final String RELEASE_DATE = "2020-03-04";
20 20
    private static final String MAJOR_RELEASE_DATE = "2018-09-27";

Also available in: Unified diff