Bug #5374
closedTransformFromFile fails to create output file
100%
Description
Reported by user here: https://stackoverflow.com/questions/71381858/saxonc-ee-11-2-transformfromfile-produces-empty-output/71383253#71383253
The following snippet of C++ code which uses transformFromFile fails to create output file:
SaxonProcessor* processor = new SaxonProcessor(false);
processor->setcwd( Current Working Directory );
Xslt30Processor* xslt = processor->newXslt30Processor();
XdmNode* xmlfile = processor->parseXmlFromFile( Some Xml File );
XsltExecutable* xslte = xslt->compileFromFile(Some Xsl File);
xslte->setOutputFile(Output File);
xslte->transformToFile(xmlfile);
Updated by O'Neil Delpratt over 2 years ago
Workaround is to use applyTemplatesReturningFile
. Alternatively user can use transformToString
then save the string result to file.
Updated by O'Neil Delpratt over 2 years ago
- Status changed from New to In Progress
Bug issue found in the transformToFile
method of the class net.sf.saxon.option.cpp.Xslt30Processor. We fail to correctly execute the transform if the supplied source is an XdmNode value as opposed to a file source.
Updated by O'Neil Delpratt over 2 years ago
- Status changed from In Progress to Resolved
- % Done changed from 0 to 100
Bug fixed and unit test added in C++ tests.
Updated by O'Neil Delpratt over 2 years ago
I confirm the the test case succeeds after bug fix applied.
Updated by O'Neil Delpratt over 2 years ago
- Status changed from Resolved to Closed
- Fixed in version set to 11.3
Bug fix applied in the SaxonC 11.3 maintenance release.
Please register to edit this issue