Bug #6676
closedInitial template invocation with a combination of tunnel and non-tunnel parameters
100%
Description
You can use the SaxonC C++ API to invoke a transform for a specified initial template, e.g. using XsltExecutable.callTemplateReturningValue
. You can supply values for the template parameters in advance using setInitialTemplateParameters
. However I think if you attempt to supply both tunnel parameters and non-tunnel parameters, it may not work correctly; because the implementation for setInitialTemplateParameters
only sets itparam:
parameters and a global tunnel
property. I think you should be setting separate lists for tunnel (perhaps tnparam:
) and non-tunnel (itparam:
) parameters.
In applyXsltTransformerProperties
in net.sf.saxon.option.cpp.Xslt30Processor
, you should be independently setting both tunnel and non-tunnel parameters with two calls to transformer.setInitialTemplateParameters()
rather than just one.
I believe the attached stylesheet will show the issue, if you attempt to run it from initial template start
supplying parameter values (note the mismatch of tunnel and non-tunnel, this is intentional):
<initial-template name="start">
<param name="par1" tunnel="no" select="'foo1'"/>
<param name="par2" tunnel="yes" select="'foo2'"/>
<param name="par3" tunnel="no" select="'foo3'"/>
<param name="par4" tunnel="yes" select="'foo4'"/>
</initial-template>
The output should be <out>xyz1, foo2, foo3, xyz4</out>
.
Files
Updated by O'Neil Delpratt about 21 hours ago
- Status changed from New to In Progress
There is no way to set both tunnel and non-tunnel parameters to the same executable. I agree with the suggested fix.
Updated by O'Neil Delpratt about 16 hours ago
- Status changed from In Progress to Resolved
- % Done changed from 0 to 100
- Applies to branch 12, trunk added
- Fix Committed on Branch 12, trunk added
- SaxonC Languages All added
Bug fix with test committed to repository
Please register to edit this issue