create.jsp attachment for Reply to Christian Freytag, titled

Hi Christian,
Just didn’t know how to post multiple attachments for a single message. I refer to my reply to you, titled "Tried it but still unsuccessful >:-( ", and here is the attachment for “create.jsp”.

Pls note that I’ve purposely taken out all loop tags for those elements of multiple occurrence, to simplify my debugging.

Hope this is Ok with the defined schema.

Thanks Christian!

Sincerely,
Wang Nan

[This message was edited by Christian Freytag on 21 Mar 2003 at 12:30.]
create.jsp (18 KB)

Hello,

yes you are right. Uploading more than one file is not possible. Therefore, my propose for the future is to zip all files into an archive file and to attach the zip file to the topic post.

For your problem: I will try out the user schema and find out what’s wrong with the generated create.jsp.

But, what’s about your classifcation loop. Does the loop work? Or do have still problems with this part of your application.

Bye,
Christian.

Hello,

I could reporduce the error. It’s combination of two problems:

1) The generator creates wrong paths for the optional fields of the element ‘User’.

For example to address the ‘Name’:
the correct path must be

   
/User/xapp:child(1)/xapp:child(1)/xapp:child(1)/xapp:child(1)/Name
</pre><BR>or when using seq / occ / chc<BR><pre class="ip-ubbcode-code-pre">  
/User/xapp:seq(1)/xapp:occ(1)/xapp:seq(1)/xapp:occ(1)/Name



The generator seams not to consider optional nodes (occurrences with minOccurs=‘0’) for the nested sequence and the ‘Name’ element.

2) Even if I correct the path, X-Application produces an exception when creating the optional nodes via ‘touchDescendant’.

We have to analyze these bugs. I will send a post when we find a workaround or can deliver a fix.

Bye,
Christian.

X-Application Version: 3.1.3, 3.1.2, 3.1.1
Tamino Version : 3.1.1
Platform : NT, Win2k, Solaris, …
WebContainer : Tomcat 3.3
JDK Version : 1.3.1

[This message was edited by Admin on 12 Feb 2003 at 09:45.]

Hello Christian,
I have no problem both understanding and agreeing with the SPath statements you used to address the particular business nodes.
I will pay special attentions to your remarks on the problem of X-appliation in considering optional nodes (with minOccurs = 0)within nested sequences. I remember that my colleagues have had such issues before.
Will amend all the incorrect paths accordingly and see how it’ll go.
For now, thank u very much Christian. Till then, take care…

Sincerely,
Wang Nan

Hi Christian,
Just want to clear one concept with your help. You mentioned about nested sequences in your previous assistance message, here I understand the term “nested sequences” as those explicitly declared within a parent sequence.

For example, element “User” has a declared root sequence, which nests an explicitly declared sequence. In this case, I can say that the latter sequence is a nested sequence with respect to the former one.

Pls consider this scenario, element “User” has a declared root sequence, which simply contains an element reference, say “EleRef”. Then again, the definition of “EleRef” itself has a declared root sequence. In this case, can I say that the root sequence of “EleRef” is a nested sequence with respect to the root sequence of “User”?

Pls help me to clear the concept. Thanks in advance!!

Sincerely,
Wang Nan

Hello,

I use the word ‘nested’ only for sequences or choices which are child of another sequence or choice, e.g.

<xs:element name='X'>
  <xs:complexType>
    <xs:choice>
      <xs:sequence minOccurs='0' maxOccurs'unbounded'>
       ...
</pre><BR><BR>In this case the seqeunce is a 'nested' sequence because it is directly enclosed by a choice.<BR><BR><pre class="ip-ubbcode-code-pre">
<xs:element name='X'>
  <xs:complexType>
    <xs:choice>
      <xs:element name='Y'>
        <xs:complexType>
          <xs:sequence minOccurs='0' maxOccurs'unbounded'>
       ...
</pre><BR><BR>For this example I don't call the sequence a 'nested' one. However, I would call the element declaration of 'Y' a 'nested' element declaration. Also when using a reference to the element declaration of 'Y' the sequence is not 'nested'.<BR><BR><pre class="ip-ubbcode-code-pre">
<xs:element name='X'>
  <xs:complexType>
    <xs:choice>
      <xs:element ref='Y'>
      ...
<xs:element name='Y'>
  <xs:complexType>
    <xs:sequence minOccurs='0' maxOccurs'unbounded'>
    ...



I don’t think these terms are ‘official’. My colleagues and I use them and we are accustomed to use them.

I hope this aswers your question about ‘nested’.

Bye,
Christian.

Hello,

I posted a fix to your last topic

No_Such_Schema Error

The fix and the structure.xml / create.jsp should help you to solve your problem.

Bye,
Christian.

Hello,

we checked the schema ‘user.tsd’ with X-Application 4.1.1. The problems with this schema metioned above were solved.

Bye,
Christian.