Altova Mailing List Archives


[xsl] numbers and XPath

From: "Endre, MAGYARI" <endre@--------->
To:
Date: 11/24/2002 8:41:00 AM
Dear list,


	Thank you all for your replies regarding my attribute question.

	I have an other problem, this is an expression which gives value 
to an attribute inline, inside the element definition:

"{concat('id',string(number($assoc_pos)*number('1000') + number('500000') 
+ number(position())))}"

	This is inside an <xsl:for-each> loop and we may assume that 
all the for-each loop will loop exactly two times.

	The $assoc_pos variable will have different values, it will start 
from 5 and it will have an incremented value whenever the processor enters 
this template.

So, the output attribute should be stg. like:
id5005001, id5005002
id5006001, id5006002
....
id5009001, id5009002

and so on. And this is how it work, but, it's very strange, when the 
variable $assoc_pos reaches the value 10, the generated attributes will be

id51, id51

I have no idea how could this happen. Is this a bug ? Or I have done stg 
wrong?

I'm using XmlSPY 5.2

Thank you,
Endre


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Disclaimer

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.