Project

Profile

Help

Bug #3952 » SchemaValidator.cpp

Contains workaround fix - O'Neil Delpratt, 2018-10-05 19:06

 
1
#include "SchemaValidator.h"
2
#include "XdmNode.h"
3
#include "XdmValue.h"
4
#include "XdmItem.h"
5

    
6
//#define DEBUG
7

    
8
SchemaValidator::SchemaValidator() {
9
        SaxonProcessor *p = new SaxonProcessor(true);
10
        SchemaValidator(p, "");
11
}
12

    
13
SchemaValidator::SchemaValidator(SaxonProcessor* p, std::string curr){
14
        proc = p;
15
        /*
16
         * Look for class.
17
         */
18
        cppClass = lookForClass(SaxonProcessor::sxn_environ->env,
19
                        "net/sf/saxon/option/cpp/SchemaValidatorForCpp");
20
        if ((proc->proc) == NULL) {
21
                std::cerr << "Processor is NULL" << std::endl;
22
        }
23

    
24
        cppV = createSaxonProcessor2(SaxonProcessor::sxn_environ->env, cppClass,
25
                        "(Lnet/sf/saxon/s9api/Processor;)V", proc->proc);
26

    
27
#ifdef DEBUG
28
        jmethodID debugMID = SaxonProcessor::sxn_environ->env->GetStaticMethodID(cppClass, "setDebugMode", "(Z)V");
29
        SaxonProcessor::sxn_environ->env->CallStaticVoidMethod(cppClass, debugMID, (jboolean)true);
30
#endif    
31

    
32
        proc->exception = NULL;
33
        if(!(proc->cwd.empty()) && curr.empty()){
34
                cwdV = proc->cwd;
35
        } else {
36
                cwdV = curr;
37
        }
38
        if(exceptionOccurred()) {
39
                                if(proc->exception != NULL) {
40
                                        delete proc->exception;
41
                                }
42
                                proc->exception = proc->checkForExceptionCPP(SaxonProcessor::sxn_environ->env, cppClass, NULL);
43
                                
44
                             
45
                        
46
#ifdef DEBUG
47
                SaxonProcessor::sxn_environ->env->ExceptionDescribe();
48
#endif
49
                proc->exceptionClear();
50
        }
51

    
52
}
53

    
54
   void SchemaValidator::setcwd(const char* dir){
55
        if(dir==NULL) {
56
                    cwdV = std::string(dir);
57
        }
58
   }
59

    
60
  void SchemaValidator::setOutputFile(const char * sourceFile){
61
        outputFile = std::string(sourceFile);
62
  }
