Problem/Motivation
Currently a number EAD tags get stripped (including the contents inside the tag) from the view in Drupal because they're XML tags not HTML. The 'title' one is is a tag that is causing particular issue for us.
Steps to reproduce
To reproduce you'd have to have an ArchvicesSpace note, such as a Subnote with content that includes one or more title elements (e.g. Something here). Then when you migrate the content, you'll see in Drupal it won't show the title element in the display, but you can see it when you edit the field.
Proposed resolution
I propose we add code to support the title tag and render attribute.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | archivesspace-title-ead-tag-3549869-3.patch | 3.44 KB | cao89 |
Issue fork archivesspace-3549869
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
cao89 commentedI added a function that transforms all the title elements found in the value of an ArchivesSpace note. I used https://www.loc.gov/ead/tglib/elements/title.html to determine what render attributes to support. I got it supporting all the "render" attribute values except for altrender because I was unable to figure out what that was and how it should transform to HTML.
It's kind of a lot of code for just one element and I was unsure how to support other attribute values. We really need like a full EAD to HTML library, but I have a specific need for title to be supported so I thought I'd create a ticket and branch and start the conversation. Any thoughts on how this should be handled?
Comment #3
cao89 commentedOops, sorry, accidentally added a render case I didn't mean to. I removed it from my forked branch and the patch.
Comment #7
seth.e.shaw commented