Creating new nodes in the XML Form Builder

79 views
Skip to first unread message

Bolam, Michael R

unread,
Apr 27, 2017, 1:58:18 PM4/27/17
to isla...@googlegroups.com

Hello!

 

We have a use case in the XML Form Builder that I have not been able to accommodate.

 

The basic idea is that we would like to create new nodes within a repeatable element. We’re using a locally modified version of the FSU Full MODS form (https://github.com/Islandora-Labs/islandora_ingest_forms/blob/master/MODS/FSU%20Full%20MODS%20form.xml).

 

For our case, we’d like to be able to create new mods:notes elements within mods:relatedItem. The “read” component is able to add repeating mods:notes, with the proper @type. We are also able to “update” the metadata within those elements. The problem is that I cannot “create” a new mods:note and @type within the repeatable mods:relatedItem section. Switching to Form Builder speak, I think that I want to make a tabs/tabpanel inside of another tabs/tabpanel, but when I’ve attempted to do that, the parent tabs/tabpanel no longer renders in the form. From what I can tell, using the “tags” is not an option here, because we need to be able to set the mods:note/@type. 

 

We are collecting container and series information for digitized archival materials using mods:notes with local “@type”. For most cases, we are able to capture this information from an XSLT transformation on the finding aid. There is one collection that was digitized long before we had the current workflow in place. We have not captured the container or series information for these objects. We’d like to have our archives staff enter the proper metadata using the form for these objects. I have come up with a less elegant solution, where I’ve created standalone elements for each of these fields. “Behind the scenes” the form properly encodes the notes for each of these elements. I am curious is anyone has been able to create a repeating element within another repeating element using form builder, allowing me to avoid having these outlier elements?  

 

I’m happy to send along a copy of our MODS XML Form and take screen captures, if it would be helpful to understand our issue.

 

Thanks,

Mike

 

--

Michael Bolam

Metadata Librarian

Digital Scholarship Services

University Library System

University of Pittsburgh

Schedule an appointment with me

 

dp...@metro.org

unread,
Apr 27, 2017, 4:01:30 PM4/27/17
to islandora
Hi Mike, I got a bit confused on what you need and how the  “read” component is able to add repeating element? So, if possible, a piece (just the relevant relatedItems and notes part) of that failing form would be helpful. Screenshots and a demo XML of what your form should generate even better.
Tabs inside tabs is tricky and won't work probably as expected. But, using direct XML snippets instead of element and a mix of parent references should do the trick. If not, there is always possible to extend and create on your own module a specific for this purpose XML forms Form element that encapsulates the needed functionality, but I'm kinda confident that most of the existing tools should be enough (hopefully)


Best

Diego Pino N
Metro.org

Bolam, Michael R

unread,
Apr 28, 2017, 11:06:18 AM4/28/17
to isla...@googlegroups.com

Thanks Diego,

 

Here’s an example MODS snippet for the section we’d like to update –

[…]

<mods:relatedItem type="series">
    
<mods:titleInfo>
         
<mods:title>Archival Collection of Dick Thornburgh, 1932-(ongoing), AIS 98:30. Series 16, Sub-Series 02.</mods:title>
    
</mods:titleInfo>
    
<mods:identifier type="local-asc">AIS.1998.30</mods:identifier>
    
<mods:originInfo>
         
<mods:dateCreated>1932-</mods:dateCreated>
    
</mods:originInfo>
    
<mods:note type="ownership">ULS Archives Service Center</mods:note>
    
<mods:note type="prefercite">Dick Thornburgh Papers, 1932- , AIS.1998.30, Archives Service Center, University of Pittsburgh</mods:note>
 
</mods:relatedItem>

[…]

 

Here’s how’d we’d like it to look after, with the added elements highlighted in blue –

[…]

<mods:relatedItem type="series">
    
<mods:titleInfo>
         
<mods:title>Archival Collection of Dick Thornburgh<mods:title>
    
</mods:titleInfo>
    
<mods:identifier type="local-asc">AIS.1998.30</mods:identifier>
    
<mods:originInfo>
         
<mods:dateCreated>1932-</mods:dateCreated>
    
</mods:originInfo>
   
<mods:note type="container">Box 22, Folder 20</mods:note>
    
<mods:note type="series">16</mods:note>
    
<mods:note type="subseries">02</mods:note>
    
<mods:note type="ownership">ULS Archives Service Center</mods:note>
    
<mods:note type="prefercite">Dick Thornburgh Papers, 1932- , AIS.1998.30, Archives Service Center, University of Pittsburgh</mods:note>
 
</mods:relatedItem>

 

I’ve also attached some screen captures –

1.       Current form showing the mods:relatedItem/notes elements. The “add” button at the bottom will create a new mods:relatedItem tab. I’m hoping to have an “add” button that will just create a new mods:note and @type within mods:relatedItem

2.       Current Form Builder showing the mods:relatedItem/notes elements.

3.       My “not very elegant/brute force” method on getting these elements to work. The first is the form, showing the elements in action.

4.       Here’s the Form Builder version of the same thing as above.

 

As it turns out, I don’t have a version of the broken “tabs inside of tabs” version. I must have just scrapped it in a wave of frustration or something. I’m sure I could recreate it if you think it would be worthwhile?

 

Mike

--
For more information about using this group, please read our Listserv Guidelines: http://islandora.ca/content/welcome-islandora-listserv
---
You received this message because you are subscribed to the Google Groups "islandora" group.
To unsubscribe from this group and stop receiving emails from it, send an email to islandora+...@googlegroups.com.
Visit this group at https://groups.google.com/group/islandora.
To view this discussion on the web visit https://groups.google.com/d/msgid/islandora/6ca8a558-698a-46da-be64-1ebfb97b22d7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

current_form_relatedItem_notes.JPG
formBuilder_with_hardcoded_notes_for_containers.JPG
current_formBuilder_relatedItem_notes.JPG
form_with_hardcoded_notes_for_containers.JPG

dp...@metro.org

unread,
Apr 28, 2017, 12:12:42 PM4/28/17
to islandora
Hi Mike, ok, will give this a look during the weekend

Cheers

Brian D. Gregg

unread,
May 4, 2017, 11:58:32 AM5/4/17
to isla...@googlegroups.com

Diego,

 

Just checking on this if you've had a chance to look at it for Mike?  It's kind of a blocker here as our work around is def. not optimal going forward.

 

Thanks,

-Brian

 

Brian D. Gregg

Solutions Architect

University of Pittsburgh | University Library System

Address: 7500 Thomas Blvd.  Room 129 Pittsburgh, PA 15208

Tel: (412) 648-3264 | Email: bdg...@pitt.edu | Fax: (412) 648-3585

https://orcid.org/0000-0001-6541-4544

Brandon Weigel

unread,
May 4, 2017, 1:29:08 PM5/4/17
to islandora
Alternatively, tags might work for you - although the textfield is small and I'm not sure about the character limit. Worth a try.

dp...@metro.org

unread,
May 5, 2017, 9:39:01 AM5/5/17
to islandora
I´m on it Brian. Got stuck on other developments. Will write you later today.

Diego

dp...@metro.org

unread,
May 8, 2017, 11:15:51 AM5/8/17
to islandora
Ok, my days are 72 hours long so writing you today (shame). I have some solutions, ideas, but will share that piece of XML form only if possible. I also have some questions. Wondering if you would have some time to chat tomorrow? On IRC? or any other mean to explain myself? Entering some meetings now, so will update with xml after that. Sorry again for the delay, I'm way overcommitted this weeks.

Diego

Brian D. Gregg

unread,
May 8, 2017, 2:20:00 PM5/8/17
to isla...@googlegroups.com, Gillingham Brian, Bolam, Michael R

Diego,

 

No problem.   The persons involved here (I've cc'd them here to flag them) are Mike Bolam and Brian Gillingham.  Either or both of them would be the persons here to talk with about this problem as they are working closer with the issue we are having.    You can contact me offline at bdg...@pitt.edu if you need, and I can get you in contact with Mike and Brian.

 

Thanks for spending some time on this, it is truly appreciated.

-Brian.

Bolam, Michael R

unread,
May 8, 2017, 4:07:20 PM5/8/17
to Brian D. Gregg, isla...@googlegroups.com, Gillingham Brian

Hi Diego,

 

I should available just about any time tomorrow. I’m not a regular IRC user, but I can get in via the webchat. I’ll probably be there as mbolam, and can look for you, if you give me some times that would work for you. Alternatively, I can log in tomorrow morning and leave it running in the background until you’re ready for the chat.

 

Mike

dp...@metro.org

unread,
May 8, 2017, 4:46:34 PM5/8/17
to islandora
Hi,

This piece of XML (hopethishelps.xml) form should serve as an example, I hope I did understand what you wanted. I haven't tested it 110% but it does create read and update elements and attributes in that multi inside multi scenario you selected. Tested with Virtual Machine 7.x-1.9, on Form editor and associated to MODS and a CMODEL on real object. Not sure about the FSU schema hidden field thing so I left it there. Also, would need some finer tuning, adding missing @type options, etc since it is just a demo (not even title elements!). But It does multi tab relatedItems and multi notes inside that. 

Lastly: There is an issue with this idea that I would like to make sure is clear. MODS does not encourage (kinda does not allow) to have duplicated notes with same @type or duplicated relatedItems with same @type. There is no way you can limit XML forms to Uniqueness without a custom form validator or a custom XSLT clean up transformation that could eventually strip elements. That is not an issue with XML forms Form elements  or this form in particular, but the way we are dealing with */not dealing /schema correctness. So this form or any solution like this would allow people to create eventually incorrect MODS or force you to run a possible "use only the first element that matches a selection" type of XLST cleanup, which will for sure not discern which one is better and should be kept in a duplicated elements/type combo scenario

Cheers!

Diego Pino N










On Thursday, April 27, 2017 at 1:58:18 PM UTC-4, Mike Bolam wrote:
hopethishelps.xml

Bolam, Michael R

unread,
May 8, 2017, 4:58:13 PM5/8/17
to isla...@googlegroups.com

Hi Diego,

 

This looks like it should do what we want it to do. I’ll take it for a test run and then see about incorporating it into my form tomorrow.

 

Mike

 

From: isla...@googlegroups.com [mailto:isla...@googlegroups.com] On Behalf Of dp...@metro.org


Sent: Monday, May 08, 2017 4:47 PM
To: islandora <isla...@googlegroups.com>

--

For more information about using this group, please read our Listserv Guidelines: http://islandora.ca/content/welcome-islandora-listserv
---
You received this message because you are subscribed to the Google Groups "islandora" group.
To unsubscribe from this group and stop receiving emails from it, send an email to islandora+...@googlegroups.com.
Visit this group at https://groups.google.com/group/islandora.

dp...@metro.org

unread,
May 9, 2017, 9:41:52 AM5/9/17
to islandora
Hi, ok, ping me if you need any further help or something Does not work/does not make sense in that xml form.

Cheers

Diego Pino N
Reply all
Reply to author
Forward
0 new messages