Hi Nicolas,

you should not put fb:tags inside your <fb:insert-node/>. The <fb:insert-node/> will put all it's child nodes into the DOM object and they will then of course appear in the resulting XML document.

You need to make sure the hierarchy of you document is correct.
So what happens if you do it like this with the classment insert node in between?

  <fb:repeater id="niveaux" parent-path="." row-path="niveau">
    <fb:on-bind>
      <fb:repeater id="classements" parent-path="." row-path="classement">
        <fb:on-bind>
<fb:repeater id="concurrents" parent-path="." row-path="concurrent">
            <fb:on-insert-row>
              <fb:insert-node>
                <concurrent>
                  <nom/>
                </concurrent>
              </fb:insert-node>
            </fb:on-insert-row>
          </fb:repeater>
        </fb:on-bind>
        <fb:on-insert-row>
          <fb:insert-node>
            <classement> </classement>
          </fb:insert-node>
        </fb:on-insert-row>
      </fb:repeater>
    </fb:on-bind>
    <fb:on-insert-row>
      <fb:insert-node>
        <niveau>
          <libelle/>
          <classement> </classement>
        </niveau>
      </fb:insert-node>
    </fb:on-insert-row>
  </fb:repeater>

Reijn




Nicolas Duroc wrote:
Hi Jeroen,
Thanks for your response, in fact, when I insert many <fb:insert-node>...</fb:insert-node>, they still are in the XML document instead of inserting a "real" node. If I try this : </fb:repeater>
      </fb:on-bind>
        <fb:on-insert-row>
            <fb:insert-node>
                <niveau>
                    <libelle>
                    <fb:insert-node>
                        <classement>
</classement> </fb:insert-node>
                </niveau>
            </fb:insert-node>
        </fb:on-insert-row>
 </fb:repeater>
Here's what I get in the XML document when it's saved : <niveau>
    <libelle>test</libelle>
    <fb:insert-node xmlns:fb="http://apache.org/cocoon/forms/1.0#binding";>
        <classement>
            <concurrent/>
        </classement>
    </fb:insert-node>
</niveau>
I don't want that the <fb:insert-node> appear in the XML document. Regards, Nicolas 2006/9/29, Jeroen Reijn <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>:

    Hi Nicolas,

    I will try to help you out.

    Nicolas Duroc wrote:
     > Hello,
     >
     > I have some problem about inserting nodes in my XML document. In
    fact my
     > document has the following structure :
     >
     > <root>
     >     <niveau>
     >         <classement>
     >             <concurrent>
     >                 <nom>test</nom>
     >             </concurrent>
     >             ...
     >         </classement>
     >     </niveau>
     >     ...
     > </root>
     >
     > I use the "on-insert-row" action to insert "concurrent", but when
    I want
     > to insert a "niveau", I would like ton insert the associated
     > "classement" like :
     >
     > <niveau>
     >     <classement/>
     > </niveau>

    Ok well this seems pretty logical to me.

     >
     > By this way, I could add "concurrent" in this "classement".
    Although I
     > specified, the inserted node with a "2 level deep", it inserts
    only the
     > "niveau", and I can't insert "concurrent" in it.

    Hmm this seems strange to me, so this is where the problem lies.

     >
     > here's my binding file :
    <snip/>
     >
     > To insert a deeper "node", I suppose I have to add many
    "insert-node"
     > but when I try, tags aren't interpreted, and they appear in the
    XML File...

    What do you mean exactly with tags aren't interpreted. You don't see
    them inside your form?

    What happens if you save the file, do the XML tags end up in your
    resulting XML document?

     >
     > If anyone has an idea...
     >
    Ciao,

    Jeroen Reijn
    Hippo

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: [EMAIL PROTECTED]
    <mailto:[EMAIL PROTECTED]>
    For additional commands, e-mail: [EMAIL PROTECTED]
    <mailto:[EMAIL PROTECTED]>



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to