Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

convert xsl  to MSXML2

Posted on 2013-10-30
1
Medium Priority
?
347 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 60

Accepted Solution

by:
Geert Bormans earned 2000 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

Quick Start: DOCKER

Sometimes you just need a Quick Start on a topic in order to begin using it.. this is just what you need to know to get up and running with Docker!

Question has a verified solution.

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

Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
Without even knowing it, most of us are using web applications on a daily basis.  In fact, Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We generally confuse these web applications to…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

705 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