podsync icon indicating copy to clipboard operation
podsync copied to clipboard

Add xsl stylesheet to xml files

Open Rpsl opened this issue 5 years ago • 3 comments

See example


For use stylesheet need add tag inside xml file:

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="./feed-stylesheet.xsl"?>    <------ that tag
<rss version="2.0" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd">
  <channel>
  ...

I looked at the mxpv/podcast packages, that need refactoring for implementation the stylesheet feature. They look outdated.

Do you want merge some updates into https://github.com/mxpv/podcast and i make refactoring after that?

Rpsl avatar Feb 03 '20 13:02 Rpsl

We probably want to get rid of the fork and go back to the reference implementation

mxpv avatar Feb 08 '20 22:02 mxpv

62b64b689e29828b0f717b4fd4f460ae4c9fe50a

mxpv avatar Mar 08 '20 01:03 mxpv

just for history.

i was try to patch podcast packages but it need to make craphack over internal api or making complexity refactoring.

at now i just create bash script for patching existing xml files. it looks bad but it work and i was spend about 5 minutes. may be sometime i found motivation for do it the righ way.

grep -L "xml-stylesheet" ./data/*.xml | xargs sed -i 's/<?xml version="1.0" encoding="UTF-8"?>/<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text\/xsl" href=".\/feed-stylesheet.xsl"?>/g'

Rpsl avatar Oct 17 '21 16:10 Rpsl