XML-stylesheet in XSL variant

We current have a couple of RSS feeds being generated by our 6.5.2 Rhythmyx installation, using XSL variants to build a .xml Page.

I’ve had a number of request from our customers to put a CSS stylesheet on the xml output so it is readable without an RSS agregator (and in old browsers)

In my test version I have been using <?xml-stylesheet href=“rss.css” type=“test/css” ?> just before the <rss> tag in the .xml file

This works great - however when I tell Rhythmyx to output the same it either … doesnt(ignores it) or generates an error that the xml is invalid

I’ve tried using <![CDATA[ ]]> tags and it isnt happy with that either, does anyone have any ideas how I could go about adding this tag into the XSL stylsheet that produces the final xml page

thanks

Phil

Have you tried using CDATA to try to escape it?


<!-- begin XSL -->
<xsl:text disable-output-escaping="yes"><![CDATA[<tagRXtoignore>]]></xsl:text>
<!-- end XSL -->

Sadly CDATA didnt seem to work (generates an XML error infact)

Having had a look round the net is seems to be an XSL issue rather than a Rhythmyx one (that you cant easily embed XML command into XSL)
Anyhows… I found something that works so posting it here incase others want it.


<xsl:processing-instruction name="xml-stylesheet">type="text/css" href="rss.css"</xsl:processing-instruction>

Produces


<?xml-stylesheet type="text/css" href="rss.css" ?>