63

    
64
  XdmNode * SchemaValidator::getValidationReport(){
65
        jmethodID mID =
66
                (jmethodID) SaxonProcessor::sxn_environ->env->GetMethodID(cppClass, "getValidationReport", "()Lnet/sf/saxon/s9api/XdmNode;");
67
        if (!mID) {
68
                std::cerr << "Error: libsaxon." << "validate.getValidationReport()" << " not found\n"
69
                        << std::endl;
70
        } else {
71
                jobject result = (jobject)(
72
                        SaxonProcessor::sxn_environ->env->CallObjectMethod(cppV, mID));
73
                
74
                if (result) {
75
                        XdmNode * node = new XdmNode(result);
76
                        node->setProcessor(proc);
77
                        return node;
78
                }
79
        }
80
        return NULL;
81
}
82

    
83
  void SchemaValidator::registerSchemaFromFile(const char * sourceFile){
84
        if (sourceFile == NULL) {
85
                std::cerr << "Error:: sourceFile string cannot be empty or NULL" << std::endl;
86
             return;
87
        }
88
        
89
        jmethodID mID =
90
                (jmethodID) SaxonProcessor::sxn_environ->env->GetMethodID(cppClass, "registerSchema",
91
                                "(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;[Ljava/lang/Object;)V");
92
        if (!mID) {
93
                std::cerr << "Error: libsaxon." << "validate" << " not found\n"
94
                        << std::endl;
95
        } else {
96
        jobjectArray stringArray = NULL;
97
        jobjectArray objectArray = NULL;
98
        jclass objectClass = lookForClass(SaxonProcessor::sxn_environ->env, "java/lang/Object");
99
        jclass stringClass = lookForClass(SaxonProcessor::sxn_environ->env, "java/lang/String");
100

    
101
        int size = parameters.size() + properties.size();
102
#ifdef DEBUG
103
                std::cerr<<"Properties size: "<<properties.size()<<std::endl;
104
                std::cerr<<"Parameter size: "<<parameters.size()<<std::endl;
105
                std::cerr<<"size:"<<size<<std::endl;
106
#endif
107
        if (size > 0) {
108
                objectArray = SaxonProcessor::sxn_environ->env->NewObjectArray((jint) size,
109
                                objectClass, 0);
110
                stringArray = SaxonProcessor::sxn_environ->env->NewObjectArray((jint) size,
111
                                stringClass, 0);
112
                int i = 0;
113
                for (std::map<std::string, XdmValue*>::iterator iter = parameters.begin();
114
                                iter != parameters.end(); ++iter, i++) {
115
                        SaxonProcessor::sxn_environ->env->SetObjectArrayElement(stringArray, i,
116
                                        SaxonProcessor::sxn_environ->env->NewStringUTF((iter->first).c_str()));
117
                        SaxonProcessor::sxn_environ->env->SetObjectArrayElement(objectArray, i,
118
                                        (iter->second)->getUnderlyingValue(proc));
119
#ifdef DEBUG
120
                                std::string s1 = typeid(iter->second).name();
121
                                std::cerr<<"Type of itr:"<<s1<<std::endl;
122
                                jobject xx = (iter->second)->getUnderlyingValue(proc);
123
                                if(xx == NULL) {
124
                                        std::cerr<<"value failed"<<std::endl;
125
                                } else {
126

    
127
                                        std::cerr<<"Type of value:"<<(typeid(xx).name())<<std::endl;
128
                                }
129
                                if((iter->second)->getUnderlyingValue(proc) == NULL) {
130
                                        std::cerr<<"(iter->second)->getUnderlyingValue() is NULL"<<std::endl;
131
                                }
132
#endif
133
                }
134
                for (std::map<std::string, std::string>::iterator iter = properties.begin();
135
                                iter != properties.end(); ++iter, i++) {
136
                        SaxonProcessor::sxn_environ->env->SetObjectArrayElement(stringArray, i,
137
                                        SaxonProcessor::sxn_environ->env->NewStringUTF((iter->first).c_str()));
138
                        SaxonProcessor::sxn_environ->env->SetObjectArrayElement(objectArray, i,
139
                                        SaxonProcessor::sxn_environ->env->NewStringUTF((iter->second).c_str()));
140
                }
141
        }
142
        
143
                        SaxonProcessor::sxn_environ->env->CallVoidMethod(cppV, mID,
144
                                        SaxonProcessor::sxn_environ->env->NewStringUTF(cwdV.c_str()),
145
                                        SaxonProcessor::sxn_environ->env->NewStringUTF(sourceFile), stringArray, objectArray);
146

    
147
        if (size > 0) {
148
                SaxonProcessor::sxn_environ->env->DeleteLocalRef(stringArray);
149
                SaxonProcessor::sxn_environ->env->DeleteLocalRef(objectArray);
150
        }
151

    
152
}
153
                if(exceptionOccurred()) {
154
                                if(proc->exception != NULL) {
155
                                        delete proc->exception;
156
                                }
157
                                proc->exception = proc->checkForExceptionCPP(SaxonProcessor::sxn_environ->env, cppClass, NULL);
158
                                
159
                             
160
                        
161
#ifdef DEBUG
162
                SaxonProcessor::sxn_environ->env->ExceptionDescribe();
163
#endif
164
                proc->exceptionClear();
165
        }
166
 }
