I have an XSL transformation which outputs HTML. In the head element I have a CSS file reference.
<link rel="stylesheet" type="text/css" href="css/styles.css"/>
I would like to create a standalone HTML result without external references and thus I would like to inline the CSS styles. To prevent code duplication, I do not want to hard code the styles into the XSL file, so I am looking for some XSL command to copy the file contents of the css file. I know xsl:include or xsl:import won't work, since they expect XSL files. Neither does
<xsl:copy-of select="document('css/styles.css')"/>
as it expects something XML compliant.
I also have some javascript function declarations which I would like to inline.
Is this possible with pure XSL or will I have to do some pre-processing of the XSL file (or post-processing of the HTML file)?