Home Dashboard Directory Help
Search

Problem with <xsl:sort> nodes when using XslCompiledTransform by Mike Dour


Status: 

Closed
 as Won't Fix Help for as Won't Fix


1
0
Sign in
to vote
Type: Bug
ID: 620628
Opened: 11/10/2010 9:31:28 AM
Access Restriction: Public
0
Workaround(s)
view
2
User(s) can reproduce this bug

Description

I am having trouble sorting some XML data when using an XSL transform. Here is my XSL file:

<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.1">
<xsl:strip-space elements="*"/>
<xsl:template match="/">
    <html>
     <body>
        <table>
         <xsl:for-each select="/reflection/apis/api">
            <xsl:sort select="@id" />
            <tr>
             <td>
                <xsl:value-of select="@id" />
             </td>
            </tr>
         </xsl:for-each>
        </table>
     </body>
    </html>
</xsl:template>
</xsl:stylesheet>

And when I try to transform the following XML file:

<?xml version="1.0" encoding="utf-8"?>
<reflection>
<apis>
    <api id="C">
     <foos>
        <foo/>
     </foos>
    </api>
    <api id="B">
     <foos>
        <foo/>
     </foos>
    </api>
</apis>
</reflection>

I get this result:

<html>
<body>
    <table>
     <tr>
        <td>C</td>
     </tr>
     <tr>
        <td>B</td>
     </tr>
    </table>
</body>
</html>
Details
Sign in to post a comment.
Posted by danieloe on 10/7/2011 at 9:04 AM
Hi!

I've an application that generates more than 20 reports using XML+XSL. All data is sorted using xsl:sort. Is any way to use xsl:sort using the framework?


Thanks in advance

Daniel
Posted by Microsoft on 6/9/2011 at 8:18 PM
Hi Mike,
    Thanks a lot for your feedback. This has been recognized as an issue by the XML team.

However, XSLT 1.1 is the only scenario where this occurs. We triaged & investigated the fix for this and found that changing our core behavior just to support this particular edge case is not worth it.

So, we have decided not to make this fix at this point in time. Please let us know if this is causing significant issues for you. We can then look at finding a suitable workaround for your specific scenario.

Regards,
Arun Chandrasekhar
Senior Program Manager
XML Team
Posted by Microsoft on 11/10/2010 at 6:24 PM

Thanks for your feedback. We are routing this issue to the appropriate group within the Visual Studio Product Team for triage and resolution. These specialized experts will follow-up with your issue.
Posted by Microsoft on 11/10/2010 at 10:22 AM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)
Sign in to post a workaround.