Project

Profile

Help

Revision fc47eaa6

Added by O'Neil Delpratt 10 months ago

Saxon/C test file update & build fixup

View differences:

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

  
349 349
    std::map<std::string, XdmValue *> parMap = trans->getParameters();
350 350
    if (parMap.size() > 0) {
351
        cout << "Parameter size: " << parMap.size() << endl;
352
        cout << "Parameter size: " << parMap.size()
353
             << endl;//", Value:"<<trans->getParameters()["value0"]->getHead()->getStringValue()<<endl;
351
        //cout << "Parameter size: " << parMap.size() << endl;
352
        //cout << "Parameter size: " << parMap.size()<< endl;//", Value:"<<trans->getParameters()["value0"]->getHead()->getStringValue()<<endl;
354 353
        ostringstream name1;
355 354
        for (int i = 0; i < 10; i++) {
356 355
            name1 << "param:value" << i;
......
527 526

  
528 527
void exampleSimple2(Xslt30Processor *proc, sResultCount *sresult) {
529 528
    cout << "<b>exampleSimple2:</b><br/>" << endl;
530
    //proc->setcwd("");
529
    proc->setcwd("/Users/ond1/work/development/git/saxon-dev/saxondev/src/main/c/samples/cppTests");
531 530

  
532 531
    XsltExecutable * executable = proc->compileFromFile("../php/xsl/foo.xsl");
532
    if(executable == NULL) {
533
        sresult->failure++;
534
        sresult->failureList.push_back("exampleSimple2");
535
        cerr << "exampleSimple2 NULL found" << endl;
536
        if (executable->exceptionOccurred()) {
537
            cerr <<"exampleSimple2 error: "<< proc->getErrorMessage() << endl;
538
        }
539
        return;
540
    }
541
    cout << "exampleSimple2 cp0" << endl;
533 542
    executable->setInitialMatchSelectionAsFile("../php/xml/foo.xml");
534 543
    const char *filename = "output1.xml";
535 544
    executable->setOutputFile(filename);
......
1220 1229

  
1221 1230
int main() {
1222 1231

  
1223

  
1224 1232
    SaxonProcessor *processor = new SaxonProcessor(true);
1233
    processor->setConfigurationProperty("http://saxon.sf.net/feature/licenseFileLocation", "/usr/local/lib/saxon-license.lic");
1225 1234
    cout << "Test: Xslt30Processor with Saxon version=" << processor->version() << endl << endl;
1226 1235
    char cwd[256];
1227 1236
    char buff[FILENAME_MAX]; //create string buffer to hold path

Also available in: Unified diff