From: Eduard D. <ed...@fr...> - 2017-03-21 13:44:25
|
Thank for this clarification! Now I can design our approach... Eduard Drenth, Software Architekt ed...@fr... Doelestrjitte 8 8911 DX Ljouwert +31 58 234 30 47 gpg: https://sks-keyservers.net/pks/lookup?op=get&search=0x065EF82A1E02CC43 ________________________________________ From: Joe Wicentowski <jo...@gm...> Sent: Tuesday, March 21, 2017 2:24 PM To: Eduard Drenth Cc: exi...@li... Subject: Re: [Exist-development] collection.xconf duplicate? Hi Eduard, What you observe is typical of eXist apps distributed via EXPath Package mechanism. All assets in an EXPath Package are stored in a single zip-compressed .xar file, and during installation, these assets are stored into eXist according to the directives in the package metadata—typically into a collection inside /db/apps. Many apps depend on collections being created, collection index and trigger configurations being installed into /db/system/config, etc., so the package metadata allows a script to be run before any other files are uploaded to the database. This script is conventionally called pre-install.xql. In the TEI Publisher apps, the pre-install.xql script copies the app's index configuration into /db/system/config, so that when the rest of the app is installed, the collection's indexes and triggers are in place. Similarly, a post-install.xql script can also be invoked. This is typically used to set permissions on the now-installed collections and resources. So you're right in your observation that you see two collection.xconf files in the TEI Publisher apps. These are not kept in sync by the database, so if you need to make a change to the active collection configuration file, you would alter the one in /db/system and then reindex the affected collection to apply it to any already-stored resources. eXide has a convenient feature to help users who edit a collection.xconf file in a /db/apps subcollection: upon save, eXide offers to copy the file to /db/system and reindex for you. To reinforce the points above, there is nothing that prevents you or your app (e.g., post-install.xql) from deleting the collection.xconf file in /db/apps. Joe On Tue, Mar 21, 2017 at 8:45 AM, Eduard Drenth <ed...@fr...> wrote: > Dear all, > > When creating an app (via teipublisher) I get two collection.xconf: > > - one in system/config/db/<collection> > - one in apps/<collection> > > Why is that? Should I keep this in sync? Are they merged? Is some config read from one xconf and other config from the other? > > Eduard Drenth, Software Architekt > > ed...@fr... > > Doelestrjitte 8 > 8911 DX Ljouwert > +31 58 234 30 47 > > gpg: https://sks-keyservers.net/pks/lookup?op=get&search=0x065EF82A1E02CC43 > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Exist-development mailing list > Exi...@li... > https://lists.sourceforge.net/lists/listinfo/exist-development |