I have problems with X-Application-"choice"-Element

Dear X-Application Team,

I have described my Problem in the attachment-file “ProblemBeschreibung.rtf”. I send you forther more my XML-Schema “wiw-artikel.tsd” as attachment.
Thank you for your help.

Yours sincerely,

Irfan
ProblemBeschreibung.rtf (3.77 MB)

Hello,

this is the page you posted to the communit to display your data. It is ok except the inner most loop.

<BR>   <bdm:module id="WiWBrowse"><BR>      <bdm:browse module="WiWBrowse" document="wiwdoc" pagesize="10"><BR>         <bdm:if condition="exist" select="/wiw-artikel/EinWortLemma" ><BR>            <font size=5 color="00FF00">Kookkurrenzen2</font><BR>            <table><BR>            <bdm:loop module="WiWBrowse" document="wiwdoc" select="/wiw-artikel/EinWortLemma/Kookkurrenz" iterate="MWKook" targetbase="Kook2" ><BR>               <tr><BR>               <bdm:choice type="TXTobj" select="."  ><BR>                  <bdm:loop module="WiWBrowse" document="wiwdoc" select="." iterate="TXTobj" base="Kook2" targetbase="Kook3" ><BR>                     <td><BR>                       <bdm:display select="." /><BR>                     </td><BR>                  </bdm:loop><BR>               </bdm:choice><BR>               </tr><BR>            </bdm:loop><BR>            </table><BR>         </bdm:if><BR>      </bdm:browse><BR>      <input type="submit" value="Zurueck" >   <BR>   </bdm:module><BR></pre><BR><BR>The reason for your problem is the choice request for the MWKook element. The element itself is not a choice, but it contains a list of choices. <BR><pre class="ip-ubbcode-code-pre"><BR>  <!ELEMENT <B>Kookkurrenz</B> (Sign?, ... , <B>MWKook</B>*, ... , AngabeZusatz?) ><BR>  <!ELEMENT <B>MWKook</B> (TXTobj | AngabeZusatz)*  ><BR> </pre><BR><BR>An MWKook of the form<BR><BR><pre class="ip-ubbcode-code-pre"><BR><MWKook><BR>   <TXTobj>...</TXTobj><BR>   <AngabeZusatz>...</AngabeZusatz><BR>   <TXTobj>...</TXTobj><BR>   <TXTobj>...</TXTobj><BR>  <AngabeZusatz>...</AngabeZusatz><BR></MWKook><BR></pre><BR><BR>is possible.<BR><BR>Therefore, the loop tag and the choice tag should be switched.<BR><BR><pre class="ip-ubbcode-code-pre"><BR><bdm:loop module="WiWBrowse" document="wiwdoc" select="." iterate="TXTobj AngabeZusatz" base="Kook2" targetbase="Kook3" ><BR>  <bdm:choice type="TXTobj" select="."  ><BR>    <td><BR>       <bdm:display select="." /><BR>    </td><BR>  </bdm:choice><BR></bdm:loop>             <BR>



I hope, this solves your problem.

Bye,
Christian.

Hello,

this topic will be moved to the Assistance Forum in the next days.
The assistance forum is intended to be used for technical questions and answers.

Thank you for your understanding.

Regards,
Christian.

Hello Christian,

I get now the following error message:

ApplicationException: 999: Application Error! Please contact the X-Application-Team.
com.softwareag.xtools.xapplication.common.PreconditionViolation
the node ‘/wiw-artikel/EinWortLemma/Kookkurrenz/MWKook/xapp:occ(1)/xapp:chc(1)’ is not a content node

Thank you for your help.

Regards

Irfan Bilgili

Hello Irfan,

excuse me, it was my mistake. The choice tag does not change the node context. With the inner most loop you have a “virtual” choice node. The child of the choice node is the content node TXTobj.

Therefore change the path of the display tag
Instead of

<BR><bdm:choice type="TXTobj" select="."  ><BR>   <td>       <BR>     <bdm:display select="." /><BR>   </td>  <BR></bdm:choice><BR></pre><BR><BR>use<BR><BR><pre class="ip-ubbcode-code-pre"><BR><bdm:choice type="TXTobj" select="."  ><BR>   <td>       <BR>     <bdm:display <B>select="./TXTobj"</B> /><BR>   </td>  <BR></bdm:choice><BR>



Bye,
Christian.

Hello Christian,

it works properly now.

Thank you very much.

Best regards.

Irfan