Re: [xsl] Response to G Ken Holman re Question on search and replace in XSL

Subject: Re: [xsl] Response to G Ken Holman re Question on search and replace in XSL
From: Martin Honnen <Martin.Honnen@xxxxxx>
Date: Tue, 10 Apr 2012 17:24:43 +0200
Peterson, Melanie S. wrote:


<!--create groups of three using the tokenized input--> <xsl:for-each-group select="tokenize(.,';')" group-by="( position() - 1 ) idiv 3">

I'm getting an error message on the<xsl:for-each-group> statement: 'xsl:for-each-group' is not a recognized extension element. I did some research and found some suggestions that this would work better with version 1.0. When I try that, though, the error message I get is: 'xsl:for-each-group' cannot be a child of the 'xsl:template' element. So, once again, I'm stuck. Perhaps it would help if I explain how this code is being used. It's called from an ASP.Net application, and it's used to generate an HTML document which is then sent via an SMTP server as an email. The users are using Windows 7 and viewing the application in IE9. However, they *never* view the output of this XSL document; it's just sent as an email behind the scenes. The .Net code is as follows:

To use for-each-group you need an XSLT 2.0 processor like Saxon 9 or AltovaXML or XQSharp.
Microsoft's XslTransform or XslCompiledTransform are XSLT 1.0 processors and don't support the for-each-group element introduced in XSLT 2.0 in 2007.


--

	Martin Honnen --- MVP Data Platform Development
	http://msmvps.com/blogs/martin_honnen/

Current Thread