XPath and XSLT 2.0 for .NET? [closed]

2019-01-01 06:47发布

.NET 3.5 doesn't completely support XPATH 2.0 or XSLT 2.0, which is just too bad. Does anyone know if these two will be included and fully supported in any future .NET versions?

标签: .net xslt xpath
5条回答
何处买醉
2楼-- · 2019-01-01 07:19

See this blog post

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

It takes a lot of effort and resources to implement all 3 technologies (XQuery, XSLT 2.0 & XPath 2.0). Our guiding principle was that we believe creating a proliferation of XML query technologies is confusing to end users. We'd rather implement one more language that we push people to learn than have to support and explain three more XML query and transformation languages, in addition to XPath 1.0 & XSLT 1.0 which already exist in the .NET Framework. Having our customers and support people have to deal with the complexity of 3 sophisticated XML query languages two of which are look similar but behave quite differently in the case of XPath 2.0 and XQuery seemed to us not to be that beneficial.

查看更多
人间绝色
3楼-- · 2019-01-01 07:26

I don't think they'll add support for XPath 2.0 or XSLT 2.0 any time soon.

However, you shouldn't feel bad if these are not part of the BCL, as long as you have 3rd party implementations available:

Microsoft is customer oriented. If customers don't want it, they won't make it.


2009-11-18: I contacted the XML team here and got this response:

While XML continues to be a key part of our platform going forward, we have decided not to pursue an XSLT 2.0 implementation at this time. If there is a specific XSLT task you’re trying to accomplish and are having difficulty with XSLT 1.0, please let us know and we’ll do our best to help.


This list is now maintained at github.com/maxtoroq/dotnet-xml

查看更多
爱死公子算了
4楼-- · 2019-01-01 07:35

My understanding is that many Microsoft XML resources were diverted from XSLT 2.0 onto LINQ to XML, which - in my view - doesn't address the same problem-space as XSLT at all.

LINQ to XSD was supposed to enhance LINQ to XML (as well as XML Schema benefits, the syntax is less ugly), but this was open-sourced by Microsoft onto CodePlex some time ago and appears to have no community support.

Also, its unlikely that Microsoft would launch a new XSLT 2.0 processor without an XSLT 2.0 editor and debugger integrated into Visual Studio, so quite a bit of effort/time would be required to reverse their 'non-adoption' decision.

So instead we have Saxon.NET, which has an unimpeachable standards compliance reputation and provides excellent extensibility options for .NET.

查看更多
路过你的时光
5楼-- · 2019-01-01 07:38

Microsoft have no plans to release support for XPath/XSLT 2.0 in .NET.

XQSharp provides a 3rd party implementation of XPath 2.0, XSLT 2.0 and XQuery for .NET.

[edit: XQSharp 2.0 beta (with XSLT 2.0) has been released]

查看更多
余生请多指教
6楼-- · 2019-01-01 07:40

I can't believe they won't be at some stage since they're core W3C technologies. However I can't find any current reference to these (only info posted a long time ago).

For the near future you should take a look at Saxon which supports the Xpath/XSLT versions you require.

查看更多
登录 后发表回答