167

    
168
  void SchemaValidator::registerSchemaFromString(const char * sourceStr){
169
        setProperty("resources", proc->getResourcesDirectory());
170
        
171
        if (sourceStr == NULL) {
172
                std::cerr << "Error:: Schema string cannot be empty or NULL" << std::endl;
173
             return;
174
        }
175
        jmethodID mID =
176
                (jmethodID) SaxonProcessor::sxn_environ->env->GetMethodID(cppClass, "registerSchemaString",
177
                                "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;[Ljava/lang/Object;)V");
178

    
179
        if (!mID) {
180
                std::cerr << "Error: libsaxon." << "registerSchemaString" << " not found\n"
181
                        << std::endl;
182
        } else {
183
        jobjectArray stringArray = NULL;
184
        jobjectArray objectArray = NULL;
185
        jclass objectClass = lookForClass(SaxonProcessor::sxn_environ->env, "java/lang/Object");
186
        jclass stringClass = lookForClass(SaxonProcessor::sxn_environ->env, "java/lang/String");
187

    
188
        int size = parameters.size() + properties.size();
189
#ifdef DEBUG
190
                std::cerr<<"Properties size: "<<properties.size()<<std::endl;
191
                std::cerr<<"Parameter size: "<<parameters.size()<<std::endl;
192
                std::cerr<<"size:"<<size<<std::endl;
193
#endif
194

    
195
        if (size > 0) {
196
                objectArray = SaxonProcessor::sxn_environ->env->NewObjectArray((jint) size,
197
                                objectClass, 0);
198
                stringArray = SaxonProcessor::sxn_environ->env->NewObjectArray((jint) size,
199
                                stringClass, 0);
200
                int i = 0;
201
                for (std::map<std::string, XdmValue*>::iterator iter = parameters.begin();
202
                                iter != parameters.end(); ++iter, i++) {
203
                        SaxonProcessor::sxn_environ->env->SetObjectArrayElement(stringArray, i,
204
                                        SaxonProcessor::sxn_environ->env->NewStringUTF((iter->first).c_str()));
205
                        SaxonProcessor::sxn_environ->env->SetObjectArrayElement(objectArray, i,
206
                                        (iter->second)->getUnderlyingValue(proc));
207
#ifdef DEBUG
208
                                std::string s1 = typeid(iter->second).name();
209
                                std::cerr<<"Type of itr:"<<s1<<std::endl;
210
                                jobject xx = (iter->second)->getUnderlyingValue(proc);
211
                                if(xx == NULL) {
212
                                        std::cerr<<"value failed"<<std::endl;
213
                                } else {
214

    
215
                                        std::cerr<<"Type of value:"<<(typeid(xx).name())<<std::endl;
216
                                }
217
                                if((iter->second)->getUnderlyingValue(proc) == NULL) {
218
                                        std::cerr<<"(iter->second)->getUnderlyingValue() is NULL"<<std::endl;
219
                                }
220
#endif
221
                }
222
                for (std::map<std::string, std::string>::iterator iter = properties.begin();
223
                                iter != properties.end(); ++iter, i++) {
224
                        SaxonProcessor::sxn_environ->env->SetObjectArrayElement(stringArray, i,
225
                                        SaxonProcessor::sxn_environ->env->NewStringUTF((iter->first).c_str()));
226
                        SaxonProcessor::sxn_environ->env->SetObjectArrayElement(objectArray, i,
227
                                        SaxonProcessor::sxn_environ->env->NewStringUTF((iter->second).c_str()));
228
                }
229
        }
230

    
231
        
232
                        SaxonProcessor::sxn_environ->env->CallVoidMethod(cppV, mID,
233
                                        SaxonProcessor::sxn_environ->env->NewStringUTF(cwdV.c_str()),
234
                                        (sourceStr != NULL ? SaxonProcessor::sxn_environ->env->NewStringUTF(sourceStr) : NULL), NULL, stringArray, objectArray);
235

    
236
        if (size > 0) {
237
                SaxonProcessor::sxn_environ->env->DeleteLocalRef(stringArray);
238
                SaxonProcessor::sxn_environ->env->DeleteLocalRef(objectArray);
239
        }
240

    
241
}
242

    
243
                if(exceptionOccurred()) {
244

    
245
                                if(proc->exception != NULL) {
246
                                        delete proc->exception;
247
                                }
248
                                proc->exception = proc->checkForExceptionCPP(SaxonProcessor::sxn_environ->env, cppClass, NULL);
249
                                
250
                             
251
#ifdef DEBUG
252
                        SaxonProcessor::sxn_environ->env->ExceptionDescribe();
253
#endif
254
                        proc->exceptionClear();
255
                }
256

    
257
        
258
}
259

    
260
  void SchemaValidator::validate(const char * sourceFile){
261
        /*if (sourceFile == NULL) {
262
                std::cerr << "Error:: sourceFile string cannot be empty or NULL" << std::endl;
263
             return;
264
        }*/
265
setProperty("resources", proc->getResourcesDirectory());
266
jmethodID mID =
267
                (jmethodID) SaxonProcessor::sxn_environ->env->GetMethodID(cppClass, "validate",
268
                                "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;[Ljava/lang/Object;)V");
269
if (!mID) {
270
        std::cerr << "Error: libsaxon." << "validate" << " not found\n"
271
                        << std::endl;
272

    
273
} else {
274
        jobjectArray stringArray = NULL;
275
        jobjectArray objectArray = NULL;
276
        jclass objectClass = lookForClass(SaxonProcessor::sxn_environ->env, "java/lang/Object");
277
        jclass stringClass = lookForClass(SaxonProcessor::sxn_environ->env, "java/lang/String");
278

    
279
        int size = parameters.size() + properties.size();
280
        if(lax) {
281
                size++;
282
        }
283
#ifdef DEBUG
284
                std::cerr<<"Properties size: "<<properties.size()<<std::endl;
285
                std::cerr<<"Parameter size: "<<parameters.size()<<std::endl;
286
                std::cerr<<"size:"<<size<<std::endl;
287
#endif
288
        if (size > 0) {
289
                objectArray = SaxonProcessor::sxn_environ->env->NewObjectArray((jint) size,
290
                                objectClass, 0);
291
                stringArray = SaxonProcessor::sxn_environ->env->NewObjectArray((jint) size,
292
                                stringClass, 0);
293
                int i = 0;
294
                if(lax){
295
        SaxonProcessor::sxn_environ->env->SetObjectArrayElement(stringArray, i,
296
                                        SaxonProcessor::sxn_environ->env->NewStringUTF("lax"));
297
                        SaxonProcessor::sxn_environ->env->SetObjectArrayElement(objectArray, i,
298
                                        booleanValue(*(SaxonProcessor::sxn_environ), lax));
299
                i++;
300
                }
301
                for (std::map<std::string, XdmValue*>::iterator iter = parameters.begin();
302
                                iter != parameters.end(); ++iter, i++) {
303
                        SaxonProcessor::sxn_environ->env->SetObjectArrayElement(stringArray, i,
304
                                        SaxonProcessor::sxn_environ->env->NewStringUTF((iter->first).c_str()));
305
                        SaxonProcessor::sxn_environ->env->SetObjectArrayElement(objectArray, i,
306
                                        (iter->second)->getUnderlyingValue(proc));
307

    
308
#ifdef DEBUG
309
                                std::string s1 = typeid(iter->second).name();
310
                                std::cerr<<"param-name:"<<(iter->first)<<",  "<<"Type of itr:"<<s1<<std::endl;
311
                                jobject xx = (iter->second)->getUnderlyingValue(proc);
312
                                if(xx == NULL) {
313
                                        std::cerr<<"value failed"<<std::endl;
314
                                } else {
315

    
316
                                        std::cerr<<"Type of value:"<<(typeid(xx).name())<<std::endl;
317
                                }
318
                                if((iter->second)->getUnderlyingValue(proc) == NULL) {
319
                                        std::cerr<<"(iter->second)->getUnderlyingValue() is NULL"<<std::endl;
320
                                }
321
#endif
322
                }
323
                for (std::map<std::string, std::string>::iterator iter = properties.begin();
324
                                iter != properties.end(); ++iter, i++) {
325
                        SaxonProcessor::sxn_environ->env->SetObjectArrayElement(stringArray, i,
326
                                        SaxonProcessor::sxn_environ->env->NewStringUTF((iter->first).c_str()));
327
                        SaxonProcessor::sxn_environ->env->SetObjectArrayElement(objectArray, i,
328
                                        SaxonProcessor::sxn_environ->env->NewStringUTF((iter->second).c_str()));
329

    
330
                }
331
        }
332
        
333
                        SaxonProcessor::sxn_environ->env->CallVoidMethod(cppV, mID,
334
                                        SaxonProcessor::sxn_environ->env->NewStringUTF(cwdV.c_str()), 
335
                                        (sourceFile != NULL ? SaxonProcessor::sxn_environ->env->NewStringUTF(sourceFile) : NULL), (outputFile.empty() ? NULL : outputFile.c_str() ), stringArray, objectArray);
336

    
337
        if (size > 0) {
338
                SaxonProcessor::sxn_environ->env->DeleteLocalRef(stringArray);
339
                SaxonProcessor::sxn_environ->env->DeleteLocalRef(objectArray);
340
        }
341
                if(exceptionOccurred()) {
342
                        if(proc->exception != NULL) {
343
                                delete proc->exception;
344
                        }
345
                                proc->exception = proc->checkForExceptionCPP(SaxonProcessor::sxn_environ->env, cppClass, NULL);
346
                                
347
                             
348

    
349

    
350
#ifdef DEBUG
351
        SaxonProcessor::sxn_environ->env->ExceptionDescribe();
352
#endif
353
                        proc->exceptionClear();
354
                }
355
                }        
356
}
357
   
