cioos-siooc / ckan

CKAN is an open-source DMS (data management system) for powering data hubs and data portals. CKAN makes it easy to publish, share and use data. It powers datahub.io, catalog.data.gov and europeandataportal.eu/data/en/dataset among many other sites.
http://ckan.org/
Other
2 stars 4 forks source link

Spacing / newlines in XML not coming through #148

Closed n-a-t-e closed 2 years ago

n-a-t-e commented 2 years ago

I wonder if theres anything that can be done to make spacing in text come through from XML files to CKAN.

Here's an example of an XML with spacing in the abstract, that all gets clumped together when displayed in CKAN:

https://catalogue.hakai.org/dataset/ca-cioos_71447a55-3eca-41b1-87ff-b8ef69314c4d

fostermh commented 2 years ago

abstract supports markdown in ckan it that helps? If not then I could look into replacing spaces with appropreit markdown or something during harvest.

A follow-up question is, for your example, how should it look? The xml file also seems to be one block of text when I look at it in the browser.

n-a-t-e commented 2 years ago

I also noticed this browser issue (both in chrome and firefox). Seems that you have to look at the XML file in a text editor to see how it's really formatted.

So it looks like to get a newline in markdown you need two spaces and a newline, or two newlines would work too. https://www.markdownguide.org/basic-syntax/#line-breaks

Example of XML with line breaks/bullet spacing - https://pac-dev1.cioos.org/dev/metadata/hakai/100_islands_research_program_t_71447.xml

fostermh commented 2 years ago

interestingly it appears that some of the formatting is making it into ckan however the multiple new lines are being striped and replaced by a single new line.

Screen Shot 2022-03-14 at 3 51 23 PM

fostermh commented 2 years ago

well that's confusing. spacing seems to work great on my local. Screen Shot 2022-03-14 at 7 31 27 PM

fostermh commented 2 years ago

updating production code and reharvesting seems to have fixed the issue.

fostermh commented 2 years ago

I think this issues is fixed. please reopen if it is not.