Subject: Re: [xsl] xslt breaks css with a <![CDATA[ <img/> ]]> tag! From: Steve <subsume@xxxxxxxxx> Date: Sat, 9 Sep 2006 10:29:23 -0400 |
One thing I encountered was the bleeding of attributes. Perhaps <img></img> will work?
It's really simple. I want to throw in arbitrary HTML in the XML data. Example: ---------------------------------------------------------------- <element><![CDATA[Name2 <img src="http://www.google.com/images/logo_sm.gif" height="20px" /> Name]]></element> ---------------------------------------------------------------- transformed with: ---------------------------------------------------------------- <div class="box"><xsl:value-of select="element" disable-output-escaping="yes"/></div> ---------------------------------------------------------------- Well, the image will display (good) but it seems to float:left (to the edge of the .element div) all the elements before it!!
The example is at: http://philblack.us/mark/flowchart/index.php compare with (in firefox) http://philblack.us/mark/flowchart/flow.xml
the index.php is nothing but: ---------------------------------------------------------------- <? $stylesheet = $basepath . "flow1.xsl"; $memofile=$basepath . "flow.xml"; $xmldoc = domxml_open_file($memofile); $xsldoc = domxml_xslt_stylesheet_file($stylesheet); $result = $xsldoc->process($xmldoc); echo $result->html_dump_mem(); ?> ----------------------------------------------------------------
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!!
You'll notice I've added 'boundary css' to show the aligning/spacing of it all. I've tried playing with the display:inline/block & position:static,relative,absolute. All to no avail.
Anyone see what I'm saying? Hopefully a solution is out there.
__________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] xslt breaks css with a <![CDA, mark wallace | Thread | Re: [xsl] xslt breaks css with a <!, David Carlisle |
Re: [xsl] xtvd grouping problem (I , Bob Portnell | Date | Re: [xsl] How expensive is //?, Mukul Gandhi |
Month |