[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: xslt breaks css with a <![CDATA[ <img/> ]]> tag!
Remember that XSLT has no connection with CSS (or HTML or javascript or anything else used to render the page in the browser). The XSLT engine, whether iy is running on the server runs before the rendered document is processed by the page layout engine and that just renders what is there. <element><![CDATA[Name2 <img src="http://www.google.com/images/logo_sm.gif" height="20px" /> Name]]></element> If you have any control over your input it would be much better to have <element> src="http://www.google.com/images/logo_sm.gif" height="20px" /> </element> as the _only_ purpose f CDATA is to inform the processor that the <img is_not_ a tag, when clearly you want it to be processed as a tag. <div class="box"><xsl:value-of select="element" disable-output-escaping="yes"/></div> d-o-e is explictly an optional feature of xslt and a processor can igonre it. In particular most processors can not support it if they are outputting a result tree as a tree ratherthan a linearised document, as then the output escaping (if it ever happens at all is under the control f whatever application uses the tree. One notable system that always outputs as a DOM tree is the one in mozilla. > Well, what makes it all the more interesting is if you remove > the <img/> tag from the CDATA, oh look! it works like it > should!! If you rephrase that more acurately as "if you have an image tag rather tahn the character data < i m g then it includes an inage as expected. David
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|