Add XSLT stylesheet for OPDS feeds

This commit is contained in:
Alex Cabal 2022-06-20 13:52:39 -05:00
parent 3b26e49509
commit 305a9d298b
10 changed files with 182 additions and 56 deletions

View file

@ -86,6 +86,10 @@ class OpdsFeed{
file_put_contents($parentFilepath, str_replace(" ns=", " xmlns=", $xmlString));
// If we include this stylsheet declaration in the OPDS template, `se clean` will remove it and also
// add a bunch of empty namespaces in the output. So, add it programatically here instead.
file_put_contents($tempFilename, str_replace("?>", "?>\n<?xml-stylesheet href=\"/opds/style\" type=\"text/xsl\"?>", file_get_contents($tempFilename)));
rename($tempFilename, $path);
}
else{