talk@lists.collectionspace.org

WE HAVE SUNSET THIS LISTSERV - Join us at collectionspace@lyrasislists.org

View all threads

Overriding base instance vocabularies

PM
Peter Murray
Fri, Oct 30, 2015 2:39 PM

SDMoM wants to override values in the base instance vocabularies, but the changes I'm making to 'domain-instance-vocabularies.xml' are not being honored.  The changes I'm making to <instance id="vocab-lostatus"> are here:

https://github.com/cherryhill/sdmom-tenant-config/blob/a2f9f6b85b9cd8315fe2dc7641bea1c85a551b8e/application/domain-instance-vocabularies.xml#L270-L284

Reading through the chain of include files, it looks like the domain-instance-vocabularies.xml file is being pulled in here:

https://github.com/collectionspace/application/blob/v4.2/tomcat-main/src/main/resources/defaults/base-instance-vocabularies.xml#L2

Perhaps because that is so early in the base-instance-vocabularies.xml file that the later definition of 'vocal-lostatus' are overriding it?

https://github.com/collectionspace/application/blob/v4.2/tomcat-main/src/main/resources/defaults/base-instance-vocabularies.xml#L39-L54

Peter

Peter Murray
Dev/Ops Lead and Project Manager
Cherry Hill Company

SDMoM wants to override values in the base instance vocabularies, but the changes I'm making to 'domain-instance-vocabularies.xml' are not being honored. The changes I'm making to <instance id="vocab-lostatus"> are here: https://github.com/cherryhill/sdmom-tenant-config/blob/a2f9f6b85b9cd8315fe2dc7641bea1c85a551b8e/application/domain-instance-vocabularies.xml#L270-L284 Reading through the chain of include files, it looks like the domain-instance-vocabularies.xml file is being pulled in here: https://github.com/collectionspace/application/blob/v4.2/tomcat-main/src/main/resources/defaults/base-instance-vocabularies.xml#L2 Perhaps because that is so early in the base-instance-vocabularies.xml file that the later definition of 'vocal-lostatus' are overriding it? https://github.com/collectionspace/application/blob/v4.2/tomcat-main/src/main/resources/defaults/base-instance-vocabularies.xml#L39-L54 Peter -- Peter Murray Dev/Ops Lead and Project Manager Cherry Hill Company
RL
Ray Lee
Wed, Nov 4, 2015 12:39 AM

Hi Peter,
I believe your analysis is right. The *-vocabularies.xml files do not take
part in the newer xmlmerge overlay scheme, for some reason. The older
"include" scheme only allows inserting XML elements, and the insertion
point is too early in the file to be able to override what comes after.
When I need to change something in base-instance-vocabularies, I copy the
entire file into my tenant folder, and edit it directly. Those vocabulary
files should really be restructured so they can be modified with xmlmerge
overlays.

Ray

On Fri, Oct 30, 2015 at 7:39 AM, Peter Murray pmurray@chillco.com wrote:

SDMoM wants to override values in the base instance vocabularies, but the
changes I'm making to 'domain-instance-vocabularies.xml' are not being
honored.  The changes I'm making to <instance id="vocab-lostatus"> are here:

https://github.com/cherryhill/sdmom-tenant-config/blob/a2f9f6b85b9cd8315fe2dc7641bea1c85a551b8e/application/domain-instance-vocabularies.xml#L270-L284

Reading through the chain of include files, it looks like the
domain-instance-vocabularies.xml file is being pulled in here:

https://github.com/collectionspace/application/blob/v4.2/tomcat-main/src/main/resources/defaults/base-instance-vocabularies.xml#L2

Perhaps because that is so early in the base-instance-vocabularies.xml
file that the later definition of 'vocal-lostatus' are overriding it?

https://github.com/collectionspace/application/blob/v4.2/tomcat-main/src/main/resources/defaults/base-instance-vocabularies.xml#L39-L54

Peter

Peter Murray
Dev/Ops Lead and Project Manager
Cherry Hill Company


Talk mailing list
Talk@lists.collectionspace.org

http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org

Hi Peter, I believe your analysis is right. The *-vocabularies.xml files do not take part in the newer xmlmerge overlay scheme, for some reason. The older "include" scheme only allows inserting XML elements, and the insertion point is too early in the file to be able to override what comes after. When I need to change something in base-instance-vocabularies, I copy the entire file into my tenant folder, and edit it directly. Those vocabulary files should really be restructured so they can be modified with xmlmerge overlays. Ray On Fri, Oct 30, 2015 at 7:39 AM, Peter Murray <pmurray@chillco.com> wrote: > SDMoM wants to override values in the base instance vocabularies, but the > changes I'm making to 'domain-instance-vocabularies.xml' are not being > honored. The changes I'm making to <instance id="vocab-lostatus"> are here: > > > https://github.com/cherryhill/sdmom-tenant-config/blob/a2f9f6b85b9cd8315fe2dc7641bea1c85a551b8e/application/domain-instance-vocabularies.xml#L270-L284 > > Reading through the chain of include files, it looks like the > domain-instance-vocabularies.xml file is being pulled in here: > > > https://github.com/collectionspace/application/blob/v4.2/tomcat-main/src/main/resources/defaults/base-instance-vocabularies.xml#L2 > > Perhaps because that is so early in the base-instance-vocabularies.xml > file that the later definition of 'vocal-lostatus' are overriding it? > > > https://github.com/collectionspace/application/blob/v4.2/tomcat-main/src/main/resources/defaults/base-instance-vocabularies.xml#L39-L54 > > > Peter > -- > Peter Murray > Dev/Ops Lead and Project Manager > Cherry Hill Company > > > _______________________________________________ > Talk mailing list > Talk@lists.collectionspace.org > > http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org >
PM
Peter Murray
Wed, Nov 4, 2015 5:24 PM

