xsl-list
[Top] [All Lists]

Re: [xsl] xslt breaks css with a <![CDATA[ <img/> ]]> tag!

2006-09-09 12:28:50
Was this resolved?

One thing I encountered was the bleeding of attributes. Perhaps
<img></img> will work?

-S

On 9/9/06, mark wallace <fadingdust(_at_)yahoo(_dot_)com> wrote:
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

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>