Index error with multiple sequences

X-Application Version: 3.1.3
Tamino Version : 3.1.1
Platform : NT
WebContainer : Tomcat 3.3
JDK Version : 1.3.1

Hi,

I created a schema (see attached file) and let X-Application generate an application. Generally, it works fine, but if a document is found, that contains different occurences in two sequences (e.g. those beginning with the elements FBRANT and FFAPID, for example FBRANT has 2 occurences and FFAPID 0), an index error occurs (see attached file).

Does anyone have an idea what’s wrong?

[This message was edited by Christian Freytag on 21 Mar 2003 at 12:25.]
FOBJ.TSD.rtf (14.5 KB)

Hello,

I could reproduce your error on my machine when invoking the create page (create.jsp) and clicking on the add button for the anonymous sequence ‘FBRAN FBRANT’.

I don’t know whether the generator creates wrong attributes for loop or action tags or the internal tag implemenation has a bug. I have to analyze the problem.

I will post to the community when I or my colleagues find out the reason for the problem.

Bye,
Christian.

Hello,

I found out that the generator creates the same name for multiple ?loops?. The name of a loop should be unique since the name is used to select nodes (elements / attributes) and to be a base for sub-loops. The name of a loop is defined by the attribute ?targetbase? of the loop tag.

To solve your problem you have to give the four loops which currently have the name ?/FOBJ/xapp:child(1)?, individual names. I did this renaming within the file structure.xml:

- /FOBJ/xapp:child(1)/s1
- /FOBJ/xapp:child(1)/s2
- /FOBJ/xapp:child(1)/s3
- /FOBJ/xapp:child(1)/s4

These are the new loop names. Then, I used the regenerate of the generator to create the new JSPs.

Remark: If you rename the targetbase of the loop tag within your structure.xml, you must also change the attribute ?base? of nested loop tags.

I attach my structure.xml where I made this changes. It should be nearly the same as yours but I removed some ?displays?. The reason is, that the generated JSPs where to big and the compiler could not process them.

I hope, with a look at the structure file and my description you are able to fix this problem. If not, feel free to ask for more assistance.

Bye,
Christian.
structure.xml (16 KB)

Hello,

this bug is fixed with X-Application 4.1.1. Please be aware that the naming of loops (attribute ‘targetbase’) differs with the new generator. The name is

loop

where is an integer increased for each new loop.

Bye,
Christian.