Compartilhar via


Using External XSLT in the BizTalk Mapper

I had a client that had a lot of existing XSLT's that they wanted to use in BizTalk instead of recreating them using the BizTalk Mapper.

 

The BizTalk Mapper supports custom XSLT in two forms; the script functoid (1) and then in the Mapper itself (2) (this is the one that I was interested in).

 

1)  The script functoid operates on parts of a schema.  You can use the script functoid to write inline XSLT for any part of the schema in which the output of the functoid creates the target node and all of its appropriate substructure.  However, there can not be any other mappings to this target structure or its substructure.

 

2)       This functionality allows you to use a whole existing XSLT style sheet and use it in your BTS project.  To do this

 

a.      Add the source and destination schemas to your project

b.      Create the map (.btm file) and add the two schemas to it (but do not do any graphical mappings)

c.      Click the grid zone and on the properties window there will be a “Custom XSLT Path” property.  Click the ellipses and navigate to the file containing the XSLT.

d.      Build the project and deploy.  The Mapper will use your XSLT file to perform the mappings.

 

One thing to be aware of is that if your custom XSLT contains embedded code then the compiler gets loaded each time a map is run.  We had an old XSLT that had VB Script.  We updated the code to use VB.NET and then we loaded it into the Mapper.  When we submitted 20 messages we saw 20 instances of the VBC.EXE process load into memory.

Comments

  • Anonymous
    May 18, 2004
    can you please let me know if the XSLT is compiled into the dll, or is it refernced via a url/urn??
  • Anonymous
    May 21, 2004
    there is an example in the SDK refresh that shows how to apply XSLT in a send pipeline this may be a better alternative for some scenarios
  • Anonymous
    May 27, 2004
    I have been doing a similar XSLT replace in BTS2002. Many of the transforms I end up creating by hand are too complicated to recreate in the mapper.
  • Anonymous
    January 21, 2009
    PingBack from http://www.keyongtech.com/323497-custom-adapter-or-pipeline-please