Page Css with Xslt
This is an open discussion with 4 replies, filed under XSLT.
Search
Your <xsl:value-of... isn't text, so you need to close off the xsl:text element.
Try this instead: <![CDATA=[ body { background-image: url('uploads/]]><![CDATA=['); } ]]>
Well, that broke the forums... please ignore that post Manaus!
Edit: Try this instead: http://pastebin.com/baGsanMN
<style> body { background-image: url("uploads/<xsl:value-of select='data/detail/entry/sfondo/filename'/>"); } </style>
Try invert the quotes. I use this way and works... Also there's no need of <xsl:text>
for this approach.
Your first version is how I do it, but you need to terminate an restart the xsl:text before and after (respectively) the xsl:value-of
Create an account or sign in to comment.
Hello,
I'm trying to generate a dynamic css rule within the page, such as
But to no avail. Raises some error ("xslt:text content problem")... Thanks!