Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - Re: [HELP] XSLT.Load Problem [Thread Next] Re: [HELP] XSLT.Load ProblemTo: NULL Date: 8/1/2004 5:21:00 AM Gr8 And Thanks For your help! Best Regards, T :-) "Chris Barber" wrote: > Hmm. > > to be honest I can't see *any* reason why that wouldn't work without the number() function! > > However, it is good practice to explicitly cast to a number when using string based information (as > XML does) to ensure that you don't get funny results. > > I'd suggest that it's a bug in the .NET system (not unlikely). > > Chris. > > "tiraman" <tiraman@d...> wrote in message > news:C41832E5-9046-4A0E-95AB-1FF6656374F9@m...... > the variable define like this: > <xsl:variable name="myCounter" select="count(/root/Category > [@Type=18]/Child)"/> > > and later in the xsl i m doing this kind of loop > <xsl:for-each select="(Category)[(@Type='18')]"> > <TR VALIGN="BOTTOM"> > <xsl:call-template name="Child1"> > <!-- please note that i added the number() function which solve me the > problem which i didn't have in VB6 --> > <xsl:with-param name="myCounter" > select="number(($myCounter))*2"/> > </xsl:call-template> > </TR> > </xsl:for-each> > > > Best Regards, > > T :-) > > "Chris Barber" wrote: > > > Post your XML (truncate to make it smaller if necessary) and XSL that shows this issue and I'll > have > > a look using Xselerator to see exactly what the variable / param contains - might point to a > reason > > for this. > > > > Chris. > > > > "Chris Barber" <chris@b...> wrote in message > > news:uG7DxS2dEHA.996@T...... > > Is the variable a nodelist containing more than one element? > > The number() function will then transform the first element value to a number thus allowing the > > calculation? > > > > Chris. > > > > "tiraman" <tiraman@d...> wrote in message > > news:E749BBFF-DF24-4E1F-90DA-615FD8841385@m...... > > hi, > > you are right ! now it is working but as i wrote above it is wierd since > > > > it is working to me ok when i m doing transformation with vb6 but with > > > > vb .NET i have the problem if i m not using this function :-( > > > > so 1st thanks ! > > > > 2nd if you have any idea why this happen i would like to know. > > > > Best Regards, > > > > T :-) > > > > > > "Chris Barber" wrote: > > > > > You should probably ensure that the variable really is a number before attempting to use it in a > > > calculation: > > > > > > <xsl:with-param name="myCounter" select="number(($myCounter))*2"/> > > > > > > Chris. > > > > > > "tiraman" <tiraman@d...> wrote in message > > > news:F0F1F6D7-56EC-49C9-A3EA-A82E87212E6E@m...... > > > Hi, > > > > > > i have a problem to load xsl files which holds code like this: > > > > > > <xsl:with-param name="myCounter" select="($myCounter)*2"/> > > > > > > but when i m removing the *2 every thing ok > > > > > > <xsl:with-param name="myCounter" select="($myCounter)"/> > > > > > > Please note that this is working ok from VB6 using the > > > > > > Best Regards, > > > > > > T :-) > > > > > > > > > --- > > > Outgoing mail is certified Virus Free. > > > Checked by AVG anti-virus system (http://www.grisoft.com). > > > Version: 6.0.732 / Virus Database: 486 - Release Date: 29/07/2004 > > > > > > > > > > > > > > > --- > > Outgoing mail is certified Virus Free. > > Checked by AVG anti-virus system (http://www.grisoft.com). > > Version: 6.0.732 / Virus Database: 486 - Release Date: 29/07/2004 > > > > > > > > > > > --- > Outgoing mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.732 / Virus Database: 486 - Release Date: 29/07/2004 > > > | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
