2

In the past, BizTalk (and the .NET framework in general) has not supported any XSLT version besides 1.0. Our company is about to upgrade to BizTalk Server 2016, and I was wondering whether it's possible (and natively supported) to use XSLT 2.0 or 3.0 for custom mapping in said BizTalk Server version?

I know it's not likely they've implemented this, but I've been roaming the internet and I can't seem to find a concrete answer to this question.

Dijkgraaf
  • 11,049
  • 17
  • 42
  • 54
Arne Kemps
  • 108
  • 10
  • 1
    The generic answer for XSLT >1.0 for .Net is Saxon: http://www.saxonica.com/html/documentation/about/gettingstarted/gettingstarteddotnet.html. Not sure on BT 2016's native support, but given you have C# at your disposal within BT, this gives a potential workaround. Certainly .Net's `XslCompiledTransform` only supports XSLT 1.0 today (with a few MS addons outside of the XSLT spec). – JohnLBevan Jun 30 '17 at 07:46
  • Comments section implies not (search page for XSLT; first occurrence): http://www.integrationusergroup.com/integration-not-monday-discussion-with-josh-twist/; but hardly an official site for that kind of info. – JohnLBevan Jun 30 '17 at 07:48
  • 1
    @JohnLBevan If it turns out there isn't any other way, I'll take a closer look at workarounds. Thanks for the suggestion. – Arne Kemps Jun 30 '17 at 07:54
  • An old post,, but here was MS's justification for not implementing v2 support... Whether they reconsider that after all these years / with them now being 2 versions behind & XSLT still going strong, who knows. https://blogs.msdn.microsoft.com/dareobasanjo/2004/05/13/why-you-wont-see-xslt-2-0-or-xpath-2-0-in-the-next-version-of-the-net-framework/ – JohnLBevan Jun 30 '17 at 07:54
  • @JohnLBevan Yeah, I've read that article at one point. It's also the main reason for my question. There seems to be no update on their statement since. – Arne Kemps Jun 30 '17 at 08:04
  • BizTalk 2020 does support XSLT 3, I've updated my answer accordingly. – Dijkgraaf Jul 15 '20 at 00:57

2 Answers2

4

No, it only supports XSLT 1.0.

However it has been requested on uservoice before it was decommissioned

And Microsoft responded

Tord Glad Nordahl (Program Manager, Microsoft Corp) responded · March 18, 2017 We have forwarded this request to the .NET team. We will keep this open.

XSLT 3 is however a feature with BizTalk 2020, see What's New in BizTalk Server 2020.

XSLT 3.0 New extensible model for runtime map execution, out of box wiring to work with Saxon XSLT3.0.

Dijkgraaf
  • 11,049
  • 17
  • 42
  • 54
  • 3
    Nice find; FYI: That led me to look at the .net suggestions, where you can thumbs up this option: https://github.com/dotnet/corefx/issues/2295 – JohnLBevan Jun 30 '17 at 08:15
  • 1
    In case it's not completely clear, this is a .Net limitation, not BizTalk :(. – Johns-305 Jun 30 '17 at 14:39
4

MS Support for XSLT >1.0

Sadly MS took the decision not to provide support for XSLT > 1.0. Here's their reasoning from 2004; and so far as I can see it's not been revised since. https://blogs.msdn.microsoft.com/dareobasanjo/2004/05/13/why-you-wont-see-xslt-2-0-or-xpath-2-0-in-the-next-version-of-the-net-framework/

There are several reasons why we aren’t implementing XSLT 2.0 and XPath 2.0.

It takes a lot of effort...

Their XslCompiledTransform does support some additional features over XSLT 1.0; but it's non-standard and by no means full support. https://msdn.microsoft.com/en-us/library/system.xml.xsl.xslcompiledtransform(v=vs.110).aspx

The XslCompiledTransform class is an XSLT processor that supports the XSLT 1.0 syntax. It is a new implementation and includes performance gains when compared to the obsolete XslTransform class. The structure of the XslCompiledTransform class is very similar to the XslTransform class. The Load method loads and compiles the style sheet, while the Transform method executes the XSLT transform.

Workaround: Use a 3rd Party solution: e.g. Saxon

That said, in BT you can make use of C# classes within orchestrations. Saxon provides support for XSLT 3.0 for .net, so you just need to make use of their third party library. Here's a getting started guide:

http://www.saxonica.com/html/documentation/about/gettingstarted/gettingstarteddotnet.html

Feature Request

There is an open issue on the .Net Core Framework site requesting this support. Once it's in the framework, BT would surely make use of it. Please thumbs up this suggestion to help prioritise it: https://github.com/dotnet/corefx/issues/2295

Community
  • 1
  • 1
JohnLBevan
  • 22,735
  • 13
  • 96
  • 178
  • 1
    Thanks again for helping me out. And he's right guys, everyone vote on the suggestion if you'd like to see this added at some point! – Arne Kemps Jun 30 '17 at 08:51
  • 1
    Nice find, I had no idea that was the MSFT standpoint within the past. Thank you for sharing! – zurebe-pieter Jun 30 '17 at 09:55