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 used 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 XSLTs.
Another Solution with reuse Functionality
- Do the transformation by C# code:
- Inside a Message Assignment Shape
- Or by creating an XslTransformPipelineComponent which provides an appropriate XmlResolver.
Regarding the first solution, it would be nice if you mentioned how to combine two existing xslt-files into one