I have a task to split an XML that I'm receiving using XSLT. The input XML is formatted as follows:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<startup tenantid="edf81f6b-b223-432c-8ce8-38cbd38c76dc">
<application sysid="cb9121ea-a82b-46ae-9521-f4563a51c5c0">
<property type="Ws" name="module_name">Pratica</property>
<property name="saas_user">batch_user</property>
</application>
<processing>
<template type="Name">TemplateProva</template>
<processmode>asynchronous</processmode>
<channel>save</channel>
<modus>central</modus>
<editor>false</editor>
</processing>
<standarddata>
<data>
<object uniqueid="1" name="Pratica" boid="e90737aa-8785-4cbe-ba24-d7c479206872">
<property name="ClienteCap" propid="eef76da7-e5e0-44d9-a1aa-e14621d2a993">10145</property>
<property name="ClienteIndirizzo" propid="6b214298-61d4-4f42-ae25-9279f1db7e8f">Via Roma 10</property>
<property name="NomeFileOutput" propid="6b1aa407-3ec8-4668-9095-da8c100ea3a1">NomeFileProva2225</property>
</object>
<object uniqueid="1" name="Pratica" boid="e90737aa-8785-4cbe-ba24-d7c479206872">
<property name="ClienteCap" propid="eef76da7-e5e0-44d9-a1aa-e14621d2a993">10146</property>
<property name="ClienteIndirizzo" propid="6b214298-61d4-4f42-ae25-9279f1db7e8f">Via Roma 11</property>
<property name="NomeFileOutput" propid="6b1aa407-3ec8-4668-9095-da8c100ea3a1">NomeFileProva2226</property>
</object>
</data>
</standarddata>
</startup>
I need to create 2 output XML documents, that should be like the input above, but each of them should just report 1 <object> element. Any suggestion on how to achieve this?
Example output files:
output1.xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<startup tenantid="edf81f6b-b223-432c-8ce8-38cbd38c76dc">
<application sysid="cb9121ea-a82b-46ae-9521-f4563a51c5c0">
<property type="Ws" name="module_name">Pratica</property>
<property name="saas_user">batch_user</property>
</application>
<processing>
<template type="Name">TemplateProva</template>
<processmode>asynchronous</processmode>
<channel>save</channel>
<modus>central</modus>
<editor>false</editor>
</processing>
<standarddata>
<data>
<object uniqueid="1" name="Pratica" boid="e90737aa-8785-4cbe-ba24-d7c479206872">
<property name="ClienteCap" propid="eef76da7-e5e0-44d9-a1aa-e14621d2a993">10145</property>
<property name="ClienteIndirizzo" propid="6b214298-61d4-4f42-ae25-9279f1db7e8f">Via Roma 10</property>
<property name="NomeFileOutput" propid="6b1aa407-3ec8-4668-9095-da8c100ea3a1">NomeFileProva2225</property>
</object>
</data>
</standarddata>
</startup>
output2.xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<startup tenantid="edf81f6b-b223-432c-8ce8-38cbd38c76dc">
<application sysid="cb9121ea-a82b-46ae-9521-f4563a51c5c0">
<property type="Ws" name="module_name">Pratica</property>
<property name="saas_user">batch_user</property>
</application>
<processing>
<template type="Name">TemplateProva</template>
<processmode>asynchronous</processmode>
<channel>save</channel>
<modus>central</modus>
<editor>false</editor>
</processing>
<standarddata>
<data>
<object uniqueid="1" name="Pratica" boid="e90737aa-8785-4cbe-ba24-d7c479206872">
<property name="ClienteCap" propid="eef76da7-e5e0-44d9-a1aa-e14621d2a993">10146</property>
<property name="ClienteIndirizzo" propid="6b214298-61d4-4f42-ae25-9279f1db7e8f">Via Roma 11</property>
<property name="NomeFileOutput" propid="6b1aa407-3ec8-4668-9095-da8c100ea3a1">NomeFileProva2226</property>
</object>
</data>
</standarddata>
</startup>