Hi, maybe someone has an answer or idea. Thank you.
This is to debug a custom XSLT mapping in a deployed Biztalk Server app. I get errors with it and it's not easy to track what is going wrong. BTW, maybe it's not necessary to fully understand Biztalk at all here, because it's mostly an XML, XSLT related issue I guess.
So, I went back to the basics and I generated a very simple XSLT from a map that works and I wanted to visually see the result in the output XML directly in Visual Studio. From there I thought I could experiment with my custom XSLT and determine and fix the errors more easily than in the deployed Biztalk app (log is not totally helpful).
So here what I have done, if it makes sense : (see code below as required - sorry I had to cut the code a bit to fit in the post)
In Visual Studio 2012 Ultimate,
1. I have this XSLT that I generated from a functional Biztalk Server map (validate map command). The map has a Biztalk HL7 accelerator ADT_A01_25_GLO_DEF xsd schema on the left (input), and our custom output schema on the right; This is for and incoming message.
2. I generated a test file (generate instance command) from the ADT_A01_25_GLO_DEF xsd schema as a source XML file to test the XSLT;
3. I selected that XML file as the input for the XSLT to process in VS;
4. I process that file with the command in menu XML / Start XSLT without debugging, and Visual studio gives me just one error :
XML document must contain a root level element.
(The output file is actually empty)
My question is, how can that be ? The test file and the XSLT have been generated by Visual Studio (with original Biztalk schemas) all along ? The map (or generated XSLT equivalent) runs just fine in the Biztalk app. I am puzzled. Any idea on what I'm missing please?
Thanks
Claude
Biztalk accelarator Hl7 ADT_A01_25_GLO_DEF xsd schema on the
And part of the generated instance of this ADT_A01_25_GLO_DEF xsd schema ( Not showing, but I entered a bit of real data in the PID ):
XSLT generated from validate map :
<?xmlversion="1.0"encoding="UTF-16"?>
<xsl:stylesheetxmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:msxsl="urn:schemas-microsoft-com:xslt"
xmlns:var="http://schemas.microsoft.com/BizTalk/2003/var"
exclude-result-prefixes="msxsl var s0 s1 s2 s3 s4 userCSharp"
version="1.0"xmlns:s0="http://schemas.microsoft.com/BizTalk/2003/aggschema"
xmlns:s1="http://microsoft.com/HealthCare/HL7/2X/2.5/Tables"
xmlns:s2="http://microsoft.com/HealthCare/HL7/2X"
xmlns:s3="http://microsoft.com/HealthCare/HL7/2X/2.5/Segments"
xmlns:s4="http://microsoft.com/HealthCare/HL7/2X/2.5/DataTypes"
xmlns:userCSharp="http://schemas.microsoft.com/BizTalk/2003/userCSharp">
<xsl:outputomit-xml-declaration="yes"method="xml"version="1.0" />
<xsl:templatematch="/">
<xsl:apply-templatesselect="/s0:Root" />
</xsl:template>
<xsl:templatematch="/s0:Root">
<form1>
....... some code here
</form1>
</xsl:template>
</xsl:stylesheet>