Actions
Bug #6009
opencppTests/testXSLT30 exampleTransformToString fails, probably due to wrong base URI lacking a trailing slash
Start date:
2023-05-03
Due date:
% Done:
0%
Estimated time:
Applies to branch:
Fix Committed on Branch:
Fixed in Maintenance Release:
Found in version:
Fixed in version:
SaxonC Languages:
SaxonC Platforms:
SaxonC Architecture:
Description
Using SaxonC EE 12.2 under Linux, I find that one test of cppTests/testXSLT30 fails, namely then one named exampleTransformToString
outputs e.g.
<b>exampleTransformToString:</b><br/>
baseURI = file:///home/mh/libsaxon-EEC-linux-v12.2/samples/cppTests
producing sheet
exampleTransformToString =
The file output.xml does not exist
where the baseURI is constructed and output with e.g.
string baseURI = string("file://")+sproc->getcwd();
cerr<<"baseURI = "<<baseURI<<endl;
executable->setBaseOutputURI(baseURI.c_str());
a stylesheet then creates an output file output.xml
relative to the baseURI e.g. it creates file:///home/mh/libsaxon-EEC-linux-v12.2/samples/output.xml
but the code checks with
cout<< "exampleTransformToString = "<<result<<endl;
string filename = baseURI+"/output.xml";
if (CppTestUtils::exists(filename.c_str())) {
cout << "The file output.xml exists" << endl;
remove("output.xml");
sresult->success++;
} else {
cout << "The file output.xml does not exist" << endl;
sresult->failure++;
sresult->failureList.push_back("exampleTransformToString");
}
and finds the file file:///home/mh/libsaxon-EEC-linux-v12.2/samples/cppTests/output.xml
doesn't exist and counts the test as failed.
Therefore I think the base output URI needs to be set to string baseURI = string("file://")+sproc->getcwd() + "/";
, if that test is supposed to pass.
Please register to edit this issue
Actions