Embed XSLT filter in the ODS file

Is there an option to embed the XSLT filter in the ODS file and run the export from the Calc LibreOffice Basic macro?

I am looking for a solution to port some Workbook.SaveAsXMLData() macro code from Excel where XmlMap is embeded in the spreadsheet document. If there is an option to embed the XSLT into the macro/document and then run the export filter that would mostly be what I need.