Solved

convert xsl  to MSXML2

Posted on 2013-10-30
1
333 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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Suggested Solutions

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

770 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