Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 17th, 2004, 05:34 AM
Authorized User
 
Join Date: Nov 2003
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
Default xsl:sort and IE 5.0 Issue

Hi,

I have a function that gives me XSL for sorting

function fnGetXslStr()
    'Note the XML Need to have @Name, @ID, @RowOrder, @Description,
    dim strXsl
    strXsl = "<xsl:stylesheet xmlns:xsl=""http://www.w3.org/TR/WD-xsl"">" & _
        "<xsl:template match='/'>" & _
        "<table style=""width:auto;height:auto"" cellspacing=""1"" cellpadding=""1"">" & _
        "<xsl:for-each select='/ITEM_LIST/ITEM'>" & _
            "<xsl:sort select='@RowOrder' data-type='number'/>" & _
            "<xsl:if test=""@Deleted[.='0']"">" & _
            "<tr class=""listrow"">" & _
            "<xsl:attribute name=""id"">tr_<xsl:value-of select='@ID'/></xsl:attribute>" & _
            "<xsl:attribute name=""onclick"">javascript:fnSetSelected(""<xsl:v alue-of select='@ID'/>"")</xsl:attribute>" & _
            "<xsl:attribute name=""ondblclick"">javascript:fnEditItemWithSelec tion(""<xsl:value-of select='@ID'/>"")</xsl:attribute>" & _
            "<td valign=""top"" style=""height:auto;width:120px"">" & _
            "<xsl:value-of select='@Name'/>" & _
            "</td>" & _
            "</tr>" & _
            "</xsl:if>" & _
        "</xsl:for-each>" & _
        "</table>" & _
        "</xsl:template>" & _
    "</xsl:stylesheet>"
    fnGetXslStr = strXsl
end function

If we check the header,
<xsl:stylesheet xmlns:xsl=" http://www.w3.org/TR/WD-xsl" >
this header does not seem to work with xsl:sort.
So, I have used,
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
But this does not seem to work in IE 5.0. Actually I am not getting any error. Instead when I am transforming the XML, i get XSL as my output. But with IE 6.0 it works perfect.

How do I resolve this issue in IE 5.0


 
Old March 17th, 2004, 06:12 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post
Default

http://www.netcrucible.com/xslt/msxml-faq.htm





Similar Threads
Thread Thread Starter Forum Replies Last Post
Need Xsl to Sort the following simple xml: Takashi321 XSLT 3 August 27th, 2007 11:54 AM
XSLT Dynamic xsl:sort Method kwilliams XSLT 2 July 20th, 2005 03:19 PM
xsl:sort Question kwilliams XSLT 6 July 18th, 2005 08:39 AM
Unable to sort using xsl sort command sly_jimmy_boy XSLT 3 June 17th, 2005 05:15 AM
XSLT-- xsl:sort help... debo XSLT 2 December 3rd, 2004 04:25 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.