ChurchApps / FreeShow

FreeShow is a free and open-source, user-friendly presenter software.
https://freeshow.app
GNU General Public License v3.0
577 stars 89 forks source link

Importing OpenLyrics without result #422

Closed gyuris closed 8 months ago

gyuris commented 9 months ago

I try to import OpenLyrics XMLs (in bundles), but FreeShow (1.1.4) does nothing. I got only a "in progress..." popup but no success.

The files, which I try to import is: https://github.com/gyuris/aszaf/releases/download/v1.0.4/Aszaf.csomag.7z

I see that the importer is waiting XML source files. No idea what to do.

vassbo commented 9 months ago

The issue is due to the "< ?xml version="1.0" encoding="UTF-8"? >" at the start of each file. This will be fixed. But if you remove that line it will work.

gyuris commented 9 months ago

Thanks for the clarification! The import is successfully after removing processing instructions. Please refer to this bug in OpenLP. There can be stylesheet instructions too: Example:

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="stylesheets.css" type="text/css"?>
gyuris commented 8 months ago

A small comment to 7620c461a4911221f21714af62f8e4c724d2a802. This would be a more general solution.

while (xml.indexOf("<?xml") >= 0) {
  xml = xml.split("\n").slice(1, xml.split("\n").length).join("\n")
}
vassbo commented 8 months ago

I agree. Didn't think it was necessary, but will implement it.

gyuris commented 8 months ago

Thanks for fixing this issue. I will promote the next release when this fix is released. :-).