XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
Bill CohaganSubject: Wrong value in variable (faulty arithmetic?)
Author: Bill Cohagan
Date: 11 Jul 2004 04:14 PM
I'm a new user (evaluation version) and am attempting to debug an XSL.
As I F11 through a template I am viewing values of variables and the values
being displayed are incorrect. Here are two variable definitions:

<xsl:variable name="First" select="count(w:p[generate-id() = $NextNode]/preceding-sibling::*)" />
<xsl:variable name="FirstPosition" select = "$First + 1"/> <!-- Position of "this" subp-statement paragraph -->

The first variable is correctly displayed as "1", but the second is also
displayed as "1", obviously incorrect. The problem actually appears to be
an engine problem rather than just a display problems.

Have I missed something fundamental or is there a problem with arithmetic
operations in this product?

Thanks,
Bill

Postnext
Minollo I.Subject: Re: Wrong value in variable (faulty arithmetic?)
Author: Minollo I.
Date: 11 Jul 2004 09:19 PM
I've tried reproducing the problem you have described, but without luck.
Can you email me the XSLT and XML documents you are using?

Thanks,
Minollo

Postnext
Bill CohaganSubject: Re: Wrong value in variable (faulty arithmetic?)
Author: Bill Cohagan
Date: 12 Jul 2004 09:28 AM
Minolo
Attached is a Zip containing the xml input, the xsl file, and the project file. Of course the project file reflects my actual folder structure so it'd require an edit. Anyway, put a breakpoint on <xsl:template match="ns0:SubpracticeSet">, start debugging and when it breaks you only need to step a few times before reaching the xsl:variable lines in question. Be sure to have variable display turned on.

Bill


DocumentNewWinZipFile.zip
Zip containing XML, XSL files to debug

Postnext
Minollo I.Subject: Re: Wrong value in variable (faulty arithmetic?)
Author: Minollo I.
Date: 12 Jul 2004 04:28 PM
Thanks for the testcase.

The problem is related to the display of variable values and ONLY when
setting Stylus Studio to use the XSLT .NET processor in the scenario
properties. The issue only affects the value displayed in the variable
window, and not the one internally handled by the processor. A quick
workaround would be to rename your "First" variable definition and use into
"First_".

We are of course investigating further, and we will make a fix available as
soon as possible.

Thanks for reporting this problem,
Minollo

Postnext
Bill CohaganSubject: Re: Wrong value in variable (faulty arithmetic?)
Author: Bill Cohagan
Date: 12 Jul 2004 06:12 PM
Minollo
Thanks for the response, but I'm afraid I don't understand the workaround. Are you suggesting that just changing the name from First to First_ will cure the problem?

Bill

Postnext
Minollo I.Subject: Re: Wrong value in variable (faulty arithmetic?)
Author: Minollo I.
Date: 13 Jul 2004 05:15 PM
That's correct.

The problem is with the internal interface to the .NET XSLT engine which is currently confusing variable names beginning with the same group of characters ($First and $FirstPosition in your case).

Minollo

Postnext
Bill CohaganSubject: Re: Wrong value in variable (faulty arithmetic?)
Author: Bill Cohagan
Date: 06 Aug 2004 10:06 PM
Is this problem fixed yet?

Thanks,
Bill

Posttop
Minollo I.Subject: Re: Wrong value in variable (faulty arithmetic?)
Author: Minollo I.
Date: 07 Aug 2004 10:42 AM
Yes, BL179i available on www.stylusstudio.com/update should contain the fix.

Thanks,
Minollo

 
Topic Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.