Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsReportsReportsLarge XML file XSL Transform problemLarge XML file XSL Transform problem
Previous
 
Next
New Post
2/14/2008 11:46 AM
 

Browser: IE7
Database: SQL2005

When dealing with large XML files, 2000+ records the XLS transformation doesnot complete entirely.

My sample xml data looks something like this..


<DocumentElement>
  <QueryResults>
    <Date_Time>2008-01-15T00:00:00-05:00</Date_Time>
    <Speed>42.13</Speed>
  </QueryResults>
  <QueryResults>
    <Date_Time>2008-01-15T00:15:00-05:00</Date_Time>
    <Speed>42.13</Speed>
  </QueryResults>
</DocumentElement>


the xsl transformation does a number of things...
 -Parse the date
 -Make a bar graph and apply a color to the bar based on the speed

here is the xsl code....

----------------------------------------------------------
----------------------------------------------------------
<?xml version='1.0' encoding='utf-8'?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="yes"/>

<xsl:template match="/*">
<html>
      <head>
            <style>
                  td{font-size:10;font-family:arial;padding:0}
            </style>
      </head>
     
      <body>
      <table width="350px"><tr><td>
    <table width="100%" height="100%">
          <tr>
                        <td width="100px" align="right" style="padding-right:3"><br/></td>
                        <td>0</td>
                        <td align="right" style="padding-right:16">60</td>
                        <td><br/></td>
                  </tr>
    </table>
      </td></tr></table>
      <table width="350px"><tr><td>
    <xsl:for-each select="QueryResults">
            <table width="100%" height="100%">
                  <tr>
                        <td width="100px" align="right" style="padding-right:3"><xsl:call-template name="FormatDate"><xsl:with-param name="DateTime" select="Date_Time"/></xsl:call-template></td>
                        <td colspan="2" width="250px">
                              <table style="border:solid;border-width:1;width:100%"><tr><td>
                                    <table>
                                          <xsl:attribute name="style">
                                                <xsl:choose>
                                                      <xsl:when test="Speed &lt; '50'">
                                                            <xsl:value-of select="concat('height:10;background-color:green',';width:',round(Speed * 100 div 60),'%')" />
                                                      </xsl:when>
                                                      <xsl:otherwise>
                                                            <xsl:value-of select="concat('height:10;background-color:red',';width:',round(Speed * 100 div 60),'%')" />
                                                      </xsl:otherwise>
                                                </xsl:choose>
                                          </xsl:attribute>
                                          <tr><td style='font-size:1'><br/></td></tr>
                                    </table>
                              </td></tr></table>
                        </td>
                        <td width="1%" style="padding-left:3"><xsl:value-of select="Speed"/></td>
                  </tr>
            </table>
      </xsl:for-each></td>
      </tr></table>
      </body>
</html>
</xsl:template>

<xsl:template name="FormatDate">

    <xsl:param name="DateTime" />

    <!--                 1234567890123456789012345 -->
    <!-- new date format 2008-01-14T00:00:00-05:00 -->

    <xsl:variable name="year">
      <xsl:value-of select="substring($DateTime,1,4)" />
    </xsl:variable>
   
    <xsl:variable name="mo">
      <xsl:value-of select="substring($DateTime,6,2)" />
    </xsl:variable>

    <xsl:variable name="day">
      <xsl:value-of select="substring($DateTime,9,2)" />
    </xsl:variable>

    <xsl:variable name="time-temp">
      <xsl:value-of select="substring-after($DateTime,'T')" />
    </xsl:variable>

    <xsl:variable name="time">
      <xsl:value-of select="substring-before($time-temp,'-')" />
    </xsl:variable>

    <xsl:variable name="hh">
      <xsl:value-of select="substring($time,1,2)" />
    </xsl:variable>

    <xsl:variable name="mm">
      <xsl:value-of select="substring($time,4,2)" />
    </xsl:variable>

    <xsl:variable name="ss">
      <xsl:value-of select="substring($time,7,2)" />
    </xsl:variable>


    <xsl:choose>
      <xsl:when test="$mo = '01'">Jan</xsl:when>

      <xsl:when test="$mo = '02'">Feb</xsl:when>

      <xsl:when test="$mo = '03'">Mar</xsl:when>

      <xsl:when test="$mo = '04'">Apr</xsl:when>

      <xsl:when test="$mo = '05'">May</xsl:when>

      <xsl:when test="$mo = '06'">June</xsl:when>

      <xsl:when test="$mo = '07'">July</xsl:when>

      <xsl:when test="$mo = '08'">Aug</xsl:when>

      <xsl:when test="$mo = '09'">Sept</xsl:when>

      <xsl:when test="$mo = '10'">Oct</xsl:when>

      <xsl:when test="$mo = '11'">Nov</xsl:when>

      <xsl:when test="$mo = '12'">Dec</xsl:when>
    </xsl:choose>

    <xsl:value-of select="' '"/>

    <xsl:if test="(string-length($day) &lt; 2)">
      <xsl:value-of select="0"/>
    </xsl:if>

    <xsl:value-of select="$day"/>
    <xsl:value-of select="' '"/>

    <xsl:value-of select="$year"/>
   

    <xsl:value-of select="' '"/>

    <xsl:value-of select="$hh"/>
    <xsl:value-of select="':'"/>
    <xsl:value-of select="$mm"/>

  </xsl:template>
</xsl:stylesheet>

---------------------------------------------------------
---------------------------------------------------------

When I return the XML through the setting interface and cut and paste everything into my own XML file and XSL file and run that from my desktop top everything works as it should.

So I am confident that the code is not to blame, but i could be wrong.

Lastly when I refresh the page a couple times the results fail at different locations.

When I say "fail" i mean the data trails off. The data start to only display the data and no bar and ,eventually nothing.


So... this leaves me to think, is there a size limit? Is there a limit set somewhere in the web.config file, or in the module settings?

Any help or direction is much appreciated.

p.s. Sorry no public URL available, developed on an Inranet environment.
and the exact file return count is 2364 items.

 
New Post
2/14/2008 7:32 PM
 

I've logged a bug report for this (RPT-7080) and I'll look in to it ASAP.


Andrew Nurse
DotNetNuke Core Team Member and Reports Module Project Lead
Microsoft Certified Professional Developer

 
New Post
4/23/2008 1:48 PM
 

Sorry for the delay, but I have been trying to reproduce this and cannot. I have run the visualizer on a data set containing 80,000+ records without reproducing this issue.

It is possible that a highly complicated XSLT file processing a large XML file could fail under Web conditions where it would not fail when run from a Desktop machine. This could be due to a lack of memory (in shared hosting environments, etc.) or other unforseen issues. Unfortunately, there does not appear to be anything the module can do to correct this as the module simply uses the XSLT processor included in the .Net Framework.

The only suggestion I can make is to avoid using the <xsl:for-each /> (as suggested here). I'm not an XSLT expert, but I would suggest using various resources available online (i.e. Google) to try to ensure your XSLT file is as performant as possible.

Hope you are able to solve your problem!


Andrew Nurse
DotNetNuke Core Team Member and Reports Module Project Lead
Microsoft Certified Professional Developer

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsReportsReportsLarge XML file XSL Transform problemLarge XML file XSL Transform problem


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out