Thanks for the insight, Ray.  It looks like Chad ran into the same thing with the same observation, and logged a ticket for it:

https://issues.collectionspace.org/browse/CSPACE-6718 https://issues.collectionspace.org/browse/CSPACE-6718

For now I'll just copy over the base-instance-vocabularies file and update the file.  Fortunately, it looks like the files in the tenant take precedent over the ones in the defaults directory, so by naming it the same file and putting it in the tenant directory, it was picked up and used instead of the default one.

Peter

On Nov 3, 2015, at 7:39 PM, Ray Lee rhlee@berkeley.edu wrote:

Hi Peter,
I believe your analysis is right. The *-vocabularies.xml files do not take part in the newer xmlmerge overlay scheme, for some reason. The older "include" scheme only allows inserting XML elements, and the insertion point is too early in the file to be able to override what comes after. When I need to change something in base-instance-vocabularies, I copy the entire file into my tenant folder, and edit it directly. Those vocabulary files should really be restructured so they can be modified with xmlmerge overlays.

Ray

On Fri, Oct 30, 2015 at 7:39 AM, Peter Murray <pmurray@chillco.com mailto:pmurray@chillco.com> wrote:
SDMoM wants to override values in the base instance vocabularies, but the changes I'm making to 'domain-instance-vocabularies.xml' are not being honored.  The changes I'm making to <instance id="vocab-lostatus"> are here:

https://github.com/cherryhill/sdmom-tenant-config/blob/a2f9f6b85b9cd8315fe2dc7641bea1c85a551b8e/application/domain-instance-vocabularies.xml#L270-L284 https://github.com/cherryhill/sdmom-tenant-config/blob/a2f9f6b85b9cd8315fe2dc7641bea1c85a551b8e/application/domain-instance-vocabularies.xml#L270-L284

Reading through the chain of include files, it looks like the domain-instance-vocabularies.xml file is being pulled in here:

https://github.com/collectionspace/application/blob/v4.2/tomcat-main/src/main/resources/defaults/base-instance-vocabularies.xml#L2 https://github.com/collectionspace/application/blob/v4.2/tomcat-main/src/main/resources/defaults/base-instance-vocabularies.xml#L2

Perhaps because that is so early in the base-instance-vocabularies.xml file that the later definition of 'vocal-lostatus' are overriding it?

https://github.com/collectionspace/application/blob/v4.2/tomcat-main/src/main/resources/defaults/base-instance-vocabularies.xml#L39-L54 https://github.com/collectionspace/application/blob/v4.2/tomcat-main/src/main/resources/defaults/base-instance-vocabularies.xml#L39-L54

Peter

--
Peter Murray
Dev/Ops Lead and Project Manager
Cherry Hill Company

Thanks for the insight, Ray. It looks like Chad ran into the same thing with the same observation, and logged a ticket for it: https://issues.collectionspace.org/browse/CSPACE-6718 <https://issues.collectionspace.org/browse/CSPACE-6718> For now I'll just copy over the base-instance-vocabularies file and update the file. Fortunately, it looks like the files in the tenant take precedent over the ones in the defaults directory, so by naming it the same file and putting it in the tenant directory, it was picked up and used instead of the default one. Peter > On Nov 3, 2015, at 7:39 PM, Ray Lee <rhlee@berkeley.edu> wrote: > > Hi Peter, > I believe your analysis is right. The *-vocabularies.xml files do not take part in the newer xmlmerge overlay scheme, for some reason. The older "include" scheme only allows inserting XML elements, and the insertion point is too early in the file to be able to override what comes after. When I need to change something in base-instance-vocabularies, I copy the entire file into my tenant folder, and edit it directly. Those vocabulary files should really be restructured so they can be modified with xmlmerge overlays. > > Ray > > > On Fri, Oct 30, 2015 at 7:39 AM, Peter Murray <pmurray@chillco.com <mailto:pmurray@chillco.com>> wrote: > SDMoM wants to override values in the base instance vocabularies, but the changes I'm making to 'domain-instance-vocabularies.xml' are not being honored. The changes I'm making to <instance id="vocab-lostatus"> are here: > > https://github.com/cherryhill/sdmom-tenant-config/blob/a2f9f6b85b9cd8315fe2dc7641bea1c85a551b8e/application/domain-instance-vocabularies.xml#L270-L284 <https://github.com/cherryhill/sdmom-tenant-config/blob/a2f9f6b85b9cd8315fe2dc7641bea1c85a551b8e/application/domain-instance-vocabularies.xml#L270-L284> > > Reading through the chain of include files, it looks like the domain-instance-vocabularies.xml file is being pulled in here: > > https://github.com/collectionspace/application/blob/v4.2/tomcat-main/src/main/resources/defaults/base-instance-vocabularies.xml#L2 <https://github.com/collectionspace/application/blob/v4.2/tomcat-main/src/main/resources/defaults/base-instance-vocabularies.xml#L2> > > Perhaps because that is so early in the base-instance-vocabularies.xml file that the later definition of 'vocal-lostatus' are overriding it? > > https://github.com/collectionspace/application/blob/v4.2/tomcat-main/src/main/resources/defaults/base-instance-vocabularies.xml#L39-L54 <https://github.com/collectionspace/application/blob/v4.2/tomcat-main/src/main/resources/defaults/base-instance-vocabularies.xml#L39-L54> > > > Peter -- Peter Murray Dev/Ops Lead and Project Manager Cherry Hill Company