Solved

convert xsl  to MSXML2

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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
In this tutorial viewers will learn how to define a gradient in CSS. Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Gradient. Define the background as "linear-gradient(to right, #ee3668, black)". Ensure you …
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

758 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

18 Experts available now in Live!

Get 1:1 Help Now