xsltepub3

is it possible to put .xsl (which are XSLT) inside epub 3?


I mean that epub reader should apply the transform to show output. Anything I can found in internet does preprocessing before archiving epub.

I want to keep data in source and in the book exactly the same. I.e. If i exchange with epubs with someone, I should be able to restore the source code from these specifically created epubs (i.e. use them as texts packages like in a linux package manager, and be able to read ebooks as is at the same time)


Solution

  • You can put an XSLT file inside the EPUB container (as you can do with any file of any kind), but the reading applications are not required to actually act upon it, that is, to render it as you expect. In fact, the only two types of Content Documents allowed by the current EPUB 3 specification are XHTML and SVG.

    I do not know about any reading application that accepts an EPUB (3) file with XSLT files and renders them.