How to Create a Custom XSL Map for Use in BizTalk 2006 Los Angeles CA

Discover when and why you may want to use a custom XSL document for mapping rather than the BizTalk Mapper.

Local Companies

Moyea Software
92295612365
Hot building, ring street
LA, CA
Interneer Inc.
8005586832 x85
6101 W. Centinela Ave.
Culver City, CA
Cornerstone Concepts Inc
818-247-3909
600 W Broadway
Glendale, CA
Greene Computer Corporation
(818) 956-4961
200 S. Louise Street
Glendale, CA
Corticalx Inc Software Solutions & Technology
818-500-0881
425 E Colorado St
Glendale, CA
Alphatier Systems
818-409-8920
517 Griswold St
Glendale, CA
TimeTECH - Customizable Time and Attendance / Workforce Management Solutions
905-677-7009
7420 Airport Rd 203
Mississauga, CA
Hutchinson & Bloodgood, LLP
(818) 637-5000
101 N. Brand Blvd. #1600
Glendale, CA
Telsoft Solutions
818-545-8680
100 N Brand Blvd
Glendale, CA
Abraxas Technologies Inc
818-502-9100
450 N Brand Blvd
Glendale, CA

provided by: 
Originally published at Internet.com


When working with BizTalk, one of the most straightforward tasks can be creating the data transformation using the BizTalk Mapper. But what about those times when your needs simply don't fit within the boundaries of the Mapper?

In previous versions, you would end up either doing multiple passes through BizTalk or perhaps using custom functionality. Now, you can take advantage of the custom map feature in BizTalk 2006.

When to Use a Custom Map

The most common item I have run into over the years where BizTalk Mapper needs help is when there is a strange parent/child or peer relationship between the source and destination document. For example, if there are two nodes that must be flattened, BizTalk Mapper will flatten the first node, but cannot properly map the second node.

For an example, look at the output of an error message from the Enterprise Library Exception Handling Application Block.



Click here for a larger image.

Figure 1: Sample output XML from application block

In this XML, there are two nodes that would need to be flattened using the Value Mapping (Flattening), the Exception and additional info nodes, for the destination XML as seen in Figure 2.

Figure 2: Destination XML

Writing the entire XSLT document can be a daunting task. BizTalk Mapper can help you create the XSLT. Not only is it a visual tool for mapping, but it outputs XSLT when it is compiled. To begin, create the map in BizTalk Mapper. I first created the links for the Exception node using two functoids, the equal logical functoid and then the Value Mapping (Flattening) functoid. In the equal value, I compare the property name to constant values and then send the output to the flattening functoid. The first stage of the map would look like what's shown in Figure 3.



Click here for a larger image.

Figure 3: BizTalk Mapper

Next, right-click on the map in the solution explorer, and then select Validate Map. In the output window, you now can select the XSLT output of the map. Take a look at the XSLT; you can see how the value mapping (flattening) functoid works.

Now, if you add in the value mapping for the additionalinfo node, you then can merge these two XSL documents or use the pattern and apply it to both. So now to create the map, simply select the source schema and the destination schema as you would when starting any map. In the properties, point the Custom XSL Path to the location of your saved file.



Click here for a larger image.

Figure 4: BizTalk Mapper document properties

Summary

Being able to use a custom XSL can help transform data in more ways. You also can get the full depth of the XSLT commands available to you. I also find it useful to view the XSLT when you create a map so that you can understand fully how BizTalk interprets the map you have created.

About the Author

Drew Block, MCSD, is a .NET Architect of enterprise integration and web applications. He is a Senior Manager at Crowe Chizek in Indianapolis, Indiana where he architects, designs, and manages the development of Microsoft-based solutions. You can reach Drew at ablock@crowechizek.com.

Author: Drew Block

Read article at Internet.com site

Featured Local Company

Moyea Software

92295612365
Hot building, ring street
LA, CA

Related Local Events
Automation Technology Expo West (ATX West)
Dates: 2/9/2010 - 2/11/2010
Location: Anaheim Convention Center
Anaheim, CA
View Details

SOLAR POWER - Exhibition and Conference
Dates: 10/12/2010 - 10/14/2010
Location: Los Angeles Convention & Exhibition Center
Los Angeles, CA
View Details

REAL-TIME & EMBEDDED COMPUTING CONFERENCE - LONG BEACH 2009
Dates: 10/1/2009 - 10/1/2009
Location: Marriott Long Beach
Long Beach, CA
View Details

2009 IEEE Petroleum and Chemical Industry Technical Conference (PCIC 2009)
Dates: 9/14/2009 - 9/16/2009
Location:
Anaheim, CA
View Details

Medical Design & Manufacturing - Trade
Dates: 6/9/2009 - 6/11/2009
Location: CANON COMMUNICATIONS LLC
Los Angeles, CA
View Details