问题
I'm getting the following exception while running Xls v.2 template in Visual Studio 2013 (in no debug mode):
XslTransformException
---------------------
'for-each-group' is not a recognized extension element. An error occurred at blah.xslt(27,6).
Is it possible to use xsl 2 with VS2013 at all?
回答1:
Microsoft does not have any XSLT 2.0 implementation, all its XSLT processors (the various versions of MSXML in the COM world and XslTransform and XslCompiledTransform in the .NET world) are XSLT 1.0 processors.
If you want to use XSLT 2.0 then you need to look into third party solutions like Saxon 9, XmlPrime, AltovaXML/AltovaRaptor. You should be able to run them with code (e.g. C#, VB.NET, C++) written in Visual Studio, I don't know however whether anyone provides an extension to Visual Studio as an IDE to run XSLT 2.0 inside the IDE, according to http://www.altova.com/xmlspy/visual-studio-xml-editor.html XMLSpy offers integration into VS.
There are however various XML IDEs like oXygen, Stylus Studio, XML Spy, that allow you to run and debug XSLT 2.0.
来源:https://stackoverflow.com/questions/34596042/xsl-v-2-wont-work-in-visual-studio-2013