Project

Profile

Help

Revision 00082f6f

Added by O'Neil Delpratt 5 months ago

Saxon/C bug fixes

View differences:

src/main/c/samples/cppTests/testXSLT30.cpp
189 189

  
190 190

  
191 191
    sresult->failure++;
192
    cout << endl << "cpp1" << endl;
192 193
    sresult->failureList.push_back("testApplyTemplates2a");
193 194
    fflush(stdout);
194 195
    delete executable;
......
284 285
void testTransformToString4(SaxonProcessor *processor, Xslt30Processor *trans, sResultCount *sresult) {
285 286

  
286 287
    cout << endl << "Test: testTransformToString4:" << endl;
288
    cout << endl << "cpp0-1" << endl;
289
    SaxonProcessor::sxn_environ->env->ExceptionDescribe();
290

  
287 291
    trans->clearParameters(true);
292
    cout << endl << "cpp0-2" << endl;
293
    SaxonProcessor::sxn_environ->env->ExceptionDescribe();
288 294

  
289 295
    XdmNode *input = processor->parseXmlFromString(
290 296
            "<out><person>text1</person><person>text2</person><person>text3</person></out>");
......
302 308
    values->addXdmItem((XdmItem *) processor->makeIntegerValue(6));
303 309
    values->addXdmItem((XdmItem *) processor->makeIntegerValue(7));
304 310

  
305

  
311
    SaxonProcessor::sxn_environ->env->ExceptionDescribe();
306 312

  
307 313
   /* XdmNode *sheet = processor->parseXmlFromFile("test2.xsl");
308 314

  
......
1390 1396

  
1391 1397
void testCatalog(const char * cwd, SaxonProcessor * proc, sResultCount *sresult) {
1392 1398

  
1399

  
1393 1400
    cout << endl << "Test: testCatalog" << endl;
1394 1401
    bool trace = false;
1395 1402
    proc->setcwd(cwd);
......
1397 1404

  
1398 1405
    Xslt30Processor * trans = proc->newXslt30Processor();
1399 1406

  
1400

  
1401 1407
    XsltExecutable  * executable = trans->compileFromFile("../php/catalog-test/test1.xsl");
1402 1408

  
1403 1409
    if(executable == nullptr) {
1410

  
1404 1411
        if (trans->exceptionOccurred()) {
1405
            const char *message = trans->getErrorMessage();
1406
            cout << "exception=" << message << endl;
1407
        }
1412

  
1413
            if(trans->getErrorMessage() != nullptr) {
1414
                const char *message = trans->getErrorMessage();
1415
                cout << "exception=" << message << endl;
1416
            } else {
1417
                const char *message = proc->getErrorMessage();
1418
                if(message != nullptr) {
1419
                    cout << "exception=" << message << endl;
1420
                }
1421
            }
1422
            }
1408 1423
        return;
1409 1424
    }
1410 1425

  
......
1528 1543
    testApplyTemplates2a(processor, trans, sresult);
1529 1544

  
1530 1545
    testTransformToString4(processor, trans, sresult);
1531
    processor->release();
1532
    return 0;
1546

  
1533 1547

  
1534 1548
    testCatalog(cwd, processor,  sresult);
1549
    processor->release();
1550
    return 0;
1535 1551

  
1536 1552
    testTransformToString2b(processor, trans, sresult);
1537 1553

  

Also available in: Unified diff