.Net 1.1 to .Net 3.5 XSLT Issue

Hi,

I've recently upgraded my 1.1 app to 3.5.

The following xslt works fine running against the 1.1 compiled code, but does not work when running against the 3.5 version:

 <xsl:if test="position() &gt; $recordsPerPage * number($pageNumber) and position() &lt;= number($recordsPerPage * number($pageNumber)+ $recordsPerPage)">

There no exceptions being thrown, but the results are not the same particular around resultsets with 1 or 2 items.

Has anyone else had problems with xslt upgrading?

0
Simple79
3/23/2009 4:00:02 PM
asp.net.xml-datasource 7181 articles. 0 followers. Follow

4 Replies
914 Views

Similar Articles

[PageSpeed] 51

Well I haven't worked in XSLT in a bit, but I'm pretty sure that specification adherence got more strict between the versions. 1.x and 2.0 of .NET.

So my guess is that something is wrong in that regard.


Evan's Blog
Codeundrum: Code that puzzles.
0
Evan
3/23/2009 4:40:52 PM

What changes have you made exactly, have you moved from System.Xml.Xsl.XslTransform to System.Xml.Xsl.XslCompiledTransform?

Can you try to isolate the problem and post a minimal but complete XML input document and stylesheet allowing us to reproduce the problem?

Both XslTransform and XslCompiledTransform implement XSLT 1.0 so should not differ but it is of course possible that due to a bug one is behaving differently from the other. And position() tests could also be impacted by whether or not white space got stripped.


Martin Honnen --- MVP XML
My blog
0
Martin_Honnen
3/23/2009 4:59:01 PM

Thanks.

Here's a single node of xml:

 <MeetingSearch>
     <Meeting MeetingID="3564" MeetingDate="24/02/2009" MeetingTime="08:30" Slot="AM" MeetingTypeID="1" Code="PaperType1" Paper="ABC Paper" />
</MeetingSearch>

Here's the xslt:

<?xml version="1.0" encoding="UTF-8" ?>
<
xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<
xsl:variable name="recordsPerPage" select ="10"></xsl:variable>
<
xsl:variable name="pageNumber" select="1"></xsl:variable>
<
xsl:variable name="recordCount" select="0"></xsl:variable>
<
xsl:variable name="HasPapers" select="1"></xsl:variable>
<
xsl:template match="/">
<
xsl:element name="div">
<
xsl:attribute name="class">
<xsl:choose>
<xsl:when test="$HasPapers=1">PaperEditControl</xsl:when>
<
xsl:otherwise>EditControl</xsl:otherwise></xsl:choose></xsl:attribute>

<fieldset>
<
legend>Search Results</legend>
<
table border="0" cellpadding="3" cellspacing="1" class="DataField" width="100%">
<
thead>
<
th class="DataColumn" width="25">Date</th>
<
th width="15%">Slot</th>
<
th width="20%">Time</th>
<
th>Meeting</th>
<
xsl:if test="$HasPapers='1'"><th>Credit Paper</th></xsl:if>
</
thead>
<
xsl:for-each select="//Meeting">
<
xsl:if test="position() &gt; $recordsPerPage * number($pageNumber) and position() &lt;= number($recordsPerPage * number($pageNumber)+ $recordsPerPage)">
<
tr>
<
td><xsl:value-of select="@MeetingDate" /></td>
<
td align="Center"><xsl:value-of select="@Slot" /></td>
<
td align="Center"><xsl:value-of select="@MeetingTime" /></td>
<
td>
<
xsl:element name="a">
<
xsl:attribute name="href">../Meetings/MeetingDetails.aspx?mid=<xsl:value-of select="@MeetingID" />&amp;src=ms&amp;p=<xsl:value-of select="$pageNumber" /></xsl:attribute>
<
xsl:value-of select="@Code" />
</
xsl:element>
</
td>
<
xsl:if test="$HasPapers='1'">
<
td>
<
xsl:value-of select="@Paper" />
</
td>
</
xsl:if>
</
tr>
</
xsl:if>
</
xsl:for-each>
</
table>
</
fieldset>
</
xsl:element>
</
xsl:template>
</
xsl:stylesheet>

Code:

XslCompiledTransform trans = XslTransformCache.GetXslTransform(xsltPath);

XmlDocument docXml = new XmlDocument();
docXml.LoadXml(xml);
StringBuilder sb = new StringBuilder();

using (XmlWriter writer = XmlWriter.Create(sb, null))
{
   // Write XML data.
   writer.WriteRaw(xml);
   trans.Transform(docXml.CreateNavigator(), args, writer);
}

return sb.ToString();
 
0
Simple79
3/24/2009 9:17:56 AM

When I run that stylesheet against that XML sample with XslTransform and with XslCompiledTransform I don't see any difference in the result.

Can you show us the different results you get?


Martin Honnen --- MVP XML
My blog
0
Martin_Honnen
3/24/2009 12:07:38 PM
Reply:

Similar Artilces:

