From: <kev...@xp...> - 2021-07-24 19:04:06
|
There are multiple ways to skin a cat, one of these ways could be: Take the three fragments and make a single document under a wrapper, like: let $wrapper := <wrapper> {$var1} {$var2} {$var3} </wrapper> But you are making these fragments I guess so you could make that more generic or build the whole wrapper at one time. Then write an XSL containing the logic for your merge and apply the XSL. Kevin From: Jean-Paul Rehr <re...@gm...> Sent: Saturday, July 24, 2021 10:17 AM To: Alfredo Cosco <alf...@gm...> Cc: exist-open <exi...@li...> Subject: Re: [Exist-open] merging XML Alfredo, are you creating a TEI document in memory, or are you trying to insert these into an existing document stored in eXist-db? JPR On Sat, Jul 24, 2021 at 7:04 PM Alfredo Cosco <alf...@gm... <mailto:alf...@gm...> > wrote: Hi all, I'm working on eXist 4.7 The problem is: I have tre variables with XML code: let $var1 := <fileDesc> <sourceDesc> <msDesc> <physDesc> <objectDesc form=""/> </physDesc> </msDesc> </sourceDesc> </fileDesc> let var2 := <fileDesc> <sourceDesc> <msDesc> <msIdentifier> <idno/> </msIdentifier> </msDesc> </sourceDesc> </fileDesc> let var3 := <fileDesc> <titleStmt> <title/> </titleStmt> </fileDesc> How can I merge there 3 snapshots and obtain something like: <fileDesc> <titleStmt> <title/> </titleStmt> <sourceDesc> <msDesc> <physDesc> <objectDesc form=""/> </physDesc> <msIdentifier> <idno/> </msIdentifier> </msDesc> </sourceDesc> </fileDesc> Thanks, Alfredo _______________________________________________ Exist-open mailing list Exi...@li... <mailto:Exi...@li...> https://lists.sourceforge.net/lists/listinfo/exist-open |