358
XdmNode * SchemaValidator::validateToNode(const char * sourceFile){
359
        if (sourceFile == NULL) {
360
                std::cerr << "Error:: source file string cannot be empty or NULL" << std::endl;
361
             return NULL;
362
        }
363
setProperty("resources", proc->getResourcesDirectory());
364
jmethodID mID =
365
                (jmethodID) SaxonProcessor::sxn_environ->env->GetMethodID(cppClass, "validateToNode",
366
                                "(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;[Ljava/lang/Object;)Lnet/sf/saxon/s9api/XdmNode;");
367
if (!mID) {
368
        std::cerr << "Error: libsaxon." << "validate" << " not found\n"
369
                        << std::endl;
370

    
371
} else {
372
        jobjectArray stringArray = NULL;
373
        jobjectArray objectArray = NULL;
374
        jclass objectClass = lookForClass(SaxonProcessor::sxn_environ->env, "java/lang/Object");
375
        jclass stringClass = lookForClass(SaxonProcessor::sxn_environ->env, "java/lang/String");
376

    
377
        int size = parameters.size() + properties.size();
378
#ifdef DEBUG
379
                std::cerr<<"Properties size: "<<properties.size()<<std::endl;
380
                std::cerr<<"Parameter size: "<<parameters.size()<<std::endl;
381
                std::cerr<<"size:"<<size<<std::endl;
382
#endif
383
        if (size > 0) {
384
                objectArray = SaxonProcessor::sxn_environ->env->NewObjectArray((jint) size,
385
                                objectClass, 0);
386
                stringArray = SaxonProcessor::sxn_environ->env->NewObjectArray((jint) size,
387
                                stringClass, 0);
388
                int i = 0;
389
                for (std::map<std::string, XdmValue*>::iterator iter = parameters.begin();
390
                                iter != parameters.end(); ++iter, i++) {
391
                        SaxonProcessor::sxn_environ->env->SetObjectArrayElement(stringArray, i,
392
                                        SaxonProcessor::sxn_environ->env->NewStringUTF((iter->first).c_str()));
393
                        SaxonProcessor::sxn_environ->env->SetObjectArrayElement(objectArray, i,
394
                                        (iter->second)->getUnderlyingValue(proc));
395
#ifdef DEBUG
396
                                std::string s1 = typeid(iter->second).name();
397
                                std::cerr<<"Type of itr:"<<s1<<std::endl;
398
                                jobject xx = (iter->second)->getUnderlyingValue(proc);
399
                                if(xx == NULL) {
400
                                        std::cerr<<"value failed"<<std::endl;
401
                                } else {
402

    
403
                                        std::cerr<<"Type of value:"<<(typeid(xx).name())<<std::endl;
404
                                }
405
                                if((iter->second)->getUnderlyingValue(proc) == NULL) {
406
                                        std::cerr<<"(iter->second)->getUnderlyingValue() is NULL"<<std::endl;
407
                                }
408
#endif
409
                }
410
                for (std::map<std::string, std::string>::iterator iter = properties.begin();
411
                                iter != properties.end(); ++iter, i++) {
412
                        SaxonProcessor::sxn_environ->env->SetObjectArrayElement(stringArray, i,
413
                                        SaxonProcessor::sxn_environ->env->NewStringUTF((iter->first).c_str()));
414
                        SaxonProcessor::sxn_environ->env->SetObjectArrayElement(objectArray, i,
415
                                        SaxonProcessor::sxn_environ->env->NewStringUTF((iter->second).c_str()));
416
                }
417
        }
418
        jobject result = (jobject)(
419
                        SaxonProcessor::sxn_environ->env->CallObjectMethod(cppV, mID,
420
                                        SaxonProcessor::sxn_environ->env->NewStringUTF(cwdV.c_str()),
421
                                        SaxonProcessor::sxn_environ->env->NewStringUTF(sourceFile), stringArray, objectArray));
422
        if (size > 0) {
423
                SaxonProcessor::sxn_environ->env->DeleteLocalRef(stringArray);
424
                SaxonProcessor::sxn_environ->env->DeleteLocalRef(objectArray);
425
        }
426
        if (result) {
427
                XdmNode * node = new XdmNode(result);
428
                node->setProcessor(proc);
429
                return node;
430
        }
431

    
432
}
433
#ifdef DEBUG
434
        SaxonProcessor::sxn_environ->env->ExceptionDescribe();
435
#endif
436
SaxonProcessor::sxn_environ->env->ExceptionClear();
437

    
438
}
439

    
440
void SchemaValidator::exceptionClear(){
441
 if(proc->exception != NULL) {
442
         delete proc->exception;
443
         proc->exception = NULL;
444
 }
445
   SaxonProcessor::sxn_environ->env->ExceptionClear();
446
 }