Differences between .net 1, .net 1.1, .net 2.0 and .net 3.0
Hi, This seems to be a common question, but i havent got an answer yet:(Can, any one please explain me the differences between these versions.If you keep your feet firmly on the ground, you'll have trouble putting on your pants! Have a look into this links http://en.wikipedia.org/wiki/.NET_Framework http://blogs.msdn.com/mohammadakif/archive/2006/12/03/net-3-0-different-versions-of-the-net-framework.aspx http://www.codeproject.com/aspnet/ComparisonASP1xASP20.aspAshok Rajawww.iGold.inDon't forget to click "Mark as Answer" on the post that helped you. This credits that m...

Differences between .net 1, .net 1.1, .net 2.0 and .net 3.0 #2
Hi, This seems to be a common question, but i havent got an answer yet:(Can, any one please explain me the differences between these versions.If you keep your feet firmly on the ground, you'll have trouble putting on your pants! There are too many differences for one email - - from 1.0 to 1.1 (not a whole lot of real change, other than fixes, at least compared to 1.1 to 2.0) With 2.0, there were many new declarative controls, with many new ideas added in With 3.0, it's a superset of 2.0 - instead of replacing the installation completely, it just 'added on' new functionality - I would...

Issue with clients consuming a web service that was upgraded from .NET 1.1 to .NET 3.5
I am currently working with an application that was converted from Visual Studio 2003 to Visual Studio 2008 and we are having issues with a client consuming the web service portion of the application.  The web services were written in .NET 1.1 using the Web Services Enhancements 2.0 and was upgraded to use the .NET 3.5 framework.  One of our clients application, which is still written in .NET 1.1 was reference the upgraded web service and tried to consume the web service and received the following error: System.Web.Services.Protocols.SoapException: Se...

autocomplete not working in IE7 after web app was migrated from .NET 1.0/1.1 to .NET 3.5
IE7 autocomplete not working after web app was migrated from .NET 1.0/1.1 to .NET 3.5. OS: Windows XP. Autocomplete worked fine on IE6 and IE7 before migration.  Is there anything thats needs to be configured on the server for IE7 autocomplete to work with the new migrated 3.5 application?  Appreciate the feedback         How are you impleneting Autocomplete? Can you show us problem causing code..My Blog"Don't be afraid to be wrong; otherwise you'll never be right." there is no autocomplete implementation. This is purely using...

Migrating .NET 1.1 to .NET 2.0/3.5
We have many of our application running in .NET 1.1, and plannig to migrate all one-by-one, i know there will be a big challenge for this activity, What we are planning is not to migrate all in one shot, After migrating one application we will give for some selective users testing once we feel it is OK, do the next. What is best way of doing this thing? Any links, thrid party tools, since opening this in VWD 2005, it is converting the application but many errors are popuping up. Any reference would be highly appreciated, thanks in advance. Hi, Please follow the steps mentioned in this l...

Proplem with..Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3 (.NET CLR 3.5.30729)
Name: Tony Email: Accuscopeathotmaildotcodotuk Product: Firefox Summary: Proplem with..Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3 (.NET CLR 3.5.30729) Comments: I have used Firefox for many years but I am not happy with latest version. You can set options such as home page and security and privacy settings but as soon as you close the browser and re start it remembers none of the settings??? Very frustrating! I have re-installed several times and rebooted every time but it always goes back to a default page as though I had just do...

is .net framework 1.1 same as .net framework SDK 1.1
is .net framework 1.1 same as  .net framework SDK 1.1 Basically Framework 1.1 of .NET includes the Sofware Development Kit (SDK) 1.1 http://www.microsoft.com/downloads/details.aspx?FamilyID=9b3a2ca6-3647-4070-9f41-a333c6b9181d&displaylang=en Regards,Vinz"Code, Beer and Music" that's my way of being a programmer!How to get your Forum Question Answered | Blog | CodeASP.NET I think .net framework 1.1 is just the runtime library to view .net 1.1 programs.  the .net framework SDK 1.1 one is the actual development library used to create them.   Eri...

VS .NEt 2003/ .Net 1.1 issues
Hi, I have a couple of issues with VS 2003/1.1 development on a machine.  I have no problems working with VS 2005/2.0 on the very same machine.   When creating a Web Application on my localhost IIS install, as soon as the WebForm1.aspx is created I get an ExecutionEngineException in DefaultDomain and the IDE closes.   Thinking that this could be an IDE issue, I attempted to install VS 2003 SP1.  When I try that, I get a Fatal Execution Engine Error 0x7925dc14. I have googled that error and it seems to come up in the context of some other applications a...

Problems while porting .Net framework 1.0 (VB.Net) application to .Net Framework 1.1
Hello,   I have a ASP.Net web application,written in VB.Net,developed on .Net Framework 1.0 .I am trying to port it on to .Net framework 1.1.   For achieving this,I follow the following steps-   1.Open the project using the .vbproj file. 2.I am prompted with the conversion message "Do you want to convert the solution and all projects to .Net framework  1.1....." 3.I click "Yes" 4.I assume that the project is now converted. 5.I build the project & try to run it. 6.I get the following error -     Server Error in '/Consert.Net' Application. ...

Version beforeMozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.7) Gecko/20091221 Firefox/3.5.7 (.NET CLR 3.5.30729)
Name: James Kiekow Email: jamesdotkiekowathotmaildotcom Product: Firefox Summary: Version beforeMozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.7) Gecko/20091221 Firefox/3.5.7 (.NET CLR 3.5.30729) Comments: Dear Excellent Developers, I share a passion for the same in IT and I wanted to mention that I have the previous version of Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.7) Gecko/20091221 Firefox/3.5.7 (.NET CLR 3.5.30729) installed and it was extremely slow surfing the web so I upgraded and my assumption was correct it was the install I believe of th...

