Page 1 of 1

Repository element indexing uses 1-based index vs. 0-based

Posted: Thu Dec 27, 2012 4:58 pm
by krstcs
The Repository indexing system uses a 1-based index, but all other .NET structures use 0-based.

This causes issues when trying to use the indexes and requires the user to know that there needs to be a conversion.

The Repository index should be changed to match standard .NET conventions. All indexing should be based on the same value.

Re: Repository element indexing uses 1-based index vs. 0-based

Posted: Fri Dec 28, 2012 12:05 pm
by Support Team
Hello,

Could you please describe which index do you mean?
Do you mean the index attribute in the RanoreXPath of a repository item?

Regards,
Markus (T)

Re: Repository element indexing uses 1-based index vs. 0-based

Posted: Wed Jan 02, 2013 7:54 pm
by krstcs
Marcus,

Yes, that is correct. The RxPath indexing starts at 1, but all other indexes, including container child indexes, start at 0, per .NET standards.

Re: Repository element indexing uses 1-based index vs. 0-based

Posted: Thu Jan 03, 2013 2:37 pm
by Support Team
Hello,

This is because the RxPath is a subset of XPath and according to the W3C standard the index is 1 based (XPath Syntax).

Regards,
Markus

Re: Repository element indexing uses 1-based index vs. 0-based

Posted: Fri Jan 04, 2013 2:20 pm
by krstcs
OK, that explains it.

Thanks Markus.

Re: Repository element indexing uses 1-based index vs. 0-based

Posted: Fri Jan 04, 2013 2:51 pm
by Support Team
Your're welcome!

Regards,
Markus