1

I have requirement to transform the xml file by passing xslt using excel vba code. i have tried with some sample code its working for simple xslt. When i started testing with complex one.Got error distinct-values(//object/@name) is not supporting.

<xsl:for-each-group select="//object" group-by="@name">
  <object><xsl:value-of select="current-grouping-key()"/></object>
</xsl:for-each-group>

just wanted to confirm . Is Microsoft Excel VBA is supporting Xpath2.0 and XSLT2.0. If not what is the alternate solution for this.

Your help is really appreciated. Thanks in advance.

3
  • 1
    The XSLT 1.0 method: jenitennison.com/xslt/grouping/muenchian.html Commented Apr 10, 2015 at 19:43
  • 1
    No, it's highly unlikely that XSLT 2.0 is supported. The simplest way to find out is to test it - try to transform a stylesheet that contains an XPath 2.0 function, e.g. tokenize(). The XSLT 1.0 solution is to use a key. Commented Apr 10, 2015 at 23:18
  • VBA and Excel are Microsoft products. Microsoft at this time only has implementations of XSLT 1.0. Commented Apr 11, 2015 at 3:24

1 Answer 1

1

Is Microsoft Excel VBA is supporting Xpath2.0 and XSLT2.0.

No, VBA and Excel are Microsoft products. Microsoft at this time only has implementations of XSLT 1.0.

If not what is the alternate solution for this.

A good and efficient XSLT 1.0 solution is to use the Muenchian Method for grouping.

Sign up to request clarification or add additional context in comments.

2 Comments

which technology will support XSLT2.0 and Xpath 2.0. Requirement is to make an automation between xml and xslt. If any error i have to send to user.
@Deepaksingh, Something non-Microsoft. Saxon is written in Java, and there is a version for ,NET, but I doubt you will be able to make a COM object of it. Do try XML-SPY, but the latest version, I think, don't offer free, community components.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.