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/build64-linux.sh
22 22

  
23 23
gcc -m64  -c ../../Saxon.C.API/SaxonCXPath.c -o bin/SaxonCXPath.o -ldl -lc $TURN_ERRORS_TO_WARNINGS $SAXON_ERRORS $1 $2
24 24

  
25
g++ -m64  -c ../../Saxon.C.API/XdmValue.cpp -o bin/XdmValue.o -ldl -lc $TURN_ERRORS_TO_WARNINGS $SAXON_ERRORS $1 $2
25
g++ -std=c++14 -m64   -c cppExentionFunction.cpp -o bin/cppExentionFunction.o -ldl -lc $TURN_ERRORS_TO_WARNINGS $SAXON_ERRORS $1 $2
26 26

  
27
g++ -m64  -c ../../Saxon.C.API/XdmItem.cpp -o bin/XdmItem.o -ldl -lc $TURN_ERRORS_TO_WARNINGS $SAXON_ERRORS $1 $2
27
g++  -std=c++14 -m64  -c ../../Saxon.C.API/XdmValue.cpp -o bin/XdmValue.o -ldl -lc $TURN_ERRORS_TO_WARNINGS $SAXON_ERRORS $1 $2
28 28

  
29
g++ -m64  -c ../../Saxon.C.API/XdmNode.cpp -o bin/XdmNode.o -ldl -lc $TURN_ERRORS_TO_WARNINGS $SAXON_ERRORS $1 $2
29
g++  -std=c++14 -m64  -c ../../Saxon.C.API/XdmItem.cpp -o bin/XdmItem.o -ldl -lc $TURN_ERRORS_TO_WARNINGS $SAXON_ERRORS $1 $2
30 30

  
31
g++ -m64  -c ../../Saxon.C.API/XdmAtomicValue.cpp -o bin/XdmAtomicValue.o -ldl -lc $TURN_ERRORS_TO_WARNINGS $SAXON_ERRORS $1 $2
31
g++  -std=c++14 -m64  -c ../../Saxon.C.API/XdmNode.cpp -o bin/XdmNode.o -ldl -lc $TURN_ERRORS_TO_WARNINGS $SAXON_ERRORS $1 $2
32 32

  
33
g++ -m64  -c ../../Saxon.C.API/SaxonProcessor.cpp -o bin/SaxonProcessor.o -ldl -lc $TURN_ERRORS_TO_WARNINGS $SAXON_ERRORS $1 $2
33
g++ -std=c++14 -m64   -c ../../Saxon.C.API/XdmMap.cpp -o bin/XdmMap.o -ldl -lc $TURN_ERRORS_TO_WARNINGS $SAXON_ERRORS $1 $2
34 34

  
35
g++ -m64  -c ../../Saxon.C.API/XsltProcessor.cpp -o bin/XsltProcessor.o -ldl -lc $TURN_ERRORS_TO_WARNINGS $SAXON_ERRORS $1 $2
35
g++ -std=c++14 -m64   -c ../../Saxon.C.API/XdmArray.cpp -o bin/XdmArray.o -ldl -lc $TURN_ERRORS_TO_WARNINGS $SAXON_ERRORS $1 $2
36 36

  
37
g++ -m64  -c ../../Saxon.C.API/Xslt30Processor.cpp -o bin/Xslt30Processor.o -ldl -lc $TURN_ERRORS_TO_WARNINGS $SAXON_ERRORS $1 $2
37
g++ -std=c++14 -m64   -c ../../Saxon.C.API/XdmFunctionItem.cpp -o bin/XdmFunctionItem.o -ldl -lc $TURN_ERRORS_TO_WARNINGS $SAXON_ERRORS $1 $2
38 38

  
39
g++ -m64 -c ../../Saxon.C.API/XQueryProcessor.cpp -o bin/XQueryProcessor.o -ldl -lc $TURN_ERRORS_TO_WARNINGS $SAXON_ERRORS $1 $2
39
g++  -std=c++14 -m64  -c ../../Saxon.C.API/XdmAtomicValue.cpp -o bin/XdmAtomicValue.o -ldl -lc $TURN_ERRORS_TO_WARNINGS $SAXON_ERRORS $1 $2
40 40

  
41
g++ -m64 -c ../../Saxon.C.API/XPathProcessor.cpp -o bin/XPathProcessor.o -ldl -lc $TURN_ERRORS_TO_WARNINGS $SAXON_ERRORS $1 $2
41
g++  -std=c++14 -m64  -c ../../Saxon.C.API/SaxonProcessor.cpp -o bin/SaxonProcessor.o -ldl -lc $TURN_ERRORS_TO_WARNINGS $SAXON_ERRORS $1 $2
42 42

  
43
g++ -m64 -c ../../Saxon.C.API/SchemaValidator.cpp -o bin/SchemaValidator.o -ldl -lc $TURN_ERRORS_TO_WARNINGS $SAXON_ERRORS $1 $2
43
g++ -std=c++14 -m64   -c ../../Saxon.C.API/SaxonApiException.cpp -o bin/SaxonApiException.o -ldl -lc $TURN_ERRORS_TO_WARNINGS $SAXON_ERRORS $1 $2
44 44

  
45
g++ -m64  bin/SaxonCGlue.o bin/SaxonCXPath.o bin/SaxonProcessor.o bin/XQueryProcessor.o bin/XsltProcessor.o bin/Xslt30Processor.o bin/XPathProcessor.o bin/XdmValue.o bin/XdmItem.o bin/XdmNode.o bin/XdmAtomicValue.o bin/SchemaValidator.o testXSLT.cpp -o testXSLT -ldl -lc $TURN_ERRORS_TO_WARNINGS $SAXON_ERRORS $1 $2
45
g++  -std=c++14 -m64  -c ../../Saxon.C.API/XsltProcessor.cpp -o bin/XsltProcessor.o -ldl -lc $TURN_ERRORS_TO_WARNINGS $SAXON_ERRORS $1 $2
46 46

  
47
g++ -m64  bin/SaxonCGlue.o bin/SaxonCXPath.o bin/SaxonProcessor.o bin/XQueryProcessor.o bin/XsltProcessor.o bin/Xslt30Processor.o bin/XPathProcessor.o bin/XdmValue.o bin/XdmItem.o bin/XdmNode.o bin/XdmAtomicValue.o bin/SchemaValidator.o testXSLT30.cpp -o testXSLT30 -ldl -lc $TURN_ERRORS_TO_WARNINGS $SAXON_ERRORS $1 $2
47
g++  -std=c++14 -m64  -c ../../Saxon.C.API/Xslt30Processor.cpp -o bin/Xslt30Processor.o -ldl -lc $TURN_ERRORS_TO_WARNINGS $SAXON_ERRORS $1 $2
48 48

  
49
g++ -std=c++14 -m64   -c ../../Saxon.C.API/XsltExecutable.cpp -o bin/XsltExecutable.o -ldl -lc $TURN_ERRORS_TO_WARNINGS $SAXON_ERRORS $1 $2
49 50

  
50
g++ -m64  bin/SaxonCGlue.o bin/SaxonCXPath.o bin/SaxonProcessor.o bin/XQueryProcessor.o bin/XsltProcessor.o bin/Xslt30Processor.o bin/XPathProcessor.o bin/XdmValue.o bin/XdmItem.o bin/XdmNode.o bin/XdmAtomicValue.o bin/SchemaValidator.o testXQuery.cpp -o testXQuery -ldl -lc $TURN_ERRORS_TO_WARNINGS $SAXON_ERRORS $1 $2
51
g++  -std=c++14 -m64 -c ../../Saxon.C.API/XQueryProcessor.cpp -o bin/XQueryProcessor.o -ldl -lc $TURN_ERRORS_TO_WARNINGS $SAXON_ERRORS $1 $2
51 52

  
53
g++  -std=c++14 -m64 -c ../../Saxon.C.API/XPathProcessor.cpp -o bin/XPathProcessor.o -ldl -lc $TURN_ERRORS_TO_WARNINGS $SAXON_ERRORS $1 $2
52 54

  
53
g++ -m64  bin/SaxonCGlue.o bin/SaxonCXPath.o bin/SaxonProcessor.o bin/XQueryProcessor.o bin/XsltProcessor.o bin/Xslt30Processor.o bin/XPathProcessor.o bin/XdmValue.o bin/XdmItem.o bin/XdmNode.o bin/XdmAtomicValue.o bin/SchemaValidator.o testXPath.cpp -o testXPath -ldl -lc $TURN_ERRORS_TO_WARNINGS $SAXON_ERRORS $1 $2
55
g++  -std=c++14 -m64 -c ../../Saxon.C.API/SchemaValidator.cpp -o bin/SchemaValidator.o -ldl -lc $TURN_ERRORS_TO_WARNINGS $SAXON_ERRORS $1 $2
54 56

  
55
g++ -m64  bin/SaxonCGlue.o bin/SaxonCXPath.o bin/SaxonProcessor.o bin/XQueryProcessor.o bin/XsltProcessor.o bin/Xslt30Processor.o bin/XPathProcessor.o bin/XdmValue.o bin/XdmItem.o bin/XdmNode.o bin/XdmAtomicValue.o bin/SchemaValidator.o testValidator.cpp -o testValidator -ldl -lc $TURN_ERRORS_TO_WARNINGS $SAXON_ERRORS $1 $2
57
g++  -std=c++14 -m64   bin/SaxonCGlue.o bin/SaxonCXPath.o bin/SaxonProcessor.o bin/XQueryProcessor.o bin/XsltProcessor.o bin/XsltExecutable.o bin/Xslt30Processor.o bin/XPathProcessor.o bin/XdmValue.o bin/XdmItem.o bin/XdmNode.o bin/XdmAtomicValue.o bin/XdmArray.o bin/XdmMap.o bin/XdmFunctionItem.o bin/SchemaValidator.o bin/SaxonApiException.o testXSLT.cpp -o testXSLT -ldl -lc $TURN_ERRORS_TO_WARNINGS $SAXON_ERRORS $1 $2
56 58

  
57
g++ -fPIC -shared -m64  cppExtensionFunction.cpp -o bin/cppExtensionFunction.o $TURN_ERRORS_TO_WARNINGS $SAXON_ERRORS $1 $2
59
g++  -std=c++14 -m64  bin/SaxonCGlue.o bin/SaxonCGlue.o bin/SaxonCXPath.o bin/SaxonProcessor.o bin/XQueryProcessor.o bin/XsltProcessor.o bin/XsltExecutable.o bin/Xslt30Processor.o bin/XPathProcessor.o bin/XdmValue.o bin/XdmItem.o bin/XdmNode.o bin/XdmAtomicValue.o bin/XdmArray.o bin/XdmMap.o bin/XdmFunctionItem.o bin/SchemaValidator.o bin/SaxonApiException.o testXSLT30.cpp -o testXSLT30 -ldl -lc $TURN_ERRORS_TO_WARNINGS $SAXON_ERRORS $1 $2
58 60

  
59
g++ -m64 -shared -Wl,-soname,cppExtensionFunction.so -o  cppExtensionFunction.so bin/cppExtensionFunction.o $TURN_ERRORS_TO_WARNINGS $SAXON_ERRORS $1 $2
61

  
62
g++  -std=c++14 -m64  bin/SaxonCGlue.o bin/SaxonCXPath.o bin/SaxonProcessor.o bin/XQueryProcessor.o bin/XsltProcessor.o bin/Xslt30Processor.o bin/XPathProcessor.o bin/XdmValue.o bin/XdmItem.o bin/XdmNode.o bin/XdmAtomicValue.o bin/XdmArray.o bin/XdmFunctionItem.o bin/XdmMap.o bin/SchemaValidator.o bin/SaxonApiException.o testXQuery.cpp -o testXQuery -ldl -lc $TURN_ERRORS_TO_WARNINGS $SAXON_ERRORS $1 $2
63

  
64

  
65
g++  -std=c++14 -m64  bin/SaxonCGlue.o bin/SaxonCXPath.o bin/SaxonProcessor.o bin/XQueryProcessor.o bin/XsltProcessor.o bin/Xslt30Processor.o bin/XPathProcessor.o bin/XdmValue.o bin/XdmItem.o bin/XdmNode.o bin/XdmAtomicValue.o bin/XdmArray.o bin/XdmFunctionItem.o bin/XdmMap.o bin/SchemaValidator.o bin/SaxonApiException.o testXPath.cpp -o testXPath -ldl -lc $TURN_ERRORS_TO_WARNINGS $SAXON_ERRORS $1 $2
66

  
67
g++  -std=c++14 -m64  bin/SaxonCGlue.o bin/SaxonCXPath.o bin/SaxonProcessor.o bin/XQueryProcessor.o bin/XsltProcessor.o bin/Xslt30Processor.o bin/XPathProcessor.o bin/XdmValue.o bin/XdmItem.o bin/XdmNode.o bin/XdmAtomicValue.o bin/XdmArray.o bin/XdmFunctionItem.o bin/XdmMap.o bin/SchemaValidator.o bin/SaxonApiException.o testValidator.cpp -o testValidator -ldl -lc $TURN_ERRORS_TO_WARNINGS $SAXON_ERRORS $1 $2
68

  
69
g++  -std=c++14 -fPIC -shared -m64  cppExtensionFunction.cpp -o bin/cppExtensionFunction.o $TURN_ERRORS_TO_WARNINGS $SAXON_ERRORS $1 $2
70

  
71
g++  -std=c++14 -m64 -shared -Wl,-soname,cppExtensionFunction.so -o  cppExtensionFunction.so bin/cppExtensionFunction.o $TURN_ERRORS_TO_WARNINGS $SAXON_ERRORS $1 $2
src/main/c/samples/cppTests/build64-mac.sh
56 56

  
57 57
g++ -std=c++14 -m64 -fPIC -I$jdkdir  -I$jdkdir/unix -c ../../Saxon.C.API/SchemaValidator.cpp -o bin/SchemaValidator.o $1 $2
58 58

  
59
g++ -std=c++14 -m64 -fPIC -I$jdkdir  -I$jdkdir/unix -c ../../Saxon.C.API/SaxonApiException.cpp -o bin/SaxonApiException.o $1 $2
60

  
61 59
g++ -std=c++14  -m64 -fPIC -I$jdkdir  -I$jdkdir/unix bin/SaxonCGlue.o bin/SaxonCXPath.o bin/SaxonProcessor.o bin/XQueryProcessor.o bin/XsltProcessor.o bin/XsltExecutable.o bin/Xslt30Processor.o bin/XPathProcessor.o bin/XdmValue.o bin/XdmItem.o bin/XdmNode.o bin/XdmAtomicValue.o bin/XdmArray.o bin/XdmMap.o bin/XdmFunctionItem.o bin/SchemaValidator.o bin/SaxonApiException.o testXSLT.cpp -o testXSLT -ldl  -L.  $1 $2
62 60

  
63 61
g++ -std=c++14  -m64 -fPIC -I$jdkdir  -I$jdkdir/unix bin/SaxonCGlue.o bin/SaxonCXPath.o bin/SaxonProcessor.o bin/XQueryProcessor.o bin/XsltProcessor.o bin/XsltExecutable.o bin/Xslt30Processor.o bin/XPathProcessor.o bin/XdmValue.o bin/XdmItem.o bin/XdmNode.o bin/XdmAtomicValue.o bin/XdmArray.o bin/XdmMap.o bin/XdmFunctionItem.o bin/SchemaValidator.o bin/SaxonApiException.o testXSLT30.cpp -o testXSLT30 -ldl  -L.  $1 $2
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