Add a form view content as a notebook page

Hello!
I need to know how to put the content of a form into a notebook page on a new form.
For example. Lets say I have a module “my_module”, and there is a form view with the next content.

<form>
   <label name="name"/>
   <field name="name"/>
</form>

Now, I have another module, “my_new_module”, and there is a form view, that is an expansion of the precedent form. I want to make something like this:

<data>
    <notebook>
        <page string="Page 1">
            <the content of the original view/>
         </page>
         <page string="Page 2">
          (................)
           </page>
    </notebook>
</data>

The idea is to not rewrite (or c/p) everything on the new view.

Thanks.
Francisco

For now, there is no solution to do that except define the notebook in the initial module. Or to replace the entire view.
But I think we could have a new position option to surround the target with a portion of XML. An initial idea would be:

<xpath expr="//field[@name="name"]" position="surround">
    <notebook>
         <page string="Page 1">
         </page>
    <notebook>
</xpath>

It would put the selected tag in the deepest node.
But it should also allow to select sibling to surround.

1 Like

That would be great!
I tried to “hack-it” with postition=“before” and position=“after”, adding the corresponding elements. Of course, with no success.

And what about to “call” those elements, like saying “from this node - to this node” put it here or something else.
Something like
<xpath origin=“view_id” start_expr="//starting_node" end_expr="//ending_node" attribute=“some_options”/>
some_options=[‘paste’,‘move’,‘delete’,‘some_other_options’]

Sorry, I am not a computer scientist, so I don’t know if it is even right the idea I am proposing.

Thanks for the answer and the editing. I cannot find the upper … on my keyboard.
All the best.
Francisco