Solved

convert xsl  to MSXML2

Posted on 2013-10-30
1
327 Views
Last Modified: 2013-10-30
Dear all,
The xsl in this question:
Q_28280583.html

can you please change the xsl to be compatible with MSXML2 processor?

I got this error:
msxml3.dll error '80004005'
Keyword xsl:template may not contain xsl:for-each-group.

thanks,
0
Comment
Question by:ethar1
1 Comment
 
LVL 60

Accepted Solution

by:
Geert Bormans earned 500 total points
ID: 39612816
Here you go

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    version="1.0">
    <xsl:output indent="yes"></xsl:output>
    
    <xsl:key name="item-by-y" match="item" use="y"/>
    <xsl:key name="item-by-xy" match="item" use="concat(x, '-', y)"/>
    
    <xsl:template match="layout">
        <div id="maincontent">
            <xsl:for-each select="item[generate-id() = generate-id(key('item-by-y', y)[1])]">
                <xsl:sort order="ascending" select="y" data-type="number"/>
                <xsl:variable name="width" select="sum(key('item-by-y', y)/width)"/>
                <xsl:variable name="y" select="y"/>
                <div class="section group">
                    <xsl:for-each select="../item[generate-id() = generate-id(key('item-by-xy', concat(x, '-', $y))[1])]">
                        <xsl:sort order="ascending" select="x" data-type="number"/>
                        <div class="col span_{width}_of_{$width}">
                            <xsl:text>ID=</xsl:text>
                            <xsl:value-of select="id"/>
                        </div>
                    </xsl:for-each>
                </div>
            </xsl:for-each>
        </div>
    </xsl:template>
    
</xsl:stylesheet>

Open in new window

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
Many times as a report developer I've been asked to display normalized data such as three rows with values Jack, Joe, and Bob as a single comma-separated string such as 'Jack, Joe, Bob', and vice versa.  Here's how to do it. 
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now