Bug #6145

Unnecessary spacing in EAD elements, and between elements, on EAD export

Added by Dan Gillean over 8 years ago. Updated about 7 years ago.

Status:VerifiedStart date:12/17/2013
Priority:MediumDue date:
Assignee:Mike Gale% Done:

0%

Category:EAD
Target version:Release 2.2.0
Google Code Legacy ID: Tested version:
Sponsored:No Requires documentation:

Description

From the RAD template - note the unnecessary space before the closing bracket on the first tag of the elements:

TITLE NOTES:
<odd type="titleVariation" ><p>Title notes: Variations in title</p></odd>
<odd type="titleAttributions" ><p>Title notes: Attributions and conjectures</p></odd>
<odd type="titleContinuation" ><p>Title notes: Continuation of title</p></odd>
<odd type="titleStatRep" ><p>Title notes: Statement of responsibility</p></odd>
<odd type="titleParallel" ><p>Title notes: Parallel titles and other title information</p></odd>
<odd type="titleSource" ><p>Title notes: Source of title proper</p></odd>

OTHER NOTES:
<odd type="physDesc" ><p>Other notes: Physical description (RAD 1.8B9)</p></odd>
<odd type="alphanumericDesignation" ><p>Other notes: Alpha-numerical designations (RAD 1.8B11)</p></odd>
<odd type="bibSeries" ><p>Other notes: Publisher's series </p></odd>

Additionally, I've noted that the spacing of our EAD export is very strange when viewed in a text editor. Examples include excessive spacing between elements throughout, or elements that are weirdly indented - for example, the <bioghist> element currently contains a <chronlist>, but the indentation is reversed, with the <bioghist> appearing far more indented than the <chronlist> and several other nested elements.

This reduces the human readability of the EAD output considerably, and makes it harder to search for errors or for particular information contained therein. To increase usability, it would be great to follow accepted best practices in XML structure and nesting during output, by cleaning up our export scripts to ensure a clean EAD output that is easy to read, nested appropriately, free of unnessary spaces, etc.

rad-sample-description;ead.xml Magnifier (7.91 KB) Dan Gillean, 12/17/2013 10:03 AM


Related issues

Related to Access to Memory (AtoM) - Bug #6141: General note <odd> dropped during XML import Verified 12/17/2013

History

#1 Updated by Jesús García Crespo over 7 years ago

  • Target version changed from Release 2.0.2 to Release 2.1.0

#2 Updated by Jesús García Crespo over 7 years ago

  • Target version changed from Release 2.1.0 to Release 2.2.0

#3 Updated by Sarah Romkey about 7 years ago

  • Target version deleted (Release 2.2.0)

#4 Updated by Mike Gale about 7 years ago

  • Status changed from New to Code Review
  • Assignee changed from Jesús García Crespo to José Raddaoui Marín

#5 Updated by José Raddaoui Marín about 7 years ago

Awesome! It looks great, thanks Mike.

Notes from Mike G. in the PR:

"This code will tidy up all the weird XML spacing issues in AtoM. We are already using this method for CLI bulk:export since Mike C refactored that code. I tested tidy_url() against a 20MB XML file and it only added on 3-4 seconds of processing time. I think this is a fair trade off; UI users will timeout if they are exporting files that large anyway, and on typical, smaller files the extra processing time is negligible.

This code also refactors tidy_xml to be a general helper function so we can use it across AtoM."

#6 Updated by José Raddaoui Marín about 7 years ago

  • Status changed from Code Review to In progress
  • Assignee changed from José Raddaoui Marín to Mike Gale

#7 Updated by Mike Gale about 7 years ago

  • Assignee changed from Mike Gale to Dan Gillean
  • Target version set to Release 2.3.0

Merged into qa/2.3.x. This was borderline for whether or not it's a new 'feature' or just fixing a bug... so I'll leave it up to Dan et all on whether or not we want to sneak this into 2.2 release :)

#8 Updated by Dan Gillean about 7 years ago

  • Assignee changed from Dan Gillean to Mike Gale
  • Target version changed from Release 2.3.0 to Release 2.2.0

Let's do it! 2.2!

#9 Updated by Mike Gale about 7 years ago

  • Status changed from In progress to QA/Review
  • Assignee changed from Mike Gale to Dan Gillean

merged in qa/2.2.x

#10 Updated by Dan Gillean about 7 years ago

  • Status changed from QA/Review to Verified
  • Assignee changed from Dan Gillean to Mike Gale

Nice. Tested via UI, and via export:bulk. So much better!

Also available in: Atom PDF