KTH-Library / kthcorpus

R package to support workflows related to the corpus of publications from KTH
https://kth-library.github.io/kthcorpus
GNU Affero General Public License v3.0
0 stars 1 forks source link

Investigate fail for sid 85179583593 when generating MODS #152

Closed mskyttner closed 8 months ago

mskyttner commented 8 months ago

Does this indicate bad xml?

Quitting from lines 268-392 [unnamed-chunk-7] (mods.qmd)
Error in `read_xml.raw()`:
! Sequence ']]>' not allowed in content [62]
Backtrace:
 1. kthcorpus:::create_diva_modscollection(my_mods_ar)
 3. xml2:::read_xml.character(collection)
 4. xml2:::read_xml.raw(...)
Execution halted
Error in `processx::run(quarto_bin, args, echo = TRUE)`:
! System command 'quarto' failed
---
Exit status: 1
stdout & stderr: <printed>
---
Backtrace:
1. kthcorpus:::publish_qmd_report()
2. quarto::quarto_render(input = i, output_format = "html", execute_params = …
3. processx::run(quarto_bin, args, echo = TRUE)
4. processx:::throw(new_process_error(res, call = sys.call(), echo = echo, …
Execution halted
mskyttner commented 8 months ago

"In CDATA you cannot include the string ]]> (CDEnd)"

A string sequence "3/2$]]>" is inside an abstract which breaks the CDATA-section:

<abstract lang="eng"><![CDATA[In decaying magnetohydrodynamic (MHD) turbulence with a strong magnetic field, the spectral magnetic energy density is known to increase with time at small wavenumbers, provided the spectrum at low is sufficiently steep. This process is called inverse cascading and occurs for an initial Batchelor spectrum, where the magnetic energy per linear wavenumber interval increases like. For an initial Saffman spectrum that is proportional to, however, inverse cascading has not been found in the past. We study here the case of an intermediate spectrum, which may be relevant for magnetogenesis in the early Universe during the electroweak epoch. This case is not well understood in view of the standard Taylor expansion of the magnetic energy spectrum for small. Using high resolution MHD simulations, we show that, also in this case, there is inverse cascading with a strength just as expected from the conservation of the Hosking integral, which governs the decay of an initial Batchelor spectrum. Even for shallower spectra with spectral index 3/2$]]>, our simulations suggest a spectral increase at small with time proportional to. The critical spectral index of is related to the slope of the spectral envelope in the Hosking phenomenology. Our simulations with mesh points now suggest inverse cascading even for an initial Saffman spectrum.]]></abstract>

tidy_xml()-fcn should remove any such sequences