Using XML to HTML Stylesheets in BizTalk

Using the XslTransform pipeline component is a simple way to send HTML formatted email from BizTalk, but specifying the style sheet at design time means keeping track of the full path to the XSL file.

To make life easier, I deploy style sheets to the Pipeline Components directory and use a pre-build script to copy the XSL file so it’s available at build-time.

copy /y “$(ProjectDir)\StyleSheet.xsl” “%BTSINSTALLPATH%\Pipeline Components”

Bear in mind this will overwrite the runtime’s style sheet every time you build, so it’s not good for environments where you’re developing on a test or production box. If you’re not using source control, you could lose your style sheet in a click-stance!

There are more robust ways to do this, I’m sure, and I leave it to the readers to safeguard their work.

This entry was posted in BizTalk, Tips and Tricks and tagged , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s