Transform saml assertion to openid jwt token

Hello everybody
is it possible to convert a saml assertion to a openid jwt token ?

the specific case is the following:
an application 1 is authenticating using saml, then goes to application 2,giving the saml assertion. The problem now is that application 2 and all the other following integration works with openid.

is there a way to covert?