talk@lists.collectionspace.org

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

View all threads

Add a field in an existing <repeat> (using overlay)

SB
Sébastien Brossard
Fri, Aug 10, 2012 2:59 PM

Still trying to insert the StructuredSMKDate field to the existing textualInscriptionGroupList/textualInscriptionGroup, which is declared as a <repeat> group (see "Add a field in an existing <repeat> (using xmlmerge)"  for more details).

The service is declared the same way as in the xmlmerge try.

This time I used the overlay method. I created the following domain-collectionobject.xml in my application tenant:

<root> <services-record-path id="smk">collectionobjects_smk:http://collectionspace.org/services/collectionobject/local/smk,collectionobjects_smk</services-record-path>
   <section id="domaindata">
<section id="textualInscriptionInformation"> <repeat id="textualInscriptionGroupList/textualInscriptionGroup">

<group id="textualSMKDateGroup" ui-type="groupfield/structureddateSMK" primarykey="dateSMKDisplayText" ui-func="cspace.structuredDateSMK">

                                        <services-tag>textualInscriptionGroupList/textualInscriptionGroup</services-tag>
                                        <selector>object-description-inscription-content-date-smk</selector>
                  <field id="dateSMKDisplayText" section="smk"/>
                                        <field id="dateSMKDateDay" section="smk"/>
                                        <field id="dateSMKDateMonth" section="smk"/>                                                                                                                                            <field id="dateSMKDateYear" section="smk"/>
                                        <field id="dateSMKEraSelector" section="smk"/>
                                        <field id="dateSMKSecondDateDay" section="smk"/>
                                        <field id="dateSMKSecondDateMonth" section="smk"/>
                                        <field id="dateSMKSecondDateYear" section="smk"/>
                                        <field id="dateSMKSecondEraSelector" section="smk"/>
                                        <field id="dateSMKThirdDateDay" section="smk"/>
                                        <field id="dateSMKThirdDateMonth" section="smk"/>                                                                                                                                    <field id="dateSMKThirdDateYear" section="smk"/>
                                        <field id="dateSMKThirdEraSelector" section="smk"/>
                                        <field id="dateSMKSegmentSelector" section="smk"/>
                                        <field id="dateSMKTypeSelector" section="smk"/>
                                        <field id="scalarValuesComputed" ui-search="false" section="smk"/>

                         </group>
     </repeat>
</section>
    </section>
</root>

This time the interface looks OK.

But when I try to save, I've got an error message complaining about the <service-tag> that should'nt contain a "/".

So I removed the  <service-tag>, and added two section = "smk":

<root> <services-record-path id="smk">collectionobjects_smk:http://collectionspace.org/services/collectionobject/local/smk,collectionobjects_smk</services-record-path>
   <section id="domaindata">
<section id="textualInscriptionInformation"> <repeat id="textualInscriptionGroupList/textualInscriptionGroup" section="smk"/> <group id="textualSMKDateGroup" ui-type="groupfield/structureddateSMK" primarykey="dateSMKDisplayText" ui-func="cspace.structuredDateSMK" section="smk"/>
                                        <selector>object-description-inscription-content-date-smk</selector>
                  <field id="dateSMKDisplayText" section="smk"/>
                                        <field id="dateSMKDateDay" section="smk"/>
                                        <field id="dateSMKDateMonth" section="smk"/>                                                                                                                                            <field id="dateSMKDateYear" section="smk"/>
                                        <field id="dateSMKEraSelector" section="smk"/>
                                        <field id="dateSMKSecondDateDay" section="smk"/>
                                        <field id="dateSMKSecondDateMonth" section="smk"/>
                                        <field id="dateSMKSecondDateYear" section="smk"/>
                                        <field id="dateSMKSecondEraSelector" section="smk"/>
                                        <field id="dateSMKThirdDateDay" section="smk"/>
                                        <field id="dateSMKThirdDateMonth" section="smk"/>                                                                                                                                    <field id="dateSMKThirdDateYear" section="smk"/>
                                        <field id="dateSMKThirdEraSelector" section="smk"/>
                                        <field id="dateSMKSegmentSelector" section="smk"/>
                                        <field id="dateSMKTypeSelector" section="smk"/>
                                        <field id="scalarValuesComputed" ui-search="false" section="smk"/>

                         </group>
     </repeat>
</section>
    </section>
</root>

This time, it worked and saved my value but... in the Cataloging UI, I had now two Textual Inscription groups !!!

Looking at the xml of the GET packet, I think the first Textual Inscription group comes from the <textualInscriptionGroupList><textualInscriptionGroup>  declared in my ns2:collectionobjects_smk,  and the other one from  ns2:collectionobjects_commons.

I've you got any idea how to sort that out?
As for me I hope the weekend rest will help...

Have a nice weekend, and by advance thanks for your help.

Best regards,
Sébastien

