Created
March 30, 2012 11:41
-
-
Save breezhang/2250995 to your computer and use it in GitHub Desktop.
xslt import css file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[From] (http://stackoverflow.com/questions/1038101/how-to-inline-css-and-javascript-through-xsl) | |
You CSS file | |
<!--/*--><root><![CDATA[<!--*/--> | |
body | |
{ | |
margin: 0; | |
} | |
div > p | |
{ | |
background-color: yellow; | |
} | |
<!--/*-->]]></root><!--*/--> | |
XSL file | |
<style type="text/css"> | |
<xsl:value-of select="document('test.css')" disable-output-escaping="yes" /> | |
</style> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
XSLT 1.0, if you don't need to be too script about the CSS, you can use the following to make the CSS file