Based on @nwellnholf advice I checked transform.c and after some time I figured out how to implement it.
The core magic is inside xsltApplySequenceConstructor
as @nwellnholf wrote. To be able to use it it's necessary to edit library and make this function public, because originally this function is defined in transform.c only. To do so, define this in transform.h and recompile libxslt.
XSLTPUBFUN void xsltApplySequenceConstructor(xsltTransformContextPtr ctxt, xmlNodePtr contextNode, xmlNodePtr list, xsltTemplatePtr templ);
Second step is implement own xslt function, proceed own instructions and return processing back to xslt. These steps are done via following commands:
void elemChangeContext(xsltTransformContextPtr ctxt, xmlNodePtr node, xmlNodePtr inst, xsltElemPreCompPtr /*comp*/)
{
if ( ctxt == NULL || node == NULL || inst == NULL || ctxt->insert == NULL )
return;
xmlNodePtr cur = /* change context to different node */;
xmlNodePtr curInst = inst->children; //sub xslt instruction
xsltApplySequenceConstructor(ctxt,cur, curInst,NULL);
}