BizTalk Maps: Does Custom xsl support the document function of XSLT

Home Page Forums BizTalk 2004 – BizTalk 2010 BizTalk Maps: Does Custom xsl support the document function of XSLT

Viewing 1 reply thread
  • Author
    Posts
    • #16555

      Hi,

      I would like to know if the document function (xslt) is supported within a BizTalk Map if I use Custom xsl.

      The document function in xslt allows me to access more than 1 xml file for the xsl stylesheet.

      I am able to use the document function in DotNet successfully, but not in BizTalk Maps.

      I had an inputxml, outputxml, customxsl, samplexml(additional xml file to pick values) 

      E.g. sample.xml – has the values to be parsed and placed in the map.
      ****************

      <? xml version="1.0" encoding="utf-8" ?>
      <RootNode>
      <Node1>value1</Node1>
      <Node2>value2</Node2>
      </RootNode>
      ********
      And in my xsl stylesheet I try to get the values
      ******

      <xsl:variable name="var1" select="document('<Drive>:\Folder\sample.xml')/RootNode/Node1"/>

      <OutputNode><xsl:value-of select="$var1"/></OutputNode>

      ******

      But my output that I am getting: <OutputNode/> – means the nodes arent being accessed.

       

      But when I try and use the Transform function in Dot Net ( using system.xml, system.xml.xpath,system.xml.xsl) ( stimulates the mapper functionality) 

      Map.Load(Mapxsl) 

      Mapl.Transform(Inputxml, Outputxml)

      In the Output xml I get <OutputNode> Some value </OutputNode>

      I am not sure why the same xsl code works while using DotNet and not BizTalk Maps-custom xsl.

      Thanks

    • #16611

      I have never seen this used inside a BizTalk Map.  Not sure if it’s supported or not… 

       

      You’d want to pass the message into BizTalk and then do a multi message mapping inside an Orchestration.  It would get a little messy.

       

      Now you could be able to have a .net component that you call from the map that reads your file and returns your value.  I know that works.

      • #16648

         

        Hi Stephen,

        Thanks for the reply. Here I am trying to avoid the Orchestration. I am using the custom xsl stylesheet(option to select the stylesheet in map properties), because when I use the BizTalk mapper my application gets hung and that is not serving my purpose. In the Biz Talk Mapper Tool scripting functoid I could call a dotnet component. But I am not able to use the Mapper and custom xsl together. Is there any way I can come to know if a particular xslt function is supported or not by the BizTalk Map.

         Thanks 

        • #16652

          My uneducated guess would be that it doesn't have permission to see the external file path when it executes in Biztalk.

          So although the function works, it effectively can;t do what you want because of security concerns. That would explain why it works in .net but not Biztalk.  

          -weak architect

Viewing 1 reply thread
  • The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.