BizTalk XSLT Reuse (xsl:include and xsl:import): Resolving of external URIs was prohibited error

Posted: April 26, 2010 in BizTalk
Tags: , ,

A client of mine, use a strategy for re-use XSL, basically they have custom XSLT with external XSLT’s that contain global functions that can be use inside all XSLT transformations.

When I tried to import this strategy to BizTalk mapper, the aim was to migrate old flows to BizTalk orchestrations, the map fails with the error:

“XSL transform error: (0,0) : Resolving of External URI’s was prohibited. “

CAUSE

  • This issue can occur if the XSLT file that is defined in the Custom XSL Path Grid Properties uses the <xsl:import> element or the <xsl:include> element to import or to include an external XSLT file.

MORE INFORMATION

The <xsl:import> element is used to import an external XSLT file. The <xsl:include> element is used to include an external XSLT file. You cannot use these elements in custom XSLT files that are defined in the Custom XSL Path Grid Properties in a BizTalk project. You cannot do this because a Uniform Resource Identifier (URI) that is defined in an external XSLT file may be from a nonsecure source such as the Internet.

SOLUTION

  • To work around this issue, make sure that the XSLT file that is defined in the Custom XSL Path Grid Properties contains all the code that is required to transform the message.

This is a valid solution, however it loses the re-use functionality, because you have to do this for all the XSLT’s.

ANOTER SOLUTION WITH RE-USE FUNCTIONALTY

  • Do the transformation by C# code:
    • Inside a Message Assignment Shape
    • Or by creating a XslTransformPipelineComponent which provides an appropriate XmlResolver.

Tags: BizTalk | Map | Errors and Warnings, Causes and Solutions

Comments
  1. […] written a blog post about the  ‘Resolving of external URIs was prohibited error’, see https://sandroaspbiztalkblog.wordpress.com/2010/04/26/biztalk-xslt-reuse-xslinclude-and-xslimport-res…. He describes other solutions to this error, for example a XslTransformPipelineComponent or custom […]

  2. Süleyman says:

    Regarding the first solution, it would be nice if you mentioned how to combine two existing xslt-files into one

  3. […] XSLT reuse and the ‘Resolving of external URIs was prohibited error’. For his article, see https://sandroaspbiztalkblog.wordpress.com/2010/04/26/biztalk-xslt-reuse-xslinclude-and-xslimport-res&#8230;. He describes other solutions to this error, for example a XslTransformPipelineComponent or custom […]

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s