1

I'm trying my first XSLT 3.0 in BizTalk 2020, and doing a "test map" in Visual Studio 2019. Below is the from the output window:

    Invoking component...
    C:\Users\Administrator\source\repos\SchemaLesson\MapXSLTDemos\Map_FlightReservation_to_FlightData_3.0.btm: 
The compilation is using the CustomXslt and CustomExtensionXml tags to generate the output.  The map content is ignored.

    TestMap used the following file: 
<file:///C:\Users\Administrator\AppData\Local\Temp\inputfile.xml> as input to the map.
    C:\Users\Administrator\source\repos\SchemaLesson\MapXSLTDemos\Map_FlightReservation_to_FlightData_3.0.btm: 
error btm1050: XSL transform error: Unable to write output instance to the following <file:///C:\Users\Administrator\AppData\Local\Temp\_MapData\MapXSLTDemos\Map_FlightReservation_to_FlightData_3.0_output.xml>. 
Errors were reported during stylesheet compilation
    Test Map failure for map file <file:///C:\Users\Administrator\source\repos\SchemaLesson\MapXSLTDemos\Map_FlightReservation_to_FlightData_3.0.btm>. 
The output is stored in the following file: <file:///C:\Users\Administrator\AppData\Local\Temp\_MapData\MapXSLTDemos\Map_FlightReservation_to_FlightData_3.0_output.xml> 
    Component invocation succeeded.

To me, the issue is that there are errors [as it says "Errors were reported during stylesheet compilation"], but they are not shown in the output window. Are they written to disk on some mystery file that is not listed in the output window? I'm not asking to solve my specific error, so I'm not posting the code. I want to know how to see the errors that "were reported".

From the custom grid, I went to the properties window and set the "XSLT transform engine" to "Saxon 9 HE".

enter image description here

A similar question was asked here. But the answer solved the specific code issues, rather than telling the person how to find the errors.

Dijkgraaf
  • 11,049
  • 17
  • 42
  • 54
NealWalters
  • 17,197
  • 42
  • 141
  • 251
  • 1
    Can you open the XSLT in Visual Studio, and use the XML menu to select the Run XSLT with debugging? – Dijkgraaf Mar 10 '20 at 00:38
  • 1
    The interface MS documents at https://learn.microsoft.com/en-gb/biztalk/core/technical-reference/xslt-custom-transform-implementation does not make it clear what happens to errors during the `Load` call or the `Transform` call so it is not clear whether or how any errors reported by Saxon during stylesheet compilation or execution are propagated or reported. If you run the .NET version of Saxon 9 from the command line with the `Transform.exe` it will report errors to error stream of the console http://saxonica.com/html/documentation9.8/using-xsl/commandline/. – Martin Honnen Mar 10 '20 at 06:54
  • @Dijkgraaf - at first that did let me see my first error. But apparently I have other errors that it did not identify. After I fixed the first one, and tried to step through my map, clicking F10 or F11 seemed to be starting a deploy, which failed. So that seems like another issue entirely. Martin I will try the Saxonica command line probably tonight. I was hoping it wouldn't be necessary and that Visual Studio would handle everything. – NealWalters Mar 10 '20 at 19:00
  • @MartinHonnen - I was able to find the error using the Saxonica command line - once I got it installed (https://stackoverflow.com/questions/60627181/download-of-saxonica-for-net-has-jar-files). I think it's a bug if Microsoft isn't capturing those error and displaying them in the Output window. – NealWalters Mar 10 '20 at 23:43
  • Posted in MSDN Forum to see if they will admit this is a bug and maybe fix in future updates. https://social.msdn.microsoft.com/Forums/en-US/4b901a71-0637-430e-9be9-2a043c73e0df/biztalk-2020-visual-studio-2019-bug-report-with-xslt-30?forum=biztalkgeneral – NealWalters Mar 10 '20 at 23:49

1 Answers1

1

You need to follow this article: Create custom XSLT transform

  1. Go to c:\Program Files (x86)\Microsoft BizTalk Server\Developer Tools\CustomTransform.xml
  2. Copy the value of TypeAssemblyQualifiedName
  3. Open regedit.exe and create a string value "XsltEngine" in the follow registry:
  • 64 bit host instances: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\BizTalk Server\3.0\Configuration
  • 32 bit host instances: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\BizTalk Server\3.0\Configuration
  1. Paste the value of TypeAssemblyQualifiedName as the value
  2. Restart your server
Paul Roub
  • 36,322
  • 27
  • 84
  • 93
  • This question was from 7 months ago, and I had an error in my XSLT, but Visual Studio wasn't showing the actual error. Are you saying your answer fixes that? I was able to run Saxon XSLT with no issue if the XSLT code is correct. – NealWalters Oct 29 '20 at 16:46
  • 1
    I'm sorry i started now with Biz 20 :) So i read that this problem is fixed with Cumulative Update 1. https://support.microsoft.com/en-gb/help/4538666/cumulative-update-1-for-microsoft-biztalk-server-2020 ypu can find these resolution : FIX: Test map doesn't provide detailed information about the errors in XSLT stylesheet – Emilio Marino Oct 29 '20 at 17:09
  • Cool, I haven't even checked the Cumulative Updates yet. – NealWalters Oct 29 '20 at 17:24
  • 1
    I triyed to install and works . You can download here : https://www.microsoft.com/en-us/download/details.aspx?id=101582 – Emilio Marino Oct 30 '20 at 08:36