447

    
448
const char * SchemaValidator::getErrorCode(int i) {
449
        if(proc->exception == NULL) {return NULL;}
450
        return proc->exception->getErrorCode(i);
451
}
452

    
453
const char * SchemaValidator::getErrorMessage(int i ){
454
 if(proc->exception == NULL) {return NULL;}
455
 return proc->exception->getErrorMessage(i);
456
 }
457

    
458
bool SchemaValidator::exceptionOccurred() {
459
        return proc->exceptionOccurred() || proc->exception != NULL;
460
}
461

    
462
const char* SchemaValidator::checkException() {
463
        /*if(proc->exception == NULL) {
464
         proc->exception = proc->checkForException(environ, cppClass, cpp);
465
         }
466
         return proc->exception;*/
467
        return checkForException(*(SaxonProcessor::sxn_environ), cppClass, cppV);
468
}
469

    
470
int SchemaValidator::exceptionCount(){
471
 if(proc->exception != NULL){
472
 return proc->exception->count();
473
 }
474
 return 0;
475
 }
476

    
477
void SchemaValidator::setSourceNode(XdmNode * value) {
478
    if(value != NULL){
479
      value->incrementRefCount();
480
      parameters["node"] = (XdmValue *)value;
481
    }
482

    
483
        
484
}
485

    
486
void SchemaValidator::setParameter(const char * name, XdmValue*value) {
487
        if(value != NULL){
488
                value->incrementRefCount();
489
                parameters["param:"+std::string(name)] = value;
490
        }
491
}
492

    
493
bool SchemaValidator::removeParameter(const char * name) {
494
        return (bool)(parameters.erase("param:"+std::string(name)));
495
}
496

    
497
void SchemaValidator::setProperty(const char * name, const char * value) {
498
#ifdef DEBUG        
499
        if(value == NULL) {
500
                std::cerr<<"Validator setProperty is NULL"<<std::endl;
501
        }
502
#endif
503
        properties.insert(std::pair<std::string, std::string>(std::string(name), std::string((value== NULL ? "" : value))));
504
}
505

    
506
void SchemaValidator::clearParameters(bool delVal) {
507
        if(delVal){
508
                       for(std::map<std::string, XdmValue*>::iterator itr = parameters.begin(); itr != parameters.end(); itr++){
509
                        XdmValue * value = itr->second;
510
                        value->decrementRefCount();
511
#ifdef DEBUG
512
                        std::cout<<"SchemaValidator.clearParameter() - XdmValue refCount="<<value->getRefCount()<<std::endl;
513
#endif
514
                        if(value != NULL && value->getRefCount() < 1){                
515
                                delete value;
516
                        }
517
                }
518
                parameters.clear();
519
        }
520
}
521

    
522
void SchemaValidator::clearProperties() {
523
        properties.clear();
524
}
525

    
526
std::map<std::string,XdmValue*>& SchemaValidator::getParameters(){
527
        std::map<std::string,XdmValue*>& ptr = parameters;
528
        return ptr;
529
}
530

    
531
std::map<std::string,std::string>& SchemaValidator::getProperties(){
532
        std::map<std::string,std::string> &ptr = properties;
533
        return ptr;
534
}
(2-2/2)