After migration from .Net 1.1 to .Net 3.5 do I have to incorporate new web.config settings in old *.config file
Hi,I have successfully migrated web application from .Net 1.1 to .Net 3.5. Could you let me know whether I have to incorporate setting in new web.config (this new web.config file was generated automatically due to migration) into old *.config file?FYI: Old *.config file contains all application level settings required. So I will continue to use old.config file by removing new web.config file. Settings which are in new web.config file are:<configSections><sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup,...

Where is the ADO.NET Sybase driver for .NET 1.1 and .Net 2.0?
Hi All Does anyone know where I can get the Sybase drivers for ADO.NET for both versions, 1.1 and 2.0/3.0? Cheers Chris Burrell Hi Chris, There is no release of ASE ADO.NET Provider 2.0 (I assume you refer to ASE provider, not ASA - if ASA please port to sybase.public.sqlanywhere.general). For the 1.1 Provider: It is available in the ASE SDK for windows or the PC Client CDRom included with ASE product. On the SDK its available as 12.5.1 and 15.0 On ASE PC Client I think 12.5.1 is part of ASE 12.5.X and 15.0 is part of ASE 15.X 2.0 provider should release som...

best practices to migrate from .net 1.0 to .net 1.1
hi, i have windows xp pro running iis 5.1. i have an intranet site running under iis. i made this site using VS.NET 2002 under .NET framework 1.0.3705. Now i want to upgrade me .NET frame work to version 1.1. , but i still want to use VS.NET 2002 for programming and maintaining the site. How do i do this without the upgrade affecting my already deployed website. A step by step procedure to migrate from version 1.0.3705 to version 1.1 would be quite helpful. Thanks in advance, Raja. Well, at least take a look at this doc about running v1.0 and 1.1 side-by-side h...

best method to migrate from .net 1.0 to .net 1.1
hi, i have windows xp pro running iis 5.1. i have an intranet site running under iis. i made this site using VS.NET 2002 under .NET framework 1.0.3705. Now i want to upgrade me .NET frame work to version 1.1. , but i still want to use VS.NET 2002 for programming and maintaining the site. How do i do this without the upgrade affecting my already deployed website. A step by step procedure to migrate from version 1.0.3705 to version 1.1 would be quite helpful. Thanks in advance, Raja. Hi, There is an article on this, right on this site. Check this Hope it hel...

Web resources about - .Net 1.1 to .Net 3.5 XSLT Issue - asp.net.xml-datasource

Sports Illustrated Swimsuit Issue - Wikipedia, the free encyclopedia
Through the years many models, such as Cheryl Tiegs , Christie Brinkley , Paulina Porizkova , Elle Macpherson , Rachel Hunter , Rebecca Romijn ...

Potential Post-IPO Issues For Facebook: Mobile Revenue, Overvaluation, Google AdSense
The road ahead may be rough for Facebook, post- initial public offering . At least that is the speculation of Michael Mothner, founder and chief ...

Smoggy With a Chance of Disruption: Beijing Issues New Red Alert
NDTV Smoggy With a Chance of Disruption: Beijing Issues New Red Alert Bloomberg A Beijing environmental official said the city will look to ...

DHS Unveils New Terror Warning System, Issues First ‘Bulletin’
Prior to the changes DHS announced Wednesday, NTAS had two types of alerts “Elevated Alerts." NTAS had never been deployed.


What I like to see: Agencies Issue Statement on CRE Loans
During the housing bubble, the regulatory agencies were lax in providing guidance related to weak lending standards and high credit concentrations. ...

The Biggest Issue Right Now For American Voters Wasn’t Even On Their Radar In ’08
The Biggest Issue Right Now For American Voters Wasn’t Even On Their Radar In ’08

The Real Issue
Of course Republicans don't care about the deficit, but the bigger issue is that the scolds in the media only care about the deficit when they ...

Miss Universe Contestants Overcame Weight Issues, Kidnapping & Terrorism To Make It to the International ...
Miss Universe contestants are known for their beauty, but this year, it's their stories of survival that make them stand out.

Netflix Updates Algorithm Policy, May Solve Streaming Issues
Instead of its old blanket policies, Netflix now is looking at all its video presentations and assigning appropriate encoding algorithms to each ...

Resources last updated: 12/20/2015 6:54:23 AM