Converter JSON em XML usando funções XSLT 3.0

Eu sou novo no XSLT, tenho um JSON simples que quero transformar em um XML usando o XSLT 3.0. Tentei as funções parsejson e jsontoxml de acordo com as recomendações do w3c, mas a saída produzida não está no formato desejado. Estou usando o processador Saxonica para esse fim. É possível escrever um único xslt que pode ser usado em qualquer json de uma estrutura específica, independentemente dos nomes das chaves. Caso contrário, como posso abordar a conversão de um json para o xml desejado usando os recursos xslt

Eu tentei o exemplo na resposta: [Transformação JSON para XML no XSLT 3.0, mas não está funcionando para mim

JSON de entrada

<data>{

      "Assets": [
  { "Asset": {        
        "Open": "25.15",
        "High": "25.15",
        "Low": "25.11",
        "Close": "25.87"
      }},
      { "Asset": {        
        "Open": "25.15",
        "High": "25.15",
        "Low": "25.11",
        "Close": "25.87"
      }}]

}
</data>

Saída esperada

<data>
   <Assets>
      <Asset>
         <Close>25.87</Close>
         <High>25.15</High>
         <Low>25.11</Low>
         <Open>25.15</Open>
      </Asset>
      <Asset>
         <Close>25.87</Close>
         <High>25.15</High>
         <Low>25.11</Low>
         <Open>25.15</Open>
      </Asset>
   </Assets>
</data>

Saída real que obtive usando meu xslt

<?xml version="1.0" encoding="UTF-8"?>
<map xmlns="http://www.w3.org/2005/xpath-functions">
   <array key="Assets">
      <map>
         <map key="Asset">
            <string key="Open">25.15</string>
            <string key="High">25.15</string>
            <string key="Low">25.11</string>
            <string key="Close">25.87</string>
         </map>
      </map>
      <map>
         <map key="Asset">
            <string key="Open">25.15</string>
            <string key="High">25.15</string>
            <string key="Low">25.11</string>
            <string key="Close">25.87</string>
         </map>
      </map>
   </array>
</map>

Minha função XSLT

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:math="http://www.w3.org/2005/xpath-functions/math" xmlns:xs="http://www.w3.org/2001/XMLSchema" exclude-result-prefixes="xs math" version="3.0">
   <xsl:output indent="yes" />
   <xsl:template match="data">
      <xsl:copy-of select="json-to-xml(.)" />
   </xsl:template>
</xsl:stylesheet>

Abaixo está o código de exemplo que estou usando com o saxão para fazer a transformação

        var xslt = new FileInfo("myxslt.xslt");
        var input = new FileInfo("inputxml.xml");

        // Compile stylesheet
        var processor = new Processor(true);
        var compiler = processor.NewXsltCompiler();
        var executable = compiler.Compile(new Uri(xslt.FullName));
        Serializer serializer = processor.NewSerializer();
        serializer.SetOutputFile(txtOutput.Text);

        // Do transformation to a destination
        var destination = new XdmDestination();
        using (var inputStream = input.OpenRead())
        {
            var transformer = executable.Load();
            transformer.SetInputStream(inputStream, new Uri(input.DirectoryName));
            transformer.Run(serializer);
        }

questionAnswers(1)

yourAnswerToTheQuestion