Sébastien Brossard
IT-Udvikler
sebastien.brossard@smk.dkmailto:3sebastien.brossard@smk.dkT
Tmailto:3sebastien.brossard@smk.dkT +45 3374 8483

Statens Museum for Kunst
Sølvgade 48-50
DK-1307 København K

T +45 3374 8494
F +45 3374 8404
smk.dkhttp://smk.dk/

[Beskrivelse: Logo_mail]

Still trying to insert the StructuredSMKDate field to the existing textualInscriptionGroupList/textualInscriptionGroup, which is declared as a <repeat> group (see "Add a field in an existing <repeat> (using xmlmerge)" for more details). The service is declared the same way as in the xmlmerge try. This time I used the overlay method. I created the following domain-collectionobject.xml in my application tenant: <root> <services-record-path id="smk">collectionobjects_smk:http://collectionspace.org/services/collectionobject/local/smk,collectionobjects_smk</services-record-path> <section id="domaindata"> <section id="textualInscriptionInformation"> <repeat id="textualInscriptionGroupList/textualInscriptionGroup"> <group id="textualSMKDateGroup" ui-type="groupfield/structureddateSMK" primarykey="dateSMKDisplayText" ui-func="cspace.structuredDateSMK"> <services-tag>textualInscriptionGroupList/textualInscriptionGroup</services-tag> <selector>object-description-inscription-content-date-smk</selector> <field id="dateSMKDisplayText" section="smk"/> <field id="dateSMKDateDay" section="smk"/> <field id="dateSMKDateMonth" section="smk"/> <field id="dateSMKDateYear" section="smk"/> <field id="dateSMKEraSelector" section="smk"/> <field id="dateSMKSecondDateDay" section="smk"/> <field id="dateSMKSecondDateMonth" section="smk"/> <field id="dateSMKSecondDateYear" section="smk"/> <field id="dateSMKSecondEraSelector" section="smk"/> <field id="dateSMKThirdDateDay" section="smk"/> <field id="dateSMKThirdDateMonth" section="smk"/> <field id="dateSMKThirdDateYear" section="smk"/> <field id="dateSMKThirdEraSelector" section="smk"/> <field id="dateSMKSegmentSelector" section="smk"/> <field id="dateSMKTypeSelector" section="smk"/> <field id="scalarValuesComputed" ui-search="false" section="smk"/> </group> </repeat> </section> </section> </root> This time the interface looks OK. But when I try to save, I've got an error message complaining about the <service-tag> that should'nt contain a "/". So I removed the <service-tag>, and added two section = "smk": <root> <services-record-path id="smk">collectionobjects_smk:http://collectionspace.org/services/collectionobject/local/smk,collectionobjects_smk</services-record-path> <section id="domaindata"> <section id="textualInscriptionInformation"> <repeat id="textualInscriptionGroupList/textualInscriptionGroup" section="smk"/> <group id="textualSMKDateGroup" ui-type="groupfield/structureddateSMK" primarykey="dateSMKDisplayText" ui-func="cspace.structuredDateSMK" section="smk"/> <selector>object-description-inscription-content-date-smk</selector> <field id="dateSMKDisplayText" section="smk"/> <field id="dateSMKDateDay" section="smk"/> <field id="dateSMKDateMonth" section="smk"/> <field id="dateSMKDateYear" section="smk"/> <field id="dateSMKEraSelector" section="smk"/> <field id="dateSMKSecondDateDay" section="smk"/> <field id="dateSMKSecondDateMonth" section="smk"/> <field id="dateSMKSecondDateYear" section="smk"/> <field id="dateSMKSecondEraSelector" section="smk"/> <field id="dateSMKThirdDateDay" section="smk"/> <field id="dateSMKThirdDateMonth" section="smk"/> <field id="dateSMKThirdDateYear" section="smk"/> <field id="dateSMKThirdEraSelector" section="smk"/> <field id="dateSMKSegmentSelector" section="smk"/> <field id="dateSMKTypeSelector" section="smk"/> <field id="scalarValuesComputed" ui-search="false" section="smk"/> </group> </repeat> </section> </section> </root> This time, it worked and saved my value but... in the Cataloging UI, I had now two Textual Inscription groups !!! Looking at the xml of the GET packet, I think the first Textual Inscription group comes from the <textualInscriptionGroupList><textualInscriptionGroup> declared in my <ns2:collectionobjects_smk>, and the other one from <ns2:collectionobjects_commons>. I've you got any idea how to sort that out? As for me I hope the weekend rest will help... Have a nice weekend, and by advance thanks for your help. Best regards, Sébastien Sébastien Brossard IT-Udvikler sebastien.brossard@smk.dk<mailto:3sebastien.brossard@smk.dkT> T<mailto:3sebastien.brossard@smk.dkT> +45 3374 8483 Statens Museum for Kunst Sølvgade 48-50 DK-1307 København K T +45 3374 8494 F +45 3374 8404 smk.dk<http://smk.dk/> [Beskrivelse: Logo_mail]