XML Import: <p> tags in <biogHist>

55 views
Skip to first unread message

Abraham Lam

unread,
Jul 13, 2021, 4:50:22 PM7/13/21
to AtoM Users
Hi,

I noticed the <p> tags in <biogHist> get dropped during the XML Import. Is this intentional? I thought the <p> tags are accepted in the EAC record.

Here's the XML file in question for reference:

Thank you.

Dan Gillean

unread,
Jul 22, 2021, 10:14:23 AM7/22/21
to ICA-AtoM Users
Hi Abraham, 

Sorry for the delay in replying. I've tried importing your file into AtoM - as far as I can tell, the paragraph tags are being respected on import, but may not be leading to the outcome you are hoping for?

bioghist-p-elements.png

First, AtoM will not maintain in-line elements (such as the <p> element) in the saved text of the description upon import - so you won't see <p> tags if you enter edit mode and look at the imported text in the history field. 

Second, I am guessing that perhaps you were hoping for an additional carriage return  / line break here, to make the space between paragraphs more apparent? There may be a way to locally alter AtoM's import code to do this - I'm not sure, but I can ask if it would help you with future imports. 

Cheers, 

Dan Gillean, MAS, MLIS
AtoM Program Manager
Artefactual Systems, Inc.
604-527-2056
@accesstomemory
he / him


--
You received this message because you are subscribed to the Google Groups "AtoM Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ica-atom-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ica-atom-users/bbebebc0-9980-495e-bd65-5416f549e817n%40googlegroups.com.

Abraham Lam

unread,
Jul 22, 2021, 11:15:18 AM7/22/21
to AtoM Users
Hi Dan,

No worries. Thank you for getting back to me.

I assume there isn't a setting in AtoM to preserve the <p> tag during import. Will it be available in future version?

Yes, if there's a way to add additional carriage return or line break for the paragraphs during import that would be great.

Thank you again.

Abraham

Dan Gillean

unread,
Jul 23, 2021, 2:07:59 PM7/23/21
to ICA-AtoM Users
I assume there isn't a setting in AtoM to preserve the <p> tag during import. Will it be available in future version?

Unfortunately, there is no setting, and there are not currently any plans for such a feature. If anything, we've been moving in the opposite direction. Because AtoM includes a number of web-based forms, user added content that can be interpreted as HTML was previously breaking form layout when people tried to format the text in various ways. I think if you try manually adding a <p> tag to an AtoM field now, it will behave much as this email / forum post will - it will display as raw input, rather than trying to render the content now. So if we were to have such a setting in the future, then your paragraph tags would be visible to users without further work to attempt to identify and hide them on the fly. 

We did go down that road previously with the extent and medium field, allowing supported EAD 2002 nested extent elements to be imported, and remain hidden in the user interface on import, as a way of trying to reconcile the structured data options available in EAD 2002 for this data against the single field approach in AtoM, based on the loose requirements of ISAD(G). It was a bit of a nightmare to maintain, and caused all sorts of unexpected knock-off effects that would make me personally wary to go down that route again. Ultimately, AtoM is a database-driven web application for archival management that can support basic XML import and export, not an XML focused application or authoring and management tool. 

To help address formatting requests, we did also add markdown support - plus there are some long-standing helpers in the fields, so manually adding 2 carriage returns should on save properly render. We could in the future extend our XML support by trying to translate markdown formatting for emphasis (strong; italics; etc) into equivalent formatting elements in the EAD or EAC generated on export, and vice versa. I believe at present there are a few elements supported like this on import, but not export, so development would be required to pursue this further. 

In the meantime, I only have a partial answer for you so far, but it does seem that there is some generic code that attempts to deal with elements such as <p> on import, and convert it.... into two newlines! See: 
I'm yet not sure why this isn't doing what's expected in the EAC bioghist element - it could be that there isn't currently code specifically looking for <p> in <bioghist>, or a bug, etc. I'll have to see if we can dig any farther. 

In the meantime, you could try changing line #487 in that file from "\n\n" to something like "\n\n\n" to see if it makes a difference? I would be curious to hear the result!

Cheers, 
 
Dan Gillean, MAS, MLIS
AtoM Program Manager
Artefactual Systems, Inc.
604-527-2056
@accesstomemory
he / him

Reply all
Reply to author
Forward
0 new messages