Yossi Dahan [BizTalk]


Monday, March 16, 2009

Ok, got your message, now let us have xsl re-use!

From the Microsoft Knowledgebase  -

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.

Am I (well, and Ben Gimblett here)  the only one who thinks this is a lame excuse? since when MS tries to protect developers from stupidity? and in any case, if they really wanted to do that – wouldn’t they have to prevent us from writing ANY code?

Labels: , ,


  • My guess is that since XSL files are stored as embedded resources in the compiled assemblies, they can't be loaded by the default XmlResolver, which loads external references from a URI.

    But BizTalk could still provide its own XmlResolver (by providing the resolver as a parameter to XslTransform.Load) that can load from embedded resources (and doesn't know how to load resources from the Internet).

    When in doubt, blame laziness on security reasons.

    (You could probably workaround this issue by creating a XslTransformPipelineComponent which provides an appropriate XmlResolver)

    By Anonymous Anonymous, at 16/03/2009, 14:19  

Post a comment

<< Home